Now call creat() and open() instead of _creat() and _open().

This commit is contained in:
dtrg 2010-09-27 20:47:32 +00:00
parent 7292b538bc
commit a33473e0a5
2 changed files with 4 additions and 4 deletions

View file

@ -87,10 +87,10 @@ static int initfl(descr,sz,f) int descr; int sz; struct file *f; {
f->fname = _pargv[i];
_cls(f);
if ((descr & WRBIT) == 0) {
if ((f->ufd = _open(f->fname,0)) < 0)
if ((f->ufd = open(f->fname,0)) < 0)
_trp(ERESET);
} else {
if ((f->ufd = _creat(f->fname,0644)) < 0)
if ((f->ufd = creat(f->fname,0644)) < 0)
_trp(EREWR);
}
}

View file

@ -18,12 +18,12 @@
/* Author: J.W. Stevenson */
#include <unistd.h>
#include <pc_file.h>
#include <pc_err.h>
extern _cls();
extern _trp();
extern int _creat();
/* procedure pcreat(var f:text; s:string); */
@ -36,6 +36,6 @@ pcreat(f,s) struct file *f; char *s; {
f->size = 1;
f->count = PC_BUFLEN;
f->buflen = PC_BUFLEN;
if ((f->ufd = _creat(s,0644)) < 0)
if ((f->ufd = creat(s,0644)) < 0)
_trp(EREWR);
}