delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/01/13/12:15:22

Posted: Thu, 13 Jan 94 16:10:01 -0100
Date: Thu, 13 Jan 94 15:42:01 -0100
Sender: nolasco AT who DOT ch
From: "Perfecto NOLASCO" <nolasco AT who DOT ch>
To: "INET: djgpp AT sun DOT soe DOT clarkson DOT edu" <djgpp AT sun DOT soe DOT clarkson DOT edu>
Subject: Problem using "isalnum(c)" in both gcc254 and 257
Msg-Class: !AS

	First of all, I would like to congratulate DJ for his wonderful work
in porting GCC to MSDOS (lots of applause!!!).

	Now for the problem that's about to drive me nuts ...

	I used the macro defined in "ctype.h" shown below:

		#define isalnum(c)   ((_ctype_+1)[c]&(_U|_L|_N))

in the following function definition:

	static void parseVariableName(pp, endp)
	Byte    **pp, **endp;
	{
	  register Byte *p, *e;

	  p = *pp;
	  e = *endp;

	  while (isWhiteSpace(*p)) {
	    p++;
	  }

	  /* ### check for non-null here and not alnum; 
	     we've jammed on a bogus char and it's an error */

	  /* variable name extends from p to e-1 */
	  for (e = p; *e; e++) {
	    if (!isalnum(*e)) {
	      break;
	    }
	  }

	  *pp = p;
	  *endp = e;
	}


and got the following error during compilation:

		gcc -O2 -m486 -D QUIET   -c MSTSYM.c -o MSTSYM.o
		MSTSYM.c: In function parseVariableName':
	===>	MSTSYM.c:570: _ctype_' undeclared (first use this function)
		MSTSYM.c:570: (Each undeclared identifier is reported only once
		MSTSYM.c:570: for each function it appears in.)
		make.exe: *** MSTSYM.o Error 1

Note that I am compiling a new version of a program that contains the above
function definition and no such problem occured in the old version (the 
function was not touched while writing the new version). Any ideas?

	Any response will be greatly appreciated.

							Jun Nolasco
							nolasco AT who DOT ch

P.S.	If this one has already been discussed in the list, my apologies.
	I have just recently joined this list.

	By the way, where is the archive of this newsgroup?


- Raw text -


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