#ifndef ERRORMSG_H #define ERRORMSG_H #include /** \file * \brief Error message collection */ /** \brief Error message item */ typedef struct ErrMsg { struct ErrMsg *next; char *text; /**< the message text */ int cnt; /**< count */ time_t last; /**< time of last message */ } ErrMsg; /** \brief Put a formatted message to the error message list * * The error message list contains only one entry for all messages * with the same text, storing only the count and the last used time. * Characters within sqaure brackets are not taken into account * when comparing messages. * The newset message is always at the head of the list. * * \param dump the error message list * \param fmt the format for the message * \return the new error message list head */ ErrMsg *ErrPutMsg(ErrMsg *dump, char *fmt, ...); #endif