Initial revision
This commit is contained in:
17
lang/pc/libpc/rf.c
Normal file
17
lang/pc/libpc/rf.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <pc_file.h>
|
||||
#include <pc_err.h>
|
||||
|
||||
extern struct file *_curfil;
|
||||
extern _trp();
|
||||
extern _incpt();
|
||||
|
||||
_rf(f) struct file *f; {
|
||||
|
||||
_curfil = f;
|
||||
if ((f->flags&0377) != MAGIC)
|
||||
_trp(EBADF);
|
||||
if (f->flags & WRBIT)
|
||||
_trp(EREADF);
|
||||
if ((f->flags & WINDOW) == 0)
|
||||
_incpt(f);
|
||||
}
|
||||
Reference in New Issue
Block a user