summaryrefslogtreecommitdiff
path: root/apps/wince/sword/include
diff options
context:
space:
mode:
authorRoberto C. Sanchez <roberto@connexer.com>2014-03-29 10:53:33 -0400
committerRoberto C. Sanchez <roberto@connexer.com>2014-03-29 10:53:33 -0400
commit8d3fc864d094eeadc721f8e93436b37a5fab173e (patch)
tree05e201c67dca55b4ccdf90ad479a25d95e3b1e63 /apps/wince/sword/include
Imported Upstream version 1.5.3
Diffstat (limited to 'apps/wince/sword/include')
-rw-r--r--apps/wince/sword/include/dirent.h18
-rw-r--r--apps/wince/sword/include/fcntl.h23
-rw-r--r--apps/wince/sword/include/io.h1
-rw-r--r--apps/wince/sword/include/swordce.h11
-rw-r--r--apps/wince/sword/include/sys/stat.h2
-rw-r--r--apps/wince/sword/include/sys/types.h1
-rw-r--r--apps/wince/sword/include/unistd.h15
7 files changed, 71 insertions, 0 deletions
diff --git a/apps/wince/sword/include/dirent.h b/apps/wince/sword/include/dirent.h
new file mode 100644
index 0000000..dde8597
--- /dev/null
+++ b/apps/wince/sword/include/dirent.h
@@ -0,0 +1,18 @@
+#include <windows.h>
+#include <string.h>
+
+struct dirent {
+ char d_name[MAX_PATH];
+};
+
+typedef struct {
+ WIN32_FIND_DATA wfd;
+ HANDLE hFind;
+ struct dirent de;
+} DIR;
+
+
+extern DIR* opendir( const char *pSpec);
+extern void closedir(DIR * pDir);
+extern struct dirent * readdir(DIR *pDir);
+extern void rewinddir( DIR* dir ); \ No newline at end of file
diff --git a/apps/wince/sword/include/fcntl.h b/apps/wince/sword/include/fcntl.h
new file mode 100644
index 0000000..163797a
--- /dev/null
+++ b/apps/wince/sword/include/fcntl.h
@@ -0,0 +1,23 @@
+#ifndef FCNTL_H
+#define FCNTL_H
+
+
+#define O_RDONLY 0x0000 /* open for reading only */
+#define O_WRONLY 0x0001 /* open for writing only */
+#define O_RDWR 0x0002 /* open for reading and writing */
+#define O_APPEND 0x0008 /* writes done at eof */
+
+#define O_CREAT 0x0100 /* create and open file */
+#define O_TRUNC 0x0200 /* open and truncate */
+//not implemented for CE #define O_EXCL 0x0400 /* open only if file doesn't already exist */
+
+/* O_TEXT files have <cr><lf> sequences translated to <lf> on read()'s,
+** and <lf> sequences translated to <cr><lf> on write()'s
+*/
+
+#define O_TEXT 0x4000 /* file mode is text (translated) */
+#define O_BINARY 0x8000 /* file mode is binary (untranslated) */
+
+
+
+#endif
diff --git a/apps/wince/sword/include/io.h b/apps/wince/sword/include/io.h
new file mode 100644
index 0000000..1e823fb
--- /dev/null
+++ b/apps/wince/sword/include/io.h
@@ -0,0 +1 @@
+#include <unistd.h>
diff --git a/apps/wince/sword/include/swordce.h b/apps/wince/sword/include/swordce.h
new file mode 100644
index 0000000..ac595e1
--- /dev/null
+++ b/apps/wince/sword/include/swordce.h
@@ -0,0 +1,11 @@
+#ifndef SWORDCE_H
+#define SWORDCE_H
+
+#include <string.h>
+#include <ctype.h>
+
+wchar_t *strtowstr(const char *str);
+char *wstrtostr(const wchar_t *str);
+int stricmp(const char *s1, const char *s2);
+
+#endif
diff --git a/apps/wince/sword/include/sys/stat.h b/apps/wince/sword/include/sys/stat.h
new file mode 100644
index 0000000..af6529c
--- /dev/null
+++ b/apps/wince/sword/include/sys/stat.h
@@ -0,0 +1,2 @@
+#define S_IREAD 0000400
+#define S_IWRITE 0000200
diff --git a/apps/wince/sword/include/sys/types.h b/apps/wince/sword/include/sys/types.h
new file mode 100644
index 0000000..2443d27
--- /dev/null
+++ b/apps/wince/sword/include/sys/types.h
@@ -0,0 +1 @@
+//I'm empty, but I make compilers happy.
diff --git a/apps/wince/sword/include/unistd.h b/apps/wince/sword/include/unistd.h
new file mode 100644
index 0000000..c836995
--- /dev/null
+++ b/apps/wince/sword/include/unistd.h
@@ -0,0 +1,15 @@
+#ifndef UNISTD_H
+#define UNISTD_H
+
+typedef long off_t;
+
+int close (int fd);
+int open(const char *path, int mode);
+int open(const char *path, int access, unsigned mode);
+int read(int fd, void* buf, size_t count);
+int write(int fd, const void * buf, size_t count);
+off_t lseek(int fildes, off_t offset, int whence);
+int access(const char* path, int mode);
+#define unlink ::remove
+
+#endif