[Klone-users] Re: Merge u_config_save_to_buf() and
u_config_print_to_fp() ?
Mickael Auger
mickael.auger at gmail.com
Mon Dec 21 08:22:15 EST 2009
Sorry for my previous message, the good message is :
Hi,
>
> I use the functions "u_config_..." to load, read and write configuration
> file (like kloned.conf), but I have a problem to save.
>
> u_config_print_to_fp() save the contain of configuration file without brace
> '{' and '}' but with tabulation such as :
> ================
> section1
> key1 value
> key2 value
> section2
> key1 value
> key2 value
> ================
> And it's easy to read but the file isn't a configuration file.
>
> More over u_config_save_to_buf() get the config syntax wihout tabulation
> but with brace such as :
> ================
> section1
> {
> key1 value
> key2 value
> }
> section2
> {
> key1 value
> key2 value
> }
> ================
> And it's not easy to edit this file manually (with an text editor).
>
> As you might guess, my question is :
>
> Could we have a function that saves a file with braces?
>
> This function could be "u_config_save_to_fp(u_config_t *c, FILE *fp)" and
> its result could be :
> ================
> section1
> {
> key1 value
> key2 value
> }
> section2
> {
> key1 value
> key2 value
> }
> ================
>
> Bye.
>
> PS : I will complete the LibU Wiki on the Config section.
>
> --
Mickaël AUGER
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://koanlogic.com/pipermail/klone-users/attachments/20091221/f6dc991c/attachment.html
More information about the klone-users
mailing list