[ccan] Configuration file parser?
Rusty Russell
rusty at rustcorp.com.au
Fri Jan 30 11:49:22 EST 2009
On Thursday 29 January 2009 23:16:02 Tim Post wrote:
> On Thu, 2009-01-29 at 11:33 +1030, Rusty Russell wrote:
>
> > I always steal from the kernel, Tridge's junkcode, or the SAMBA project when
> > looking for this kind of stuff.
> >
> > In this case, the code (from SAMBA) has also been used by petitboot, so you
> > can find params.[ch] here:
> >
> > http://git.ozlabs.org/?p=petitboot;a=tree;f=discover;h=8b487f54df841cbd33d0b5f4e1de4bfcbbe61419;hb=refs/heads/multiple-ui
> >
> > GPLv2 or later, which is fine. Want to modernize it and turn it into a ccan module?
>
> Yes, this would be easy to modernize, I'll send patches next week to
> bring it up to date.
>
> I'd love to see it grow into a swiss army knife to deal with several
> popular formats with one clean interface, not just ini style.
>
> Is there a c-style guide for ccan? I tend to follow Linux guidelines.
I don't feel moral authority to enforce a particular style, but I tend to use
the Linux kernel one these days myself (except I prefer split-lines to have
the operator at the beginning of the line, for readability, eg:
if (some_complex_function(foo, bar, baz)
&& some_other_complex_function(wiz, bang, buzz))
Thanks!
Rusty.
More information about the ccan
mailing list