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