struct spam_list_t *next;
} SPAM_LIST;
-#define mutt_new_list() safe_calloc (1, sizeof (LIST))
-#define mutt_new_heap() safe_calloc(1, sizeof(HEAP))
-#define mutt_new_rx_list() safe_calloc (1, sizeof (RX_LIST))
-#define mutt_new_spam_list() safe_calloc (1, sizeof (SPAM_LIST))
+inline LIST *mutt_new_list()
+{
+ return safe_calloc (1, sizeof (LIST));
+}
+
+inline HEAP *mutt_new_heap()
+{
+ return safe_calloc (1, sizeof (HEAP));
+}
+
+inline RX_LIST *mutt_new_rx_list()
+{
+ return safe_calloc (1, sizeof (RX_LIST));
+}
+
+inline SPAM_LIST *mutt_new_spam_list()
+{
+ return safe_calloc (1, sizeof (SPAM_LIST));
+}
+
void mutt_free_list (LIST **);
void mutt_free_rx_list (RX_LIST **);
void mutt_free_spam_list (SPAM_LIST **);
unsigned int refs_changed : 1; /* References changed to break thread */
} ENVELOPE;
+inline ENVELOPE *mutt_new_envelope()
+{
+ return safe_calloc (1, sizeof (ENVELOPE));
+}
+
typedef struct parameter
{
char *attribute;
struct parameter *next;
} PARAMETER;
+inline PARAMETER *mutt_new_parameter()
+{
+ return safe_calloc (1, sizeof (PARAMETER));
+}
+
/* Information that helps in determing the Content-* of an attachment */
typedef struct content
{
char *maildir_flags; /* unknown maildir flags */
} HEADER;
+inline HEADER *mutt_new_header()
+{
+ return safe_calloc (1, sizeof (HEADER));
+}
+
struct mutt_thread
{
unsigned int fake_thread : 1;
int tabs;
} ENTER_STATE;
+inline ENTER_STATE *mutt_new_enter_state()
+{
+ return safe_calloc (1, sizeof (ENTER_STATE));
+}
+
/* flags for the STATE struct */
#define MUTT_DISPLAY (1<<0) /* output is displayed to the user */
#define MUTT_VERIFY (1<<1) /* perform signature verification */
#include <sys/types.h>
#include <utime.h>
+/*
+ * External definitions for inline functions in mutt.h
+ */
+extern LIST *mutt_new_list();
+extern HEAP *mutt_new_heap();
+extern RX_LIST *mutt_new_rx_list();
+extern SPAM_LIST *mutt_new_spam_list();
+extern PARAMETER *mutt_new_parameter();
+extern HEADER *mutt_new_header();
+extern ENVELOPE *mutt_new_envelope();
+extern ENTER_STATE *mutt_new_enter_state();
+
static const char *xdg_env_vars[] =
{
[kXDGConfigHome] = "XDG_CONFIG_HOME",
BODY *mutt_new_body (void)
{
- BODY *p = (BODY *) safe_calloc (1, sizeof (BODY));
+ BODY *p = safe_calloc (1, sizeof (BODY));
p->disposition = DISPATTACH;
p->use_disp = 1;
#define mutt_thread_next_unread(x,y) _mutt_traverse_thread(x,y,MUTT_THREAD_NEXT_UNREAD)
int _mutt_traverse_thread (CONTEXT *ctx, HEADER *hdr, int flag);
-
-#define mutt_new_parameter() safe_calloc (1, sizeof (PARAMETER))
-#define mutt_new_header() safe_calloc (1, sizeof (HEADER))
-#define mutt_new_envelope() safe_calloc (1, sizeof (ENVELOPE))
-#define mutt_new_enter_state() safe_calloc (1, sizeof (ENTER_STATE))
-
typedef const char * format_t (char *, size_t, size_t, int, char, const char *, const char *, const char *, const char *, unsigned long, format_flag);
void mutt_FormatString (char *, size_t, size_t, int, const char *, format_t *, unsigned long, format_flag);