Mail Archives: djgpp-workers/2001/01/30/05:09:05
djgpp-workers AT delorie DOT com wrote:
> Couple of little nits, haven't read it closely yet.
> > #include <sys/farptr.h>
> Use <sys/farptrgs.h> for libc functions.
> > static char lcn_collate[256] š= "C";
> > static char lcn_ctype[256] š š= "C";
> > static char lcn_monetary[256] = "C";
> > static char lcn_numeric[256] š= "C";
> > static char lcn_time[256] š š = "C";
These arrays should be big enough to store any of supported locale. I'll make define for size (LOCALE_MAX_STRING_SIZE) and put loc2id array strings into arrays to determine overflow at time of compilation in case someone add very long locale.
> > š if (category == LC_ALL) {
> Please put open braces under the if, not on the same line.
Is it Ok to apply `indent -npcs' to the sources? Any other switches required/recommended?
> > š š š š š tolower(i) = i;
> > š š š š š toupper(i) = i;
> This isn't portable, or even a good idea.
Fixed.
> > š static char rv[256];
> Another big buffer to bloat programs with?
Actually it should be 5*LOCALE_MAX_STRING_SIZE, I'll fix it.
And thanks to pointing on these, I've found small bug there. Will fix, retest and resend.
--
Alexander Aganichev
Hypercom Europe Limited, Inc.
Software Engineer
__________________________________________________________________
Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/
- Raw text -