-
Notifications
You must be signed in to change notification settings - Fork 53
MSG_CAT_RED
Jurek Muszyński edited this page Sep 13, 2019
·
1 revision
Tells whether error code belongs to “errors” category.
Returns true if code belongs to errors, otherwise false.
/* --------------------------------------------------------------------------
Show error message if present in URI
-------------------------------------------------------------------------- */
int check_error_msg(int ci)
{
int msg;
if ( !QSI("msg", &msg) || msg==OK ) return OK;
if ( MSG_CAT_RED(msg) )
OUT("<p class=red>%s</p>", silgy_message(msg));
else if ( MSG_CAT_ORANGE(msg) )
OUT("<p class=ora>%s</p>", silgy_message(msg));
else /* Successful message -- in green */
OUT("<p class=grn>%s</p>", silgy_message(msg));
return msg;
}