Copyright 2000 Engineering Design Team
Definition in file edt_error.h.
#include "edt_utils.h"
#include <stdarg.h>
Go to the source code of this file.
Data Structures | |
struct | _edt_msg_handler |
Structure used by the Message Handler Library to control the output of messages. More... | |
Defines | |
#define | edt_msg_add_default_level(addlevel) edt_msg_set_level(edt_msg_default_handle(), edt_msg_default_level() | addlevel) |
#define | EDT_MSG_ALWAYS 0x80000000 |
#define | EDT_MSG_FATAL EDTAPP_MSG_FATAL | EDTLIB_MSG_FATAL | PDVLIB_MSG_FATAL |
#define | EDT_MSG_INFO_1 EDTAPP_MSG_INFO_1 | EDTLIB_MSG_INFO_1 | PDVLIB_MSG_INFO_1 |
#define | EDT_MSG_INFO_2 EDTAPP_MSG_INFO_2 | EDTLIB_MSG_INFO_2 | PDVLIB_MSG_INFO_2 |
#define | EDT_MSG_WARNING EDTAPP_MSG_WARNING | EDTLIB_MSG_WARNING | PDVLIB_MSG_WARNING |
#define | EDTAPP_MSG_FATAL 0x1 |
Fatal-error messages in applications. | |
#define | EDTAPP_MSG_INFO_1 0x4 |
First level info messages in applications. | |
#define | EDTAPP_MSG_INFO_2 0x8 |
Second level info messages in applications. | |
#define | EDTAPP_MSG_WARNING 0x2 |
Warning messages in applications. | |
#define | EDTLIB_MSG_FATAL 0x10 |
Fatal-error messages in libedt. | |
#define | EDTLIB_MSG_INFO_1 0x40 |
Informative messages in libedt. | |
#define | EDTLIB_MSG_INFO_2 0x80 |
Debugging messages in libedt. | |
#define | EDTLIB_MSG_WARNING 0x20 |
Warning messages in libedt. | |
#define | PDVLIB_MSG_FATAL 0x100 |
Fatal-error messages in libpdv. | |
#define | PDVLIB_MSG_INFO_1 0x400 |
Informative messages in libpdv. | |
#define | PDVLIB_MSG_INFO_2 0x800 |
Debugging messages in libpdv. | |
#define | PDVLIB_MSG_WARNING 0x200 |
Warning messages in libpdv. | |
Typedefs | |
typedef int(*) | EdtMsgFunction (void *target, int level, const char *message) |
An EdtMsgFunction is a function which outputs a message if that message's level is high enough. | |
typedef _edt_msg_handler | EdtMsgHandler |
Structure used by the Message Handler Library to control the output of messages. | |
Enumerations | |
enum | EdtReturn |
Functions | |
int | edt_get_verbosity (void) |
int | edt_msg (int level, const char *format,...) |
Submits a message to the default message handler, which will conditionally (based on the flag bits) send the message to the default message handler function. | |
void | edt_msg_add_level (EdtMsgHandler *msg_p, int level) |
Sets the message level to the combination of the specified level with the message handler's previous level. | |
void | edt_msg_close (EdtMsgHandler *msg_p) |
Closes and frees up memory associated with a message handler. | |
EdtMsgHandler * | edt_msg_default_handle (void) |
Gets the default message handler. | |
int | edt_msg_default_level (void) |
Gets the message level that messages must match in order to be handled by the default message handler. | |
int | edt_msg_get_level (EdtMsgHandler *msg_p) |
Gets the message level that messages must match in order to be handled by the message handler msg_p. | |
void | edt_msg_init (EdtMsgHandler *msg_p) |
Initializes a message handler with default values. | |
void | edt_msg_init_files (EdtMsgHandler *msg_p, FILE *file, int level) |
Initializes a message handler to use the specified file and level. | |
void | edt_msg_init_names (EdtMsgHandler *msg_p, char *file, int level) |
Initializes a message handler to use the named file and specified level. | |
char * | edt_msg_last_error (void) |
Gets the message last sent to the output by the edt message handling system. | |
int | edt_msg_output (EdtMsgHandler *msg_p, int level, const char *format,...) |
Submits a message using the msg_p message handler, which will conditionally (based on the flag bits) send the message to the handler's function. | |
int | edt_msg_output_perror (EdtMsgHandler *msg_p, int level, const char *message) |
Conditionally (based on the flag bits) outputs message , followed by the last system error message, to msg_p . | |
int | edt_msg_output_printf_perror (EdtMsgHandler *msg_p, int level, const char *format,...) |
Writes to the specified EdtMsgHandler a caller-specified message (in the printf-style format) followed by the last system error message. | |
int | edt_msg_perror (int level, const char *msg) |
Conditionally outputs a system perror using the default message handler. | |
int | edt_msg_printf_perror (int level, const char *format,...) |
Outputs a caller-specified message to the output, followed by the last system error message. | |
void | edt_msg_set_file (EdtMsgHandler *msg_p, FILE *f) |
Sets the output file pointer for the message handler. | |
void | edt_msg_set_function (EdtMsgHandler *msg_p, EdtMsgFunction f) |
Sets the function to call when a message event occurs. | |
void | edt_msg_set_level (EdtMsgHandler *msg_p, int newlevel) |
Sets the "message level" flag bits that determine whether to call the message handler for a given message. | |
void | edt_msg_set_name (EdtMsgHandler *msg_p, const char *f) |
Sets the output file to the named file. | |
void | edt_msg_set_target (EdtMsgHandler *msg_p, void *t) |
Sets the target in the message handler. | |
void | edt_set_verbosity (int verbose) |
int | lvl_printf (int delta, char *format,...) |