From 37da2899f40661e3e9631e497da8dc59b971cbd0 Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Fri, 22 Dec 2006 17:07:39 +0000 Subject: 20060303a --- 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