Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 15441 Details for
Bug 25818
worker-2.8.0.ebuild (Update)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
LC_NUMERIC patch for thousands_sep
worker-2.8.0-LC_NUMERIC.diff (text/plain), 1.55 KB, created by
Dr. Tobias Quathamer
on 2003-08-03 08:15:27 UTC
(
hide
)
Description:
LC_NUMERIC patch for thousands_sep
Filename:
MIME Type:
Creator:
Dr. Tobias Quathamer
Created:
2003-08-03 08:15:27 UTC
Size:
1.55 KB
patch
obsolete
>--- worker-2.8.0.orig/src/aguix/lowlevelfunc.cc >+++ worker-2.8.0/src/aguix/lowlevelfunc.cc >@@ -21,6 +21,7 @@ > /* $Id: lowlevelfunc.cc,v 1.25 2003/06/05 01:02:20 ralf Exp $ */ > > #include "lowlevelfunc.h" >+#include <locale.h> > > #ifdef USE_MEM_SYSTEM > typedef struct _safemem {void *ptr; >@@ -205,6 +206,16 @@ > int s = NiceLongSize( size ); > char ch; > int l,i,pos; >+ /* assign a fallback default value */ >+ char own_thousands_sep = '.'; >+ struct lconv *current_locale = localeconv(); >+ >+ /* check if the locale defines thousands_sep */ >+ if (*(current_locale->thousands_sep)) { >+ /* yes, it does. just copy the char. */ >+ own_thousands_sep = *(current_locale->thousands_sep); >+ } >+ > // first write the normal str into buf > l=WriteLong2Str(buffer,size); > // start at the right of needed room (the lowest number) >@@ -213,13 +224,13 @@ > for(i=0;i<l;i++) { > // save the char > ch=buffer[l-1-i]; >- // when overtaking the thousand/million/billion number write a "." >- // into the dest >+ // when overtaking the thousand/million/billion number write the >+ // own_thousands_sep (depending on the current locale) into the dest > // this will NOT overwrite any important information because > // 1.we saved the ch we will write > // 2.at the end we will be at pos 0 (pos starts at s-1) > // and if we have all points written, we will overtake the ch >- if(((i==3)||(i==6)||(i==9))&&(isdigit(ch))) buffer[pos--]='.'; >+ if(((i==3)||(i==6)||(i==9))&&(isdigit(ch))) buffer[pos--] = own_thousands_sep; > buffer[pos--]=ch; > } > return s;
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 25818
:
15440
| 15441