ref: 866d74c0c4bb50e85e9e8bb95140c10d409e53be
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; }