Programming Guide



sm_inimsg

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.

Environment

C only

Returns

Description

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 supply sm_inimsg with the error code returned from the failed function and a description of the function itself through parameters error_code and filetype, 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.

See Also

sm_keyinit, sm_msg_read, sm_vinit