summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
473a17a)
SCCS-vsn: usr.bin/pascal/pdx/command/token.l 1.3
%{
/* Copyright (c) 1982 Regents of the University of California */
%{
/* Copyright (c) 1982 Regents of the University of California */
-static char sccsid[] = "@(#)token.l 1.2 %G%";
+static char sccsid[] = "@(#)token.l 1.3 %G%";
/*
* Token definitions for pdx scanner.
/*
* Token definitions for pdx scanner.
#include "defs.h"
#include "command.h"
#include "y.tab.h"
#include "defs.h"
#include "command.h"
#include "y.tab.h"
#include "symtab.h"
#include "sym.h"
#include "process.h"
#include "symtab.h"
#include "sym.h"
#include "process.h"
LOCAL FILE **curfp = &infp[0];
LOCAL BOOLEAN isnewfile;
LOCAL FILE **curfp = &infp[0];
LOCAL BOOLEAN isnewfile;
+LOCAL BOOLEAN firsttime;
/*
* Initially, we set the input to the initfile if it exists.
/*
* Initially, we set the input to the initfile if it exists.
fp = fopen(initfile, "r");
if (fp != NIL) {
fclose(fp);
setinput(initfile);
fp = fopen(initfile, "r");
if (fp != NIL) {
fclose(fp);
setinput(initfile);
+ if (!option('r')) {
+ firsttime = TRUE;
+ }
fclose(yyin);
yyin = *--curfp;
if (yyin == stdin) {
fclose(yyin);
yyin = *--curfp;
if (yyin == stdin) {
+ if (firsttime) {
+ firsttime = FALSE;
+ } else {
+ prompt();
+ }