- introduce script context
This commit is contained in:
30
errormsg.h
Normal file
30
errormsg.h
Normal file
@ -0,0 +1,30 @@
|
||||
#ifndef ERRORMSG_H
|
||||
#define ERRORMSG_H
|
||||
|
||||
#include <time.h>
|
||||
|
||||
/** \file
|
||||
* \brief Error message collection
|
||||
*/
|
||||
/** \brief Error message item
|
||||
*/
|
||||
typedef struct ErrMsg {
|
||||
struct ErrMsg *next;
|
||||
char *text; /**< the message text */
|
||||
char *data; /**< additional text which may be different for the same message */
|
||||
int cnt; /**< count */
|
||||
time_t last; /**< time of last message */
|
||||
} ErrMsg;
|
||||
|
||||
/* define type ErrMsgList and functions ErrMsgAdd etc. */
|
||||
#define MC_NAME(T) ErrMsg##T
|
||||
#include "mclist.h"
|
||||
|
||||
/** \brief Put a formatted message to the error message list
|
||||
* \param dump the error message list
|
||||
* \param data some additional text (may be NULL)
|
||||
* \param fmt the format for the message
|
||||
*/
|
||||
ErrMsg *ErrPutMsg(ErrMsgList *dump, char *data, char *fmt, ...);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user