From: Damian Yerrick Newsgroups: comp.os.msdos.djgpp Subject: Re: BAD strupr, BAD getw Organization: Pin Eight Software http://pineight.8m.com/ Message-ID: References: X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Lines: 54 X-Trace: +4awYTwzd6zkHw7Ch1YzAyiReL3j7V58bv4jOG1KvhwvqJshZ9rWphXLX8fLCrtOX66yxnvo+dc4!3kTovNISl/F5ChECAGmHfeZ/sieyX73V0p2lN9vI9V6RU2viXZdz3ebDAK41bP9GkfDuSYf5oT2d!gHA= X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Fri, 25 Aug 2000 07:42:22 GMT Distribution: world Date: Fri, 25 Aug 2000 07:42:22 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Fri, 25 Aug 2000 02:44:18 -0400, Radical NetSurfer wrote: >Tonight we had to create our very own code for > >strupr > >simply because DJGPP does NOT implement this function >correctly at ALL :( > >experiment strupr(): > >"abcédef" --> "ABCéDEF" expected! BORLAND: CORRECT! Reminds me of "pokémon" --> "POKéMON" >2) an ACCURATE and properly implemented method of ACTUALLY >converting Upper/Lower FOREIGN character set should be implemented. This would require tons of locale support (is it in DJGPP?) for different codepages (DOS uses 437 or 850; Windows uses 1252; Allegro uses UTF-8 Unicode...) >(ah, Mr. Wizard, sir, how do we know an ASCII char represents a >foreign character, please?) [snip] >-------------- problem #2 getw() -------------- > >also, getw is defined in LIBC.TXT as: > >int getw(FILE *file); > >this is INCORRECT! > >get-WORD() should of been defined as: > >short getw(FILE*); > >as a WORD is "typically/natively" DEFINED AS 16-BIT! Look at the proto for fgetc() and see what it returns. C:\>info libc a fgetc Then you might understand better. -- MS (n) 1. A debilitating and surprisingly widespread affliction that renders the sufferer barely able to perform the simplest task. 2. A disease, multiple sclerosis (see). This is McAfee VirusScan. Add these two lines to your signature to prevent the spread of signature viruses. http://www.mcafee.com/