Programming Guide |
Creates a displayable error message on failure of an initialization function
char *sm_inimsg(int filetype, int error_code);
filetype
- Specifies the source of the error through one of the following constants, defined in
smumisc.h
:
B_E_KEYS
- Error was generated by sm_keyinit or
sm_n_keyinit
.B_E_MSGS
- Error was generated by sm_msg_read.
B_E_VID
- Error was generated by sm_vinit or
sm_n_vinit
.error_code
- The error code returned by the initialization function.
C only
- · Success: A pointer to the error message.
sm_inimsg
lets you display an error message to the user after an initialization function fails—for example, attempts to initialize a message file fail. You supplysm_inimsg
with the error code returned from the failed function and a description of the function itself through parameterserror_code
andfiletype
, respectively.sm_inimsg
uses this information to return a string that you can display to the user—for example, by passing it to sm_fqui_msg.
sm_keyinit, sm_msg_read, sm_vinit