Commit 13cdee6d 13cdee6ddd5808eb849137e6244c3bc78607bea0 by Alain Magloire

Update.

1 parent ae7e200d
......@@ -19,7 +19,7 @@
#define _MAILUTILS_MBOX_H
#include <mailutils/message.h>
#include <mailutils/observer.h>
#include <mailutils/observable.h>
#ifdef __cplusplus
extern "C" {
......
......@@ -50,7 +50,7 @@
# define monitor_cleanup_push(routine, arg) {
# define monitor_cleanup_pop(execute) }
# define monitor_rdlock(m) (m = 1)
# define monitor_lock(m) (m = 1)
# define monitor_unlock(m) (m = 0)
#endif
......
......@@ -19,6 +19,8 @@
#define _MAILUTILS_SYS_MBOX_H
#include <time.h>
#include <mailutils/monitor.h>
#include <mailutils/locker.h>
#include <mailutils/mbox.h>
#ifdef __cplusplus
......@@ -122,9 +124,24 @@ struct _mbox
char *date;
off_t off;
monitor_t lock;
locker_t dotlock;
mu_debug_t debug;
locker_t locker;
observable_t observable;
};
/* Moro(?)ic kluge. */
#define MBOX_DEBUG0(mbox, type, format) \
if (mbox->debug) mu_debug_print (mbox->debug, type, format)
#define MBOX_DEBUG1(mbox, type, format, arg1) \
if (mbox->debug) mu_debug_print (mbox->debug, type, format, arg1)
#define MBOX_DEBUG2(mbox, type, format, arg1, arg2) \
if (mbox->debug) mu_debug_print (mbox->debug, type, format, arg1, arg2)
#define MBOX_DEBUG3(mbox, type, format, arg1, arg2, arg3) \
if (mbox->debug) mu_debug_print (mbox->debug, type, format, arg1, arg2, arg3)
#define MBOX_DEBUG4(mbox, type, format, arg1, arg2, arg3, arg4) \
if (mbox->debug) mu_debug_print (mbox->debug, type, format, arg1, arg2, arg3, arg4)
#ifdef __cplusplus
}
#endif
......