Copies the text of the current item to the specified buffer
| Call | ||
| #include <vv_clist.h> | ||
| int cl_curtxt(bufstp, clistp) | ||
|
INTUCHAR *bufstp |
String buffer to copy text of item |
|
| CLISTPTR clistp | Pointer to choice list to check | |
| Returns | ||
| 1 | The item was found, and its text was transferred to the specified buffer | |
| 0 | Error. VV_ERR is set to one of the following: | |
| KWDNOTFOUND
ERRREAD FILETOOBIG |
The choice list keyword could not be found in the memory file for the choice list.
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
cl_curtxt() first sets the choice list's memory file to operate within the section specified by the choice list's keyword by calling mf_kwdset(). The line corresponding to the current item in the choice list in that section of the memory file is copied to the specified buffer. If the 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 cl_curtxt() 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'. cl_curtxt() is a macro that calls the function cli_numtxt(). Macros are not listed by the VCS error reporting system, but cli_numtxt() may be listed. |
||