ref: 5edeca01b0622463a65c126ebcc29314013fd928
dir: /emu/port/file.c/
#include "dat.h" #include "fns.h" #include "error.h" int openmode(ulong o) { if(o >= (OTRUNC|OCEXEC|ORCLOSE|OEXEC)) error(Ebadarg); o &= ~(OTRUNC|OCEXEC|ORCLOSE); if(o > OEXEC) error(Ebadarg); if(o == OEXEC) return OREAD; return o; }