summaryrefslogtreecommitdiff
path: root/wince
diff options
context:
space:
mode:
authorSimon Howard2013-08-11 17:32:29 +0000
committerSimon Howard2013-08-11 17:32:29 +0000
commit63acb55b18f024db74fd9a7eedbf3137922630c4 (patch)
tree625c361f74f661ab3448f165d8bcc0b154379292 /wince
parentb1d51276a264849ded93ce943eb0283c1f4f1aba (diff)
downloadchocolate-doom-63acb55b18f024db74fd9a7eedbf3137922630c4.tar.gz
chocolate-doom-63acb55b18f024db74fd9a7eedbf3137922630c4.tar.bz2
chocolate-doom-63acb55b18f024db74fd9a7eedbf3137922630c4.zip
Remove Windows CE support.
What support exists is for obsolete devices I no longer possess; I've never been contacted about the port and it's been several years since I even bothered to build a new version. All the extra overrides are clutter that can just be removed. Subversion-branch: /branches/v2-branch Subversion-revision: 2615
Diffstat (limited to 'wince')
-rw-r--r--wince/.gitignore5
-rw-r--r--wince/Makefile.am17
-rw-r--r--wince/README8
-rw-r--r--wince/dummy.c8
-rw-r--r--wince/env.c92
-rw-r--r--wince/env.h24
-rw-r--r--wince/errno.c20
-rw-r--r--wince/errno.h17
-rw-r--r--wince/fileops.c49
-rw-r--r--wince/fileops.h14
-rw-r--r--wince/libc_wince.h4
11 files changed, 0 insertions, 258 deletions
diff --git a/wince/.gitignore b/wince/.gitignore
deleted file mode 100644
index d4e88e5a..00000000
--- a/wince/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-Makefile
-Makefile.in
-.deps
-tags
-TAGS
diff --git a/wince/Makefile.am b/wince/Makefile.am
deleted file mode 100644
index c19471ca..00000000
--- a/wince/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-
-noinst_LIBRARIES=libc_wince.a
-
-if WINDOWS_CE
-
-libc_wince_a_SOURCES = \
- libc_wince.h \
- env.c env.h \
- errno.c errno.h \
- fileops.c fileops.h
-
-else
-
-libc_wince_a_SOURCES = dummy.c
-
-endif
-
diff --git a/wince/README b/wince/README
deleted file mode 100644
index 76f282f4..00000000
--- a/wince/README
+++ /dev/null
@@ -1,8 +0,0 @@
-Windows CE is a horribly crippled operating system. The poor thing doesn't
-even include a complete implementation of the ANSI standard C library. This
-is a mini-library called libc_wince that implements some of the missing
-library functions. I've only implemented those necessary to get Chocolate
-Doom to compile.
-
-On non-Windows CE platforms it is just built as an empty library.
-
diff --git a/wince/dummy.c b/wince/dummy.c
deleted file mode 100644
index 68af0caa..00000000
--- a/wince/dummy.c
+++ /dev/null
@@ -1,8 +0,0 @@
-
-// Dummy source file so that the Windows CE workaround library is
-// not empty. Some platforms don't like empty libraries.
-
-void DummyWindowsCEFunction(void)
-{
-}
-
diff --git a/wince/env.c b/wince/env.c
deleted file mode 100644
index c90b4c8d..00000000
--- a/wince/env.c
+++ /dev/null
@@ -1,92 +0,0 @@
-//
-// "Extension" implementation of getenv for Windows CE.
-//
-// I (Simon Howard) release this file to the public domain.
-//
-
-#include <stdlib.h>
-#include <string.h>
-
-#include <windows.h>
-#include <lmcons.h>
-#include <secext.h>
-#include <shlobj.h>
-
-#include "env.h"
-
-static void WCharToChar(wchar_t *src, char *dest, int buf_len)
-{
- unsigned int len;
-
- len = wcslen(src) + 1;
-
- WideCharToMultiByte(CP_OEMCP, 0, src, len, dest, buf_len, NULL, NULL);
-}
-
-static void SetEnvironment(char *env_string, wchar_t *wvalue)
-{
- char value[MAX_PATH + 10];
- int env_len;
-
- // Construct the string for putenv: NAME=value
-
- env_len = strlen(env_string);
- strcpy(value, env_string);
-
- WCharToChar(wvalue, value + env_len, sizeof(value) - env_len);
-
- // Set the environment variable:
-
- putenv(value);
-}
-
-static int ReadOwnerName(wchar_t *value, DWORD len)
-{
- HKEY key;
- DWORD valtype;
-
- if (RegOpenKeyExW(HKEY_CURRENT_USER,
- L"\\ControlPanel\\Owner", 0,
- KEY_READ, &key) != ERROR_SUCCESS)
- {
- return 0;
- }
-
- valtype = REG_SZ;
-
- if (RegQueryValueExW(key, L"Name", NULL, &valtype,
- (LPBYTE) value, &len) != ERROR_SUCCESS)
- {
- return 0;
- }
-
- // Close the key
-
- RegCloseKey(key);
-
- return 1;
-}
-
-void PopulateEnvironment(void)
-{
- wchar_t temp[MAX_PATH];
-
- // Username:
-
- if (ReadOwnerName(temp, MAX_PATH))
- {
- SetEnvironment("USER=", temp);
- SetEnvironment("USERNAME=", temp);
- }
-
- // Temp dir:
-
- GetTempPathW(MAX_PATH, temp);
- SetEnvironment("TEMP=", temp);
-
- // Use My Documents dir as home:
-
- SHGetSpecialFolderPath(NULL, temp, CSIDL_PERSONAL, 0);
- SetEnvironment("HOME=", temp);
-}
-
diff --git a/wince/env.h b/wince/env.h
deleted file mode 100644
index 96805c31..00000000
--- a/wince/env.h
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// "Extension" implementation of getenv for Windows CE.
-//
-// I (Simon Howard) release this file to the public domain.
-//
-
-#ifndef WINCE_ENV_H
-#define WINCE_ENV_H
-
-// SDL provides an implementation of getenv/putenv:
-
-#include "SDL_getenv.h"
-
-#ifndef getenv
-#define getenv SDL_getenv
-#endif
-#ifndef putenv
-#define putenv SDL_putenv
-#endif
-
-extern void PopulateEnvironment(void);
-
-#endif /* #ifndef WINCE_ENV_H */
-
diff --git a/wince/errno.c b/wince/errno.c
deleted file mode 100644
index 28cd0899..00000000
--- a/wince/errno.c
+++ /dev/null
@@ -1,20 +0,0 @@
-//
-// "Extension" implementation of errno.h for Windows CE.
-//
-// I (Simon Howard) release this file to the public domain.
-//
-
-#include <windows.h>
-
-#include "errno.h"
-
-// This should really be a thread-local variable. Oh well.
-
-static int my_errno;
-
-int *_GetErrno()
-{
- my_errno = GetLastError();
- return &my_errno;
-}
-
diff --git a/wince/errno.h b/wince/errno.h
deleted file mode 100644
index a2149b45..00000000
--- a/wince/errno.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//
-// "Extension" implementation of errno.h for Windows CE.
-//
-// I (Simon Howard) release this file to the public domain.
-//
-
-#ifndef WINCE_ERRNO_H
-#define WINCE_ERRNO_H
-
-#define EISDIR 21 /* Is a directory */
-
-extern int *_GetErrno();
-
-#define errno (*_GetErrno())
-
-#endif /* #ifndef WINCE_ERROR_H */
-
diff --git a/wince/fileops.c b/wince/fileops.c
deleted file mode 100644
index b0617bd3..00000000
--- a/wince/fileops.c
+++ /dev/null
@@ -1,49 +0,0 @@
-//
-// "Extension" implementation of ANSI C file functions for Windows CE.
-//
-// I (Simon Howard) release this file to the public domain.
-//
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <windows.h>
-
-#include "fileops.h"
-
-int remove(const char *pathname)
-{
- wchar_t temp[MAX_PATH + 1];
-
- MultiByteToWideChar(CP_OEMCP,
- 0,
- pathname,
- strlen(pathname) + 1,
- temp,
- MAX_PATH);
-
- return DeleteFileW(temp) != 0;
-}
-
-int rename(const char *oldpath, const char *newpath)
-{
- wchar_t oldpath1[MAX_PATH + 1];
- wchar_t newpath1[MAX_PATH + 1];
-
- MultiByteToWideChar(CP_OEMCP,
- 0,
- oldpath,
- strlen(oldpath) + 1,
- oldpath1,
- MAX_PATH);
- MultiByteToWideChar(CP_OEMCP,
- 0,
- newpath,
- strlen(newpath) + 1,
- newpath1,
- MAX_PATH);
-
- return MoveFileW(oldpath1, newpath1);
-}
-
diff --git a/wince/fileops.h b/wince/fileops.h
deleted file mode 100644
index 757a34fd..00000000
--- a/wince/fileops.h
+++ /dev/null
@@ -1,14 +0,0 @@
-//
-// "Extension" implementation of ANSI C file functions for Windows CE.
-//
-// I (Simon Howard) release this file to the public domain.
-//
-
-#ifndef WINCE_FILEOPS_H
-#define WINCE_FILEOPS_H
-
-int remove(const char *pathname);
-int rename(const char *oldpath, const char *newpath);
-
-#endif /* #ifndef WINCE_FILEOPS_H */
-
diff --git a/wince/libc_wince.h b/wince/libc_wince.h
deleted file mode 100644
index 0d6fac05..00000000
--- a/wince/libc_wince.h
+++ /dev/null
@@ -1,4 +0,0 @@
-
-#include "env.h"
-#include "fileops.h"
-