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

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

Date: Tue, 09 Feb 2010 11:19:54 -0800

To: Michal Sojka, notmuch@notmuchmail.org

Cc:

From: Carl Worth


On Tue, 09 Feb 2010 15:40:00 +0100, Michal Sojka <sojkam1@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
part-000.sig (application/pgp-signature)

Thread: