| version 1.12, 2000/12/22 10:03:32 |
version 1.15, 2001/06/04 02:49:48 |
|
|
| * 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.11 2000/12/18 01:28:27 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/parse/lex.c,v 1.14 2001/03/08 07:49:13 noro Exp $ |
| */ |
*/ |
| #include <ctype.h> |
#include <ctype.h> |
| #include "ca.h" |
#include "ca.h" |
| Line 413 void purge_stdin() |
|
| Line 413 void purge_stdin() |
|
| w_purge_stdin(); |
w_purge_stdin(); |
| #elif defined(sparc) || defined(__alpha) || defined(__SVR4) || defined(mips) || defined(VISUAL) |
#elif defined(sparc) || defined(__alpha) || defined(__SVR4) || defined(mips) || defined(VISUAL) |
| stdin->_ptr = stdin->_base; stdin->_cnt = 0; |
stdin->_ptr = stdin->_base; stdin->_cnt = 0; |
| |
#elif defined(__MACH__) && defined(__ppc__) |
| |
stdin->_r = 0; stdin->_p = stdin->_bf._base; |
| #else |
#else |
| --->FIXIT |
--->FIXIT |
| #endif |
#endif |
| Line 423 static int skipspace() { |
|
| Line 425 static int skipspace() { |
|
| |
|
| for ( c = Getc(); ; ) |
for ( c = Getc(); ; ) |
| switch ( c ) { |
switch ( c ) { |
| case ' ': case '\t': |
case ' ': case '\t': case '\r': |
| c = Getc(); break; |
c = Getc(); break; |
| case '\n': |
case '\n': |
| c = afternl(); break; |
c = afternl(); break; |
|
|
| int c; |
int c; |
| |
|
| if ( fp ) { |
if ( fp ) { |
| c = getc(fp); |
#if FEP |
| |
if ( do_fep && isatty(fileno(fp)) ) |
| |
c = readline_getc(); |
| |
else |
| |
#endif |
| |
c = getc(fp); |
| #if defined(VISUAL) |
#if defined(VISUAL) |
| if ( recv_intr ) { |
if ( recv_intr ) { |
| #include <signal.h> |
#include <signal.h> |
|
|
| if ( fp ) { |
if ( fp ) { |
| if ( asir_infile->encoded ) |
if ( asir_infile->encoded ) |
| c = (int)encrypt_char((unsigned char)c); |
c = (int)encrypt_char((unsigned char)c); |
| ungetc(c,fp); |
#if FEP |
| |
if ( do_fep && isatty(fileno(fp)) ) |
| |
readline_ungetc(); |
| |
else |
| |
#endif |
| |
ungetc(c,fp); |
| } else |
} else |
| *--parse_strp = c; |
*--parse_strp = c; |
| } |
} |
| Line 568 static int Getc() { |
|
| Line 580 static int Getc() { |
|
| int c; |
int c; |
| |
|
| if ( main_parser ) { |
if ( main_parser ) { |
| #if FEP |
|
| if ( do_fep && isatty(fileno(asir_infile->fp)) ) |
|
| while ( 1 ) { |
|
| if ((c = readline_getc()) == EOF) |
|
| if ( NEXT(asir_infile) ) { |
|
| closecurrentinput(); |
|
| c = Getc(); |
|
| break; |
|
| } else if ( read_exec_file || do_file ) |
|
| asir_terminate(1); |
|
| else { |
|
| if ( asir_infile->fp ) |
|
| clearerr(asir_infile->fp); |
|
| } |
|
| else |
|
| break; |
|
| } |
|
| else |
|
| #endif |
|
| while ( 1 ) { |
while ( 1 ) { |
| if ((c = Egetc(asir_infile->fp)) == EOF) |
if ((c = Egetc(asir_infile->fp)) == EOF) |
| if ( NEXT(asir_infile) ) { |
if ( NEXT(asir_infile) ) { |
| Line 615 static int Getc() { |
|
| Line 608 static int Getc() { |
|
| |
|
| static void Ungetc(c) { |
static void Ungetc(c) { |
| if ( main_parser ) { |
if ( main_parser ) { |
| #if FEP |
|
| if ( do_fep && isatty(fileno(asir_infile->fp)) ) |
|
| readline_ungetc(); |
|
| else |
|
| #endif |
|
| Eungetc(c,asir_infile->fp); |
Eungetc(c,asir_infile->fp); |
| if ( echoback ) |
if ( echoback ) |
| fputc('',asir_out); |
fputc('',asir_out); |