*** empty log message ***

This commit is contained in:
ceriel 1987-02-07 00:35:16 +00:00
parent a1c7298f9d
commit 729490c212

View file

@ -155,9 +155,9 @@ fill_window(w,len)
write_first(w) write_first(w)
queue w; queue w;
{ {
instr_p ip; register instr_p ip = qhead(w);
write_instr(ip = qhead(w)); fputs(ip->line, stdout);
remove_head(w); remove_head(w);
oldinstr(ip); oldinstr(ip);
} }
@ -524,14 +524,15 @@ static bool junk_state = FALSE; /* TRUE while processing a very long line */
instr_p read_instr() instr_p read_instr()
{ {
register instr_p ip; instr_p ip;
register int c; register int c;
register char *p; register char *p;
register FILE *inp = stdin;
char *plim; char *plim;
ip = newinstr(); ip = newinstr();
plim = &ip->line[MAXLINELEN]; plim = &ip->line[MAXLINELEN];
if (( c = getchar()) == EOF) return NIL; if (( c = getc(inp)) == EOF) return NIL;
for (p = ip->line; p < plim;) { for (p = ip->line; p < plim;) {
*p++ = c; *p++ = c;
if (c == '\n') { if (c == '\n') {
@ -540,26 +541,15 @@ instr_p read_instr()
junk_state = FALSE; junk_state = FALSE;
return ip; return ip;
} }
c = getchar(); c = getc(inp);
} }
ungetc(c,stdin); ungetc(c,inp);
*p = '\0'; *p = '\0';
junk_state = ip->state = JUNK; junk_state = ip->state = JUNK;
return ip; return ip;
} }
write_instr(ip)
instr_p ip;
{
register char *p;
for (p = ip->line; *p != '\0'; p++) {
putchar(*p);
}
}
/* Core allocation. /* Core allocation.
* As all instruction struct have the same size we can re-use every struct. * As all instruction struct have the same size we can re-use every struct.