Now call creat() and open() instead of _creat() and _open().
authordtrg <none@none>
Mon, 27 Sep 2010 20:47:32 +0000 (20:47 +0000)
committerdtrg <none@none>
Mon, 27 Sep 2010 20:47:32 +0000 (20:47 +0000)
lang/pc/libpc/opn.c
lang/pc/libpc/pcreat.c

index e28e3ed..83f9d91 100644 (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);
                }
        }
index b9c565f..1033624 100644 (file)
 
 /* 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);
 }