Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

dtsearchfreemessages(3) [hpux man page]

DtSearchMessages(library call)											    DtSearchMessages(library call)

NAME
DtSearchMessages -- Access and manipulate messages on the DtSearch MessageList SYNOPSIS
#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 provide a user with 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. DtSearchHasMessages returns zero if the MessageList is empty, and returns nonzero if there are any information or error messages currently on the MessageList. 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 mes- sages). 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. 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
DtSrAPI(3) DtSearchMessages(library call)

Check Out this Related Man Page

DtSearchHighlight(library call) 										   DtSearchHighlight(library call)

NAME
DtSearchHighlight -- Generate DtSrHitwords table for highlighting DtSearch document SYNOPSIS
#include <Dt/Search.h> intDtSearchHighlight( char *dbname, char *cleartext, DtSrHitword **hitwptr, long *hitwcount, int search_type, char *stems, int stemcount); DESCRIPTION
The DtSearchHighlight function generates an array of offsets and lengths (DtSrHitword) of parsed linguistic terms (stems) in the passed document cleartext to enable a browser to highlight the words in the text as appropriate for its user interface. ARGUMENTS
dbname Specifies which database is to be searched. It is any one of the database name strings returned from DtSearchInit or DtSearchReinit. If dbname is NULL, the first database name string is used. cleartext Pointer to a zero terminated C string containing the document text to be highlighted. Usually, but not necessarily, this value is returned from DtSearchRetrieve. hitwptr and hitwcount The hitwords array will be stored in hitwptr, the address of a DtSrHitword pointer. The array is dynamically allocated by this function and remains valid until the next call to this function. The size of the hitwords array will be stored in hitwcount. search_type Specifies the search_type of the DtSearchQuery that generated the stems array. It must be zero, 'P', 'W', or 'S'. If zero is passed, the search_type of the last call to DtSearchQuery is assumed. stems and stemcount stems and stemcount are optional; they can be NULL and zero respectively. However, if either is specified, both must be speci- fied. If specified, they refer to the stems array that was returned from the previous call to DtSearchQuery that ultimately resulted in the cleartext argument. If these arguments are not passed, the stems array from the most recent call to DtSearchQuery is assumed. RETURN VALUE
This function returns DtSrOK, as well as a DtSrHitword table, when the table generation is completely successful. Any other return code signifies failure and user messages on the MessageList explain why. Any API function can also return DtSrREINIT and the return codes for fatal engine errors at any time. SEE ALSO
DtSrAPI(3), DtSearchQuery(3), DtSearchRetrieve(3) DtSearchHighlight(library call)
Man Page