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
+19
View File
@@ -0,0 +1,19 @@
# include "ciodec.c"
cflush (fn)
int fn;
{
struct fileps *fp;
if (nargs() != 1)
IEHzap("cflush");
if (fn < 0 || fn >15) return;
fp = &IEH3fpts[fn];
if (fp->nchars > 0 && fp->wrflag >= 2)
{
write (fn, fp->buff,fp->nchars);
fp->bptr = fp->buff;
fp -> nchars = fp->eoferr = 0;
}
if (fp->wrflag == 1)
seek(fn, -(fp->nchars),1);
return;
}