X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: "Carey Evans" Newsgroups: comp.os.msdos.djgpp Subject: Re: ctype custom table lookup in C++ Date: 20 May 2005 14:11:40 -0700 Organization: http://groups.google.com Lines: 28 Message-ID: <1116623500.248605.257880@f14g2000cwb.googlegroups.com> References: <1116546092 DOT 867392 DOT 97940 AT g43g2000cwa DOT googlegroups DOT com> <3f5juoF5og3rU2 AT news DOT dfncis DOT de> NNTP-Posting-Host: 222.153.21.139 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1116623505 1027 127.0.0.1 (20 May 2005 21:11:45 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Fri, 20 May 2005 21:11:45 +0000 (UTC) User-Agent: G2/0.2 Complaints-To: groups-abuse AT google DOT com Injection-Info: f14g2000cwb.googlegroups.com; posting-host=222.153.21.139; posting-account=a2Dz9g0AAAAQI7DN4N6e935Thq5XWCRh To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hans-Bernhard Broeker wrote: [...] > I find it hard to believe the C++ would actually predefine the > implemention of a given feature. That's none of their business. Here's the bit of the spec I quoted: http://www.cantrip.org/lib-locales.html#lib.facet.ctype.char.members As far as I can tell, it's defined that way so that the table may be customised in a subclass. There's nothing that says that the table() method has to return __dj_ctype_flags or the equivalent table by default, though; it just has to return some variation that works when the character is cast to unsigned char as an index. In DJGPP's case, this is __dj_ctype_flags + 1. [...] > Only if you misunderstand how that table is supposed to be > constructed, in the case of DJGPP. The C++ standard seems to have > forgotten about the C specialty of passing EOF into a > library macro/function. The C++ ctype classes don't support passing EOF; valid input values are CHAR_MIN to CHAR_MAX, inclusive. -- Carey Evans