Now call creat() and open() instead of _creat() and _open().
This commit is contained in:
parent
7292b538bc
commit
a33473e0a5
|
@ -87,10 +87,10 @@ static int initfl(descr,sz,f) int descr; int sz; struct file *f; {
|
||||||
f->fname = _pargv[i];
|
f->fname = _pargv[i];
|
||||||
_cls(f);
|
_cls(f);
|
||||||
if ((descr & WRBIT) == 0) {
|
if ((descr & WRBIT) == 0) {
|
||||||
if ((f->ufd = _open(f->fname,0)) < 0)
|
if ((f->ufd = open(f->fname,0)) < 0)
|
||||||
_trp(ERESET);
|
_trp(ERESET);
|
||||||
} else {
|
} else {
|
||||||
if ((f->ufd = _creat(f->fname,0644)) < 0)
|
if ((f->ufd = creat(f->fname,0644)) < 0)
|
||||||
_trp(EREWR);
|
_trp(EREWR);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,12 +18,12 @@
|
||||||
|
|
||||||
/* Author: J.W. Stevenson */
|
/* Author: J.W. Stevenson */
|
||||||
|
|
||||||
|
#include <unistd.h>
|
||||||
#include <pc_file.h>
|
#include <pc_file.h>
|
||||||
#include <pc_err.h>
|
#include <pc_err.h>
|
||||||
|
|
||||||
extern _cls();
|
extern _cls();
|
||||||
extern _trp();
|
extern _trp();
|
||||||
extern int _creat();
|
|
||||||
|
|
||||||
/* procedure pcreat(var f:text; s:string); */
|
/* procedure pcreat(var f:text; s:string); */
|
||||||
|
|
||||||
|
@ -36,6 +36,6 @@ pcreat(f,s) struct file *f; char *s; {
|
||||||
f->size = 1;
|
f->size = 1;
|
||||||
f->count = PC_BUFLEN;
|
f->count = PC_BUFLEN;
|
||||||
f->buflen = PC_BUFLEN;
|
f->buflen = PC_BUFLEN;
|
||||||
if ((f->ufd = _creat(s,0644)) < 0)
|
if ((f->ufd = creat(s,0644)) < 0)
|
||||||
_trp(EREWR);
|
_trp(EREWR);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue