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