386BSD 0.1 development
authorWilliam F. Jolitz <wjolitz@soda.berkeley.edu>
Sun, 17 Mar 1991 15:54:52 +0000 (07:54 -0800)
committerWilliam F. Jolitz <wjolitz@soda.berkeley.edu>
Sun, 17 Mar 1991 15:54:52 +0000 (07:54 -0800)
Work on file usr/src/lib/libg++/g++-include/open.h

Co-Authored-By: Lynne Greer Jolitz <ljolitz@cardio.ucsf.edu>
Synthesized-from: 386BSD-0.1

usr/src/lib/libg++/g++-include/open.h [new file with mode: 0644]

diff --git a/usr/src/lib/libg++/g++-include/open.h b/usr/src/lib/libg++/g++-include/open.h
new file mode 100644 (file)
index 0000000..ffe81a1
--- /dev/null
@@ -0,0 +1,39 @@
+
+#ifndef _open_h
+#ifdef __GNUG__
+#pragma once
+#pragma interface
+#endif
+#define _open_h 1
+
+#include <File.h>
+#include <sys/file.h>           // needed to determine values of O_RDONLY...
+
+/*
+
+ translation stuff for opening files. 
+
+*/
+
+
+enum sys_open_cmd_io_mode  // These should be correct for most systems
+{                        
+  sio_read      = O_RDONLY,
+  sio_write     = O_WRONLY,
+  sio_readwrite = O_RDWR,
+  sio_append    = O_APPEND
+};
+
+enum sys_open_cmd_access_mode
+{
+  sa_create     = O_CREAT,
+  sa_truncate   = O_TRUNC,
+  sa_createonly = O_EXCL | O_CREAT
+};
+
+  
+int open_cmd_arg(io_mode i, access_mode a); // decode modes
+char* fopen_cmd_arg(io_mode i);
+int open_cmd_arg(const char* m);
+
+#endif