Add original unix v6

This commit is contained in:
memnoth
2018-01-27 22:35:41 +09:00
commit 2c7099ee50
664 changed files with 106254 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
# include "ciodec.c"
ungetc (c, fn)
{
struct fileps *fp;
if (nargs() != 2)
IEHzap("ungetc");
/* push back onto input */
fp = &IEH3fpts[fn];
if (fp->wrflag == 0)
IEH3mbuf(fn,0);
if (fp->bptr <= fp->buff - 100)
IEH3err("ungetc/unprintf: buffer full file %d",fn);
*--fp->bptr = c;
fp->nchars++;
}