Queries an Editor parameter value.
| Library: | LPEXAPI.H |
|---|---|
| Include File: | LPEXAPI.H |
C Syntax
int lxquery(unsigned char*Item, unsigned char *Buffer) ;
Parameters
Item |
The item to be queried. |
Buffer |
Set this to a variable long enough to hold the return string. The MAXQUERY constant in LPEXAPI.H is set to the longest possible return string. |
Description
The lxquery subroutine retrieves the response to the query command. The result returned by lxquery is the same as the response to the query command. For example:
lxquery("nosave", commandline)
returns the value of the commandline parameter.
There are three exceptions:
The lxquery subroutine does not indicate an empty string as <null>, a single blank as <blank>, or multiple blanks as <blanks>. It returns the empty string, blank, or blanks as appropriate.
| Note: | Unlike the query command, only a single item may be queried at a time with this subroutine. It cannot be used with the list parameter. |
Example
To find out how many changes there are in a file, type:
char *changes;
changes = malloc(MAXQUERY);
lxquery("CHANGES", changes);
To set the number of changes back to the original number, type:
lxcall("SET", changes);
Return Value
The return value is the return code from the Editor.
![]()
Building External Commands Written in
the C Language
query Command
