Functions | |
void | mbs_msg_default (char *msg) |
void | mbs_warning_msg_default (char *msg) |
void | mbs_error_msg_default (char *msg) |
Low-level error function terminating the process if an error is raised. More... | |
void | mbs_error_msg_continue (char *msg) |
Low-level error function allowing process to continue if an error is raised. More... | |
void | mbs_set_msg_fct_ptr (mbs_msg_fct_ptr msg_fct) |
Set the function that send messages. More... | |
void | mbs_set_warning_msg_fct_ptr (mbs_msg_fct_ptr msg_fct) |
Set the function that send warning messages. More... | |
void | mbs_set_error_msg_fct_ptr (mbs_msg_fct_ptr msg_fct) |
Set the function that send error messages. More... | |
char * | mbs_concatenate_to_char (char *msg, va_list arg) |
Generate a string containing the message and the optionnal formatted value. More... | |
void | mbs_msg (char *msg,...) |
Send a message. More... | |
void | mbs_warning_msg (char *msg,...) |
Send a warning message. More... | |
void | mbs_error_msg (char *msg,...) |
Send an error message. More... | |
Variables | |
mbs_msg_fct_ptr | mbs_msg_ptr = mbs_msg_default |
mbs_msg_fct_ptr | mbs_warning_msg_ptr = mbs_warning_msg_default |
mbs_msg_fct_ptr | mbs_error_msg_ptr = mbs_error_msg_default |
char* mbs_concatenate_to_char | ( | char * | msg, |
va_list | arg | ||
) |
Generate a string containing the message and the optionnal formatted value.
The returned char* must be freed.
msg | the string containing the message to send. It can optionally contain format tag (with %). The corresponding additional parameters must be passed to the function. |
void mbs_error_msg | ( | char * | msg, |
... | |||
) |
Send an error message.
Send the error message passed by the user. Default behaviour is to print the message prefixed with MBS-ERROR to the console and to stop the application. This behaviour may be overidden using the mbs_set_warning_msg_fct function.
msg
the string containing the message to send. It can optionally contain format tag (with %). The corresponding additional parameters must be passed to the function. void mbs_error_msg_continue | ( | char * | msg | ) |
Low-level error function allowing process to continue if an error is raised.
This function is not used by default, to use it assign it as default with the function mbs_set_error_msg_fct_ptr().
msg | the string containing the message to send. |
void mbs_error_msg_default | ( | char * | msg | ) |
Low-level error function terminating the process if an error is raised.
This function is used by default.
msg | the string containing the message to send. |
void mbs_msg | ( | char * | msg, |
... | |||
) |
Send a message.
Send the message passed by the user. Default behaviour is to print the message to the console. This behaviour may be overidden using the mbs_set_msg_fct function.
msg
the string containing the message to send. It can optionally contain format tag (with %). The corresponding additional parameters must be passed to the function. void mbs_msg_default | ( | char * | msg | ) |
void mbs_set_error_msg_fct_ptr | ( | mbs_msg_fct_ptr | msg_fct | ) |
Set the function that send error messages.
msg_fct
the new message function void mbs_set_msg_fct_ptr | ( | mbs_msg_fct_ptr | msg_fct | ) |
Set the function that send messages.
msg_fct
the new message function void mbs_set_warning_msg_fct_ptr | ( | mbs_msg_fct_ptr | msg_fct | ) |
Set the function that send warning messages.
msg_fct
the new message function void mbs_warning_msg | ( | char * | msg, |
... | |||
) |
Send a warning message.
Send the message passed by the user. Default behaviour is to print the message prefixed with MBS-WARNING to the console. This behaviour may be overidden using the mbs_set_warning_msg_fct function.
msg
the string containing the message to send. It can optionally contain format tag (with %). The corresponding additional parameters must be passed to the function. void mbs_warning_msg_default | ( | char * | msg | ) |
mbs_msg_fct_ptr mbs_error_msg_ptr = mbs_error_msg_default |
mbs_msg_fct_ptr mbs_msg_ptr = mbs_msg_default |
mbs_msg_fct_ptr mbs_warning_msg_ptr = mbs_warning_msg_default |