]> git.saurik.com Git - wxWidgets.git/commitdiff
wxOS2 with Open Watcom: correct PCH usage, missing headers, warning fixes, source...
authorWłodzimierz Skiba <abx@abx.art.pl>
Thu, 21 Jul 2005 17:38:58 +0000 (17:38 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Thu, 21 Jul 2005 17:38:58 +0000 (17:38 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/expat/lib/os2config.h [new file with mode: 0644]
src/expat/lib/xmlparse.c
src/expat/lib/xmlrole.c
src/expat/lib/xmltok.c

diff --git a/src/expat/lib/os2config.h b/src/expat/lib/os2config.h
new file mode 100644 (file)
index 0000000..ff04d06
--- /dev/null
@@ -0,0 +1,26 @@
+/*================================================================
+** Copyright 2000, Clark Cooper
+** All rights reserved.
+**
+** This is free software. You are permitted to copy, distribute, or modify
+** it under the terms of the MIT/X license (contained in the COPYING file
+** with this distribution.)
+*/
+
+#ifndef OS2CONFIG_H
+#define OS2CONFIG_H
+
+#include <memory.h>
+#include <string.h>
+
+#define XML_NS 1
+#define XML_DTD 1
+#define XML_CONTEXT_BYTES 1024
+
+/* we will assume all OS2 platforms are little endian */
+#define BYTEORDER 1234
+
+/* OS2 has memmove() available. */
+#define HAVE_MEMMOVE
+
+#endif /* ndef OS2CONFIG_H */
index 6c75b135d8b8909c4562f272f078063b8c4e7ee9..561d09523e210cfb29e024e3078274408ae19d97 100644 (file)
 #include "winconfig.h"
 #include "expat.h"
 
+#elif defined(OS2_32)
+
+#include "os2config.h"
+#include "expat.h"
+
 #elif defined(MACOS_CLASSIC)
 
 #include "macconfig.h"
@@ -4671,7 +4676,7 @@ defineAttribute(ELEMENT_TYPE *type, ATTRIBUTE_ID *attId, XML_Bool isCdata,
   if (type->nDefaultAtts == type->allocDefaultAtts) {
     if (type->allocDefaultAtts == 0) {
       type->allocDefaultAtts = 8;
-      type->defaultAtts = (DEFAULT_ATTRIBUTE *)MALLOC(type->allocDefaultAtts 
+      type->defaultAtts = (DEFAULT_ATTRIBUTE *)MALLOC(type->allocDefaultAtts
                             * sizeof(DEFAULT_ATTRIBUTE));
       if (!type->defaultAtts)
         return 0;
@@ -5535,8 +5540,8 @@ poolGrow(STRING_POOL *pool)
     int blockSize = (pool->end - pool->start)*2;
     pool->blocks = (BLOCK *)
       pool->mem->realloc_fcn(pool->blocks,
-                            (offsetof(BLOCK, s)
-                             + blockSize * sizeof(XML_Char)));
+                             (offsetof(BLOCK, s)
+                             + blockSize * sizeof(XML_Char)));
     if (pool->blocks == NULL)
       return XML_FALSE;
     pool->blocks->size = blockSize;
@@ -5552,7 +5557,7 @@ poolGrow(STRING_POOL *pool)
     else
       blockSize *= 2;
     tem = (BLOCK *)pool->mem->malloc_fcn(offsetof(BLOCK, s)
-                                       + blockSize * sizeof(XML_Char));
+                                         + blockSize * sizeof(XML_Char));
     if (!tem)
       return XML_FALSE;
     tem->size = blockSize;
index 5f46ddfcd226f9872ef556e82365b9ab64ac70e4..73c3ae95f21e3798ed4f9ae446f9ddb7bebf0cbb 100644 (file)
@@ -4,6 +4,8 @@
 
 #ifdef COMPILED_FROM_DSP
 #include "winconfig.h"
+#elif defined(OS2_32)
+#include "os2config.h"
 #elif defined(MACOS_CLASSIC)
 #include "macconfig.h"
 #else
index dc15e54edcf85a31acb074bf307665f4c9e08ddc..9188afebf1ab35752ab53915bcdb763c9dd6baa4 100644 (file)
@@ -4,6 +4,8 @@
 
 #ifdef COMPILED_FROM_DSP
 #include "winconfig.h"
+#elif defined(OS2_32)
+#include "os2config.h"
 #elif defined(MACOS_CLASSIC)
 #include "macconfig.h"
 #else
@@ -1330,7 +1332,7 @@ unknown_toUtf16(const ENCODING *enc,
 ENCODING *
 XmlInitUnknownEncoding(void *mem,
                        int *table,
-                       CONVERTER convert, 
+                       CONVERTER convert,
                        void *userData)
 {
   int i;
@@ -1620,7 +1622,7 @@ initScan(const ENCODING **encodingTable,
 ENCODING *
 XmlInitUnknownEncodingNS(void *mem,
                          int *table,
-                         CONVERTER convert, 
+                         CONVERTER convert,
                          void *userData)
 {
   ENCODING *enc = XmlInitUnknownEncoding(mem, table, convert, userData);