nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] Maildir support for inc


From: David Malone
Subject: Re: [Nmh-workers] Maildir support for inc
Date: Sun, 08 Aug 2004 18:30:12 +0100

> WRT the patch, is realloc(NULL, ...) considered portable these days for
> nmh?

I can't answer for nmh - it certainly works on Linux and BSD and
should work on any ANSI C implementation - the C FAQ says:

        ANSI C sanctions this usage (and the related realloc(...,
        0), which frees), although several earlier implementations
        do not support it, so it may not be fully portable. Passing
        an initially-null pointer to realloc can make it easier to
        write a self-starting incremental allocation algorithm.

since nmh uses ANSI declarations, I'd guess it probably won't compile
on a platform that doesn't support this usage.

> Also, if the code to process the two Maildir directories is
> identical, which is the bit doing the realloc() IIRC, maybe there can be
> just one copy of it.

Yep - this is a little ugly. I guess it should just iterate over a
list of subdirectories.

        David.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]