=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/parse/lex.c,v retrieving revision 1.48 retrieving revision 1.52 diff -u -p -r1.48 -r1.52 --- OpenXM_contrib2/asir2000/parse/lex.c 2015/08/06 10:01:53 1.48 +++ OpenXM_contrib2/asir2000/parse/lex.c 2017/03/28 03:26:33 1.52 @@ -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.47 2015/08/04 06:20:45 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/parse/lex.c,v 1.51 2016/08/24 08:21:03 ohara Exp $ */ #include #include "ca.h" @@ -54,7 +54,7 @@ #include "parse.h" #include #include -#if defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__) +#if defined(VISUAL) || defined(__MINGW32__) #include "ytab.h" #else #include "y.tab.h" @@ -74,7 +74,6 @@ extern Obj VOIDobj; extern int main_parser; extern char *parse_strp; -extern int recv_intr; #define NBUFSIZ (BUFSIZ*10) #define TBUFSIZ (BUFSIZ) @@ -188,6 +187,7 @@ int yylex() i = 0; do { c = Getc(); + if ( c == '\n' ) asir_infile->ln++; if ( c == '\\' ) { c1 = Getc(); if ( c1 == 'n' ) { @@ -473,7 +473,7 @@ void purge_stdin() void w_purge_stdin(); w_purge_stdin(); -#elif defined(sparc) || defined(__alpha) || defined(__SVR4) || defined(mips) || defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__) || defined(_IBMR2) +#elif defined(sparc) || defined(__alpha) || defined(__SVR4) || defined(mips) || defined(VISUAL) || defined(__MINGW32__) || defined(_IBMR2) stdin->_ptr = stdin->_base; stdin->_cnt = 0; #elif (defined(__MACH__) && defined(__ppc__)) || defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__INTERIX) stdin->_r = 0; stdin->_p = stdin->_bf._base; @@ -624,17 +624,8 @@ int Egetc(FILE *fp) else #endif c = getc(fp); -#if defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__) - if ( recv_intr ) { -#include - if ( recv_intr == 1 ) { - recv_intr = 0; - int_handler(SIGINT); - } else { - recv_intr = 0; - ox_usr1_handler(0); - } - } +#if defined(VISUAL) || defined(__MINGW32__) + check_intr(); #endif if ( c == EOF ) return c;