[PATCH 5/6] DOS 16 bit test include file

Morten Rønne morten.roenne at tdcadsl.dk
Mon Aug 23 15:06:54 CDT 2010


Added a new include file which sets up Wine's main test include file for
use with DOS 16 bit programs.
---
 include/wine/dos16test.h |   63 ++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 63 insertions(+), 0 deletions(-)
 create mode 100644 include/wine/dos16test.h

diff --git a/include/wine/dos16test.h b/include/wine/dos16test.h
new file mode 100644
index 0000000..28d1158
--- /dev/null
+++ b/include/wine/dos16test.h
@@ -0,0 +1,63 @@
+/*
+ * Definitions for Wine DOS C unit tests.
+ *
+ * Copyright (C) 2010 Morten Rønne
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __WINE_WINE_DOS16_TEST_H
+#define __WINE_WINE_DOS16_TEST_H
+
+#include <stdlib.h>
+#include <stdio.h>
+
+typedef int           WORD;
+typedef long int      LONG;
+typedef unsigned char WCHAR;
+typedef long int      DWORD;
+typedef long int      DWORD_PTR;
+typedef long int      ULONG_PTR;
+
+#define LOWORD(l)              ((WORD)((DWORD_PTR)(l) & 0xFFFF))
+
+/* Some functions DOS style */
+void ExitProcess(int code)
+{
+    exit(code);
+}
+
+/* Since we are not threaded, no need to do anything special */
+void InterlockedIncrement(LONG *ptr)
+{
+    (*ptr)++;
+}
+
+int TlsAlloc(void)
+{
+    return 0;
+}
+
+int GetEnvironmentVariableA( const char *name, char *value, int max_size)
+{
+    value[0] = '\0';
+    return 0;
+}
+
+#define STANDALONE  1
+
+#include "wine/test.h"
+
+#endif
-- 
1.7.0.4


--------------010804060206000305020908
Content-Type: text/plain;
 name="0006-New-DOS-16-bit-test-program.txt"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment;
 filename="0006-New-DOS-16-bit-test-program.txt"



More information about the wine-devel mailing list