Added ChPushBack

This commit is contained in:
ceriel 1988-08-19 13:07:20 +00:00
parent 282064375d
commit 7ee4487924
2 changed files with 8 additions and 0 deletions

View file

@ -20,6 +20,7 @@
#define LoadChar(dest) ((dest = *_ipp++) || (dest = loadbuf())) #define LoadChar(dest) ((dest = *_ipp++) || (dest = loadbuf()))
#define PushBack() (--_ipp) #define PushBack() (--_ipp)
#define ChPushBack(ch) (*--_ipp = (ch))
/* EOF may be defined as -1 in most programs but the character -1 may /* EOF may be defined as -1 in most programs but the character -1 may
be expanded to the int -1 which causes troubles at the indexing in be expanded to the int -1 which causes troubles at the indexing in

View file

@ -10,6 +10,10 @@ module for compilers
.PP .PP
.B PushBack() .B PushBack()
.PP .PP
.B ChPushBack(ch)
.br
.B int ch;
.PP
.B int InsertFile(filename, table, result) .B int InsertFile(filename, table, result)
.br .br
.B char *filename; .B char *filename;
@ -94,6 +98,9 @@ which is defined in \fIinp_pkg.spec\fR, is returned.
The macro \fIPushBack\fR pushes the last character read back onto the The macro \fIPushBack\fR pushes the last character read back onto the
input stream. input stream.
.PP .PP
The macro \fIChPushBack\fR inserts the character \fIch\fP into the
input stream.
.PP
The routine \fIInsertFile\fR suspends input from the current input stream. The routine \fIInsertFile\fR suspends input from the current input stream.
The next input characters will be obtained from the specified file The next input characters will be obtained from the specified file
\fIfilename\fR. \fIfilename\fR.