version 1.12, 2000/12/22 10:03:32 |
version 1.13, 2000/12/26 05:17:47 |
|
|
* 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.12 2000/12/22 10:03:32 saito Exp $ |
*/ |
*/ |
#include <ctype.h> |
#include <ctype.h> |
#include "ca.h" |
#include "ca.h" |
|
|
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 578 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 606 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); |