aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/include/sys
diff options
context:
space:
mode:
authorJohn Wilbert M. Villamor <lameguy64@gmail.com>2019-04-06 10:11:07 +0800
committerJohn Wilbert M. Villamor <lameguy64@gmail.com>2019-04-06 10:11:07 +0800
commitf3e040230772f978540a71aea43dfde200992922 (patch)
treebd8ca31b72dd01e24980b073854e263589530f56 /libpsn00b/include/sys
downloadpsn00bsdk-f3e040230772f978540a71aea43dfde200992922.tar.gz
First commit
Diffstat (limited to 'libpsn00b/include/sys')
-rw-r--r--libpsn00b/include/sys/fcntl.h20
-rw-r--r--libpsn00b/include/sys/types.h9
2 files changed, 29 insertions, 0 deletions
diff --git a/libpsn00b/include/sys/fcntl.h b/libpsn00b/include/sys/fcntl.h
new file mode 100644
index 0000000..dfbf5b2
--- /dev/null
+++ b/libpsn00b/include/sys/fcntl.h
@@ -0,0 +1,20 @@
+#ifndef _SYS_FCNTL_H
+#define _SYS_FCNTL_H
+
+// File control mode flags for BIOS file functions
+// (many weren't documented in nocash docs)
+#define FREAD 0x1 // Read
+#define FWRITE 0x2 // Write
+#define FNBLOCK 0x4 // Non-blocking read access
+#define FRLOCK 0x10 // Read lock
+#define FWLOCK 0x20 // Write lock
+#define FAPPEND 0x100 // Append
+#define FCREATE 0x200 // Create if not exist
+#define FTRUNC 0x400 // Truncate to zero length
+#define FSCAN 0x2000 // Scanning type
+#define FRCOM 0x2000 // Remote command entry
+#define FNBUF 0x4000 // No ring buffer and terminal interrupt
+#define FASYNC 0x8000 // Asynchronous I/O
+#define FNBLOCKS(a) (a<<16) // Number of blocks? (from nocash docs)
+
+#endif \ No newline at end of file
diff --git a/libpsn00b/include/sys/types.h b/libpsn00b/include/sys/types.h
new file mode 100644
index 0000000..2f30a5f
--- /dev/null
+++ b/libpsn00b/include/sys/types.h
@@ -0,0 +1,9 @@
+#ifndef _TYPES_H
+#define _TYPES_H
+
+typedef unsigned char u_char;
+typedef unsigned short u_short;
+typedef unsigned int u_int;
+typedef unsigned long u_long;
+
+#endif // _TYPES_H \ No newline at end of file