Mail Archives: djgpp/2000/08/30/18:30:16.1
Newsgroup: comp.os.msdos.djgpp
From: Radical NetSurfer <radsmail AT juno DOT com>
On Fri, 25 Aug 2000 02:44:18 -0400
>Tonight we had to create our very own code for
>
>strupr
>
>simply because DJGPP does NOT implement this function
>correctly at ALL :(
It's not ANSI/POSIX, so you shouldn't be counting on it being portable
in the first place.
>2) an ACCURATE and properly implemented method of ACTUALLY
>converting Upper/Lower FOREIGN character set should be implemented.
>(ah, Mr. Wizard, sir, how do we know an ASCII char represents a
>foreign character, please?)
Portable programs shouldn't be assuming an ASCII character set. IMHO,
the point of programming in C is to actually produce portable code.
>also, getw is defined in LIBC.TXT as:
>
>int getw(FILE *file);
>
>this is INCORRECT!
Since getw() isn't ANSI or POSIX either, it's not incorrect.
>
>get-WORD() should of been defined as:
>
>short getw(FILE*);
>
>as a WORD is "typically/natively" DEFINED AS 16-BIT!
This is not true.
>When did a WORD become PLATFORM SPECIFIC?
It always has been. A word is simply the machines most natural native
representation of an integer, which corresponds to C's int type. So
int getw() is entierly correct.
- Raw text -