sputerr - put error message on screen
Sputerr displays an error message on the screen. Form(C-3) uses sputerr internally to display error messages. If the user edit routine returns an error message, form calls sputerr to display the user edit routine's message. Form leaves the cursor at the current field and waits for further data entry.
After displaying the error message, sputerr clears the input queue used by snextkey. Any pending operations inserted into the input queue by snextkey are removed.
Sputerr is provided to allow the user edit routine to issue a warning message and allow the operator to continue with data entry. If sputerr is used to issue a warning message, the user edit routine should return a NULL pointer. Form continues on to the next data entry field as if there were no error.
The user edit routine should normally return an error message if there is an error with data in a field. The sputerr function should be used only in the rare occurrence when the data entered is correct, but a warning should be given. The warning message displayed by sputerr stays on the screen until the next data entry field is completed or until the current record is completed. The warning message can also be overwritten by another error message.
If the errmsg parameter points to an empty string or if it contains unprintable characters, then the error message is not displayed but is replaced instead with a diagnostic message. This also happens when a bad pointer is returned by user_edit.