[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 11:01:15 EST 2009


I tested this new function but,

- the declaration of "int i" should be at the beginning of function in C
strict
- there are superfluous tabs such as :
=========
  section1
  {
    key value
  }
=========
instead :
=========
section1
{
  key value
}
=========

So the code
==================
#define U_CONFIG_INDENT(fp, l)  \
    do { int i; for(i = 0; i < l; ++i) fprintf(fp, "  "); } while (0);
==================
can be replaced by
==================
int i;
#define U_CONFIG_INDENT(fp, l)  \
    for(i = 0; i < l; ++i) fputs("  ",fp);
==================


The next version will be the good :)

2009/12/21 thomas fossati <tho at koanlogic.com>

> On Dec 21, 2009, at 3:29 PM, Mickael Auger wrote:
>
> ok, I've fixed u_config_print_to_fp() to insert properly aligned braces
>> where needed.  Thanks for the suggestion, do you want to try it out ?
>
>
> Yes if you have a path :)
>
>
> libu alone:
> http://koanlogic.com/download/libu/libu-1.4.2rc0.tar.gz
>
> bundled with klone:
> http://koanlogic.com/download/klone/klone-2.2.2rc0.tar.gz
>
> The page is created with two examples to load and read :
> http://wiki.koanlogic.com/doku.php?id=libu_config
>
>
> This is the sort of things that warms my heart :) thank you very much !
>
> t.
>
> _______________________________________________
> Klone-users mailing list
> Klone-users at koanlogic.com
> http://koanlogic.com/cgi-bin/mailman/listinfo/klone-users
>
>


-- 
Mickaël AUGER
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://koanlogic.com/pipermail/klone-users/attachments/20091221/abc994c8/attachment.html


More information about the Klone-users mailing list