ALT Linux Bugzilla
– Attachment 4569 Details for
Bug 24170
Неправильная работа с float в русской локали
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Грязный хак, перебивающий LC_NUMERIC
basic256.atof.patch (text/plain), 961 bytes, created by
Fr. Br. George
on 2010-09-28 13:40:39 MSD
(
hide
)
Description:
Грязный хак, перебивающий LC_NUMERIC
Filename:
MIME Type:
Creator:
Fr. Br. George
Created:
2010-09-28 13:40:39 MSD
Size:
961 bytes
patch
obsolete
>diff -ur bo/LEX/basicParse.l b/LEX/basicParse.l >--- bo/LEX/basicParse.l 2010-09-22 20:54:50.000000000 +0000 >+++ b/LEX/basicParse.l 2010-09-28 09:31:57.630283459 +0000 >@@ -26,6 +26,7 @@ > > #include <string.h> > #include <stdlib.h> >+ #include <locale.h> > > struct symbol > { >@@ -286,7 +287,7 @@ > {hexinteger} { count(); yylval.number = strtol(yytext+2, NULL, 16); return B256INTEGER; } > {octalinteger} { count(); yylval.number = strtol(yytext+2, NULL, 8); return B256INTEGER; } > {binaryinteger} { count(); yylval.number = strtol(yytext+2, NULL, 2); return B256INTEGER; } >-{floatnum} { count(); yylval.floatnum = atof(yytext); return B256FLOAT; } >+{floatnum} { count(); setlocale(LC_NUMERIC, "POSIX"); yylval.floatnum = atof(yytext); return B256FLOAT; } > {string} { int len; count(); len = strlen(yytext); > yylval.string = strdup(yytext + 1); > yylval.string[len - 2] = 0;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 24170
: 4569