version 1.48, 2015/08/06 10:01:53 |
version 1.52, 2017/03/28 03:26:33 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* 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 <ctype.h> |
#include <ctype.h> |
#include "ca.h" |
#include "ca.h" |
|
|
#include "parse.h" |
#include "parse.h" |
#include <sys/types.h> |
#include <sys/types.h> |
#include <sys/stat.h> |
#include <sys/stat.h> |
#if defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__) |
#if defined(VISUAL) || defined(__MINGW32__) |
#include "ytab.h" |
#include "ytab.h" |
#else |
#else |
#include "y.tab.h" |
#include "y.tab.h" |
Line 74 extern Obj VOIDobj; |
|
Line 74 extern Obj VOIDobj; |
|
|
|
extern int main_parser; |
extern int main_parser; |
extern char *parse_strp; |
extern char *parse_strp; |
extern int recv_intr; |
|
|
|
#define NBUFSIZ (BUFSIZ*10) |
#define NBUFSIZ (BUFSIZ*10) |
#define TBUFSIZ (BUFSIZ) |
#define TBUFSIZ (BUFSIZ) |
|
|
i = 0; |
i = 0; |
do { |
do { |
c = Getc(); |
c = Getc(); |
|
if ( c == '\n' ) asir_infile->ln++; |
if ( c == '\\' ) { |
if ( c == '\\' ) { |
c1 = Getc(); |
c1 = Getc(); |
if ( c1 == 'n' ) { |
if ( c1 == 'n' ) { |
Line 473 void purge_stdin() |
|
Line 473 void purge_stdin() |
|
void w_purge_stdin(); |
void w_purge_stdin(); |
|
|
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; |
stdin->_ptr = stdin->_base; stdin->_cnt = 0; |
#elif (defined(__MACH__) && defined(__ppc__)) || defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__INTERIX) |
#elif (defined(__MACH__) && defined(__ppc__)) || defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__INTERIX) |
stdin->_r = 0; stdin->_p = stdin->_bf._base; |
stdin->_r = 0; stdin->_p = stdin->_bf._base; |
Line 624 int Egetc(FILE *fp) |
|
Line 624 int Egetc(FILE *fp) |
|
else |
else |
#endif |
#endif |
c = getc(fp); |
c = getc(fp); |
#if defined(VISUAL) || defined(__MINGW32__) || defined(__MINGW64__) |
#if defined(VISUAL) || defined(__MINGW32__) |
if ( recv_intr ) { |
check_intr(); |
#include <signal.h> |
|
if ( recv_intr == 1 ) { |
|
recv_intr = 0; |
|
int_handler(SIGINT); |
|
} else { |
|
recv_intr = 0; |
|
ox_usr1_handler(0); |
|
} |
|
} |
|
#endif |
#endif |
if ( c == EOF ) |
if ( c == EOF ) |
return c; |
return c; |