char *next;
};
+/* "128 bits of thread-id ought to be enough for anybody" */
+#define NOTMUCH_THREAD_ID_BITS 128
+#define NOTMUCH_THREAD_ID_DIGITS (NOTMUCH_THREAD_ID_BITS / 4)
+typedef struct _thread_id {
+ char str[NOTMUCH_THREAD_ID_DIGITS + 1];
+} thread_id_t;
+
#define ARRAY_SIZE(arr) (sizeof (arr) / sizeof (arr[0]))
/* These prefix values are specifically chosen to be compatible
{ "attachment_extension", "O" },
{ "msgid", "Q" },
{ "thread", "H" },
- { "ref", "R" }
+ { "ref", "R" },
+ { "timestamp", "KTS" },
};
const char *
if (strcmp (name, BOOLEAN_PREFIX[i].name) == 0)
return BOOLEAN_PREFIX[i].prefix;
+ fprintf (stderr, "Internal error: No prefix exists for '%s'\n", name);
+ exit (1);
+
return "";
}
i = message->doc.termlist_begin ();
i.skip_to (_find_prefix ("msgid"));
- /* XXX: This should really be an internal error, but we'll need to
- * fix the add_message side of things first. */
- if (i == message->doc.termlist_end ())
- return NULL;
+ if (i == message->doc.termlist_end ()) {
+ fprintf (stderr, "Internal error: Message with document ID of %d has no message ID.\n",
+ message->doc_id);
+ exit (1);
+ }
message->message_id = talloc_strdup (message, (*i).c_str () + 1);
return message->message_id;
return FALSE;
s = *tags->iterator;
- if (s.size () && s[0] == 'L')
+ if (! s.empty () && s[0] == 'L')
return TRUE;
else
return FALSE;