*** empty log message ***
This commit is contained in:
parent
debef378c9
commit
be68581019
3 changed files with 30 additions and 18 deletions
|
@ -72,10 +72,13 @@ all: cc
|
||||||
cc: hfiles LLfiles
|
cc: hfiles LLfiles
|
||||||
make "EMHOME="$(EMHOME) cpp
|
make "EMHOME="$(EMHOME) cpp
|
||||||
|
|
||||||
hfiles: Parameters
|
hfiles: Parameters char.c charoffset.h
|
||||||
./make.hfiles Parameters
|
./make.hfiles Parameters
|
||||||
@touch hfiles
|
@touch hfiles
|
||||||
|
|
||||||
|
charoffset.h char.c: chtab char.tab
|
||||||
|
chtab -fchar.tab > char.c
|
||||||
|
|
||||||
LLfiles: $(LSRC)
|
LLfiles: $(LSRC)
|
||||||
$(GEN) $(GENOPTIONS) $(LSRC)
|
$(GEN) $(GENOPTIONS) $(LSRC)
|
||||||
@touch LLfiles
|
@touch LLfiles
|
||||||
|
@ -86,12 +89,6 @@ tokenfile.g: tokenname.c make.tokfile
|
||||||
symbol2str.c: tokenname.c make.tokcase
|
symbol2str.c: tokenname.c make.tokcase
|
||||||
<tokenname.c ./make.tokcase >symbol2str.c
|
<tokenname.c ./make.tokcase >symbol2str.c
|
||||||
|
|
||||||
char.c: char.tab chtab
|
|
||||||
chtab -fchar.tab > char.c
|
|
||||||
|
|
||||||
charoffset.h: chtab char.tab
|
|
||||||
chtab -fchar.tab > /dev/null
|
|
||||||
|
|
||||||
chtab: chtab.o
|
chtab: chtab.o
|
||||||
$(CC) -o chtab chtab.o
|
$(CC) -o chtab chtab.o
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
!File: strsize.h
|
!File: strsize.h
|
||||||
#define ISTRSIZE 32 /* minimum number of bytes allocated for
|
#define ISTRSIZE 32 /* minimum number of bytes allocated for
|
||||||
storing a string */
|
storing a string */
|
||||||
#define RSTRSIZE 8 /* step size in enlarging the memory for
|
#define RSTRSIZE 32 /* step size in enlarging the memory for
|
||||||
the storage of a string */
|
the storage of a string */
|
||||||
|
|
||||||
|
|
||||||
|
@ -52,8 +52,8 @@
|
||||||
|
|
||||||
|
|
||||||
!File: textsize.h
|
!File: textsize.h
|
||||||
#define ITEXTSIZE 32 /* 1st piece of memory for repl. text */
|
#define ITEXTSIZE 64 /* 1st piece of memory for repl. text */
|
||||||
#define RTEXTSIZE 32 /* stepsize for enlarging repl.text */
|
#define RTEXTSIZE 64 /* stepsize for enlarging repl.text */
|
||||||
|
|
||||||
|
|
||||||
!File: inputtype.h
|
!File: inputtype.h
|
||||||
|
|
|
@ -16,6 +16,11 @@ char _obuf[OBUFSIZE];
|
||||||
char bits[128];
|
char bits[128];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Xflush()
|
||||||
|
{
|
||||||
|
sys_write(STDOUT, _obuf, OBUFSIZE);
|
||||||
|
}
|
||||||
|
|
||||||
preprocess(fn)
|
preprocess(fn)
|
||||||
char *fn;
|
char *fn;
|
||||||
{
|
{
|
||||||
|
@ -25,8 +30,8 @@ preprocess(fn)
|
||||||
int lineno = 0;
|
int lineno = 0;
|
||||||
extern char options[];
|
extern char options[];
|
||||||
|
|
||||||
#define flush(X) (sys_write(STDOUT,_obuf,X), op = _obuf)
|
#define flush(X) (sys_write(STDOUT,_obuf,X))
|
||||||
#define echo(ch) (op != ob || flush(OBUFSIZE), *op++ = (ch))
|
#define echo(ch) if (op == ob) { Xflush(); op = _obuf; } *op++ = (ch);
|
||||||
#define newline() echo('\n')
|
#define newline() echo('\n')
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
@ -48,7 +53,9 @@ preprocess(fn)
|
||||||
lineno = LineNumber;
|
lineno = LineNumber;
|
||||||
sprint(p, "#line %d \"%s\"\n", LineNumber,
|
sprint(p, "#line %d \"%s\"\n", LineNumber,
|
||||||
FileName);
|
FileName);
|
||||||
while (*p) echo(*p++);
|
while (*p) {
|
||||||
|
echo(*p++);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if (c & 0200) {
|
if (c & 0200) {
|
||||||
|
@ -78,17 +85,23 @@ preprocess(fn)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (c == '*') {
|
else if (c == '*') {
|
||||||
if (options['C']) echo(c);
|
if (options['C']) {
|
||||||
|
echo(c);
|
||||||
|
}
|
||||||
LoadChar(c);
|
LoadChar(c);
|
||||||
if (c == '/') {
|
if (c == '/') {
|
||||||
if (options['C']) echo(c);
|
if (options['C']) {
|
||||||
break;
|
echo(c);
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
PushBack();
|
PushBack();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (options['C']) echo(c);
|
else if (options['C']) {
|
||||||
|
echo(c);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
NoUnstack--;
|
NoUnstack--;
|
||||||
LoadChar(c);
|
LoadChar(c);
|
||||||
|
@ -189,7 +202,9 @@ preprocess(fn)
|
||||||
nomac:
|
nomac:
|
||||||
*tg = 0;
|
*tg = 0;
|
||||||
tg = buf;
|
tg = buf;
|
||||||
while (*tg) echo(*tg++);
|
while (*tg) {
|
||||||
|
echo(*tg++);
|
||||||
|
}
|
||||||
LoadChar(c);
|
LoadChar(c);
|
||||||
while (in_idf(c)) {
|
while (in_idf(c)) {
|
||||||
echo(c);
|
echo(c);
|
||||||
|
|
Loading…
Reference in a new issue