Initializing help system before first use

bindrv_getctrl

bindrv_getctrl


Purpose
Get the code of a control token.
Synopsis
int bindrv_getctrl(s_bindrvctx bctx,int *val);
Arguments
bctx 
A BinDrv reader context
val 
Pointer to return the control code
Return value
0 if successful, a negative value in case of error or the type code of the token (positive value) if it is not of the expected type.
Further information
1. A control code is represented by a 5bit integer (values 0 to 31) the interpretation of which is application-specific: the bindrv library does not use these control tokens. They are usually used as markers to structure the data flow: it is up to the user to define appropriate conventions according to his needs.
2. When the data stream is coming from Mosel, the following control codes may be used — they correspond to the control characters employed in the standard Mosel ascii file format:
BINDRV_CTRL_SKIP 
Skip entry (symbol '*' in ascii format)
BINDRV_CTRL_LABEL 
Start a new record: this control token is always followed by a string identifying the label (corresponds to 'label:' in ascii format)
BINDRV_CTRL_OPENLST 
Begin list of entries (symbol '[' in ascii format)
BINDRV_CTRL_CLOSELST 
End list of entries (symbol ']' in ascii format)
BINDRV_CTRL_OPENNDX 
Begin list of array indices (symbol '(' in ascii format)
BINDRV_CTRL_CLOSENDX 
End list of array indices (symbol ')' in ascii format)

Related topics