=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/parse/lex.c,v retrieving revision 1.33 retrieving revision 1.36 diff -u -p -r1.33 -r1.36 --- OpenXM_contrib2/asir2000/parse/lex.c 2004/04/30 08:25:38 1.33 +++ OpenXM_contrib2/asir2000/parse/lex.c 2005/10/26 07:33:03 1.36 @@ -45,7 +45,7 @@ * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. * - * $OpenXM: OpenXM_contrib2/asir2000/parse/lex.c,v 1.32 2004/03/26 08:25:37 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/parse/lex.c,v 1.35 2005/10/19 04:51:15 noro Exp $ */ #include #include "ca.h" @@ -319,7 +319,7 @@ int yylex() } yylvalp->p = (pointer)r; return ( FORMULA ); - } else if ( isalpha(c) || c == ':' ) { + } else if ( isalpha(c) || c == ':' || c == '_' ) { if ( c == ':' ) { c1 = Getc(); if ( c1 != ':' ) { @@ -347,7 +347,7 @@ int yylex() break; } REALLOC_TBUF tbuf[i] = 0; Ungetc(c); - if ( isupper(tbuf[0]) ) { + if ( isupper(tbuf[0]) || (tbuf[0] == '_' && isupper(tbuf[1])) ) { cptr = (char *)MALLOC(strlen(tbuf)+1); strcpy(cptr,tbuf); yylvalp->p = (pointer)cptr; return UCASE; @@ -480,8 +480,6 @@ void purge_stdin() #endif } -extern int asir_texmacs; - static int skipspace() { int c,c1; @@ -722,7 +720,7 @@ char *readline_console(char *prompt) exp_result = history_expand(line,&expansion); if ( !exp_result ) { free(expansion); - for ( ; isspace(*line); line++ ); + for ( ; isspace((unsigned char)*line); line++ ); add_history(line); break; } else if ( exp_result > 0 ) {