bug-gnulib
[Top][All Lists]
Advanced

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

Re: Utility functions


From: Paul Eggert
Subject: Re: Utility functions
Date: Fri, 09 Nov 2012 11:58:07 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121029 Thunderbird/16.0.2

On 11/08/2012 03:38 AM, Dmitry Bogatov wrote:

>     static inline void *
>     xrangedup (const void *begin, const void *end)
>     {
>       return xstrdup (begin, (char *) end - (char *) begin);
>     }

Yes, something like that could be useful, though this
particular example won't work since xstrdup takes just
one arg.

> In it, there is pretty untrivial code for getting home directory in
> non-GNU systems. 

That might be useful as a module, yes.

> Another routine, also related to wget, is parsing .netrc file

I don't know about that one (I don't know what a .netrc file is....).

> And, another, unrelated question, why gl_INIT macro begins with
> small letters?

It's somewhat arbitrary, but at this point that convention is
pretty common (gl_XALLOC, gl_YIELD, etc.) so I wouldn't mess
with it.



reply via email to

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