
------------------------------------------------------------------------------
1.2 Register user screen index. <Main>
------------------------------------------------------------------------------
[Name]
crt_setuserscrn
[Syntax]
#include <crt.h>
int crt_setuserscrn( int num, int *scrntbl ) ;
[Arguments]
num Number of screen index to be registered.
scrntbl Pointer to the user screen index table.
[Return]
Returns zero if successful. If any error, returns -1 and sets the
following error code in the global variable "errno".
EUCRT Number of the screen index "num" is 0 or above 200.
[Description]
Registers the screen index numbers of the CNC screens which is
replaced by the user application program.
The index numbers of the user screens are registered in CNC by calling
of this function. Then, the user application will be called by
selection of registered screens.
Store the screen index numbers in "scrntbl" with the following format.
The storing order is arbitrary.
Upper byte Lower byte
---------------+---------------
Small Large
classification classification
Refer the screen index number list of "Get current screen index
(crt_getcurscrn)" for index numbers of each screens. All available
index values are defined in crt.h as "CRT_xxx_xxx".
At the start time of the application program, no user screen is
registered. In this condition, screen switching from the user screen
to the CNC's is not allowed because it is impossible to return to the
user screen from the CNC screen again if no user screen is registered.
So, this function must be called in the beginning of the main task of
the user application program.