<mba/msgno.h>
The msgno module provides a mechanism for managing error codes (or more generically message numbers) and associated messages across separate C libraries. Each participating library registers a table of messages at runtime with the msgno_add_codes function. Several macros are provided to dispatch messages (e.g. print to stderr). When the library is distributed these macros may be disabled however, when a library is compiled with other packages that use also use msgno, the following stack trace like output may be generated where messages may come from different libraries.
[miallen@nano c]$ ./zsvr_test domnode.c:433:domnode_load: No such file or directory: conf/zsvr.xml cfg.c:288:cfg_get_property: Configuration error zsvr.c:555:main: Server initialization failed
1.2 The MSG, MNO, MNF, PMSG, PMNO, PMNF, AMSG, AMNO, AMNF macros
Synopsis
Description
#include <mba/msgno.h> MSG(fmt, args...) MNO(msgno) MNF(msgno, fmt, args...) PMSG(fmt, args...) PMNO(msgno) PMNF(msgno, fmt, args...) AMSG(fmt, args...) AMNO(msgno) AMNF(msgno, fmt, args...)
1.3 The msgno_entry structure
Synopsis
Description
#include <mba/msgno.h> struct msgno_entry { unsigned int msgno; const char *msg; };
1.3.1
The msgno_add_codes
function
Synopsis
Description
#include <mba/msgno.h>
int msgno_add_codes(struct msgno_entry *list);
1.3.2
The msgno_msg
function
Synopsis
Description
#include <mba/msgno.h>
const char *msgno_msg(unsigned int msgno);
1.3.3
The msgno_hdlr_stderr
function
Synopsis
Description
#include <mba/msgno.h>
int msgno_hdlr_stderr(const char *fmt, ...);