Mail Archives: djgpp-workers/1999/02/12/15:54:56
> Your calls to them. The ANSI spec very clearly states that the
> programmer must pass integer (not char!) values in the range 0..255
> or the constant EOF to these functions. Passing other values is
> illegal and the results are undefined.
In that case, the source files in src/libc/compat/string/ (and maybe
also others) have to be fixed, since for instance in
src/libc/compat/string/stricmp.c is coded
int
stricmp(const char *s1, const char *s2)
{
while (tolower(*s1) == tolower(*s2))
....
where a char is passed to tolower and not an int.
OK, and a last note: Since I don't have any ANSI spec
I want to know, if ANSI forbits the ctype functions to check
their arguments or not. If it is allowed then I would vote for
my patch sent already.
Robert
******************************************************
* email: Robert Hoehne <robert DOT hoehne AT gmx DOT net> *
* Post: Am Berg 3, D-09573 Dittmannsdorf, Germany *
* WWW: http://www.tu-chemnitz.de/~sho/rho *
******************************************************
- Raw text -