[ccan] Packaging what exists for ccan
Tim Post
echo at echoreply.us
Mon Mar 2 07:03:22 EST 2009
Hi,
As you know I am working on packaging iniparser for ccan. I ran across
this:
int iniparser_getboolean(dictionary * d, const char * key, int notfound)
{
char * c ;
int ret ;
c = iniparser_getstring(d, key, INI_INVALID_KEY);
if (c==INI_INVALID_KEY) return notfound ;
if (c[0]=='y' || c[0]=='Y' || c[0]=='1' || c[0]=='t' || c[0]=='T') {
ret = 1 ;
} else if (c[0]=='n' || c[0]=='N' || c[0]=='0' || c[0]=='f' ||
c[0]=='F') {
ret = 0 ;
} else {
ret = notfound ;
}
return ret;
}
Does anyone really use 'T' or 't' to indicate a boolean true in a
configuration file? I'd like to refactor this and other functions.
So, if I do so .. should I just change the name of the module to
cfgparser or something similar? I also want to add some stuff, such as
the ability to:
include /etc/myprog.d/startup.cfg
To the syntax. I hate forking other people's stuff, period. The original
author is now (like me) quite busy being a dad, he's made it quite clear
that patches are likely to go to /dev/null.
Is it ok if ccan modules by the same name as other counterparts differ a
little from the original?
Cheers,
--Tim
More information about the ccan
mailing list