You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@corinthia.apache.org by pm...@apache.org on 2015/01/10 19:21:13 UTC

[01/14] incubator-corinthia git commit: Removed #ifdef WIN32 in all sources outside platform

Repository: incubator-corinthia
Updated Branches:
  refs/heads/stable d23ccd545 -> c0753e01a


Removed #ifdef WIN32 in all sources outside platform

DFPlatform.h has been updated to include a couple of differences,
DFPlatform.h has been moved to DocFormats/headers, because some of the functions will be handy for
consumers.
CMakeFile.txt has been updated to the new location of DFPLatform.c
createDirectory() in 2 consumers has been moved to DFFilesystem.c and made portable.


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/42c3c724
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/42c3c724
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/42c3c724

Branch: refs/heads/stable
Commit: 42c3c72406c41cc3b4ad644417ebe941cbc1be53
Parents: f27803f
Author: jani <ja...@apache.org>
Authored: Fri Jan 2 18:06:58 2015 +0100
Committer: jani <ja...@apache.org>
Committed: Fri Jan 2 18:06:58 2015 +0100

----------------------------------------------------------------------
 DocFormats/CMakeLists.txt                       | 14 +++-
 DocFormats/api/CMakeLists.txt                   |  1 -
 DocFormats/core/CMakeLists.txt                  |  1 -
 DocFormats/core/src/html/DFHTML.c               |  1 +
 DocFormats/core/src/lib/DFFilesystem.c          | 24 +++++--
 DocFormats/core/src/lib/DFFilesystem.h          |  2 +-
 DocFormats/core/src/lib/DFHashTable.c           |  1 +
 DocFormats/core/src/lib/DFString.c              |  1 +
 DocFormats/core/src/xml/DFDOM.c                 |  1 +
 DocFormats/core/src/xml/DFMarkupCompatibility.c |  1 +
 DocFormats/core/src/xml/DFXML.c                 |  1 +
 DocFormats/core/tests/css/CSSTests.c            |  1 +
 DocFormats/filters/latex/CMakeLists.txt         |  1 -
 DocFormats/filters/latex/src/HTMLToLaTeX.c      |  1 +
 DocFormats/filters/odf/CMakeLists.txt           |  1 -
 DocFormats/filters/ooxml/CMakeLists.txt         |  1 -
 .../filters/ooxml/src/word/WordConverter.c      |  1 +
 DocFormats/filters/ooxml/src/word/WordLists.c   |  1 +
 .../filters/ooxml/src/word/WordNumbering.c      |  1 +
 .../filters/ooxml/src/word/formatting/WordPPr.c |  1 +
 .../filters/ooxml/src/word/formatting/WordRPr.c |  1 +
 .../filters/ooxml/src/word/lenses/WordField.c   |  1 +
 DocFormats/filters/ooxml/tests/word/WordPlain.c |  1 +
 DocFormats/filters/ooxml/tests/word/WordTests.c |  1 +
 DocFormats/headers/DFCommon.h                   |  7 --
 DocFormats/headers/DFPlatform.h                 | 72 ++++++++++++++++++++
 DocFormats/headers/DFTypes.h                    |  4 --
 DocFormats/platform/CMakeLists.txt              | 11 +--
 DocFormats/platform/headers/DFPlatform.h        | 54 ---------------
 DocFormats/platform/src/Win32.c                 |  3 -
 DocFormats/unittest/CMakeLists.txt              |  1 -
 consumers/dftest/src/main.c                     | 29 +-------
 consumers/dfutil/src/CMakeLists.txt             |  1 -
 consumers/dfutil/src/Commands.c                 | 30 +-------
 consumers/dfutil/src/Commands.h                 |  2 -
 35 files changed, 127 insertions(+), 148 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/DocFormats/CMakeLists.txt b/DocFormats/CMakeLists.txt
index ce72d7b..c21a05f 100644
--- a/DocFormats/CMakeLists.txt
+++ b/DocFormats/CMakeLists.txt
@@ -43,6 +43,16 @@ set(GroupSrcRoot
 
 
 ###
+## group main headers
+###
+set(GroupHeaderRoot
+    headers/DFCommon.h
+    headers/DFCore.h
+    headers/DFPlatform.h
+	headers/DFTypes.h)
+
+
+###
 ## group subproject objects
 ###
 set(GroupObjRoot
@@ -61,7 +71,9 @@ set(GroupObjRoot
 ###
 add_library(DocFormats
     ${GroupSrcRoot}
+    ${GroupHeaderRoot}
     ${GroupObjRoot})
 
-source_group(src FILES ${GroupSrcRoot})
+source_group(src     FILES ${GroupSrcRoot})
+source_group(headers FILES ${GroupHeaderRoot})
 set_property(TARGET DocFormats PROPERTY FOLDER DocFormats)

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/api/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/DocFormats/api/CMakeLists.txt b/DocFormats/api/CMakeLists.txt
index 4df69cc..e0146ef 100644
--- a/DocFormats/api/CMakeLists.txt
+++ b/DocFormats/api/CMakeLists.txt
@@ -48,7 +48,6 @@ include_directories(../../DocFormats/3rdparty/external/w3c-tidy-html5/src)
 include_directories(SYSTEM ${INCLUDE_DIRS})
 include_directories(SYSTEM ../api/headers)
 include_directories(../headers)
-include_directories(../platform/headers)
 include_directories(../core/src/common)
 include_directories(../core/src/css)
 include_directories(../core/src/html)

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/core/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/DocFormats/core/CMakeLists.txt b/DocFormats/core/CMakeLists.txt
index 9590118..02212cc 100644
--- a/DocFormats/core/CMakeLists.txt
+++ b/DocFormats/core/CMakeLists.txt
@@ -151,7 +151,6 @@ include_directories(../../DocFormats/platform/3rdparty/w3c-tidy-html5/include)
 include_directories(../../DocFormats/platform/3rdparty//w3c-tidy-html5/src)
 include_directories(SYSTEM ${INCLUDE_DIRS})
 include_directories(SYSTEM ../api/headers)
-include_directories(../platform/headers)
 include_directories(src/common)
 include_directories(src/css)
 include_directories(src/html)

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/core/src/html/DFHTML.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/html/DFHTML.c b/DocFormats/core/src/html/DFHTML.c
index afa5f49..0f2a348 100644
--- a/DocFormats/core/src/html/DFHTML.c
+++ b/DocFormats/core/src/html/DFHTML.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "DFHTML.h"
 #include "DFFilesystem.h"
 #include "DFDOM.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/core/src/lib/DFFilesystem.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/lib/DFFilesystem.c b/DocFormats/core/src/lib/DFFilesystem.c
index e4d4ab7..b6707ef 100644
--- a/DocFormats/core/src/lib/DFFilesystem.c
+++ b/DocFormats/core/src/lib/DFFilesystem.c
@@ -26,11 +26,9 @@
 #include <stdlib.h>
 #include <string.h>
 #include <sys/stat.h>
-#ifdef WIN32
-#include <direct.h>
-#else
-#include <unistd.h>
-#endif
+#include <io.h>
+
+
 
 int DFFileExists(const char *path)
 {
@@ -394,3 +392,19 @@ char *DFRemovePercentEncoding(const char *encoded)
     output[outpos] = 0;
     return output;
 }
+
+
+char *DFCreateTempDir(DFError **error)
+{
+    char *ctemplate = strdup("dfutil.XXXXXX");
+    char *name      = mktemp(ctemplate);
+    if (!name) {
+        free(ctemplate);
+        return NULL;
+    }
+    if (!DFCreateDirectory(name, 1, error)) {
+        free(ctemplate);
+        return NULL;
+    }
+    return name;
+}

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/core/src/lib/DFFilesystem.h
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/lib/DFFilesystem.h b/DocFormats/core/src/lib/DFFilesystem.h
index f597720..b1536e1 100644
--- a/DocFormats/core/src/lib/DFFilesystem.h
+++ b/DocFormats/core/src/lib/DFFilesystem.h
@@ -34,5 +34,5 @@ char *DFPathWithoutExtension(const char *path);
 char *DFPathResolveAbsolute(const char *base, const char *relative);
 char *DFPathNormalize(const char *path);
 char *DFRemovePercentEncoding(const char *encoded);
-
+char *DFCreateTempDir(DFError **error);
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/core/src/lib/DFHashTable.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/lib/DFHashTable.c b/DocFormats/core/src/lib/DFHashTable.c
index 88d46aa..6a1cfe8 100644
--- a/DocFormats/core/src/lib/DFHashTable.c
+++ b/DocFormats/core/src/lib/DFHashTable.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "DFHashTable.h"
 #include "DFCommon.h"
 #include <assert.h>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/core/src/lib/DFString.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/lib/DFString.c b/DocFormats/core/src/lib/DFString.c
index a2be219..b768ef4 100644
--- a/DocFormats/core/src/lib/DFString.c
+++ b/DocFormats/core/src/lib/DFString.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "DFString.h"
 #include "DFBuffer.h"
 #include "DFCharacterSet.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/core/src/xml/DFDOM.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/xml/DFDOM.c b/DocFormats/core/src/xml/DFDOM.c
index c5de0ab..413880e 100644
--- a/DocFormats/core/src/xml/DFDOM.c
+++ b/DocFormats/core/src/xml/DFDOM.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "DFDOM.h"
 #include "DFXMLNames.h"
 #include "DFHashTable.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/core/src/xml/DFMarkupCompatibility.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/xml/DFMarkupCompatibility.c b/DocFormats/core/src/xml/DFMarkupCompatibility.c
index 18bc1ac..33dc69d 100644
--- a/DocFormats/core/src/xml/DFMarkupCompatibility.c
+++ b/DocFormats/core/src/xml/DFMarkupCompatibility.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "DFMarkupCompatibility.h"
 #include "DFNameMap.h"
 #include "DFString.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/core/src/xml/DFXML.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/xml/DFXML.c b/DocFormats/core/src/xml/DFXML.c
index cf9a4f4..2172651 100644
--- a/DocFormats/core/src/xml/DFXML.c
+++ b/DocFormats/core/src/xml/DFXML.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "DFXML.h"
 #include "DFDOM.h"
 #include "DFMarkupCompatibility.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/core/tests/css/CSSTests.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/tests/css/CSSTests.c b/DocFormats/core/tests/css/CSSTests.c
index ea2bbc1..4612588 100644
--- a/DocFormats/core/tests/css/CSSTests.c
+++ b/DocFormats/core/tests/css/CSSTests.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "DFUnitTest.h"
 #include "DFHashTable.h"
 #include "DFBuffer.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/filters/latex/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/DocFormats/filters/latex/CMakeLists.txt b/DocFormats/filters/latex/CMakeLists.txt
index 0aca5e3..4cdf023 100644
--- a/DocFormats/filters/latex/CMakeLists.txt
+++ b/DocFormats/filters/latex/CMakeLists.txt
@@ -35,7 +35,6 @@ include_directories(../../DocFormats/3rdparty/external/w3c-tidy-html5/src)
 include_directories(SYSTEM ${INCLUDE_DIRS})
 include_directories(SYSTEM ../../api/headers)
 include_directories(../../headers)
-include_directories(../../platform/headers)
 include_directories(../../core/src/common)
 include_directories(../../core/src/css)
 include_directories(../../core/src/html)

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/filters/latex/src/HTMLToLaTeX.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/latex/src/HTMLToLaTeX.c b/DocFormats/filters/latex/src/HTMLToLaTeX.c
index 2db204f..10be122 100644
--- a/DocFormats/filters/latex/src/HTMLToLaTeX.c
+++ b/DocFormats/filters/latex/src/HTMLToLaTeX.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "HTMLToLaTeX.h"
 #include "DFHTML.h"
 #include "DFTable.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/filters/odf/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/DocFormats/filters/odf/CMakeLists.txt b/DocFormats/filters/odf/CMakeLists.txt
index 4673096..7787ad6 100644
--- a/DocFormats/filters/odf/CMakeLists.txt
+++ b/DocFormats/filters/odf/CMakeLists.txt
@@ -41,7 +41,6 @@ include_directories(../../DocFormats/3rdparty/external/w3c-tidy-html5/src)
 include_directories(SYSTEM ${INCLUDE_DIRS})
 include_directories(SYSTEM ../../api/headers)
 include_directories(../../headers)
-include_directories(../../platform/headers)
 include_directories(../../core/src/common)
 include_directories(../../core/src/css)
 include_directories(../../core/src/html)

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/filters/ooxml/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/CMakeLists.txt b/DocFormats/filters/ooxml/CMakeLists.txt
index acc28c2..92f46f8 100644
--- a/DocFormats/filters/ooxml/CMakeLists.txt
+++ b/DocFormats/filters/ooxml/CMakeLists.txt
@@ -127,7 +127,6 @@ include_directories(../../DocFormats/3rdparty/external/w3c-tidy-html5/src)
 include_directories(SYSTEM ${INCLUDE_DIRS})
 include_directories(SYSTEM ../../api/headers)
 include_directories(../../headers)
-include_directories(../../platform/headers)
 include_directories(../../core/src/common)
 include_directories(../../core/src/css)
 include_directories(../../core/src/html)

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/filters/ooxml/src/word/WordConverter.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/WordConverter.c b/DocFormats/filters/ooxml/src/word/WordConverter.c
index 33dacaa..5e3a2fa 100644
--- a/DocFormats/filters/ooxml/src/word/WordConverter.c
+++ b/DocFormats/filters/ooxml/src/word/WordConverter.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordConverter.h"
 #include "WordBookmark.h"
 #include "WordField.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/filters/ooxml/src/word/WordLists.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/WordLists.c b/DocFormats/filters/ooxml/src/word/WordLists.c
index e8aef52..8416fce 100644
--- a/DocFormats/filters/ooxml/src/word/WordLists.c
+++ b/DocFormats/filters/ooxml/src/word/WordLists.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordLists.h"
 #include "DFDOM.h"
 #include "CSSProperties.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/filters/ooxml/src/word/WordNumbering.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/WordNumbering.c b/DocFormats/filters/ooxml/src/word/WordNumbering.c
index e8914c8..76408e5 100644
--- a/DocFormats/filters/ooxml/src/word/WordNumbering.c
+++ b/DocFormats/filters/ooxml/src/word/WordNumbering.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordNumbering.h"
 #include "WordStyles.h"
 #include "DFDOM.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/filters/ooxml/src/word/formatting/WordPPr.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/formatting/WordPPr.c b/DocFormats/filters/ooxml/src/word/formatting/WordPPr.c
index a837149..a40da92 100644
--- a/DocFormats/filters/ooxml/src/word/formatting/WordPPr.c
+++ b/DocFormats/filters/ooxml/src/word/formatting/WordPPr.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordPPr.h"
 #include "WordStyles.h"
 #include "WordSection.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/filters/ooxml/src/word/formatting/WordRPr.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/formatting/WordRPr.c b/DocFormats/filters/ooxml/src/word/formatting/WordRPr.c
index 87f16d8..551d145 100644
--- a/DocFormats/filters/ooxml/src/word/formatting/WordRPr.c
+++ b/DocFormats/filters/ooxml/src/word/formatting/WordRPr.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordRPr.h"
 #include "WordStyles.h"
 #include "WordTheme.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/filters/ooxml/src/word/lenses/WordField.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/lenses/WordField.c b/DocFormats/filters/ooxml/src/word/lenses/WordField.c
index 240736e..9235a45 100644
--- a/DocFormats/filters/ooxml/src/word/lenses/WordField.c
+++ b/DocFormats/filters/ooxml/src/word/lenses/WordField.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordField.h"
 #include "WordLenses.h"
 #include "WordBookmark.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/filters/ooxml/tests/word/WordPlain.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/WordPlain.c b/DocFormats/filters/ooxml/tests/word/WordPlain.c
index 13a25aa..ffbbe8a 100644
--- a/DocFormats/filters/ooxml/tests/word/WordPlain.c
+++ b/DocFormats/filters/ooxml/tests/word/WordPlain.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordPlain.h"
 #include "TextPackage.h"
 #include "OPC.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/filters/ooxml/tests/word/WordTests.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/WordTests.c b/DocFormats/filters/ooxml/tests/word/WordTests.c
index fc6df68..270403d 100644
--- a/DocFormats/filters/ooxml/tests/word/WordTests.c
+++ b/DocFormats/filters/ooxml/tests/word/WordTests.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "DFUnitTest.h"
 #include "DFCommon.h"
 #include "WordPlain.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/headers/DFCommon.h
----------------------------------------------------------------------
diff --git a/DocFormats/headers/DFCommon.h b/DocFormats/headers/DFCommon.h
index d6cdbd7..27b3e5c 100644
--- a/DocFormats/headers/DFCommon.h
+++ b/DocFormats/headers/DFCommon.h
@@ -17,13 +17,6 @@
 
 #include "DFTypes.h"
 
-#ifdef WIN32
-#define snprintf _snprintf
-#define strcasecmp _stricmp
-#define bzero(mem,size) memset(mem,0,size)
-#else // not WIN32
-#endif
-
 #ifndef S_ISDIR
 #define S_ISDIR(m)      (((m) & S_IFMT) == S_IFDIR)     /* directory */
 #endif

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/headers/DFPlatform.h
----------------------------------------------------------------------
diff --git a/DocFormats/headers/DFPlatform.h b/DocFormats/headers/DFPlatform.h
new file mode 100755
index 0000000..f36269f
--- /dev/null
+++ b/DocFormats/headers/DFPlatform.h
@@ -0,0 +1,72 @@
+// Copyright 2012-2014 UX Productivity Pty Ltd
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef DocFormats_DFPlatform_h
+#define DocFormats_DFPlatform_h
+
+#ifdef WIN32
+#include <direct.h>
+
+#define _CRT_SECURE_NO_WARNINGS
+#define snprintf _snprintf
+#define strcasecmp _stricmp
+#define mktemp _mktemp
+#define mkdir  _mkdir
+#define bzero(mem,size) memset(mem,0,size)
+
+#ifndef snprintf
+#define snprintf _snprintf
+#endif
+
+#else
+#include <unistd.h>
+#endif
+
+
+
+typedef struct DFDirEntryList DFDirEntryList;
+
+struct DFDirEntryList {
+    char *name;
+    DFDirEntryList *next;
+};
+
+int DFMkdirIfAbsent(const char *path, char **errmsg);
+int DFAddDirContents(const char *absPath, const char *relPath, int recursive, DFDirEntryList ***list, char **errmsg);
+int DFGetImageDimensions(const void *data, size_t len, const char *ext,
+                         unsigned int *width, unsigned int *height, char **errmsg);
+
+#define DF_ONCE_INIT 0
+typedef int DFOnce;
+typedef void (*DFOnceFunction)(void);
+void DFInitOnce(DFOnce *once, DFOnceFunction fun);
+
+// Zip functions
+typedef struct {
+        void *handle;
+        int   zipFlag;
+        int   zipFirst;
+        } DFextZipHandle;
+typedef DFextZipHandle * DFextZipHandleP;
+
+DFextZipHandleP DFextZipOpen(const char *zipFilename, int doUnzip);
+int             DFextZipClose(DFextZipHandleP zipHandle);
+
+int             DFextZipOpenNextFile(DFextZipHandleP zipHandle, char *entryName, const int maxName);
+int             DFextZipAppendNewFile(DFextZipHandleP zipHandle, const char *entryName);
+int             DFextZipCloseFile(DFextZipHandleP zipHandle);
+
+int DFextZipReadCurrentFile(DFextZipHandleP zipHandle, void *buf, const int maxLen);
+int DFextZipWriteCurrentFile(DFextZipHandleP zipHandle, const void *buf, const int len);
+#endif

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/headers/DFTypes.h
----------------------------------------------------------------------
diff --git a/DocFormats/headers/DFTypes.h b/DocFormats/headers/DFTypes.h
index d8fe590..3b563c0 100644
--- a/DocFormats/headers/DFTypes.h
+++ b/DocFormats/headers/DFTypes.h
@@ -23,10 +23,6 @@
 #define ATTRIBUTE_FORMAT(archetype,index,first) __attribute__((format(archetype,index,first)))
 #endif
 
-#ifdef WIN32
-#define _CRT_SECURE_NO_WARNINGS
-#endif
-
 #include <sys/types.h>
 #include <stdint.h>
 #include <stdarg.h>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/platform/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/DocFormats/platform/CMakeLists.txt b/DocFormats/platform/CMakeLists.txt
index f3752e9..f3ba68b 100644
--- a/DocFormats/platform/CMakeLists.txt
+++ b/DocFormats/platform/CMakeLists.txt
@@ -88,13 +88,6 @@ set(GroupHtml5
     3rdparty/w3c-tidy-html5/src/win32tc.h
    )
 
-
-###
-## group platform code
-###
-set(GroupHeaders
-    headers/DFPlatform.h)
-
 set(GroupSrc
     src/Apple.c
     src/Linux.c
@@ -117,7 +110,7 @@ include_directories(3rdparty/w3c-tidy-html5/include)
 include_directories(3rdparty/w3c-tidy-html5/src)
 include_directories(../../external/include)
 include_directories(SYSTEM ${INCLUDE_DIRS})
-include_directories(headers)
+include_directories(../headers)
 include_directories(../unittest)
 
 
@@ -128,10 +121,8 @@ include_directories(../unittest)
 add_library(platform OBJECT
     ${GroupMinizip}
     ${GroupHtml5}
-    ${GroupHeaders}
     ${GroupSrc}
     ${GroupTests})
-source_group(headers             FILES ${GroupHeaders})
 source_group(src                 FILES ${GroupSrc})
 source_group(tests               FILES ${GroupTests})
 source_group(src\\minizip        FILES ${GroupMinizip})

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/platform/headers/DFPlatform.h
----------------------------------------------------------------------
diff --git a/DocFormats/platform/headers/DFPlatform.h b/DocFormats/platform/headers/DFPlatform.h
deleted file mode 100755
index 6f16983..0000000
--- a/DocFormats/platform/headers/DFPlatform.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2012-2014 UX Productivity Pty Ltd
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-#ifndef DocFormats_DFPlatform_h
-#define DocFormats_DFPlatform_h
-
-#include <stddef.h>
-
-typedef struct DFDirEntryList DFDirEntryList;
-
-struct DFDirEntryList {
-    char *name;
-    DFDirEntryList *next;
-};
-
-int DFMkdirIfAbsent(const char *path, char **errmsg);
-int DFAddDirContents(const char *absPath, const char *relPath, int recursive, DFDirEntryList ***list, char **errmsg);
-int DFGetImageDimensions(const void *data, size_t len, const char *ext,
-                         unsigned int *width, unsigned int *height, char **errmsg);
-
-#define DF_ONCE_INIT 0
-typedef int DFOnce;
-typedef void (*DFOnceFunction)(void);
-void DFInitOnce(DFOnce *once, DFOnceFunction fun);
-
-// Zip functions
-typedef struct {
-        void *handle;
-        int   zipFlag;
-        int   zipFirst;
-        } DFextZipHandle;
-typedef DFextZipHandle * DFextZipHandleP;
-
-DFextZipHandleP DFextZipOpen(const char *zipFilename, int doUnzip);
-int             DFextZipClose(DFextZipHandleP zipHandle);
-
-int             DFextZipOpenNextFile(DFextZipHandleP zipHandle, char *entryName, const int maxName);
-int             DFextZipAppendNewFile(DFextZipHandleP zipHandle, const char *entryName);
-int             DFextZipCloseFile(DFextZipHandleP zipHandle);
-
-int DFextZipReadCurrentFile(DFextZipHandleP zipHandle, void *buf, const int maxLen);
-int DFextZipWriteCurrentFile(DFextZipHandleP zipHandle, const void *buf, const int len);
-#endif

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/platform/src/Win32.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/src/Win32.c b/DocFormats/platform/src/Win32.c
index d5a0ff5..f17303e 100755
--- a/DocFormats/platform/src/Win32.c
+++ b/DocFormats/platform/src/Win32.c
@@ -22,9 +22,6 @@
 #include <SDL_image.h>
 #include <stdio.h>
 
-#ifndef snprintf
-#define snprintf _snprintf
-#endif
 
 static void DFErrorMsgSetWin32(char **errmsg, DWORD code)
 {

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/DocFormats/unittest/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/DocFormats/unittest/CMakeLists.txt b/DocFormats/unittest/CMakeLists.txt
index f1d7d7e..750bb3b 100644
--- a/DocFormats/unittest/CMakeLists.txt
+++ b/DocFormats/unittest/CMakeLists.txt
@@ -32,7 +32,6 @@ include_directories(../../DocFormats/3rdparty/external/w3c-tidy-html5/src)
 include_directories(SYSTEM ${INCLUDE_DIRS})
 include_directories(SYSTEM ../api/headers)
 include_directories(../headers)
-include_directories(../platform/headers)
 include_directories(../core/src/common)
 include_directories(../core/src/css)
 include_directories(../core/src/html)

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/consumers/dftest/src/main.c
----------------------------------------------------------------------
diff --git a/consumers/dftest/src/main.c b/consumers/dftest/src/main.c
index 737bf7f..1cc1f69 100644
--- a/consumers/dftest/src/main.c
+++ b/consumers/dftest/src/main.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "DFUnitTest.h"
 #include "TextPackage.h"
 #include "DFString.h"
@@ -24,9 +25,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
-#ifndef WIN32
-#include <unistd.h>
-#endif
 
 extern TestGroup APITests;
 extern TestGroup CSSTests;
@@ -62,29 +60,6 @@ typedef struct {
     int failed;
 } TestHarness;
 
-char *createTempDir(DFError **error)
-{
-#ifdef WIN32
-    // Windows lacks mkdtemp. For the purposes of a single-threaded app it's ok just to use the same name
-    // each time we do a conversion, as long as we ensure that the directory is cleared first.
-    const char *name = "dfutil.temp";
-    if (DFFileExists(name) && !DFDeleteFile(name,error))
-        return NULL;
-    if (!DFCreateDirectory(name,1,error))
-        return NULL;
-    return strdup(name);
-#else
-    char *ctemplate = strdup("dfutil.XXXXXX");
-    char *r = mkdtemp(ctemplate);
-    if (r == NULL) {
-        DFErrorFormat(error,"mkdtemp: %s",strerror(errno));
-        free(ctemplate);
-        return NULL;
-    }
-    return ctemplate;
-#endif
-}
-
 static int diffResults2(const char *from, const char *to, const char *tempDir, DFError **error)
 {
     char *fromFilename = DFAppendPathComponent(tempDir,"from");
@@ -109,7 +84,7 @@ static int diffResults2(const char *from, const char *to, const char *tempDir, D
 
 static int diffResults(const char *from, const char *to, DFError **error)
 {
-    char *tempDir = createTempDir(error);
+    char *tempDir = DFCreateTempDir(error);
     if (tempDir == NULL)
         return 0;
 

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/consumers/dfutil/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/consumers/dfutil/src/CMakeLists.txt b/consumers/dfutil/src/CMakeLists.txt
index 9c511a9..6847569 100644
--- a/consumers/dfutil/src/CMakeLists.txt
+++ b/consumers/dfutil/src/CMakeLists.txt
@@ -43,7 +43,6 @@ include_directories(SYSTEM ../../../DocFormats/api/headers)
 include_directories(.)
 include_directories(../../../DocFormats/headers)
 include_directories(../../../DocFormats/unittest)
-include_directories(../../../DocFormats/platform/headers)
 include_directories(../../../DocFormats/core/src/common)
 include_directories(../../../DocFormats/core/src/css)
 include_directories(../../../DocFormats/core/src/html)

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/consumers/dfutil/src/Commands.c
----------------------------------------------------------------------
diff --git a/consumers/dfutil/src/Commands.c b/consumers/dfutil/src/Commands.c
index 626ff93..f1054d9 100644
--- a/consumers/dfutil/src/Commands.c
+++ b/consumers/dfutil/src/Commands.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "Commands.h"
 #include "BDTTests.h"
 #include "WordPlain.h"
@@ -34,9 +35,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#ifndef WIN32
-#include <unistd.h>
-#endif
 
 static DFBuffer *readData(const char *filename, DFError **error)
 {
@@ -104,7 +102,7 @@ static int prettyPrintXMLFile(const char *filename, int html, DFError **error)
 
 static int prettyPrintWordFile(const char *filename, DFError **error)
 {
-    char *tempPath = createTempDir(error);
+    char *tempPath = DFCreateTempDir(error);
     if (tempPath == NULL)
         return 0;;
     int ok = 0;
@@ -187,7 +185,7 @@ int fromPlain(const char *inFilename, const char *outFilename, DFError **error)
     if (inStr == NULL)
         return 0;
 
-    char *tempPath = createTempDir(error);
+    char *tempPath = DFCreateTempDir(error);
     if (tempPath == NULL) {
         free(inStr);
         return 0;
@@ -424,25 +422,3 @@ int unescapeCSSIdent(const char *filename, DFError **error)
     return 1;
 }
 
-char *createTempDir(DFError **error)
-{
-#ifdef WIN32
-    // Windows lacks mkdtemp. For the purposes of a single-threaded app it's ok just to use the same name
-    // each time we do a conversion, as long as we ensure that the directory is cleared first.
-    const char *name = "dfutil.temp";
-    if (DFFileExists(name) && !DFDeleteFile(name,error))
-        return NULL;
-    if (!DFCreateDirectory(name,1,error))
-        return NULL;
-    return strdup(name);
-#else
-    char *ctemplate = strdup("dfutil.XXXXXX");
-    char *r = mkdtemp(ctemplate);
-    if (r == NULL) {
-        DFErrorFormat(error,"mkdtemp: %s",strerror(errno));
-        free(ctemplate);
-        return NULL;
-    }
-    return ctemplate;
-#endif
-}

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/42c3c724/consumers/dfutil/src/Commands.h
----------------------------------------------------------------------
diff --git a/consumers/dfutil/src/Commands.h b/consumers/dfutil/src/Commands.h
index e8acef8..69b8912 100644
--- a/consumers/dfutil/src/Commands.h
+++ b/consumers/dfutil/src/Commands.h
@@ -33,6 +33,4 @@ int stobFile(const char *inFilename, const char *outFilename, DFError **error);
 int escapeCSSIdent(const char *filename, DFError **error);
 int unescapeCSSIdent(const char *filename, DFError **error);
 
-char *createTempDir(DFError **error);
-
 #endif


[08/14] incubator-corinthia git commit: Completed External Downloading Description

Posted by pm...@apache.org.
Completed External Downloading Description

Additional description files are provided to guide the running and the
maintenance of the Windows procedures.


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/2d963742
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/2d963742
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/2d963742

Branch: refs/heads/stable
Commit: 2d963742473b25462502b491a1bd67d6b2097f66
Parents: 40fb232
Author: Dennis Hamilton <or...@apache.org>
Authored: Thu Jan 8 19:23:32 2015 -0800
Committer: Dennis Hamilton <or...@apache.org>
Committed: Thu Jan 8 19:23:32 2015 -0800

----------------------------------------------------------------------
 external/README.txt            | 117 +++++++++++++++++++------
 external/customize.txt         | 110 ++++++++++++++++++++++++
 external/external.txt          |  76 +++++++++++++++++
 external/extract_downloads.bat |  16 ++--
 external/fetch_downloads.bat   |  15 ++--
 external/maintenance.txt       | 166 ++++++++++++++++++++++++++++++++++++
 6 files changed, 461 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/2d963742/external/README.txt
----------------------------------------------------------------------
diff --git a/external/README.txt b/external/README.txt
index 2dc9a6b..efbbfb4 100644
--- a/external/README.txt
+++ b/external/README.txt
@@ -1,24 +1,24 @@
-README.txt 1.0                         UTF-8
+README.txt 1.1.0                     UTF-8
 
-                       EXTERNAL DOWNLOADS AREA STRUCTURE
-                       =================================
+                        EXTERNAL DOWNLOADS SETUP AND USE
+                        ================================
 
 The Corinthia repository external/ area is a section of the repository used
 for downloading external dependencies required in constructing Corinthia code.
 These dependencies are required when constructing Corinthia components on and
 for Microsoft Windows.
 
-The downloads are created in an externals/download/ subdirectory.  This is
+The downloads are created in an externals\download\ subdirectory.  This is
 not part of the repository and is created in a local working copy whenever
-needed.  The scripts in externals/ provide the necessary downloading and
+needed.  The scripts in externals\ provide the necessary downloading and
 organization of the external material.
 
-The files directly in externals/ level provide documentation and scripts for
+The files directly in externals\ level provide documentation and scripts for
 carrying out the download and extraction of material that Corinthia components
 depend on for their compilation and executable operation.  These files are
 part of the Corinthia source code repository and are maintained with it.
 
-There are two uses for the externals/ source code,
+There are two uses for the externals\ source code,
 
   1. as maintained scripts for downloading the current dependencies into
      the download/ folder in a form that is used by build procedures where
@@ -29,6 +29,35 @@ There are two uses for the externals/ source code,
      needed on Microsoft Windows.
 
 
+   CONTENT
+     1. Prerequisites for Using the Scripts
+     2. Operation
+     3. Compile-Time Dependency on the External/Download Content
+     4. External Files to be Included with Corinthia Software on Windows
+     5. Maintenance and Customization Procedures
+     6. Caveats
+
+      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+     Licensed to the Apache Software Foundation (ASF) under one
+      or more contributor license agreements.  See the NOTICE file
+      distributed with this work for additional information
+      regarding copyright ownership.  The ASF licenses this file
+      to you under the Apache License, Version 2.0 (the
+      "License"); you may not use this file except in compliance
+      with the License.  You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+      Unless required by applicable law or agreed to in writing,
+      software distributed under the License is distributed on an
+      "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+      KIND, either express or implied.  See the License for the
+      specific language governing permissions and limitations
+      under the License.
+
+      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
 
  1. PREREQUISITES FOR USING THE SCRIPTS
     -----------------------------------
@@ -40,72 +69,80 @@ operating system can be either x86 or x64 based.
 
 The procedures employ Microsoft Windows batch (.bat) files and rely on the
 Windows Scripting Host (WSH) for JScript access to Windows utility functions.
+The Windows Command Extensions must be in effect.  (These are usually set by
+default and Visual Studio scripts depend on them also.)
 
-The scripts can be executed using a Windows Shell of the user's choice.  They
+The scripts can be executed using a console shell of the user's choice.  They
 have been tested using Windows cmd.exe, Windows PowerShell, MSYS2 (bash),
 CygWin (bash) and JSoft Take Command (formerly 4NT and 4DOS).  They have been
-operated on Windows 8.1 Pro and Windows 10 Technical Preview as of January,
-2015.
+operated on Windows XP, Windows 8.1 Pro x64 and Windows 10 x64 Technical
+Preview as of January, 2015.
+
 
  2. OPERATION
     ---------
 
 In a console session, simply arrange to execute the script
 
-    external/extract_downloads.bat
+    external\extract_downloads.bat
 
 wherever it is located on the local system.  The other script files are used
-as needed to complete the extraction operations.
+as needed to complete the extraction operations.  The script will operate
+relative to its own location, not where it is executed from.  That is,
+the downloads\ sub-folder is always created in the same folder that holds
+extract_downloads.bat and the other scripts.
 
-The external/download/ folder will be created if needed.  Any external package
+The external\download\ folder will be created if needed.  Any external package
 that is not yet downloaded will be fetched from the Internet.  Already-
 downloaded packages will not be downloaded again.  (To force a fresh set of
-downloads, simply delete the download/ subfolder.)
+downloads, simply delete the download\ subfolder.)
 
-The external packages will be stored in external/downloads/ and will remain
+The external packages will be stored in external\downloads\ and will remain
 there for any future use so long as that folder is preserved.
 
 If the set of external packages is complete, they will then be expanded into
-download/include/, download/lib/, and download/bin/ subdirectories with the
+download\include\, download\lib\, and download\bin\ subdirectories with the
 files needed for compilation and execution of code that relies on the external
 dependencies.
 
-This extraction is done completely whenever extract_downloads is operated.  It
-will not be performed if not all of the package downloads have succeeded.
+This extraction is done completely each time extract_downloads is operated.
+Extraction is not performed if any of the package downloads are missing.
 
 
  3. COMPILE-TIME DEPENDENCY ON THE EXTERNAL/DOWNLOAD CONTENT
     --------------------------------------------------------
 
-The population of external/downloads/ is presumed in the root CMakeLists.txt
+The population of external\downloads\ is presumed in the root CMakeLists.txt
 file in the 'if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")' entry.  That
 definition and the current structure here must be kept synchronized.
 
-These externals are for builds targetted to Win32 x86 runtime only.  Externals
+These externals are for builds targeted to Win32 x86 runtime only.  Externals
 needed for producing x64 executables require a different arrangement.
 
 
  4. EXTERNAL FILES TO BE INCLUDED WITH CORINTHIA SOFTWARE ON WINDOWS
     ----------------------------------------------------------------
 
-The external/download/ folder is populated with include/, lib/, and bin/
+The external\download\ folder is populated with include\, lib\, and bin\
 subfolders that carry extracted material that Corinthia code depends on when
 compiled for Windows.
 
 The compiled executables will need to be installed in folders that also have
-copies of DLLs from external/download/bin/
+copies of DLLs from external\download\bin\
 
-  SDL2.dll
-  SDL2_image.dll
   iconv.dll
+  exit
   libjpeg-9.dll
   libpng16-16.dll
   libtiff-5.dll
   libwebp-4.dll
   libxml2.dll
+  SDL2.dll
+  SDL2_image.dll
   zlib1.dll
 
-The license files in bin/ should be carried along with those DLL files.
+The license files in bin\ are to be carried along with the DLL files they
+apply to.
 
 Not every Corinthia component requires all of these DLLs.  For finer details,
 consult information on the individual component.
@@ -114,6 +151,34 @@ consult information on the individual component.
  5. MAINTENANCE AND CUSTOMIZATION PROCEDURES
     ----------------------------------------
 
-    [TBD]
+    The file maintenance.txt provides more information on how to perform
+    basic maintenance on these procedures.
+
+    The file customize.txt provides more information on adaptation of
+    the procedures for use in a differen location and download situation.
+
+ 6. CAVEATS
+    -------
+
+    The Windows Command Extensions must be enabled for the .bat scripts to
+    work properly.
+
+    The Windows file system is case insensitive.  Any two file names and URLs
+    that differ only in case will collide.  There are also more restrictions
+    on special characters.  E.g., ":" may not be used in file names and "\"
+    is the path separator (not "/" which is also restricted).
+
+    The scripts can be unsuccessful without any failure indication.  It is
+    necessary to use troubleshooting procedures to confirm that a download
+    is failing or that an extraction is not producing the expected content.
+    It is possible for a download to fail with a delivered but incorrect
+    file.
+
+
+REVISIONS
+
+ 1.1.0 2015-01-08-21:20 Updated Draft with complete coverage
+ 1.0.0 2015-01-08-15:21 Initial Draft replacement of the original README.txt
+
 
                        *** end of README.txt ***

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/2d963742/external/customize.txt
----------------------------------------------------------------------
diff --git a/external/customize.txt b/external/customize.txt
new file mode 100644
index 0000000..cb98e2f
--- /dev/null
+++ b/external/customize.txt
@@ -0,0 +1,110 @@
+customize.txt 1.0.0                   UTF-8                       2015-01-08
+
+               CUSTOMIZING EXTERNAL DOWNLOADS FOR OTHER DOWNLOADS
+               ==================================================
+
+    The external\ folder holds scripts and the download\ sub-folder for
+    external software that Corinthia Windows Win32 x86 builds depend on.
+
+    Note: This repository folder is intended to be usable when cloned to a
+    Microsoft platform.  The notation for file paths reflects that, even
+    though POSIX path notation is used in the git and when viewed on GitHub.
+
+BASIC CUSTOMIZATION APPROACH
+
+The files, listed below, can be moved in their entirety to a new folder
+location where download of external materials is desired.
+
+The scripts are designed to operate relative to where they are stored.  So
+if the scripts are moved to a folder named test-documents\, they will produce
+and populate a further sub-folder, either named download\ or a different name
+that is customized.
+
+One can make further modifications that deviate further from this structure.
+It is useful to make such changes in stages to ensure that the new organiza-
+tion is being honored correctly.
+
+Once the eight files are moved to their intended new home, customization at
+the detail is similar to following the maintenance procedure with allowance
+for the changes in location and desired operation.
+
+FILES TO MODIFY
+
+    .gitignore
+        Change the name of the download\ subfolder here if a different
+        folder outside of the managed source tree is used.
+
+    fetch_downloads.bat
+        The "download" name must be replaced everywhere that a different
+        folder name is to be used as the location of downloaded files.  The
+        number of downloads and the names will also be changed by creation
+        of appropriate :FETCH calls in place of the ones in the script.
+
+    extract_downloads.bat
+        The "download" name must be replaced everywhere that a different
+        folder name is to be used as the location of the downloaded files
+        and of the new directories created as part of the extraction.  Note
+        that all extractions of Zips are  into a subfolder "T\" and then the
+        extracts are selectively moved to other places in the chosen download\
+        location.  This procedure requires the greatest customization
+        depending on the purpose of the download procedure.
+
+    README.txt
+        replace with appropriate text, if needed at all.
+
+    customize.txt
+        this file can be kept unchanged or touched-up slightly for the new
+        location.  Alternatively, simply refer to the originals that were
+        customized, linking to where this procedure was found.
+
+    maintenance.txt
+        This can still apply, depending on how much difference there is,
+        especially in the extraction process.  Most of the advice remains
+        applicable.
+
+    unzip-win.js
+        This helper script takes the archive filename and the destination
+        folder as parameters.  It does not need to be modified.
+
+    wget-win.js
+        This helper script takes the URL and the download location as
+        parameters.  It does not need to be modified.
+
+
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+      Licensed to the Apache Software Foundation (ASF) under one
+      or more contributor license agreements.  See the NOTICE file
+      distributed with this work for additional information
+      regarding copyright ownership.  The ASF licenses this file
+      to you under the Apache License, Version 2.0 (the
+      "License"); you may not use this file except in compliance
+      with the License.  You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+      Unless required by applicable law or agreed to in writing,
+      software distributed under the License is distributed on an
+      "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+      KIND, either express or implied.  See the License for the
+      specific language governing permissions and limitations
+      under the License.
+
+TODO
+
+ * Add maintainance.txt for the maintenance procedure for the scripts in their
+   original external\ portion of the Corinthia repository.
+
+ * Add customize.txt for the procedure for customizing the scripts in another
+   location or project.
+
+ * Update README.txt to reflect these when present.
+
+ * Add Apache license notice to anything of much length.
+
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+ 1.0.0 2015-01-08-16:48 Create initial version to account for the way
+       the scripts will produce different download folders in other places.
+
+                     *** end of customize.txt ***
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/2d963742/external/external.txt
----------------------------------------------------------------------
diff --git a/external/external.txt b/external/external.txt
new file mode 100644
index 0000000..4846554
--- /dev/null
+++ b/external/external.txt
@@ -0,0 +1,76 @@
+external.txt 1.0.0                    UTF-8                       2015-01-08
+
+              CORINTHIA EXTERNAL DOWNLOADS FOR WINDOWS x86 BUILDS
+              ===================================================
+
+    The external\ folder holds scripts and the download\ sub-folder for
+    external software that Corinthia Windows Win32 x86 builds depend on.
+
+    Note: This repository folder is intended to be usable when cloned to a
+    Microsoft platform.  The notation for file paths reflects that, even
+    though POSIX path notation is used in the git and when viewed on GitHub.
+
+
+MANIFEST
+
+    external.txt
+        This summary, manifest and work-item file for activity in this
+        external folder
+
+    .gitignore
+        Rule for excluding the download\ subfolder from the repository
+
+    extract_downloads.bat
+        Windows console session batch file for fetching and extracting
+        the external packages
+
+    fetch_downloads.bat
+        Windows console session batch file for fetching the external
+        packages to download\ without extracting anything; used by
+        extract_downloads to retrieve any packages not downloaded yet
+
+    README.txt
+        general description of the procedures and their usage
+
+    customize.txt
+        description of general procedure for customizing the procedures
+        in creating downloads on Windows for other purposes
+
+    maintenance.txt
+        description of the basic maintenance and modification-testing when
+        these procedures are updated and/or customized
+
+    unzip-win.js
+        helper JScript file used by extract_downloads to extract all
+        of the files in a Zip into a specified desktop folder
+
+    wget-win.js
+        helper JScript file used by fetch_downloads to make web requests
+        for downloading of specified URLs to specific download locations.
+
+
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+      Licensed to the Apache Software Foundation (ASF) under one
+      or more contributor license agreements.  See the NOTICE file
+      distributed with this work for additional information
+      regarding copyright ownership.  The ASF licenses this file
+      to you under the Apache License, Version 2.0 (the
+      "License"); you may not use this file except in compliance
+      with the License.  You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+      Unless required by applicable law or agreed to in writing,
+      software distributed under the License is distributed on an
+      "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+      KIND, either express or implied.  See the License for the
+      specific language governing permissions and limitations
+      under the License.
+
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+ 1.0.0 2015-01-08-21:14 Create initial version to account for the files in
+       the external\ folder
+
+                       *** end of external.txt ***
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/2d963742/external/extract_downloads.bat
----------------------------------------------------------------------
diff --git a/external/extract_downloads.bat b/external/extract_downloads.bat
index a431567..ffeedf2 100644
--- a/external/extract_downloads.bat
+++ b/external/extract_downloads.bat
@@ -1,5 +1,5 @@
 @echo off
-rem extract_downloads.bat 1.01       UTF-8
+rem extract_downloads.bat 1.1.0       UTF-8
 rem    EXTRACT THE EXTERNAL DOWNLOADS TO INCLUDE, LIB, AND BIN FOLDERS
 
 rem Fetch downloads in case not done yet
@@ -44,10 +44,12 @@ rem          path segments each ending with "\".
 
 :SDL2x86
 rem taking T\%2include and T\%2lib\*.lib across, with T\%2lib\*.dll to bin
+rem move any license *.txt files to the bin also.
 CALL :UNZIP %1
 XCOPY "%~dp0download\T\%2include\*.*" "%~dp0download\include" /I /Q /Y >nul
 XCOPY "%~dp0download\T\%2lib\x86\*.lib" "%~dp0download\lib" /I /Q /Y >nul
 XCOPY "%~dp0download\T\%2lib\x86\*.dll" "%~dp0download\bin" /I /Q /Y >nul
+XCOPY "%~dp0download\T\%2lib\x86\*.txt" "%~dp0download\bin" /I /Q /Y >nul 2>&1
 EXIT /B 0
 
 :ICONV
@@ -112,10 +114,12 @@ ECHO: ***    No extractions have been performed.
 ECHO:
 EXIT /B 2
 
-rem 1.01 2015-01-02-17:03 Silence warnings when removing non-existent
-rem      directories
-rem 1.00 2015-01-02-16:25 Complete Full-Functioning Externals Extraction
-rem      Delivering the download\include, donwload\lib, and download\bin
-rem      collections established for the current external downloads.
+rem 1.1.0 2015-01-08-14:41 Extract SDL2 Licenses
+rem       The license files are added to the bin\ extraction.
+rem 1.01  2015-01-02-17:03 Silence warnings when removing non-existent
+rem       directories
+rem 1.00  2015-01-02-16:25 Complete Full-Functioning Externals Extraction
+rem       Delivering the download\include, donwload\lib, and download\bin
+rem       collections established for the current external downloads.
 
 rem                 *** end of extract_downloads.bat ***

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/2d963742/external/fetch_downloads.bat
----------------------------------------------------------------------
diff --git a/external/fetch_downloads.bat b/external/fetch_downloads.bat
index 0d5309b..08a815b 100644
--- a/external/fetch_downloads.bat
+++ b/external/fetch_downloads.bat
@@ -1,5 +1,5 @@
 @echo off
-rem fetch_downloads.bat 1.00              UTF-8
+rem fetch_downloads.bat 1.1.0         UTF-8
 rem   FETCH EXTERNAL ARCHIVES FOR NATIVE WINDOWS BUILDS OF CORINTHIA
 
 MKDIR "%~dp0download" >nul 2>&1
@@ -18,22 +18,23 @@ EXIT /B 0
 IF EXIST "%~dp0download\%~n1%~x1" EXIT /B 0
 rem do not download an archive that is already present.
 Cscript /nologo "%~dp0wget-win.js" //B "%1" "%~dp0download\%~n1%~x1"
+rem This procedure always succeeds.  It needs some error handling.
 IF EXIST "%~dp0download\%~n1%~x1" ECHO:     %~n1%~x1% downloaded
 EXIT /B 0
 
+
 rem TODO
-rem  * Might want to pass up and act on error codes from the individual
-rem    :FETCH operations.
 rem  * It might be handy to fetch these URLs from a file so that it can
 rem    be kept maintained in one place, even though the win32 cases are
 rem    unique to building for Windows.
-rem  * Silent the warning on download folder already existing
 rem XXX
 rem  * wget-win.js does not do FTP.  So alternative locations have been
 rem    used for iconv and libmxl2.
 
-rem 1.00 2015-01-02-16:51 Complete with mating to extract_downloads.bat
-rem      The tested version is adjusted to list successful downloads
-rem      and not any that are not needed or fail.
+rem 1.1.0 2015-01-08-18:42 Adjust to line up with maintenance description
+rem       The TODO list is updated.  The always successful :FETCH noted.
+rem 1.00  2015-01-02-16:51 Complete with mating to extract_downloads.bat
+rem       The tested version is adjusted to list successful downloads
+rem       and not any that are not needed or fail.
 
 rem               *** end of fetch_downloads.bat ***

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/2d963742/external/maintenance.txt
----------------------------------------------------------------------
diff --git a/external/maintenance.txt b/external/maintenance.txt
new file mode 100644
index 0000000..17c6c21
--- /dev/null
+++ b/external/maintenance.txt
@@ -0,0 +1,166 @@
+maintenance.txt 1.0.0                 UTF-8                       2015-01-08
+
+                  MAINTAIN THE EXTERNAL DOWNLOADS PROCEDURES
+                  ==========================================
+
+    The external\ folder holds scripts that provide for specific downloads
+    to be obtained over the internet and retained in a download\ sub-folder.
+    The scripts also provide for the extraction of code and libraries from
+    the downloaded archives and making them available for use in builds on
+    Windows and in deployed packages on Windows.
+
+    When the source or version of downloads change, and other downloads are
+    added, these procedures must be maintained.  Almost all of the maintenance
+    and related customization is in the two procedure fetch_downloads.bat
+    and extract_downloads.bat.
+
+    There are interdependencies among the two scripts and within the second
+    script that must be maintained and carefully verified.
+
+    This file provides guidance on how to preserve correct, tested operation
+    as maintenance and customization are performed.
+
+MAINTAINING FETCH_DOWNLOADS.BAT
+-------------------------------
+
+CREATING THE DOWNLOAD\ SUB-FOLDER
+
+This file creates the download\ subdirectory in the same folder as the script
+when it is not present already.  It does not remove anything from a folder
+that is already there.
+
+The single command
+
+        MKDIR "%~dp0download" >nul 2>&1
+
+accomplishes that.  The script parameter %~dp0 uses the drive and path of
+the location of the script itself (ending in "\") and appends the download
+name for the desired subdirectory.  (This scheme is used throughout the
+scripts.)  Any console output is routed to nul, and any error message output
+is routed to the same place as the console.  This eliminates nuisance warnings
+about directories already existing, etc.
+
+DOWNLOADING THE EXTERNAL CONTENT
+
+Each download is accomplished with one of the lines that performs a
+CALL :FETCH operation.  The one parameter on the same line is the full URL
+of a file to download.
+
+There are two important variables to observe.  The full URL must be the
+complete location for accessing the file on the Internet using HTTP.  The
+downloads must use HTTP in this implementation.
+
+Furthermore, the name by which the download will be stored will be the
+file name at the end of the URL.  The :FETCH procedure takes apart the
+URL and specifies the correct file name to use when storing in the download\
+folder.
+
+The fetch_downloads.bat procedure is mostly silent.  If it is discovered
+that a file to be downloaded is already present, it is left intact and not
+downloaded again.  If there is a download operation, and the file is present
+afterwards, the name of the file is announced on the console.  And if that
+download fails, there is also silence.
+
+TESTING AND TROUBLE-SHOOTING
+
+If there is any doubt about a download, the easiest way to determine if it
+is working is by putting the URL in the address bar of a browser and seeing
+whether the file is delivered.
+
+It is possible to run fetch_downloads.bat multiple times.  Once all of the
+files are all present (if downloadable), there will be no further output.
+Look in the download\ directory to see what files are present.
+
+It may be necessary to trouble-shoot collisions of names that are the same
+when case is ignored, and there can be other problems with special characters
+that are not permitted in Windows file names (or that are reserved names, like
+"nul").
+
+Finally, the wget-win.js never fails, and it will always store *something*
+at the destination location.  This can lead to file-not-found messages in the extract_downloads.bat script.
+
+
+MAINTAINING EXTRACT_DOWNLOADS.BAT
+---------------------------------
+
+The extract_downloads.bat script first does a CALL fetch_downloads.bat.  This
+does no harm and it automatically obtains the downloads if they are not there
+already.
+
+CHECKING THAT THE DOWNLOADS ARE PRESENT
+
+The first part of extract_downloads.bat is a series of CALL :CHECK commands.
+Each one of these names one of the downloads that should now be present.
+If they are not all there, the procedure will report that and stop.
+
+The important feature of the CALL :CHECK commands is they must list exactly
+the same files that are specified in the CALL :FETCH commands in
+fetch_downloads.bat.  These are the names the files should have been stored
+with.
+
+It is possible that a file is present but it is incorrect.  This will usually
+show up with unusual results from the extract operations.
+
+PERFORMING EXTRACTIONS
+
+The actual extraction procedure is very specific to the individual downloads.
+There is some abstraction into general, reusable procedures, but they are
+still very specific to the nature of the download.
+
+There is a consistent extraction API for these custom routines.  The first
+parameter is the name of the downloaded file.  This should agree with the
+name in the CALL :CHECK operation.
+
+The second parameter indicates where inside of a Zip, the interesting data
+starts.  Many of the Zip files unload a single directory as their top level
+and then the actual payload is at the level below that directory.  When that
+is the case, the path prior to the payload is specified with a non-empty
+second parameter.
+
+This can be seen by examining some of the calls and comparing with how the
+Zip files are organized by inspecting them in the Windows file system.
+
+What's important:
+ 1. When an existing download is upgraded to use a new version, the file name
+    will change and so many any second parameter, since it often is a folder
+    whose name is based on the version of the related library.
+ 2. When an existing download is upgraded, the structure of the main material
+    may change, so a different set of XCOPY operations may be required to
+    extract the material correctly.
+
+This is even more involved when a new custom download is introduced.
+
+TESTING AND TROUBLESHOOTING
+
+The easiest way to test individual extractions is to remark-out all of the
+CALL procedures but the one to be tested.  The extraction from the one
+archive can be seen in the download\T\ folder, and one can verify the
+download\include\, download\lib\, and download\bin results manually.
+
+
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+      Licensed to the Apache Software Foundation (ASF) under one
+      or more contributor license agreements.  See the NOTICE file
+      distributed with this work for additional information
+      regarding copyright ownership.  The ASF licenses this file
+      to you under the Apache License, Version 2.0 (the
+      "License"); you may not use this file except in compliance
+      with the License.  You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+      Unless required by applicable law or agreed to in writing,
+      software distributed under the License is distributed on an
+      "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+      KIND, either express or implied.  See the License for the
+      specific language governing permissions and limitations
+      under the License.
+
+ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+ 1.0.0 2015-01-08-19:12 Create initial version to account for the way
+       the scripts operate and will need to be modified on upgrades of
+       any of the downloads.
+
+                     *** end of maintenance.txt ***
\ No newline at end of file


[05/14] incubator-corinthia git commit: Add .gitattributes

Posted by pm...@apache.org.
Add .gitattributes

The Git attributes are set to adjust line endings between different
clients and the repository form (usually Unix NL instead of CR-LF).


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/2d374505
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/2d374505
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/2d374505

Branch: refs/heads/stable
Commit: 2d3745056c41dd0d45484b07580b97713e1dcf52
Parents: a485215
Author: Dennis Hamilton <or...@apache.org>
Authored: Wed Jan 7 11:49:26 2015 -0800
Committer: Dennis Hamilton <or...@apache.org>
Committed: Wed Jan 7 11:49:26 2015 -0800

----------------------------------------------------------------------
 .gitattributes | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/2d374505/.gitattributes
----------------------------------------------------------------------
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..a77dbf0
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,25 @@
+# .gitattributes                       UTF-8
+#
+#           GIT ATTRIBUTES FOR THE CORINTHIA GIT REPOSITORY
+
+# Set the default behavior in case people don't have core.autocrlf set.
+# This will automatically convert between line-ending style of the client
+# and whatever line-ending style that is found in the repository.  (On the
+# client, always use a Git package that is compiled for the native OS.)
+
+* text=auto
+# This declares files to be text by default and to be line-ending alterable.
+# Be careful.  See the group below.
+
+# Denote all files that are truly binary and must not be scanned for line-end.
+# Some of these might also be .gitignored.  Better safe than sorry.
+
+*.bmp binary
+*.jpg binary
+*.png binary
+*.suo binary
+*.zip binary
+
+#                          *** end of .gitattributes ***
+
+


[02/14] incubator-corinthia git commit: move #ifdef MSC_VER to DFPlatform.h

Posted by pm...@apache.org.
move #ifdef MSC_VER to DFPlatform.h

In DFError.h ATTRIBUTE_FORMAT was defined
In DFTypes.h ATTRIBUTE_FORMAT and ATTRIBUTE_ALIGNED was defined.
DFPlatform.h has been added to the files that needed it.


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/e8d93d48
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/e8d93d48
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/e8d93d48

Branch: refs/heads/stable
Commit: e8d93d482ae0c45a65cbe5b1f9dfe3e49646f640
Parents: 42c3c72
Author: jani <ja...@apache.org>
Authored: Fri Jan 2 19:36:35 2015 +0100
Committer: jani <ja...@apache.org>
Committed: Fri Jan 2 19:36:35 2015 +0100

----------------------------------------------------------------------
 DocFormats/api/headers/DocFormats/DFError.h              |  8 --------
 DocFormats/api/src/Formats.c                             |  1 +
 DocFormats/api/src/Operations.c                          |  1 +
 DocFormats/core/src/common/DFBDT.c                       |  1 +
 DocFormats/core/src/css/CSSSelector.c                    |  1 +
 DocFormats/core/src/html/DFHTDocument.c                  |  1 +
 DocFormats/core/src/html/DFHTMLNormalization.c           |  1 +
 DocFormats/core/src/html/DFTidyHelper.c                  |  1 +
 DocFormats/core/src/html/DFTidyWrapper.c                 |  1 +
 DocFormats/core/src/lib/DFBuffer.c                       |  1 +
 DocFormats/core/src/lib/DFError.c                        |  1 +
 DocFormats/core/src/lib/DFFilesystem.c                   |  1 +
 DocFormats/core/src/lib/DFStorage.c                      |  1 +
 DocFormats/core/src/lib/DFZipFile.c                      |  1 +
 DocFormats/core/src/lib/TextPackage.c                    |  1 +
 DocFormats/core/src/xml/DFChanges.c                      |  1 +
 DocFormats/core/src/xml/DFNameMap.c                      |  1 +
 DocFormats/core/tests/common/BDTTests.c                  |  1 +
 DocFormats/core/tests/html/HTMLPlain.c                   |  1 +
 DocFormats/core/tests/html/HTMLTests.c                   |  1 +
 DocFormats/filters/latex/tests/LaTeXTests.c              |  1 +
 DocFormats/filters/odf/src/ODF.c                         |  1 +
 DocFormats/filters/odf/src/ODFManifest.c                 |  1 +
 DocFormats/filters/odf/src/ODFPackage.c                  |  1 +
 DocFormats/filters/ooxml/src/common/OPC.c                |  1 +
 DocFormats/filters/ooxml/src/word/Word.c                 |  1 +
 DocFormats/filters/ooxml/src/word/WordGC.c               |  1 +
 DocFormats/filters/ooxml/src/word/WordNotes.c            |  1 +
 DocFormats/filters/ooxml/src/word/WordPackage.c          |  1 +
 DocFormats/filters/ooxml/src/word/WordSettings.c         |  1 +
 DocFormats/filters/ooxml/src/word/WordStyles.c           |  1 +
 DocFormats/filters/ooxml/src/word/WordTheme.c            |  1 +
 DocFormats/filters/ooxml/src/word/WordWhitespace.c       |  1 +
 .../filters/ooxml/src/word/formatting/WordCommonPr.c     |  1 +
 DocFormats/filters/ooxml/src/word/formatting/WordNumPr.c |  1 +
 DocFormats/filters/ooxml/src/word/formatting/WordTblPr.c |  1 +
 .../filters/ooxml/src/word/lenses/WordBlockLevel.c       |  1 +
 DocFormats/filters/ooxml/src/word/lenses/WordBody.c      |  1 +
 DocFormats/filters/ooxml/src/word/lenses/WordChange.c    |  1 +
 DocFormats/filters/ooxml/src/word/lenses/WordDocument.c  |  1 +
 DocFormats/filters/ooxml/src/word/lenses/WordDrawing.c   |  1 +
 DocFormats/filters/ooxml/src/word/lenses/WordEquation.c  |  1 +
 DocFormats/filters/ooxml/src/word/lenses/WordHyperlink.c |  1 +
 DocFormats/filters/ooxml/src/word/lenses/WordLenses.c    |  1 +
 DocFormats/filters/ooxml/src/word/lenses/WordParagraph.c |  1 +
 .../filters/ooxml/src/word/lenses/WordParagraphContent.c |  1 +
 DocFormats/filters/ooxml/src/word/lenses/WordRun.c       |  1 +
 .../filters/ooxml/src/word/lenses/WordRunContent.c       |  1 +
 DocFormats/filters/ooxml/src/word/lenses/WordSmartTag.c  |  1 +
 DocFormats/filters/ooxml/src/word/lenses/WordTable.c     |  1 +
 DocFormats/headers/DFPlatform.h                          | 11 +++++++++++
 DocFormats/platform/tests/OStests.c                      |  5 -----
 consumers/dfconvert/src/CMakeLists.txt                   |  1 +
 consumers/dfconvert/src/main.c                           |  1 +
 consumers/dfutil/src/main.c                              |  1 +
 55 files changed, 63 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/api/headers/DocFormats/DFError.h
----------------------------------------------------------------------
diff --git a/DocFormats/api/headers/DocFormats/DFError.h b/DocFormats/api/headers/DocFormats/DFError.h
index 42ca67c..5b08fb1 100644
--- a/DocFormats/api/headers/DocFormats/DFError.h
+++ b/DocFormats/api/headers/DocFormats/DFError.h
@@ -15,18 +15,10 @@
 #ifndef DocFormats_DFError_h
 #define DocFormats_DFError_h
 
-//#include "DFTypes.h"
 #include <stdarg.h>
 
 // It's really not nice having this here, but is the only way to get the compiler to typecheck the
 // DFErrorFormat arguments when such functionality is available.
-#ifndef ATTRIBUTE_FORMAT
-#ifdef _MSC_VER
-#define ATTRIBUTE_FORMAT(archetype,index,first)
-#else
-#define ATTRIBUTE_FORMAT(archetype,index,first) __attribute__((format(archetype,index,first)))
-#endif
-#endif
 
 typedef struct DFError DFError;
 

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/api/src/Formats.c
----------------------------------------------------------------------
diff --git a/DocFormats/api/src/Formats.c b/DocFormats/api/src/Formats.c
index 3d194de..20d77dd 100644
--- a/DocFormats/api/src/Formats.c
+++ b/DocFormats/api/src/Formats.c
@@ -13,6 +13,7 @@
 // limitations under the License.
 
 #include <DocFormats/Formats.h>
+#include "DFPlatform.h"
 #include "DFFilesystem.h"
 #include "DFString.h"
 #include <stdlib.h>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/api/src/Operations.c
----------------------------------------------------------------------
diff --git a/DocFormats/api/src/Operations.c b/DocFormats/api/src/Operations.c
index ad7fb5a..18575cd 100644
--- a/DocFormats/api/src/Operations.c
+++ b/DocFormats/api/src/Operations.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include <DocFormats/Operations.h>
 #include "DFFilesystem.h"
 #include "DFString.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/core/src/common/DFBDT.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/common/DFBDT.c b/DocFormats/core/src/common/DFBDT.c
index b414602..8a34599 100644
--- a/DocFormats/core/src/common/DFBDT.c
+++ b/DocFormats/core/src/common/DFBDT.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "DFBDT.h"
 #include "DFDOM.h"
 #include "DFXML.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/core/src/css/CSSSelector.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/css/CSSSelector.c b/DocFormats/core/src/css/CSSSelector.c
index e9e922d..52220be 100644
--- a/DocFormats/core/src/css/CSSSelector.c
+++ b/DocFormats/core/src/css/CSSSelector.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "CSSSelector.h"
 #include "DFNameMap.h"
 #include "DFString.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/core/src/html/DFHTDocument.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/html/DFHTDocument.c b/DocFormats/core/src/html/DFHTDocument.c
index 84aa2f3..6d6c3f0 100644
--- a/DocFormats/core/src/html/DFHTDocument.c
+++ b/DocFormats/core/src/html/DFHTDocument.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "DFHTDocument.h"
 #include "DFString.h"
 #include "streamio.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/core/src/html/DFHTMLNormalization.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/html/DFHTMLNormalization.c b/DocFormats/core/src/html/DFHTMLNormalization.c
index 1e4693f..36404a5 100644
--- a/DocFormats/core/src/html/DFHTMLNormalization.c
+++ b/DocFormats/core/src/html/DFHTMLNormalization.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "DFHTMLNormalization.h"
 #include "DFDOM.h"
 #include "CSS.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/core/src/html/DFTidyHelper.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/html/DFTidyHelper.c b/DocFormats/core/src/html/DFTidyHelper.c
index dc048fc..f2f2303 100644
--- a/DocFormats/core/src/html/DFTidyHelper.c
+++ b/DocFormats/core/src/html/DFTidyHelper.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "DFTidyHelper.h"
 #include "buffio.h"
 #include "streamio.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/core/src/html/DFTidyWrapper.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/html/DFTidyWrapper.c b/DocFormats/core/src/html/DFTidyWrapper.c
index 70e93cf..72fe583 100644
--- a/DocFormats/core/src/html/DFTidyWrapper.c
+++ b/DocFormats/core/src/html/DFTidyWrapper.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "DFTidyWrapper.h"
 #include "DFHTDocument.h"
 #include "DFCommon.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/core/src/lib/DFBuffer.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/lib/DFBuffer.c b/DocFormats/core/src/lib/DFBuffer.c
index c23b66b..92c7a02 100644
--- a/DocFormats/core/src/lib/DFBuffer.c
+++ b/DocFormats/core/src/lib/DFBuffer.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "DFBuffer.h"
 #include "DFCommon.h"
 #include "DFString.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/core/src/lib/DFError.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/lib/DFError.c b/DocFormats/core/src/lib/DFError.c
index 22a543f..4eb19dd 100644
--- a/DocFormats/core/src/lib/DFError.c
+++ b/DocFormats/core/src/lib/DFError.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include <DocFormats/DFError.h>
 #include "DFCommon.h"
 #include <assert.h>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/core/src/lib/DFFilesystem.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/lib/DFFilesystem.c b/DocFormats/core/src/lib/DFFilesystem.c
index b6707ef..41a9f28 100644
--- a/DocFormats/core/src/lib/DFFilesystem.c
+++ b/DocFormats/core/src/lib/DFFilesystem.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "DFFilesystem.h"
 #include "DFString.h"
 #include "DFArray.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/core/src/lib/DFStorage.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/lib/DFStorage.c b/DocFormats/core/src/lib/DFStorage.c
index c4f24e5..04521aa 100644
--- a/DocFormats/core/src/lib/DFStorage.c
+++ b/DocFormats/core/src/lib/DFStorage.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include <DocFormats/DFStorage.h>
 #include "DFCommon.h"
 #include "DFString.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/core/src/lib/DFZipFile.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/lib/DFZipFile.c b/DocFormats/core/src/lib/DFZipFile.c
index 8bc0bcb..faec05f 100644
--- a/DocFormats/core/src/lib/DFZipFile.c
+++ b/DocFormats/core/src/lib/DFZipFile.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "DFZipFile.h"
 #include "DFPlatform.h"
 #include "DFFilesystem.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/core/src/lib/TextPackage.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/lib/TextPackage.c b/DocFormats/core/src/lib/TextPackage.c
index 031bb1e..b81a42e 100644
--- a/DocFormats/core/src/lib/TextPackage.c
+++ b/DocFormats/core/src/lib/TextPackage.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "TextPackage.h"
 #include "DFBuffer.h"
 #include "DFString.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/core/src/xml/DFChanges.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/xml/DFChanges.c b/DocFormats/core/src/xml/DFChanges.c
index 3e2ad96..8dd44de 100644
--- a/DocFormats/core/src/xml/DFChanges.c
+++ b/DocFormats/core/src/xml/DFChanges.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "DFChanges.h"
 #include "DFHashTable.h"
 #include "DFString.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/core/src/xml/DFNameMap.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/xml/DFNameMap.c b/DocFormats/core/src/xml/DFNameMap.c
index 1435407..f408003 100644
--- a/DocFormats/core/src/xml/DFNameMap.c
+++ b/DocFormats/core/src/xml/DFNameMap.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "DFNameMap.h"
 #include "DFDOM.h"
 #include "DFHashTable.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/core/tests/common/BDTTests.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/tests/common/BDTTests.c b/DocFormats/core/tests/common/BDTTests.c
index 4d01e7e..df10d02 100644
--- a/DocFormats/core/tests/common/BDTTests.c
+++ b/DocFormats/core/tests/common/BDTTests.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "BDTTests.h"
 #include "DFDOM.h"
 #include "DFBDT.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/core/tests/html/HTMLPlain.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/tests/html/HTMLPlain.c b/DocFormats/core/tests/html/HTMLPlain.c
index 656c5ba..d260de4 100644
--- a/DocFormats/core/tests/html/HTMLPlain.c
+++ b/DocFormats/core/tests/html/HTMLPlain.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "HTMLPlain.h"
 #include "TextPackage.h"
 #include "DFXML.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/core/tests/html/HTMLTests.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/tests/html/HTMLTests.c b/DocFormats/core/tests/html/HTMLTests.c
index 540f2af..76a1424 100644
--- a/DocFormats/core/tests/html/HTMLTests.c
+++ b/DocFormats/core/tests/html/HTMLTests.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "DFUnitTest.h"
 #include "HTMLPlain.h"
 #include "DFHTML.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/latex/tests/LaTeXTests.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/latex/tests/LaTeXTests.c b/DocFormats/filters/latex/tests/LaTeXTests.c
index 2336651..16a113c 100644
--- a/DocFormats/filters/latex/tests/LaTeXTests.c
+++ b/DocFormats/filters/latex/tests/LaTeXTests.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "DFUnitTest.h"
 #include "HTMLPlain.h"
 #include "HTMLToLaTeX.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/odf/src/ODF.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/odf/src/ODF.c b/DocFormats/filters/odf/src/ODF.c
index 43f933e..299fc95 100644
--- a/DocFormats/filters/odf/src/ODF.c
+++ b/DocFormats/filters/odf/src/ODF.c
@@ -12,5 +12,6 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "ODF.h"
 #include "DFCommon.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/odf/src/ODFManifest.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/odf/src/ODFManifest.c b/DocFormats/filters/odf/src/ODFManifest.c
index 172d8f2..843408b 100644
--- a/DocFormats/filters/odf/src/ODFManifest.c
+++ b/DocFormats/filters/odf/src/ODFManifest.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "ODFManifest.h"
 #include "DFXMLNames.h"
 #include "DFCommon.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/odf/src/ODFPackage.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/odf/src/ODFPackage.c b/DocFormats/filters/odf/src/ODFPackage.c
index e63c5f7..c05c04c 100644
--- a/DocFormats/filters/odf/src/ODFPackage.c
+++ b/DocFormats/filters/odf/src/ODFPackage.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "ODFPackage.h"
 #include "DFDOM.h"
 #include "DFXML.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/common/OPC.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/common/OPC.c b/DocFormats/filters/ooxml/src/common/OPC.c
index 2937645..724470c 100644
--- a/DocFormats/filters/ooxml/src/common/OPC.c
+++ b/DocFormats/filters/ooxml/src/common/OPC.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "OPC.h"
 #include "DFDOM.h"
 #include "DFFilesystem.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/word/Word.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/Word.c b/DocFormats/filters/ooxml/src/word/Word.c
index 7a33866..e17387d 100644
--- a/DocFormats/filters/ooxml/src/word/Word.c
+++ b/DocFormats/filters/ooxml/src/word/Word.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "Word.h"
 #include "WordStyles.h"
 #include "DFHTML.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/word/WordGC.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/WordGC.c b/DocFormats/filters/ooxml/src/word/WordGC.c
index 09afaef..2698f71 100644
--- a/DocFormats/filters/ooxml/src/word/WordGC.c
+++ b/DocFormats/filters/ooxml/src/word/WordGC.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordGC.h"
 #include "WordConverter.h"
 #include "WordPackage.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/word/WordNotes.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/WordNotes.c b/DocFormats/filters/ooxml/src/word/WordNotes.c
index cd4a887..06caa60 100644
--- a/DocFormats/filters/ooxml/src/word/WordNotes.c
+++ b/DocFormats/filters/ooxml/src/word/WordNotes.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordNotes.h"
 #include "WordConverter.h"
 #include "WordSheet.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/word/WordPackage.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/WordPackage.c b/DocFormats/filters/ooxml/src/word/WordPackage.c
index 5d414a0..86b3bed 100644
--- a/DocFormats/filters/ooxml/src/word/WordPackage.c
+++ b/DocFormats/filters/ooxml/src/word/WordPackage.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordPackage.h"
 #include "WordStyles.h"
 #include "WordSettings.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/word/WordSettings.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/WordSettings.c b/DocFormats/filters/ooxml/src/word/WordSettings.c
index 25e3bdc..2c17786 100644
--- a/DocFormats/filters/ooxml/src/word/WordSettings.c
+++ b/DocFormats/filters/ooxml/src/word/WordSettings.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordSettings.h"
 #include "DFDOM.h"
 #include "DFXML.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/word/WordStyles.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/WordStyles.c b/DocFormats/filters/ooxml/src/word/WordStyles.c
index d3b1b09..c7e5e8a 100644
--- a/DocFormats/filters/ooxml/src/word/WordStyles.c
+++ b/DocFormats/filters/ooxml/src/word/WordStyles.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordStyles.h"
 #include "DFDOM.h"
 #include "DFHTML.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/word/WordTheme.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/WordTheme.c b/DocFormats/filters/ooxml/src/word/WordTheme.c
index a9eb20f..dbd9cc3 100644
--- a/DocFormats/filters/ooxml/src/word/WordTheme.c
+++ b/DocFormats/filters/ooxml/src/word/WordTheme.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordTheme.h"
 #include "WordConverter.h"
 #include "DFDOM.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/word/WordWhitespace.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/WordWhitespace.c b/DocFormats/filters/ooxml/src/word/WordWhitespace.c
index cf3c354..5769cf9 100644
--- a/DocFormats/filters/ooxml/src/word/WordWhitespace.c
+++ b/DocFormats/filters/ooxml/src/word/WordWhitespace.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordWhitespace.h"
 #include "DFDOM.h"
 #include "DFClassNames.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/word/formatting/WordCommonPr.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/formatting/WordCommonPr.c b/DocFormats/filters/ooxml/src/word/formatting/WordCommonPr.c
index cafd637..0578e3b 100644
--- a/DocFormats/filters/ooxml/src/word/formatting/WordCommonPr.c
+++ b/DocFormats/filters/ooxml/src/word/formatting/WordCommonPr.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordCommonPr.h"
 #include "WordStyles.h"
 #include "WordSheet.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/word/formatting/WordNumPr.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/formatting/WordNumPr.c b/DocFormats/filters/ooxml/src/word/formatting/WordNumPr.c
index 3ef26f1..21d0deb 100644
--- a/DocFormats/filters/ooxml/src/word/formatting/WordNumPr.c
+++ b/DocFormats/filters/ooxml/src/word/formatting/WordNumPr.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordNumPr.h"
 #include "WordNumbering.h"
 #include "WordSheet.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/word/formatting/WordTblPr.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/formatting/WordTblPr.c b/DocFormats/filters/ooxml/src/word/formatting/WordTblPr.c
index 05632c1..bb398b3 100644
--- a/DocFormats/filters/ooxml/src/word/formatting/WordTblPr.c
+++ b/DocFormats/filters/ooxml/src/word/formatting/WordTblPr.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordTblPr.h"
 #include "WordStyles.h"
 #include "WordSection.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/word/lenses/WordBlockLevel.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/lenses/WordBlockLevel.c b/DocFormats/filters/ooxml/src/word/lenses/WordBlockLevel.c
index d1fc6b9..fe71ff2 100644
--- a/DocFormats/filters/ooxml/src/word/lenses/WordBlockLevel.c
+++ b/DocFormats/filters/ooxml/src/word/lenses/WordBlockLevel.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordLenses.h"
 #include "DFDOM.h"
 #include "DFCommon.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/word/lenses/WordBody.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/lenses/WordBody.c b/DocFormats/filters/ooxml/src/word/lenses/WordBody.c
index 25981e5..6c8b92f 100644
--- a/DocFormats/filters/ooxml/src/word/lenses/WordBody.c
+++ b/DocFormats/filters/ooxml/src/word/lenses/WordBody.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordLenses.h"
 #include "DFDOM.h"
 #include "DFCommon.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/word/lenses/WordChange.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/lenses/WordChange.c b/DocFormats/filters/ooxml/src/word/lenses/WordChange.c
index 3a8675a..484131c 100644
--- a/DocFormats/filters/ooxml/src/word/lenses/WordChange.c
+++ b/DocFormats/filters/ooxml/src/word/lenses/WordChange.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordLenses.h"
 #include "DFDOM.h"
 #include "DFString.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/word/lenses/WordDocument.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/lenses/WordDocument.c b/DocFormats/filters/ooxml/src/word/lenses/WordDocument.c
index 01fb3f4..8c2ce78 100644
--- a/DocFormats/filters/ooxml/src/word/lenses/WordDocument.c
+++ b/DocFormats/filters/ooxml/src/word/lenses/WordDocument.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordLenses.h"
 #include "DFDOM.h"
 #include "DFCommon.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/word/lenses/WordDrawing.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/lenses/WordDrawing.c b/DocFormats/filters/ooxml/src/word/lenses/WordDrawing.c
index 83de7c1..0d53286 100644
--- a/DocFormats/filters/ooxml/src/word/lenses/WordDrawing.c
+++ b/DocFormats/filters/ooxml/src/word/lenses/WordDrawing.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordDrawing.h"
 #include "WordLenses.h"
 #include "WordObjects.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/word/lenses/WordEquation.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/lenses/WordEquation.c b/DocFormats/filters/ooxml/src/word/lenses/WordEquation.c
index db24b00..d56b9e2 100644
--- a/DocFormats/filters/ooxml/src/word/lenses/WordEquation.c
+++ b/DocFormats/filters/ooxml/src/word/lenses/WordEquation.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordLenses.h"
 #include "DFCommon.h"
 

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/word/lenses/WordHyperlink.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/lenses/WordHyperlink.c b/DocFormats/filters/ooxml/src/word/lenses/WordHyperlink.c
index 6f00a75..7d19742 100644
--- a/DocFormats/filters/ooxml/src/word/lenses/WordHyperlink.c
+++ b/DocFormats/filters/ooxml/src/word/lenses/WordHyperlink.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordLenses.h"
 #include "WordStyles.h"
 #include "OPC.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/word/lenses/WordLenses.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/lenses/WordLenses.c b/DocFormats/filters/ooxml/src/word/lenses/WordLenses.c
index 8ec87ab..2137762 100644
--- a/DocFormats/filters/ooxml/src/word/lenses/WordLenses.c
+++ b/DocFormats/filters/ooxml/src/word/lenses/WordLenses.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordLenses.h"
 #include "DFCommon.h"
 

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/word/lenses/WordParagraph.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/lenses/WordParagraph.c b/DocFormats/filters/ooxml/src/word/lenses/WordParagraph.c
index beb9188..0a836d0 100644
--- a/DocFormats/filters/ooxml/src/word/lenses/WordParagraph.c
+++ b/DocFormats/filters/ooxml/src/word/lenses/WordParagraph.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordLenses.h"
 #include "WordSheet.h"
 #include "WordStyles.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/word/lenses/WordParagraphContent.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/lenses/WordParagraphContent.c b/DocFormats/filters/ooxml/src/word/lenses/WordParagraphContent.c
index c9ec88d..19e86f2 100644
--- a/DocFormats/filters/ooxml/src/word/lenses/WordParagraphContent.c
+++ b/DocFormats/filters/ooxml/src/word/lenses/WordParagraphContent.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordLenses.h"
 #include "WordBookmark.h"
 #include "WordObjects.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/word/lenses/WordRun.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/lenses/WordRun.c b/DocFormats/filters/ooxml/src/word/lenses/WordRun.c
index 22150a3..86b21be 100644
--- a/DocFormats/filters/ooxml/src/word/lenses/WordRun.c
+++ b/DocFormats/filters/ooxml/src/word/lenses/WordRun.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordLenses.h"
 #include "DFString.h"
 #include "WordNotes.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/word/lenses/WordRunContent.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/lenses/WordRunContent.c b/DocFormats/filters/ooxml/src/word/lenses/WordRunContent.c
index af3831e..784e145 100644
--- a/DocFormats/filters/ooxml/src/word/lenses/WordRunContent.c
+++ b/DocFormats/filters/ooxml/src/word/lenses/WordRunContent.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordLenses.h"
 #include "DFDOM.h"
 #include "WordDrawing.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/word/lenses/WordSmartTag.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/lenses/WordSmartTag.c b/DocFormats/filters/ooxml/src/word/lenses/WordSmartTag.c
index 738d86e..5f527d0 100644
--- a/DocFormats/filters/ooxml/src/word/lenses/WordSmartTag.c
+++ b/DocFormats/filters/ooxml/src/word/lenses/WordSmartTag.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordLenses.h"
 #include "DFDOM.h"
 #include "DFCommon.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/filters/ooxml/src/word/lenses/WordTable.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/src/word/lenses/WordTable.c b/DocFormats/filters/ooxml/src/word/lenses/WordTable.c
index 5c3d959..36f51d5 100644
--- a/DocFormats/filters/ooxml/src/word/lenses/WordTable.c
+++ b/DocFormats/filters/ooxml/src/word/lenses/WordTable.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "WordLenses.h"
 #include "WordStyles.h"
 #include "WordSheet.h"

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/headers/DFPlatform.h
----------------------------------------------------------------------
diff --git a/DocFormats/headers/DFPlatform.h b/DocFormats/headers/DFPlatform.h
index f36269f..ea517e7 100755
--- a/DocFormats/headers/DFPlatform.h
+++ b/DocFormats/headers/DFPlatform.h
@@ -34,6 +34,17 @@
 #endif
 
 
+#ifndef ATTRIBUTE_FORMAT
+#ifdef _MSC_VER
+#define ATTRIBUTE_FORMAT(archetype,index,first)
+#define ATTRIBUTE_ALIGNED(n) __declspec(align(8))
+#else
+#define ATTRIBUTE_FORMAT(archetype,index,first) __attribute__((format(archetype,index,first)))
+#define ATTRIBUTE_ALIGNED(n) __attribute__((aligned (n)))
+#endif
+#endif
+
+
 
 typedef struct DFDirEntryList DFDirEntryList;
 

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/DocFormats/platform/tests/OStests.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/tests/OStests.c b/DocFormats/platform/tests/OStests.c
index b659275..a1f430a 100644
--- a/DocFormats/platform/tests/OStests.c
+++ b/DocFormats/platform/tests/OStests.c
@@ -15,11 +15,6 @@
 #include "DFUnitTest.h"
 #include "DFPlatform.h"
 #include <stddef.h>
-#ifdef WIN32
-#include <direct.h>
-#else
-#include <unistd.h>
-#endif
 
 
 static void test_DFGetImageDimensions_gif(void)

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/consumers/dfconvert/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/consumers/dfconvert/src/CMakeLists.txt b/consumers/dfconvert/src/CMakeLists.txt
index 1157c53..8b18959 100644
--- a/consumers/dfconvert/src/CMakeLists.txt
+++ b/consumers/dfconvert/src/CMakeLists.txt
@@ -35,6 +35,7 @@ set(SOURCES
 include_directories()
 include_directories(SYSTEM ${INCLUDE_DIRS})
 include_directories(SYSTEM ../../../DocFormats/api/headers)
+include_directories(SYSTEM ../../../DocFormats/headers)
 include_directories(.)
 link_directories(${LIB_DIRS})
 

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/consumers/dfconvert/src/main.c
----------------------------------------------------------------------
diff --git a/consumers/dfconvert/src/main.c b/consumers/dfconvert/src/main.c
index abaaec1..b2bacb3 100644
--- a/consumers/dfconvert/src/main.c
+++ b/consumers/dfconvert/src/main.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include <DocFormats/DocFormats.h>
 #include <stdio.h>
 #include <string.h>

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/e8d93d48/consumers/dfutil/src/main.c
----------------------------------------------------------------------
diff --git a/consumers/dfutil/src/main.c b/consumers/dfutil/src/main.c
index 1812f2d..e1bfc7f 100644
--- a/consumers/dfutil/src/main.c
+++ b/consumers/dfutil/src/main.c
@@ -12,6 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
+#include "DFPlatform.h"
 #include "Commands.h"
 #include "BDTTests.h"
 #include "WordPlain.h"


[13/14] incubator-corinthia git commit: Fix build on windows (VC++ parser error)

Posted by pm...@apache.org.
Fix build on windows (VC++ parser error)

Forgot to add a ;; required to get around a bug in the Visual C++ parser
in the case where a single-line if body immediately precedes a line
containing a variable declaration with a typedef'd type.


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/22947efb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/22947efb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/22947efb

Branch: refs/heads/stable
Commit: 22947efbb19452866cf838ca114341253be03011
Parents: cd6ccd0
Author: Peter Kelly <pe...@uxproductivity.com>
Authored: Sun Jan 11 01:18:51 2015 +0700
Committer: Peter Kelly <pe...@uxproductivity.com>
Committed: Sun Jan 11 01:18:51 2015 +0700

----------------------------------------------------------------------
 DocFormats/filters/ooxml/tests/word/WordPlain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/22947efb/DocFormats/filters/ooxml/tests/word/WordPlain.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/WordPlain.c b/DocFormats/filters/ooxml/tests/word/WordPlain.c
index b1f4d4b..9857817 100644
--- a/DocFormats/filters/ooxml/tests/word/WordPlain.c
+++ b/DocFormats/filters/ooxml/tests/word/WordPlain.c
@@ -110,7 +110,7 @@ static char *computeDocumentRelsPath(const char *documentPath)
 static void parseDocumentRels(const char *documentPath, DFDocument *relsDoc, DFHashTable *rels, DFError **error)
 {
     if (relsDoc == NULL)
-        return;
+        return;;
     const char *basePrefix = (documentPath[0] == '/') ? "" : "/";
     char *basePath = DFFormatString("%s%s",basePrefix,documentPath);
     for (DFNode *child = relsDoc->root->first; child != NULL; child = child->next) {


[11/14] incubator-corinthia git commit: Fix OS X build breakage in DFError.h

Posted by pm...@apache.org.
Fix OS X build breakage in DFError.h

Commit e8d93d4 removed the ATTRIBUTE_FORMAT macro from DFError.h, since
this macro is also present in DFPlatform.h. However, DFError.h is part
of the public API, while DFPlatform is not. Consumers that are
configured to compile only against the public API are unable to access
macro definitions in DFPlatform.h, so those macros must be present in
the API headers.

The ATTRIBUTE_FORMAT is used for telling the compiler to check the
arguments to DFErrorFormat to make sure they conform to printf-style
formatting. GCC/Clang and Visual C++ both have a different syntax for
this, which is why a macro is needed.

I'm not sure why gcc on Linux and Visual C++ on windows weren't
complaining about this, but Xcode gave a compile error as the macro was
undefined.

If we want to avoid platform-specific #ifdefs in specific public header
files, we'll need something equivalent to DFPlatform.h which is included
in the public headers. Putting this #ifdef back as-is is a temporary
solution, needed to build the code under Xcode, but ultimately it would
be good if we could come up with a more general solution.


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/cc208a6d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/cc208a6d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/cc208a6d

Branch: refs/heads/stable
Commit: cc208a6d44534fea95a5fa2f4bcc7f733b58fd89
Parents: 3f11aef
Author: Peter Kelly <pe...@uxproductivity.com>
Authored: Sun Jan 11 00:48:26 2015 +0700
Committer: Peter Kelly <pe...@uxproductivity.com>
Committed: Sun Jan 11 00:52:52 2015 +0700

----------------------------------------------------------------------
 DocFormats/api/headers/DocFormats/DFError.h | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/cc208a6d/DocFormats/api/headers/DocFormats/DFError.h
----------------------------------------------------------------------
diff --git a/DocFormats/api/headers/DocFormats/DFError.h b/DocFormats/api/headers/DocFormats/DFError.h
index 5b08fb1..2876007 100644
--- a/DocFormats/api/headers/DocFormats/DFError.h
+++ b/DocFormats/api/headers/DocFormats/DFError.h
@@ -19,6 +19,13 @@
 
 // It's really not nice having this here, but is the only way to get the compiler to typecheck the
 // DFErrorFormat arguments when such functionality is available.
+#ifndef ATTRIBUTE_FORMAT
+#ifdef _MSC_VER
+#define ATTRIBUTE_FORMAT(archetype,index,first)
+#else
+#define ATTRIBUTE_FORMAT(archetype,index,first) __attribute__((format(archetype,index,first)))
+#endif
+#endif
 
 typedef struct DFError DFError;
 


[10/14] incubator-corinthia git commit: Don't include on non-Windows platforms

Posted by pm...@apache.org.
Don't include <io.h> on non-Windows platforms

The <io.h> system header is only avilable on windows. It was
unconditionally included in DFFilesystem.c, which broke the build on
Linux and OS X. It used to be wrapped in an #ifdef WIN32 but with the
removal of this, it was already included.

I have now moved the #include <io.h> to DFPlatform.h, where there is an
ifdef in place to distinguish between WIN32 and other platforms, so that
we don't get a compile error when this is built on Linux and OS X.


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/3f11aefa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/3f11aefa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/3f11aefa

Branch: refs/heads/stable
Commit: 3f11aefa27314b66eee44b14561cf3514a061537
Parents: f058c02
Author: Peter Kelly <pe...@uxproductivity.com>
Authored: Sun Jan 11 00:10:00 2015 +0700
Committer: Peter Kelly <pe...@uxproductivity.com>
Committed: Sun Jan 11 00:10:00 2015 +0700

----------------------------------------------------------------------
 DocFormats/core/src/lib/DFFilesystem.c | 1 -
 DocFormats/headers/DFPlatform.h        | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/3f11aefa/DocFormats/core/src/lib/DFFilesystem.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/src/lib/DFFilesystem.c b/DocFormats/core/src/lib/DFFilesystem.c
index 41a9f28..972941b 100644
--- a/DocFormats/core/src/lib/DFFilesystem.c
+++ b/DocFormats/core/src/lib/DFFilesystem.c
@@ -27,7 +27,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <sys/stat.h>
-#include <io.h>
 
 
 

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/3f11aefa/DocFormats/headers/DFPlatform.h
----------------------------------------------------------------------
diff --git a/DocFormats/headers/DFPlatform.h b/DocFormats/headers/DFPlatform.h
index ea517e7..3d4ae0b 100755
--- a/DocFormats/headers/DFPlatform.h
+++ b/DocFormats/headers/DFPlatform.h
@@ -17,6 +17,7 @@
 
 #ifdef WIN32
 #include <direct.h>
+#include <io.h>
 
 #define _CRT_SECURE_NO_WARNINGS
 #define snprintf _snprintf


[03/14] incubator-corinthia git commit: extract_downloads.bat and helper unzip-win.js 1.00

Posted by pm...@apache.org.
extract_downloads.bat and helper unzip-win.js 1.00

The pair of scripts provide custom extraction of external downloads for
win32 x86 dependencies from Corinthia components.   Implementation uses
native Windows technology with no additional components required.


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/13846644
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/13846644
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/13846644

Branch: refs/heads/stable
Commit: 13846644c85b27a4500717ddb2e02e07e56fa041
Parents: e8d93d4
Author: Dennis Hamilton <or...@apache.org>
Authored: Fri Jan 2 16:43:19 2015 -0800
Committer: Dennis Hamilton <or...@apache.org>
Committed: Fri Jan 2 17:09:41 2015 -0800

----------------------------------------------------------------------
 external/extract_downloads.bat | 118 ++++++++++++++++++++++++++++++++++++
 external/unzip-win.js          |  46 ++++++++++++++
 2 files changed, 164 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/13846644/external/extract_downloads.bat
----------------------------------------------------------------------
diff --git a/external/extract_downloads.bat b/external/extract_downloads.bat
new file mode 100644
index 0000000..4157a8e
--- /dev/null
+++ b/external/extract_downloads.bat
@@ -0,0 +1,118 @@
+@echo off
+rem extract_downloads.bat 1.00       UTF-8
+rem    EXTRACT THE EXTERNAL DOWNLOADS TO INCLUDE, LIB, AND BIN FOLDERS
+
+rem Fetch downloads in case not done yet
+CALL "%~dp0fetch_downloads.bat"
+
+rem Determine if any of the packages are missing
+SET extract_downloads=
+CALL :CHECKON zlib128-dll.zip
+CALL :CHECKON iconv-1.9.2.win32.zip
+CALL :CHECKON libxml2-2.7.8.win32.zip
+CALL :CHECKON SDL2-devel-2.0.3-VC.zip
+CALL :CHECKON SDL2_image-devel-2.0.0-VC.zip
+
+rem This procedure can't proceed unless all are present
+IF NOT "%extract_downloads%" == "" GOTO :FAIL1
+
+CALL :CLEAN
+
+rem For extractions, use the zip name listed and the path, if any, from the
+rem root of the zipped hierarchy to the level where include and libs are found
+
+CALL :SDL2x86 SDL2-devel-2.0.3-VC.zip         SDL2-2.0.3\
+CALL :SDL2x86 SDL2_image-devel-2.0.0-VC.zip   SDL2_image-2.0.0\
+CALL :ICONV   iconv-1.9.2.win32.zip           iconv-1.9.2.win32\
+CALL :LIBXML2 libxml2-2.7.8.win32.zip         libxml2-2.7.8.win32\
+CALL :ZLIB    zlib128-dll.zip                 ""
+
+EXIT /B 0
+
+rem MOST MAINTENANCE IS BY UPDATING THE FILENAMES AND TOP PATHES ABOVE.
+rem    The extraction procedure do not require maintenance unless there is
+rem    a Zip layout change or new extraction cases are needed.
+
+rem CUSTOM EXTRACTION CASES FOR COLLECTING EXTERNAL INCLUDES, LIBS, AND BINS
+rem    Each one of these cases below accepts two parameters
+rem       %1 is the filename of the zip file, to be unzipped from
+rem          %~dp0download\%1 with expansion to folder %~dp0download\T
+rem       %2 is the path from T to the level at which parts like include
+rem          and lib are to be found.  %2 is either empty or it is one or more
+rem          path segments each ending with "\".
+
+:SDL2x86
+rem taking T\%2include and T\%2lib\*.lib across, with T\%2lib\*.dll to bin
+CALL :UNZIP %1
+XCOPY "%~dp0download\T\%2include\*.*" "%~dp0download\include" /I /Q /Y >nul
+XCOPY "%~dp0download\T\%2lib\x86\*.lib" "%~dp0download\lib" /I /Q /Y >nul
+XCOPY "%~dp0download\T\%2lib\x86\*.dll" "%~dp0download\bin" /I /Q /Y >nul
+EXIT /B 0
+
+:ICONV
+rem taking T\%2include, T\%2lib, and T\%2bin\*.dll across
+CALL :UNZIP %1
+XCOPY "%~dp0download\T\%2include\*.*" "%~dp0download\include" /I /Q /Y >nul
+XCOPY "%~dp0download\T\%2lib\*.*" "%~dp0download\lib" /I /Q /Y >nul
+XCOPY "%~dp0download\T\%2bin\*.dll" "%~dp0download\bin" /I /Q /Y >nul
+EXIT /B 0
+
+:LIBXML2
+rem taking T\%2include\libxml\, T\%2lib, and T\%2bin\*.dll across
+CALL :UNZIP %1
+XCOPY "%~dp0download\T\%2include\libxml\*.*" "%~dp0download\include\libxml" /I /Q /Y >nul 2>&1
+XCOPY "%~dp0download\T\%2lib\*.*" "%~dp0download\lib" /I /Q /Y >nul
+XCOPY "%~dp0download\T\%2bin\*.dll" "%~dp0download\bin" /I /Q /Y >nul
+EXIT /B 0
+
+:ZLIB
+rem taking all across from T\%2include and T\%2lib, with T\%2*.dll to bin
+CALL :UNZIP %1
+XCOPY "%~dp0download\T\%2include\*.*" "%~dp0download\include" /I /Q /Y >nul
+XCOPY "%~dp0download\T\%2lib\*.*" "%~dp0download\lib" /I /Q /Y >nul
+XCOPY "%~dp0download\T\%2*.dll" "%~dp0download\bin" /I /Q /Y >nul
+EXIT /B 0
+
+:UNZIP
+rem EXTRACT ALL OF ZIP "%~dp0download\%1" TO "%~dp0download\T"
+rem     "%~dp0download\T" is not deleted until needed again, leaving the
+rem     last one for inspection when trouble-shooting.
+RMDIR /S /Q "%~dp0download\T" >nul
+ECHO:     extracting %1
+Cscript /nologo "%~dp0unzip-win.js" //B "%~dp0download\%1" "%~dp0download\T"
+EXIT /B 0
+
+:CHECKON
+IF EXIST "%~dp0download\%1" EXIT /B 0
+IF "%extract_downloads%" == "" ECHO:
+ECHO: *** %1 UNAVAILABLE FOR EXTRACTION
+SET extract_downloads=0
+EXIT /B 2
+
+:CLEAN
+rem clean out any previous material and be quiet about it
+RMDIR /S /Q "%~dp0download\include" >nul
+RMDIR /S /Q "%~dp0download\lib" >nul
+RMDIR /S /Q "%~dp0download\bin" >nul
+rem set up empty include, lib, and bin to receive fresh extractions
+MKDIR "%~dp0download\include"
+MKDIR "%~dp0download\lib"
+MKDIR "%~dp0download\bin"
+EXIT /B 0
+
+:FAIL1
+SET extract_downloads=
+ECHO: *** EXTRACTION REQUIRES ALL OF THE DOWNLOADS TO BE AVAILABLE
+ECHO: *** Ensure that the archives downloaded by fetch_downloads.bat and
+ECHO: *** expected here are the same.  If the unavailable archives are
+ECHO: *** no longer found at the URLs used in fetch_downloads.bat, find
+ECHO: *** alternative locations for them.
+ECHO: ***    No extractions have been performed.
+ECHO:
+EXIT /B 2
+
+rem 1.00 2015-01-02-16:25 Complete Full-Functioning Externals Extraction
+rem      Delivering the download\include, donwload\lib, and download\bin
+rem      collections established for the current external downloads.
+
+rem                 *** end of extract_downloads.bat ***

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/13846644/external/unzip-win.js
----------------------------------------------------------------------
diff --git a/external/unzip-win.js b/external/unzip-win.js
new file mode 100644
index 0000000..8c89e19
--- /dev/null
+++ b/external/unzip-win.js
@@ -0,0 +1,46 @@
+/* unzip-win.js 1.00                  UTF-8
+ *               USE WINDOWS SHELL TO EXTRACT ALL FROM ZIPS
+ *
+ * Cscript unzip-win.js zip dest
+ *   performas an "extract all" of the zip to the dest folder, where
+ *
+ *     zip is the full path file location of the zip to extract
+ *    dest is the full path of the folder to which extraction occurs
+ *
+ * This is a helper script designed to be used with a larger script or
+ * batch file that provides clean parameters and usage.
+ *
+ * The present script is adapted from the solution by Greg Zakharov at
+ * <http://stackoverflow.com/a/19711019/33810> on 2013-10-31.
+ *
+ * TODO
+ *   It is a little startling when the Windows copying-files animation
+ *   pops up when one of these runs long enough for its visibility.
+ *   Find a way to inhibit that, if possible.
+ */
+
+
+try
+{ var  zip = WScript.Arguments(0);
+  var dest = WScript.Arguments(1);
+
+  with (new ActiveXObject('Scripting.FileSystemObject'))
+  {
+    if (!FolderExists(dest)) CreateFolder(dest);
+    with (new ActiveXObject('Shell.Application'))
+    {
+      NameSpace(GetFolder(dest).Path)
+         .CopyHere(Namespace(GetFile(zip).Path).Items());
+    }
+  }
+}
+catch (e)
+{
+  WScript.echo(e.message);
+}
+
+/* 1.00 2015-01-02 Complete Adaptation for Corinthia Externals Extraction
+ */
+
+/*                   *** end of unzip-win.js ***                           */
+


[12/14] incubator-corinthia git commit: dfutil: Fix pretty-printing option (-pp)

Posted by pm...@apache.org.
dfutil: Fix pretty-printing option (-pp)

Word_toPlainFromDir was incorrectly interpreting relative path names in
OPC relationship files for word documents. Instead of calculating the
path relative to the root of the package, it would use the path relative
to the location of the document.xml file.

This was causing the pretty-printing routine to encounter an error when
looking for files like styles.xml, because it would check for them in
the root of the package, rather than the directory in which they were
located (usually /word).


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/cd6ccd0e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/cd6ccd0e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/cd6ccd0e

Branch: refs/heads/stable
Commit: cd6ccd0e7625384733db58d92dca7a87249d1247
Parents: cc208a6
Author: Peter Kelly <pe...@uxproductivity.com>
Authored: Sun Jan 11 01:10:58 2015 +0700
Committer: Peter Kelly <pe...@uxproductivity.com>
Committed: Sun Jan 11 01:10:58 2015 +0700

----------------------------------------------------------------------
 DocFormats/filters/ooxml/tests/word/WordPlain.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/cd6ccd0e/DocFormats/filters/ooxml/tests/word/WordPlain.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/WordPlain.c b/DocFormats/filters/ooxml/tests/word/WordPlain.c
index ffbbe8a..b1f4d4b 100644
--- a/DocFormats/filters/ooxml/tests/word/WordPlain.c
+++ b/DocFormats/filters/ooxml/tests/word/WordPlain.c
@@ -107,10 +107,12 @@ static char *computeDocumentRelsPath(const char *documentPath)
     return documentRelsPath;
 }
 
-static void parseDocumentRels(DFDocument *relsDoc, DFHashTable *rels, DFError **error)
+static void parseDocumentRels(const char *documentPath, DFDocument *relsDoc, DFHashTable *rels, DFError **error)
 {
     if (relsDoc == NULL)
         return;
+    const char *basePrefix = (documentPath[0] == '/') ? "" : "/";
+    char *basePath = DFFormatString("%s%s",basePrefix,documentPath);
     for (DFNode *child = relsDoc->root->first; child != NULL; child = child->next) {
         if (child->tag != REL_RELATIONSHIP)
             continue;
@@ -119,8 +121,11 @@ static void parseDocumentRels(DFDocument *relsDoc, DFHashTable *rels, DFError **
         if ((type == NULL) || (target == NULL))
             continue;
 
-        DFHashTableAdd(rels,type,target);
+        char *absTarget = DFPathResolveAbsolute(basePath,target);
+        DFHashTableAdd(rels,type,absTarget);
+        free(absTarget);
     }
+    free(basePath);
 }
 
 static int addRelatedDoc(DFHashTable *parts, DFHashTable *documentRels, const char *relName, const char *filename,
@@ -257,7 +262,7 @@ static char *Word_toPlainFromDir(DFStorage *storage, DFHashTable *parts, DFError
         goto end;
     }
 
-    parseDocumentRels(relsDoc,rels,error);
+    parseDocumentRels(documentPath,relsDoc,rels,error);
 
     if (!processParts(parts,documentPath,relsDoc,rels,output,storage,error))
         goto end;


[04/14] incubator-corinthia git commit: Completed fetch_downloads extract_downloads pairing

Posted by pm...@apache.org.
Completed  fetch_downloads extract_downloads pairing

The procedures work together and extract_downloads always calls
fetch_downloads just in case needed (already-downloaded files are not
refetched).  Basic tests are successful.


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/a4852151
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/a4852151
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/a4852151

Branch: refs/heads/stable
Commit: a48521515f567038768287d67448cb5748ae3df3
Parents: 1384664
Author: Dennis Hamilton <or...@apache.org>
Authored: Fri Jan 2 17:09:25 2015 -0800
Committer: Dennis Hamilton <or...@apache.org>
Committed: Fri Jan 2 17:09:42 2015 -0800

----------------------------------------------------------------------
 external/extract_downloads.bat | 15 +++++++++------
 external/fetch_downloads.bat   | 27 +++++++++++++++++----------
 2 files changed, 26 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/a4852151/external/extract_downloads.bat
----------------------------------------------------------------------
diff --git a/external/extract_downloads.bat b/external/extract_downloads.bat
index 4157a8e..a431567 100644
--- a/external/extract_downloads.bat
+++ b/external/extract_downloads.bat
@@ -1,5 +1,5 @@
 @echo off
-rem extract_downloads.bat 1.00       UTF-8
+rem extract_downloads.bat 1.01       UTF-8
 rem    EXTRACT THE EXTERNAL DOWNLOADS TO INCLUDE, LIB, AND BIN FOLDERS
 
 rem Fetch downloads in case not done yet
@@ -21,6 +21,7 @@ CALL :CLEAN
 rem For extractions, use the zip name listed and the path, if any, from the
 rem root of the zipped hierarchy to the level where include and libs are found
 
+rem           File Name                       Top Path
 CALL :SDL2x86 SDL2-devel-2.0.3-VC.zip         SDL2-2.0.3\
 CALL :SDL2x86 SDL2_image-devel-2.0.0-VC.zip   SDL2_image-2.0.0\
 CALL :ICONV   iconv-1.9.2.win32.zip           iconv-1.9.2.win32\
@@ -29,7 +30,7 @@ CALL :ZLIB    zlib128-dll.zip                 ""
 
 EXIT /B 0
 
-rem MOST MAINTENANCE IS BY UPDATING THE FILENAMES AND TOP PATHES ABOVE.
+rem MOST MAINTENANCE IS BY UPDATING THE FILENAMES AND TOP PATHS ABOVE.
 rem    The extraction procedure do not require maintenance unless there is
 rem    a Zip layout change or new extraction cases are needed.
 
@@ -77,7 +78,7 @@ EXIT /B 0
 rem EXTRACT ALL OF ZIP "%~dp0download\%1" TO "%~dp0download\T"
 rem     "%~dp0download\T" is not deleted until needed again, leaving the
 rem     last one for inspection when trouble-shooting.
-RMDIR /S /Q "%~dp0download\T" >nul
+RMDIR /S /Q "%~dp0download\T" >nul 2>&1
 ECHO:     extracting %1
 Cscript /nologo "%~dp0unzip-win.js" //B "%~dp0download\%1" "%~dp0download\T"
 EXIT /B 0
@@ -91,9 +92,9 @@ EXIT /B 2
 
 :CLEAN
 rem clean out any previous material and be quiet about it
-RMDIR /S /Q "%~dp0download\include" >nul
-RMDIR /S /Q "%~dp0download\lib" >nul
-RMDIR /S /Q "%~dp0download\bin" >nul
+RMDIR /S /Q "%~dp0download\include" >nul 2>&1
+RMDIR /S /Q "%~dp0download\lib" >nul 2>&1
+RMDIR /S /Q "%~dp0download\bin" >nul 2>&1
 rem set up empty include, lib, and bin to receive fresh extractions
 MKDIR "%~dp0download\include"
 MKDIR "%~dp0download\lib"
@@ -111,6 +112,8 @@ ECHO: ***    No extractions have been performed.
 ECHO:
 EXIT /B 2
 
+rem 1.01 2015-01-02-17:03 Silence warnings when removing non-existent
+rem      directories
 rem 1.00 2015-01-02-16:25 Complete Full-Functioning Externals Extraction
 rem      Delivering the download\include, donwload\lib, and download\bin
 rem      collections established for the current external downloads.

http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/a4852151/external/fetch_downloads.bat
----------------------------------------------------------------------
diff --git a/external/fetch_downloads.bat b/external/fetch_downloads.bat
index 0663217..0d5309b 100644
--- a/external/fetch_downloads.bat
+++ b/external/fetch_downloads.bat
@@ -1,32 +1,39 @@
 @echo off
-rem fetch_downloads.bat               UTF-8
+rem fetch_downloads.bat 1.00              UTF-8
 rem   FETCH EXTERNAL ARCHIVES FOR NATIVE WINDOWS BUILDS OF CORINTHIA
 
-mkdir %~dp0download
+MKDIR "%~dp0download" >nul 2>&1
 rem Make download directory at same location as this script.
-rem It does not matter if the directory already exists.
+rem Be silent even if the directory already exists.  No worries.
 
-rem  MAINTAIN THIS LIST MANUALLY
+rem  MAINTAIN THIS LIST MANUALLY.  MATCH UP IN EXTRACT_DOWNLOADS.BAT
 CALL :FETCH "http://zlib.net/zlib128-dll.zip"
 CALL :FETCH "http://xmlsoft.org/sources/win32/iconv-1.9.2.win32.zip"
 CALL :FETCH "http://xmlsoft.org/sources/win32/libxml2-2.7.8.win32.zip"
 CALL :FETCH "https://www.libsdl.org/release/SDL2-devel-2.0.3-VC.zip"
 CALL :FETCH  "https://www.libsdl.org/projects/SDL_image/release/SDL2_image-devel-2.0.0-VC.zip"
 EXIT /B 0
+
+:FETCH
+IF EXIST "%~dp0download\%~n1%~x1" EXIT /B 0
+rem do not download an archive that is already present.
+Cscript /nologo "%~dp0wget-win.js" //B "%1" "%~dp0download\%~n1%~x1"
+IF EXIST "%~dp0download\%~n1%~x1" ECHO:     %~n1%~x1% downloaded
+EXIT /B 0
+
 rem TODO
 rem  * Might want to pass up and act on error codes from the individual
 rem    :FETCH operations.
 rem  * It might be handy to fetch these URLs from a file so that it can
 rem    be kept maintained in one place, even though the win32 cases are
 rem    unique to building for Windows.
+rem  * Silent the warning on download folder already existing
 rem XXX
 rem  * wget-win.js does not do FTP.  So alternative locations have been
 rem    used for iconv and libmxl2.
 
-:FETCH
-IF EXIST "%~dp0download\%~n1%~x1" EXIT /B 0
-rem do not download an archive that is already present.
-ECHO "%~n1%~x1"
-Cscript /nologo "%~dp0wget-win.js" //B "%1" "%~dp0download\%~n1%~x1"
-EXIT /B 0
+rem 1.00 2015-01-02-16:51 Complete with mating to extract_downloads.bat
+rem      The tested version is adjusted to list successful downloads
+rem      and not any that are not needed or fail.
 
+rem               *** end of fetch_downloads.bat ***


[14/14] incubator-corinthia git commit: Merge branch 'master' into stable

Posted by pm...@apache.org.
Merge branch 'master' into stable


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/c0753e01
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/c0753e01
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/c0753e01

Branch: refs/heads/stable
Commit: c0753e01ad30516e3d600d3b732638c7c3b138f5
Parents: d23ccd5 22947ef
Author: Peter Kelly <pe...@uxproductivity.com>
Authored: Sun Jan 11 01:21:00 2015 +0700
Committer: Peter Kelly <pe...@uxproductivity.com>
Committed: Sun Jan 11 01:21:00 2015 +0700

----------------------------------------------------------------------
 .gitattributes                                  |  84 +++++
 CMakeLists.txt                                  |   4 +-
 DocFormats/CMakeLists.txt                       |  14 +-
 DocFormats/api/CMakeLists.txt                   |   1 -
 DocFormats/api/headers/DocFormats/DFError.h     |   1 -
 DocFormats/api/src/Formats.c                    |   1 +
 DocFormats/api/src/Operations.c                 |   1 +
 DocFormats/core/CMakeLists.txt                  |   1 -
 DocFormats/core/src/common/DFBDT.c              |   1 +
 DocFormats/core/src/css/CSSSelector.c           |   1 +
 DocFormats/core/src/html/DFHTDocument.c         |   1 +
 DocFormats/core/src/html/DFHTML.c               |   1 +
 DocFormats/core/src/html/DFHTMLNormalization.c  |   1 +
 DocFormats/core/src/html/DFTidyHelper.c         |   1 +
 DocFormats/core/src/html/DFTidyWrapper.c        |   1 +
 DocFormats/core/src/lib/DFBuffer.c              |   1 +
 DocFormats/core/src/lib/DFError.c               |   1 +
 DocFormats/core/src/lib/DFFilesystem.c          |  24 +-
 DocFormats/core/src/lib/DFFilesystem.h          |   2 +-
 DocFormats/core/src/lib/DFHashTable.c           |   1 +
 DocFormats/core/src/lib/DFStorage.c             |   1 +
 DocFormats/core/src/lib/DFString.c              |   1 +
 DocFormats/core/src/lib/DFZipFile.c             |   1 +
 DocFormats/core/src/lib/TextPackage.c           |   1 +
 DocFormats/core/src/xml/DFChanges.c             |   1 +
 DocFormats/core/src/xml/DFDOM.c                 |   1 +
 DocFormats/core/src/xml/DFMarkupCompatibility.c |   1 +
 DocFormats/core/src/xml/DFNameMap.c             |   1 +
 DocFormats/core/src/xml/DFXML.c                 |   1 +
 DocFormats/core/tests/common/BDTTests.c         |   1 +
 DocFormats/core/tests/css/CSSTests.c            |   1 +
 DocFormats/core/tests/html/HTMLPlain.c          |   1 +
 DocFormats/core/tests/html/HTMLTests.c          |   1 +
 DocFormats/filters/latex/CMakeLists.txt         |   1 -
 DocFormats/filters/latex/src/HTMLToLaTeX.c      |   1 +
 DocFormats/filters/latex/tests/LaTeXTests.c     |   1 +
 DocFormats/filters/odf/CMakeLists.txt           |   1 -
 DocFormats/filters/odf/src/ODF.c                |   1 +
 DocFormats/filters/odf/src/ODFManifest.c        |   1 +
 DocFormats/filters/odf/src/ODFPackage.c         |   1 +
 DocFormats/filters/ooxml/CMakeLists.txt         |   1 -
 DocFormats/filters/ooxml/src/common/OPC.c       |   1 +
 DocFormats/filters/ooxml/src/word/Word.c        |   1 +
 .../filters/ooxml/src/word/WordConverter.c      |   1 +
 DocFormats/filters/ooxml/src/word/WordGC.c      |   1 +
 DocFormats/filters/ooxml/src/word/WordLists.c   |   1 +
 DocFormats/filters/ooxml/src/word/WordNotes.c   |   1 +
 .../filters/ooxml/src/word/WordNumbering.c      |   1 +
 DocFormats/filters/ooxml/src/word/WordPackage.c |   1 +
 .../filters/ooxml/src/word/WordSettings.c       |   1 +
 DocFormats/filters/ooxml/src/word/WordStyles.c  |   1 +
 DocFormats/filters/ooxml/src/word/WordTheme.c   |   1 +
 .../filters/ooxml/src/word/WordWhitespace.c     |   1 +
 .../ooxml/src/word/formatting/WordCommonPr.c    |   1 +
 .../ooxml/src/word/formatting/WordNumPr.c       |   1 +
 .../filters/ooxml/src/word/formatting/WordPPr.c |   1 +
 .../filters/ooxml/src/word/formatting/WordRPr.c |   1 +
 .../ooxml/src/word/formatting/WordTblPr.c       |   1 +
 .../ooxml/src/word/lenses/WordBlockLevel.c      |   1 +
 .../filters/ooxml/src/word/lenses/WordBody.c    |   1 +
 .../filters/ooxml/src/word/lenses/WordChange.c  |   1 +
 .../ooxml/src/word/lenses/WordDocument.c        |   1 +
 .../filters/ooxml/src/word/lenses/WordDrawing.c |   1 +
 .../ooxml/src/word/lenses/WordEquation.c        |   1 +
 .../filters/ooxml/src/word/lenses/WordField.c   |   1 +
 .../ooxml/src/word/lenses/WordHyperlink.c       |   1 +
 .../filters/ooxml/src/word/lenses/WordLenses.c  |   1 +
 .../ooxml/src/word/lenses/WordParagraph.c       |   1 +
 .../src/word/lenses/WordParagraphContent.c      |   1 +
 .../filters/ooxml/src/word/lenses/WordRun.c     |   1 +
 .../ooxml/src/word/lenses/WordRunContent.c      |   1 +
 .../ooxml/src/word/lenses/WordSmartTag.c        |   1 +
 .../filters/ooxml/src/word/lenses/WordTable.c   |   1 +
 DocFormats/filters/ooxml/tests/word/WordPlain.c |  14 +-
 DocFormats/filters/ooxml/tests/word/WordTests.c |   1 +
 DocFormats/headers/DFCommon.h                   |   7 -
 DocFormats/headers/DFPlatform.h                 |  84 +++++
 DocFormats/headers/DFTypes.h                    |   4 -
 DocFormats/platform/CMakeLists.txt              |  11 +-
 DocFormats/platform/headers/DFPlatform.h        |  54 ---
 DocFormats/platform/src/Win32.c                 |   3 -
 DocFormats/platform/tests/OStests.c             |   5 -
 DocFormats/unittest/CMakeLists.txt              |   1 -
 consumers/dfconvert/src/CMakeLists.txt          |   1 +
 consumers/dfconvert/src/main.c                  |   1 +
 consumers/dftest/src/main.c                     |  29 +-
 consumers/dfutil/src/CMakeLists.txt             |   1 -
 consumers/dfutil/src/Commands.c                 |  30 +-
 consumers/dfutil/src/Commands.h                 |   2 -
 consumers/dfutil/src/main.c                     |   1 +
 external/README.txt                             | 352 ++++++++++---------
 external/customize.txt                          | 110 ++++++
 external/external.txt                           |  76 ++++
 external/extract_downloads.bat                  | 125 +++++++
 external/fetch_downloads.bat                    |  32 +-
 external/maintenance.txt                        | 166 +++++++++
 external/unzip-win.js                           |  46 +++
 97 files changed, 1012 insertions(+), 340 deletions(-)
----------------------------------------------------------------------



[06/14] incubator-corinthia git commit: .gitattributes 1.1.0

Posted by pm...@apache.org.
.gitattributes 1.1.0

An inventory of known test documents is reviewed and the various
binary-format extensions added to the .gitattributes, now versioned and
dated so that there are clues about what is current.


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/944312a8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/944312a8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/944312a8

Branch: refs/heads/stable
Commit: 944312a8cfa04c5ae55f28fee529097eda4619f4
Parents: 2d37450
Author: Dennis Hamilton <or...@apache.org>
Authored: Thu Jan 8 10:33:16 2015 -0800
Committer: Dennis Hamilton <or...@apache.org>
Committed: Thu Jan 8 10:33:16 2015 -0800

----------------------------------------------------------------------
 .gitattributes | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 60 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/944312a8/.gitattributes
----------------------------------------------------------------------
diff --git a/.gitattributes b/.gitattributes
index a77dbf0..f981553 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,4 +1,4 @@
-# .gitattributes                       UTF-8
+# .gitattributes 1.1.0                UTF-8                     2015-01-08
 #
 #           GIT ATTRIBUTES FOR THE CORINTHIA GIT REPOSITORY
 
@@ -13,13 +13,72 @@
 
 # Denote all files that are truly binary and must not be scanned for line-end.
 # Some of these might also be .gitignored.  Better safe than sorry.
+#   NOT AN EXHAUSTIVE LIST.  Before adding a binary format to the repository,
+# verify that it is listed here.
 
+# Common binary formats
+*.bin binary
 *.bmp binary
+*.dat binary
+*.jpeg binary
 *.jpg binary
+*.pdf binary
 *.png binary
 *.suo binary
+*.wav binary
 *.zip binary
 
+# ODF/OpenOffice binary document formats
+*.odt binary
+*.ott binary
+*.odg binary
+*.otg binary
+*.odp binary
+*.otp binary
+*.ods binary
+*.ots binary
+*.odc binary
+*.otc binary
+*.odi binary
+*.oti binary
+*.odf binary
+*.otf binary
+*.odm binary
+*.oxt binary
+
+# OOXML/Microsoft Office binary document formats (common ones)
+*.doc  binary
+*.docm binary
+*.docx binary
+*.dot  binary
+*.dotx binary
+*.emf  binary
+*.pub  binary
+*.ppt  binary
+*.pptm binary
+*.pptx binary
+*.vsd  binary
+*.xls  binary
+*.xlsm binary
+*.xlsx binary
+
+# Other folks binary document formats
+*.adm    binary
+*.dib    binary
+*.mdb    binary
+*.mpp    binary
+*.msg    binary
+*.ole2   binary
+*.ooxml  binary
+*.pfx    binary
+*.qwp    binary
+*.shw    binary
+*.sldprt binary
+*.wps    binary
+*.zvi    binary
+
+
+
 #                          *** end of .gitattributes ***
 
 


[07/14] incubator-corinthia git commit: external\README.txt replacement draft

Posted by pm...@apache.org.
external\README.txt replacement draft

A 1.0 Draft of the README is provided in place of the previous one that
referenced the bash scripts.  This attempts to cover the essentials with
drill-down into maintenance and customization to be in separate files.


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/40fb232e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/40fb232e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/40fb232e

Branch: refs/heads/stable
Commit: 40fb232e4fa18eb7eb5c09ca9661a5508c7e2fe5
Parents: 944312a
Author: Dennis Hamilton <or...@apache.org>
Authored: Thu Jan 8 12:26:49 2015 -0800
Committer: Dennis Hamilton <or...@apache.org>
Committed: Thu Jan 8 12:26:49 2015 -0800

----------------------------------------------------------------------
 external/README.txt | 287 ++++++++++++++++++++---------------------------
 1 file changed, 119 insertions(+), 168 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/40fb232e/external/README.txt
----------------------------------------------------------------------
diff --git a/external/README.txt b/external/README.txt
index 5067bdc..2dc9a6b 100644
--- a/external/README.txt
+++ b/external/README.txt
@@ -1,168 +1,119 @@
-Download external developer libraries to here, and you dont need to modify CMakeList.txt
-
-in order to compile on windows you need:
-
-Zlib developer files:
-    http://zlib.net/zlib128-dll.zip
-
-Iconv developer files:
-    ftp://ftp.zlatkovic.com/libxml/iconv-1.9.2.win32.zip
-
-libxml2 developer files:
-    ftp://ftp.zlatkovic.com/libxml/libxml2-2.7.8.win32.zip
-
-SDL2 developer files:
-    https://www.libsdl.org/release/SDL2-devel-2.0.3-VC.zip
-
-SDL2_image developer files:
-    https://www.libsdl.org/projects/SDL_image/release/SDL2_image-devel-2.0.0-VC.zip
-
-We are working on reducing these dependencies.
-
-On a Unix system (and possibly under cygwin), you can run the
-fetch_downloads.sh script to download these. The extract_downloads.sh
-script places all the files in the bin, lib, and include
-directories. The result should look like this the listing below.
-
-After building Corinthia, you will need to copy all of the DLL files from
-external/bin into the bin directory within your build directory,
-alongside dfconvert and dftest.
-
-bin/SDL2.dll
-bin/SDL2_image.dll
-bin/iconv.dll
-bin/iconv.exe
-bin/libjpeg-9.dll
-bin/libpng16-16.dll
-bin/libtiff-5.dll
-bin/libwebp-4.dll
-bin/libxml2.dll
-bin/xmlcatalog.exe
-bin/xmllint.exe
-bin/zlib1.dll
-include/SDL.h
-include/SDL_assert.h
-include/SDL_atomic.h
-include/SDL_audio.h
-include/SDL_bits.h
-include/SDL_blendmode.h
-include/SDL_clipboard.h
-include/SDL_config.h
-include/SDL_cpuinfo.h
-include/SDL_endian.h
-include/SDL_error.h
-include/SDL_events.h
-include/SDL_filesystem.h
-include/SDL_gamecontroller.h
-include/SDL_gesture.h
-include/SDL_haptic.h
-include/SDL_hints.h
-include/SDL_image.h
-include/SDL_joystick.h
-include/SDL_keyboard.h
-include/SDL_keycode.h
-include/SDL_loadso.h
-include/SDL_log.h
-include/SDL_main.h
-include/SDL_messagebox.h
-include/SDL_mouse.h
-include/SDL_mutex.h
-include/SDL_name.h
-include/SDL_opengl.h
-include/SDL_opengles.h
-include/SDL_opengles2.h
-include/SDL_pixels.h
-include/SDL_platform.h
-include/SDL_power.h
-include/SDL_quit.h
-include/SDL_rect.h
-include/SDL_render.h
-include/SDL_revision.h
-include/SDL_rwops.h
-include/SDL_scancode.h
-include/SDL_shape.h
-include/SDL_stdinc.h
-include/SDL_surface.h
-include/SDL_system.h
-include/SDL_syswm.h
-include/SDL_test.h
-include/SDL_test_assert.h
-include/SDL_test_common.h
-include/SDL_test_compare.h
-include/SDL_test_crc32.h
-include/SDL_test_font.h
-include/SDL_test_fuzzer.h
-include/SDL_test_harness.h
-include/SDL_test_images.h
-include/SDL_test_log.h
-include/SDL_test_md5.h
-include/SDL_test_random.h
-include/SDL_thread.h
-include/SDL_timer.h
-include/SDL_touch.h
-include/SDL_types.h
-include/SDL_version.h
-include/SDL_video.h
-include/begin_code.h
-include/close_code.h
-include/iconv.h
-include/libxml/DOCBparser.h
-include/libxml/HTMLparser.h
-include/libxml/HTMLtree.h
-include/libxml/SAX.h
-include/libxml/SAX2.h
-include/libxml/c14n.h
-include/libxml/catalog.h
-include/libxml/chvalid.h
-include/libxml/debugXML.h
-include/libxml/dict.h
-include/libxml/encoding.h
-include/libxml/entities.h
-include/libxml/globals.h
-include/libxml/hash.h
-include/libxml/list.h
-include/libxml/nanoftp.h
-include/libxml/nanohttp.h
-include/libxml/parser.h
-include/libxml/parserInternals.h
-include/libxml/pattern.h
-include/libxml/relaxng.h
-include/libxml/schemasInternals.h
-include/libxml/schematron.h
-include/libxml/threads.h
-include/libxml/tree.h
-include/libxml/uri.h
-include/libxml/valid.h
-include/libxml/xinclude.h
-include/libxml/xlink.h
-include/libxml/xmlIO.h
-include/libxml/xmlautomata.h
-include/libxml/xmlerror.h
-include/libxml/xmlexports.h
-include/libxml/xmlmemory.h
-include/libxml/xmlmodule.h
-include/libxml/xmlreader.h
-include/libxml/xmlregexp.h
-include/libxml/xmlsave.h
-include/libxml/xmlschemas.h
-include/libxml/xmlschemastypes.h
-include/libxml/xmlstring.h
-include/libxml/xmlunicode.h
-include/libxml/xmlversion.h
-include/libxml/xmlwriter.h
-include/libxml/xpath.h
-include/libxml/xpathInternals.h
-include/libxml/xpointer.h
-include/zconf.h
-include/zlib.h
-lib/SDL2.lib
-lib/SDL2_image.lib
-lib/SDL2main.lib
-lib/SDL2test.lib
-lib/iconv.lib
-lib/iconv_a.lib
-lib/libxml2.lib
-lib/libxml2_a.lib
-lib/libxml2_a_dll.lib
-lib/zdll.lib
-lib/zlib.def
+README.txt 1.0                         UTF-8
+
+                       EXTERNAL DOWNLOADS AREA STRUCTURE
+                       =================================
+
+The Corinthia repository external/ area is a section of the repository used
+for downloading external dependencies required in constructing Corinthia code.
+These dependencies are required when constructing Corinthia components on and
+for Microsoft Windows.
+
+The downloads are created in an externals/download/ subdirectory.  This is
+not part of the repository and is created in a local working copy whenever
+needed.  The scripts in externals/ provide the necessary downloading and
+organization of the external material.
+
+The files directly in externals/ level provide documentation and scripts for
+carrying out the download and extraction of material that Corinthia components
+depend on for their compilation and executable operation.  These files are
+part of the Corinthia source code repository and are maintained with it.
+
+There are two uses for the externals/ source code,
+
+  1. as maintained scripts for downloading the current dependencies into
+     the download/ folder in a form that is used by build procedures where
+     these dependencies matter,
+
+  2. as templates for introducing other download folders that a project
+     may require as part of its capture of external material that is
+     needed on Microsoft Windows.
+
+
+
+ 1. PREREQUISITES FOR USING THE SCRIPTS
+    -----------------------------------
+
+To use these scripts, it is necessary to have an Internet Connection and be
+on a Microsoft Windows platform.  Operation can be in a properly-connected
+Virtual Machine guest having an installed Windows Operating System.  The
+operating system can be either x86 or x64 based.
+
+The procedures employ Microsoft Windows batch (.bat) files and rely on the
+Windows Scripting Host (WSH) for JScript access to Windows utility functions.
+
+The scripts can be executed using a Windows Shell of the user's choice.  They
+have been tested using Windows cmd.exe, Windows PowerShell, MSYS2 (bash),
+CygWin (bash) and JSoft Take Command (formerly 4NT and 4DOS).  They have been
+operated on Windows 8.1 Pro and Windows 10 Technical Preview as of January,
+2015.
+
+ 2. OPERATION
+    ---------
+
+In a console session, simply arrange to execute the script
+
+    external/extract_downloads.bat
+
+wherever it is located on the local system.  The other script files are used
+as needed to complete the extraction operations.
+
+The external/download/ folder will be created if needed.  Any external package
+that is not yet downloaded will be fetched from the Internet.  Already-
+downloaded packages will not be downloaded again.  (To force a fresh set of
+downloads, simply delete the download/ subfolder.)
+
+The external packages will be stored in external/downloads/ and will remain
+there for any future use so long as that folder is preserved.
+
+If the set of external packages is complete, they will then be expanded into
+download/include/, download/lib/, and download/bin/ subdirectories with the
+files needed for compilation and execution of code that relies on the external
+dependencies.
+
+This extraction is done completely whenever extract_downloads is operated.  It
+will not be performed if not all of the package downloads have succeeded.
+
+
+ 3. COMPILE-TIME DEPENDENCY ON THE EXTERNAL/DOWNLOAD CONTENT
+    --------------------------------------------------------
+
+The population of external/downloads/ is presumed in the root CMakeLists.txt
+file in the 'if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")' entry.  That
+definition and the current structure here must be kept synchronized.
+
+These externals are for builds targetted to Win32 x86 runtime only.  Externals
+needed for producing x64 executables require a different arrangement.
+
+
+ 4. EXTERNAL FILES TO BE INCLUDED WITH CORINTHIA SOFTWARE ON WINDOWS
+    ----------------------------------------------------------------
+
+The external/download/ folder is populated with include/, lib/, and bin/
+subfolders that carry extracted material that Corinthia code depends on when
+compiled for Windows.
+
+The compiled executables will need to be installed in folders that also have
+copies of DLLs from external/download/bin/
+
+  SDL2.dll
+  SDL2_image.dll
+  iconv.dll
+  libjpeg-9.dll
+  libpng16-16.dll
+  libtiff-5.dll
+  libwebp-4.dll
+  libxml2.dll
+  zlib1.dll
+
+The license files in bin/ should be carried along with those DLL files.
+
+Not every Corinthia component requires all of these DLLs.  For finer details,
+consult information on the individual component.
+
+
+ 5. MAINTENANCE AND CUSTOMIZATION PROCEDURES
+    ----------------------------------------
+
+    [TBD]
+
+                       *** end of README.txt ***


[09/14] incubator-corinthia git commit: Change location of external extractions

Posted by pm...@apache.org.
Change location of external extractions

The extract_downloads.bat script used folders within external/download
for include, lib, and bin.  The simplest correction was to change
CMakeLists.txt to agree rather than make many more fixes to
extract_downloads.bat.


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/f058c02a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/f058c02a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/f058c02a

Branch: refs/heads/stable
Commit: f058c02a0100dc16f868745594788e96e1c84282
Parents: 2d96374
Author: Dennis Hamilton <or...@apache.org>
Authored: Fri Jan 9 14:43:30 2015 -0800
Committer: Dennis Hamilton <or...@apache.org>
Committed: Fri Jan 9 14:43:30 2015 -0800

----------------------------------------------------------------------
 CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/f058c02a/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9d1d41a..7eb3585 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,9 +42,9 @@ endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
 
 if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
     set(INCLUDE_DIRS
-        ${PROJECT_SOURCE_DIR}/external/include)
+	${PROJECT_SOURCE_DIR}/external/download/include)
     set(LIB_DIRS
-        ${PROJECT_SOURCE_DIR}/external/lib)
+	${PROJECT_SOURCE_DIR}/external/download/lib)
     set(LIBS ${LIBS} libxml2 zdll iconv SDL2 SDL2_image)
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4090 /wd4996")
 endif(${CMAKE_SYSTEM_NAME} MATCHES "Windows")