cc: hfiles LLfiles
make "EMHOME="$(EMHOME) cpp
-hfiles: Parameters
+hfiles: Parameters char.c charoffset.h
./make.hfiles Parameters
@touch hfiles
+charoffset.h char.c: chtab char.tab
+ chtab -fchar.tab > char.c
+
LLfiles: $(LSRC)
$(GEN) $(GENOPTIONS) $(LSRC)
@touch LLfiles
symbol2str.c: tokenname.c make.tokcase
<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
$(CC) -o chtab chtab.o
!File: strsize.h
#define ISTRSIZE 32 /* minimum number of bytes allocated for
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 */
!File: textsize.h
-#define ITEXTSIZE 32 /* 1st piece of memory for repl. text */
-#define RTEXTSIZE 32 /* stepsize for enlarging repl.text */
+#define ITEXTSIZE 64 /* 1st piece of memory for repl. text */
+#define RTEXTSIZE 64 /* stepsize for enlarging repl.text */
!File: inputtype.h
char bits[128];
#endif
+Xflush()
+{
+ sys_write(STDOUT, _obuf, OBUFSIZE);
+}
+
preprocess(fn)
char *fn;
{
int lineno = 0;
extern char options[];
-#define flush(X) (sys_write(STDOUT,_obuf,X), op = _obuf)
-#define echo(ch) (op != ob || flush(OBUFSIZE), *op++ = (ch))
+#define flush(X) (sys_write(STDOUT,_obuf,X))
+#define echo(ch) if (op == ob) { Xflush(); op = _obuf; } *op++ = (ch);
#define newline() echo('\n')
for (;;) {
lineno = LineNumber;
sprint(p, "#line %d \"%s\"\n", LineNumber,
FileName);
- while (*p) echo(*p++);
+ while (*p) {
+ echo(*p++);
+ }
}
for (;;) {
if (c & 0200) {
return;
}
else if (c == '*') {
- if (options['C']) echo(c);
+ if (options['C']) {
+ echo(c);
+ }
LoadChar(c);
if (c == '/') {
- if (options['C']) echo(c);
- break;
+ if (options['C']) {
+ echo(c);
+ }
+ break;
}
else {
PushBack();
}
}
- else if (options['C']) echo(c);
+ else if (options['C']) {
+ echo(c);
+ }
}
NoUnstack--;
LoadChar(c);
nomac:
*tg = 0;
tg = buf;
- while (*tg) echo(*tg++);
+ while (*tg) {
+ echo(*tg++);
+ }
LoadChar(c);
while (in_idf(c)) {
echo(c);