- allow scriptcontext objects to be dynamic

- enhancements in scriptcontext (error messages stored as properties)
This commit is contained in:
zolliker
2009-02-19 13:30:32 +00:00
parent 981534624f
commit 35f2b6b810
33 changed files with 753 additions and 310 deletions

View File

@ -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