[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Thu, 8 Nov 2012 15:38:26 +0400
Hello, Gnulib team.
I have two questions or proposals.
First, is trivial function like this
static inline void *
xrangedup (const void *begin, const void *end)
return xstrdup (begin, (char *) end - (char *) begin);
I think, that functions like this implemented over and over again across
different projects. So, probably we can add them to gnulib module,
estabilish naming conventions and make them semi-standart. If I read GNU
C source you can expect me to have prior knowledge of libc and gnulib,
but not your code. If make such functions header-only, static inline,
non-used functions will have no impact on binary size.
Second, less trivial is related to my research about Wget code.
In it, there is pretty untrivial code for getting home directory in
non-GNU systems. I cleaned it a bit, but I think, that this function
should find place in gnulib, where it will be used and enchanced.
Another routine, also related to wget, is parsing .netrc file(ftp
default logins/passwords). I admit, it is not too common task, but,
probably it also better fit gnulib, then wget.
Due modular structure of gnulib,
I think my proposals will not hurt.
Ready to discuss with constructive criticism.
And, another, unrelated question, why gl_INIT macro begins with
small letters? There is tradition, that macros are all caps.
Well, emacs think so by default.
Best regards, Dmitry Bogatov <address@hidden>,
GNU Thales maintainer.
Description: PGP signature
- Utility functions,
Dmitry Bogatov <=