[notmuch] [PATCH] Switch from random to sequential thread identifiers.

Carl Worth cworth at cworth.org
Tue Feb 9 11:19:54 PST 2010


On Tue, 09 Feb 2010 15:40:00 +0100, Michal Sojka <sojkam1 at fel.cvut.cz> wrote:
> What about the following? This could also fix Sebastian's problem.
...
> +#define __STDC_FORMAT_MACROS
> +#include <inttypes.h>
...
> -    sprintf (thread_id, "%016llx", notmuch->last_thread_id);
> +    sprintf (thread_id, "%016"PRIx64, notmuch->last_thread_id);

Excellent! I did hesitate for a moment when typing "llx" into the format
string, but I had no idea what the correct thing to use was. I'm sure
glad to have access to such a knowledgeable community where I can learn
for the low cost of exposing my ignorance in public.

I did verify the above in a copy of WG14/N1124. For anyone that doesn't
recognize that, that's the draft from the C99 working group that I've
been told is remarkably similar to C99 but distinct in that it's freely
available[*]. I haven't verified the similarity, but I have found that
document quite useful in cases like this one.

Thanks for the fix. I'll likely push my change out now that I've added
this fix.

-Carl

[*] http://www.open-std.org/JTC1/SC22/wg14/www/docs/n1124.pdf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20100209/96eeb688/attachment.pgp>


More information about the notmuch mailing list