Gustavo Sverzut Barbieri schrieb:
> On Nov 23, 2007 3:45 AM, Dave <[EMAIL PROTECTED]> wrote:
>   
>> Hi all,
>> I recently have a strange bug in the editor that prevent from saving all
>> the file.
>> The problem is that engrave write out an edc with all the floating numbers
>> having the wrong separator-char ( 0,0 instead of 0.0 ).
>> The strange think is that engrave_test seems to work well
>> Someone else have this error?
>> To try simply create a new group,a new rectangle and save the file.
>> I have this error:
>>
>> Executing: edje_cc -v   /tmp/edje_editor_tmp.edc-pQu69c "/home/dave/as"
>> edje_cc: Error. parse error :22. , marker before ; marker
>> Error in edje_cc, exit code:  25
>>
>> and in fact the tmp file have ( , ) instead of ( . ) in numbers
>>
>>
>> The tmp file is generated by engrave_edc_output() that write the value
>> with this function:
>>
>> static void
>> engrave_out_data(FILE *out, char *name, char *fmt, ...)
>> {
>>     va_list ap;
>>     char *fmt_new = (char *)calloc(strlen(fmt) + strlen(name) + level +
>> 5, sizeof(char));
>>     char *buf = engrave_output_mk_tabs();
>>
>>     sprintf(fmt_new, "%s%s: %s;\n", buf, name, fmt);
>>     va_start(ap, fmt);
>>     vfprintf(out, fmt_new, ap);
>>     va_end(ap);
>>     FREE(fmt_new);
>>     FREE(buf);
>> }
>>
>>
>> So seems that vfprintf() write the %.2f param wrong. Is this possible?
>> is vfprintf()  l18n?
>>     
>
> yes, it is. I'm not sure how to disable it just for some functions
> tough. A quick look at its man page says that every format would use
> the locale to format, but maybe there is some that I missed.
>   
Don't think there is a really nice way to do this. The only way I know 
is this:
    char prev[128];

    strncpy(prev, setlocale(LC_NUMERIC, NULL), sizeof(prev));

    setlocale(LC_NUMERIC, "C");
    printf("%f\n", 123.3);
    setlocale(LC_NUMERIC, prev);



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to