DTSEARCHGETMESSAGES(3)

πŸ“¦
version 2.5.3 Β· 2 versions
, in nixos 26.05

πŸ’– DtSearchMessages πŸ’–

okay so bestie, welcome to this library call page. It’s literally the whole MessageList crew: DtSearchHasMessages, DtSearchAddMessage, DtSearchGetMessages, and DtSearchFreeMessages. Error-message group chat energy, no cap. 🫢

✨ NAME ✨

DtSearchMessages β€” access and manipulate messages on the DtSearch MessageList. Manual-name check: it’s a library call, periodt. πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

Here’s the synopsis, copied exactly β€” no edits, no vibes-based autocomplete, bestie:

#include &<Dt/Search.h>
int DtSearchHasMessages(
,
void DtSearchAddMessage(
const char *msg,
char *DtSearchGetMessages(
,
void DtSearchFreeMessages(
);

🌸 DESCRIPTION 🌸

The DtSearch online search engine may assemble detailed user messages to explain various errors and failures. These messages are designed to give a user enough information to correct the error. Often more than one message is assembled onto the MessageList as the result of a single API call. The calling code may also append messages to the MessageList prior to display to the user. All messages remain on the MessageList, and new messages are appended to the preexisting list until the list is specifically freed by the calling code.

πŸ’€ Big vibe check: messages stay on the MessageList until the calling code specifically frees the list. They are not quietly ghosting on their own.
  • DtSearchHasMessages β€” returns zero if the MessageList is empty, and returns nonzero if there are any information or error messages currently on the MessageList. Basically: empty list = 0, any messages = not 0.
  • DtSearchAddMessage β€” appends a message to the end of the MessageList. A message is defined as a zero-terminated C string.
  • DtSearchGetMessages β€” returns a static text buffer containing all current messages on the MessageList. The messages are returned as a single flat, zero-terminated C string, with two ASCII linefeed characters between messages (giving the appearance of a blank line between messages). It is expected that the calling code will display the text in a message dialog box or its equivalent. The returned buffer address is valid until the next call. If the MessageList is currently empty, this function returns a pointer to an empty string.
🚨 Another vibe check: that returned buffer address is valid until the next call β€” that’s the whole lifespan. Do not stash it for later, bestie.
  • DtSearchFreeMessages β€” clears all messages on the MessageList. It is usually called after the user has dismissed a dialog box displaying the current messages.

πŸ¦‹ SEE ALSO πŸ¦‹

kisses and clean exits, bestie πŸ’œ β€” footer readout: DtSearchMessages(library call). The original didn’t hand me a date, so that’s the whole footer; no date to spill. πŸŽ€

πŸ“¦ where this page comes from