V61%DHDURZ1.BITNET@cunyvm.cuny.edu (Ronald Lamprecht) (06/22/89)
Even though only the functions 'toupper' and 'tolower' must return for all
ASCII characters the correct values while the macros '_toupper' and
'_tolower' must return correct values only for lower res. upper characters
there exists no reason to use macros which meet only the minimum requirements.
The original macros of the type:
#define _toupper(c) ((c) - 'a' + 'A')
should be replaced by:
#define _toupper(c) ((c) & 0xdf)
#define _tolower(c) ((c) | 0x20)
which are as fast as the old ones but correct for upper and lower case
characters.
I have included a uuencoded (sorry, but I'm on EBCDIC-Bitnet) cdiff for ctype.h.
It should be applied on the ctype.h posted within (1) and (2). Those who still
use the original ctype.h should at least apply an appropriated patch for
the macros 'toupper' and 'tolower' to avoid strange errors.
(1) EFTH 50 : ctype(3) from 18 Oct 88
(2) PC14a update from 22 Jan 89
Bitnet: V61@DHDURZ1 Ronald Lamprecht
UUCP: ...!unido!DHDURZ1.bitnet!V61 Theoretische Physik
ARPAnet: V61%DHDURZ1.BITNET@CUNYVM.CUNY.EDU (Heidelberg, West Germany)
--------------------------------cut here------------------------------------
begin 644 ctype.h_cdiff
M*BHJ(&-T>7!E+FA?<#$T80E4:'4@36%Y(" T(#(R.C,X.C T(#$Y.#D*+2TM
M(&-T>7!E+F@)5&AU($IU;B Q-2 P,3HU,3HP-2 Q.3@Y"BHJ*BHJ*BHJ*BHJ
M*BHJ*@HJ*BH@,C<L,S(@*BHJ*@H@("-D969I;F4@:7-C;G1R;"AC*0DH*%]C
M='EP95\K,2E;8UTF7T,I"B @(V1E9FEN92!I<V%S8VEI*&,I"2@H=6YS:6=N
M960I*&,I/#TP,3<W*0H@( HA("-D969I;F4@7W1O=7!P97(H8RD)*"AC*2 M
M("=A)R K("=!)RD*(2 C9&5F:6YE(%]T;VQO=V5R*&,I"2@H8RD@+2 G02<@
M*R G82<I"B$@(V1E9FEN92 @=&]A<V-I:2AC*0DH*&,I("8@,#$W-RD*+2TM
M(#(W+#,R("TM+2T*(" C9&5F:6YE(&ES8VYT<FPH8RD)*"A?8W1Y<&5?*S$I
M6V-=)E]#*0H@("-D969I;F4@:7-A<V-I:2AC*0DH*'5N<VEG;F5D*2AC*3P]
M,#$W-RD*(" *(2 C9&5F:6YE(%]T;W5P<&5R*&,I"2@H8RD@)B P>&1F*0HA
M("-D969I;F4@7W1O;&]W97(H8RD)*"AC*2!\(#!X,C I"B$@(V1E9FEN92 @
8=&]A<V-I:2AC*0DH*&,I("8@,#$W-RD*
end
--------------------------------end-----------------------------------------