Gets the text corresponding to the specified item in a choice list
| Call | ||
| #include <vv_clist.h> | ||
| int cli_numtxt(bufstp, item_num, clistp) | ||
|
UCHAR *bufstp |
String buffer to copy the text to |
|
| int item_num | Number of the item to get text for | |
| CLISTPTR clistp | Choice list to operate on | |
| Returns | ||
| 1 | The item was found and transferred to the specified buffer | |
| 0 | Error. VV_ERR is set to one of the following: | |
| KWDNOTFOUND
ERRREAD FILETOOBIG |
The keyword marking the choice list was not found in the memory file.
An error occurred while trying to read the memory file. The keyworded section used by the choice list is too large to fit in the memory file. |
|
| Description
cli_numtxt() first calls mf_kwdset() to set the memory file to operate within the section marked by the choice list's keyword. The specified line in that section of the memory file is copied to the specified buffer. If the specified line is empty, a null terminator '\0' is placed at the beginning of the buffer. At most, the number of characters in the highlight bar, plus a null terminator '\0', are copied. If a keyword was set prior to calling this function, the memory file is restored so that it operates on the keyworded section that was active when cli_numtxt() was called. |
||
| Related Functions | ||
| Cautions
The passed string buffer must be large enough to accept the text of the item and a null terminator '\0'. |
||