diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2008-01-27 11:37:44 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@xenon.tklauser.home> | 2008-01-27 11:37:44 +0100 |
commit | 7e0f021a9aec35fd8e6725e87e3313b101d26f5e (patch) | |
tree | b1cacc4b24393f517aeb4610e9e1021f954307a8 /reference/C/CONTRIB/SNIP/os_id.h |
Initial import (2.0.2-6)2.0.2-6
Diffstat (limited to 'reference/C/CONTRIB/SNIP/os_id.h')
-rwxr-xr-x | reference/C/CONTRIB/SNIP/os_id.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/reference/C/CONTRIB/SNIP/os_id.h b/reference/C/CONTRIB/SNIP/os_id.h new file mode 100755 index 0000000..bb53fdb --- /dev/null +++ b/reference/C/CONTRIB/SNIP/os_id.h @@ -0,0 +1,41 @@ +/*
+** OS_ID.H
+**
+** Based upon a public domain work by David Gibbs
+*/
+
+#ifndef OS_ID_H
+#define OS_ID_H
+
+struct i_os_ver
+{
+ int maj;
+ int min;
+};
+
+#define DOS 0
+#define OS2 1
+#define DV 2
+#define WINS 3
+#define WIN3 4
+#define TOT_OS 5
+
+ /* 76543210 */
+#define is_DOS 0x01 /* b'00000001' */
+#define is_OS2 0x02 /* b'00000010' */
+#define is_DV 0x04 /* b'00000100' */
+#define is_WINS 0x08 /* b'00001000' */
+#define is_WIN3 0x10 /* b'00010000' */
+
+#ifndef OS_ID_MAIN
+ extern int id_os_type;
+ extern int id_os;
+ extern const char *id_os_name[TOT_OS];
+ extern struct id_os_ver i_os_ver[TOT_OS];
+#endif
+
+/* Function prototypes */
+int get_os();
+
+#endif /* OS_ID_H */
+
|