Mail Archives: djgpp-workers/2001/01/29/12:42:23
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";
>
> static char currency_symbol[16] = "";
> static char mon_decimal_point[16] = "";
> static char mon_thousands_sep[16] = "";
> static char decimal_point[16] = ".";
> static char thousands_sep[16] = "";
These are really big arrays for such tiny strings.
> if (category == LC_ALL) {
Please put open braces under the if, not on the same line.
> switch(category) {
Ditto for switch, plus please put a space after "switch" so it doesn't
look like a function call.
> tolower(i) = i;
> toupper(i) = i;
This isn't portable, or even a good idea.
> if(lcnv) {
Ditto space after "if".
> strcpy (lcn_monetary, locale);
*no* spaces after function names in DJGPP sources.
> } else
Braces on their own lines.
> char *setlocale(int category, const char *locale)
Types on their own line, start second line with function name.
> static char rv[256];
Another big buffer to bloat programs with?
- Raw text -