- allow scriptcontext objects to be dynamic
- enhancements in scriptcontext (error messages stored as properties)
This commit is contained in:
20
errormsg.h
20
errormsg.h
@ -11,10 +11,17 @@
|
||||
typedef struct ErrMsg {
|
||||
struct ErrMsg *next;
|
||||
char *text; /**< the message text */
|
||||
int cnt; /**< count */
|
||||
long cnt; /**< count */
|
||||
time_t last; /**< time of last message */
|
||||
long dirty; /**< count since last reset */
|
||||
char *itemId; /**< an id for the item where the error occured */
|
||||
long id;
|
||||
} ErrMsg;
|
||||
|
||||
typedef struct {
|
||||
ErrMsg *current;
|
||||
} ErrList;
|
||||
|
||||
/** \brief Put a formatted message to the error message list
|
||||
*
|
||||
* The error message list contains only one entry for all messages
|
||||
@ -23,10 +30,17 @@ typedef struct ErrMsg {
|
||||
* when comparing messages.
|
||||
* The new message is always at the head of the list.
|
||||
*
|
||||
* \param dump the error message list
|
||||
* \param list the error message list
|
||||
* \param fmt the format for the message
|
||||
* \return the new error message list head
|
||||
*/
|
||||
ErrMsg *ErrPutMsg(ErrMsg * dump, char *fmt, ...);
|
||||
|
||||
void ErrPutMsg(ErrList *list, char *fmt, ...);
|
||||
|
||||
/** \brief Get the most recent error message
|
||||
* \param list the error list
|
||||
* \return the most recent error message
|
||||
*/
|
||||
char *ErrGetLastMsg(ErrList *list);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user