From: eglebbk AT dds DOT nl (Evert Glebbeek) Newsgroups: comp.os.msdos.djgpp Subject: Re: BAD strupr, BAD getw Date: Thu, 31 Aug 2000 22:48:52 GMT Organization: Physics student, University of Amsterdam Lines: 48 Distribution: world Message-ID: <39aec079.41070104@news.wins.uva.nl> References: <39a9a972 DOT 29351296 AT news DOT wins DOT uva DOT nl> NNTP-Posting-Host: stol-117-126.uva.studentennet.nl X-Trace: info.wins.uva.nl 967762201 5732 145.98.117.126 (31 Aug 2000 22:50:01 GMT) X-Complaints-To: usenet AT science DOT uva DOT nl NNTP-Posting-Date: Thu, 31 Aug 2000 22:50:01 +0000 (UTC) X-Newsreader: Forte Free Agent 1.11/32.235 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Newsgroup: comp.os.msdos.djgpp From: Damian Yerrick On Thu, 31 Aug 2000 00:05:38 GMT >On Wed, 30 Aug 2000 22:14:30 GMT, eglebbk AT dds DOT nl (Evert Glebbeek) >wrote: > >>Newsgroup: comp.os.msdos.djgpp >> From: Radical NetSurfer >> 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 :( > >Or implement a function > char *strxlate(char *string, int (*xlatefunc)(int)); >where strupr(string) would be written strxlate(string, toupper) > >>Portable programs shouldn't be assuming an ASCII character set. > >They can if they're reading files guaranteed to be ASCII or something >similar (e.g. .txt files). Are .txt files guarenteed to be ASCII files? I'm not aware of any such requirement - though I've never seen otherwise. >>IMHO, the point of programming in C is to actually produce >>portable code. > >According to the ANSI/ISO C standard, is a file created by fopen() >(ANSI, POSIX) and written to with fprintf() (ANSI, POSIX) guaranteed >to be usable in another program that uses fopen() (ANSI, POSIX), >fgets() (ANSI, POSIX), and sscanf() (ANSI, POSIX)? > >Are there any systems that: > o are in common use in The Year 2000, > o are typically programmed in C, and > o use an encoding for Basic Latin other than ASCII, such as Baudot or > EBCDIC? In all honesty, I don't know. When I replied, I'd just been reading a threat on the subject on comp.lang.c and it was argued quite hotly that it is FAPP a mortal sin to assume your compter uses ASCII encoding, so I guess I was a little brain washed ;-)