www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/08/31/19:00:58

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: <ue4cqsg0k83m0461605mnkssjo43odacen AT 4ax DOT com> <39a9a972 DOT 29351296 AT news DOT wins DOT uva DOT nl> <lg7rqsgqt0j335li1o9e294c2b2h1p81hr AT 4ax DOT com>
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 <Bullcr_pd_yerrick AT hotmail DOT comRemoveBullcr_p>
 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 <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 :(
>
>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 ;-)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019