[Klone-users] Merge u_config_save_to_buf() and
u_config_print_to_fp() ?
Mickael Auger
mickael.auger at gmail.com
Mon Dec 21 08:14:05 EST 2009
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 :
================
section 1
key 1
key 2
section 2
key 1
key 2
================
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 :
================
section 1
{
key 1
key 2
}
section 2
{
key 1
key 2
}
================
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 :
================
section 1
{
key 1
key 2
}
section 2
{
key 1
key 2
}
================
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/161112ab/attachment.htm
More information about the klone-users
mailing list