From dfd1934d5e1ddbeb326f77fc0e52307c801a1a3e Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Wed, 25 Mar 2009 15:55:14 +0000 Subject: x20090325-1554 --- emu/port/file.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 emu/port/file.c (limited to 'emu/port/file.c') diff --git a/emu/port/file.c b/emu/port/file.c new file mode 100644 index 00000000..91000ebb --- /dev/null +++ b/emu/port/file.c @@ -0,0 +1,16 @@ +#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; +} -- cgit v1.2.3