Codebase list teckit / 5e65b45
add teckit patches from texlive-bin-2015.20150524.37493 Daniel Glassey 8 years ago
8 changed file(s) with 328 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 2014-07-18 Peter Breitenlohner <peb@mppmu.mpg.de>
1
2 Imported TECkit-2.5.4 source tree (teckit) from
3 http://scripts.sil.org/svn-public/teckit/TRUNK
4 (svn r139 2014-07-09 14:47:39 UTC).
5
6 * patch-06-backport-r119 (removed): Now in source tree.
7 * patch-02-warning, patch-03-warnings, patch-04-pragmas,
8 patch-05-static: Adapted.
9
10 2014-06-28 Peter Breitenlohner <peb@mppmu.mpg.de>
11
12 * patch-06-static_cast (removed): Replaced by ...
13 * patch-06-backport-r119 (new): ... Backport upstream changes:
14 svn r117: Update test runner for compatibility with newer
15 versions of perl
16 svn r118: Update Normalization test data for 6.0.0
17 svn r119: Fix data-narrowing bug
18
19 2014-06-23 Peter Breitenlohner <peb@mppmu.mpg.de>
20
21 * patch-06-static_cast (new): Add static_cast required by C++11.
22
23 2012-10-13 Peter Breitenlohner <peb@mppmu.mpg.de>
24
25 Avoid TL vs W32TeX diffs (from Akira).
26 * patch-04-pragmas (new): Remove '#pragma's.
27 * patch-05-static (new): Build a static library and not a Dll.
28
29 2012-03-17 Peter Breitenlohner <peb@mppmu.mpg.de>
30
31 Imported TECkit-2.5.3 source tree (teckit) from
32 http://scripts.sil.org/svn-public/teckit/TRUNK
33 (svn r116 2011-05-12 18:24:47 UTC).
34
35 * patch-01-debian-505693, patch-04-case-sensitive (removed):
36 Now in source tree.
37 * patch-02-warning, patch-03-warnings: Adapted.
38
39 2010-02-19 Peter Breitenlohner <peb@mppmu.mpg.de>
40
41 * patch-04-case-sensitive (new): #include <windows.h> instead
42 of <Windows.h> for, e.g., Linux => MinGW32 cross compilation.
43
44 2009-10-18 Peter Breitenlohner <peb@mppmu.mpg.de>
45
46 Reconstruct TL TECkit sources from distributed tarball.
47 * TL-changes (new): Modifications applied to the distribution.
48 * patch-[0-9][0-9]-*: Patches applied to the distribution.
49
50 2009-10-01 Peter Breitenlohner <peb@mppmu.mpg.de>
51
52 * patch-03-warnings (new): Avoid maximal compiler warnings.
53 source/Sample-tools/TECkit_Compile.cpp, source/Engine.{cpp,h},
54 source/Public-headers/TECkit_Compiler.h, source/Compiler.cpp:
55 Constify.
56
57 2009-06-25 Peter Breitenlohner <peb@mppmu.mpg.de>
58
59 * patch-02-warning (new): Avoid compiler warning.
60 source/Compiler.h: change type of Compiler::Pass.passType
61 long -> UInt32.
62
63 2008-11-17 Jonathan Kew <jonathan_kew@sil.org>
64
65 * patch-01-debian-505693 (new): Bug fix.
66
0 These patches have come from the texlive-bin source
1
2 texlive-bin-2015.20150524.37493/libs/teckit/TECkit-2.5.4-PATCHES
3
4 2015-11-14
0 Changes applied to the TECkit-2.5.4/ tree obtained from:
1 http://scripts.sil.org/svn-public/teckit/TRUNK
2 (svn r139 2014-07-09 14:47:39 UTC).
3
4 Removed execute permissions from:
5 installed-top.pc.in
6 teckit.pc.in
7 uninstalled-top.pc.in
8
9 Removed:
10 .gitignore
11 SFconv/expat/xmlparse/.cvsignore
12 SFconv/expat/xmlparse/CVS/
13 SFconv/expat/xmltok/.cvsignore
14 SFconv/expat/xmltok/CVS/
15 SFconv/expat/xmlwf/CVS/
16 TECkit.mcp
17 build-mac-binaries.sh
18 build-linux-package.sh
19 build-windows-binaries.sh
20 debian-src/
21 mac-installer/
22 perl_binaries/
23 source/teckitjni/
24 zlib-1.2.3/
25
26 Converted Dos/Win line ends to native:
27 source/Perl/TECkit.xs
28 source/Perl/lib/Encode/TECkit.pm
29 source/Perl/test.pl
30 source/Perl/typemap
31 test/GNT-map.xml
32 test/ISO-8859-1.map
33 test/Mrk-GNT.sf
34 test/mrk.sf.legacy.txt.orig
35
36 Added newline at end of file:
37 source/Carbon.r
38
0 Avoid compiler warning.
1
2 diff -ur TECkit-2.5.4.orig/source/Compiler.h TECkit-2.5.4/source/Compiler.h
3 --- TECkit-2.5.4.orig/source/Compiler.h 2014-07-01 02:13:39.000000000 +0200
4 +++ TECkit-2.5.4/source/Compiler.h 2014-07-18 10:59:53.000000000 +0200
5 @@ -230,7 +230,7 @@
6 vector<UInt32> byteClassLines;
7 vector<UInt32> uniClassLines;
8
9 - long passType;
10 + UInt32 passType;
11 UInt32 uniDefault;
12 UInt8 byteDefault;
13 bool supplementaryChars;
0 Avoid more compiler warnings.
1
2 diff -ur TECkit-2.5.4.orig/source/Compiler.cpp TECkit-2.5.4/source/Compiler.cpp
3 --- TECkit-2.5.4.orig/source/Compiler.cpp 2014-07-01 02:13:39.000000000 +0200
4 +++ TECkit-2.5.4/source/Compiler.cpp 2014-07-18 11:01:30.000000000 +0200
5 @@ -189,14 +189,14 @@
6 free(table);
7 }
8
9 -char*
10 +const char*
11 WINAPI
12 TECkit_GetUnicodeName(UInt32 usv)
13 {
14 const CharName *c = &gUnicodeNames[0];
15 while (c->name != 0)
16 if (c->usv == usv)
17 - return (char*)c->name;
18 + return c->name;
19 else
20 ++c;
21 return NULL;
22 @@ -2133,7 +2133,7 @@
23 cout << " at line " << line << endl;
24 }
25 else
26 - (*errorFunction)(errFuncUserData, (char*)msg, (char*)s, line);
27 + (*errorFunction)(errFuncUserData, msg, s, line);
28 errorState = true;
29 ++errorCount;
30 }
31 diff -ur TECkit-2.5.4.orig/source/Engine.cpp TECkit-2.5.4/source/Engine.cpp
32 --- TECkit-2.5.4.orig/source/Engine.cpp 2014-07-01 02:13:39.000000000 +0200
33 +++ TECkit-2.5.4/source/Engine.cpp 2014-07-18 11:01:30.000000000 +0200
34 @@ -1087,7 +1087,7 @@
35 if (matchElems == 0 && allowInsertion == false)
36 continue;
37 patternLength = matchElems + READ(rule->postLength);
38 - pattern = (MatchElem*)(rule + 1); // point past the defined struct for the rule header
39 + pattern = (const MatchElem*)(rule + 1); // point past the defined struct for the rule header
40 direction = 1;
41 infoLimit = matchElems;
42
43 @@ -2184,7 +2184,7 @@
44 status = kStatus_BadMappingVersion;
45 else {
46 const Byte* namePtr;
47 - if (getNamePtrFromTable((Byte*)fh, nameID, namePtr, *nameLength)) {
48 + if (getNamePtrFromTable((const Byte*)fh, nameID, namePtr, *nameLength)) {
49 UInt16 copyBytes = *nameLength < bufferSize ? *nameLength : bufferSize;
50 if (copyBytes > 0)
51 memcpy(nameBuffer, namePtr, copyBytes);
52 diff -ur TECkit-2.5.4.orig/source/Engine.h TECkit-2.5.4/source/Engine.h
53 --- TECkit-2.5.4.orig/source/Engine.h 2014-07-01 02:13:39.000000000 +0200
54 +++ TECkit-2.5.4/source/Engine.h 2014-07-18 11:01:30.000000000 +0200
55 @@ -117,7 +117,7 @@
56
57 UInt32 match(int index, int repeats, int textLoc);
58 // returns 0 for no match, 1 for match, or kNeedMoreInput/kInvalidChar
59 - MatchElem* pattern;
60 + const MatchElem* pattern;
61 int patternLength;
62 int direction;
63 MatchInfo info[256];
64 diff -ur TECkit-2.5.4.orig/source/Public-headers/TECkit_Compiler.h TECkit-2.5.4/source/Public-headers/TECkit_Compiler.h
65 --- TECkit-2.5.4.orig/source/Public-headers/TECkit_Compiler.h 2014-07-01 02:13:39.000000000 +0200
66 +++ TECkit-2.5.4/source/Public-headers/TECkit_Compiler.h 2014-07-18 11:01:30.000000000 +0200
67 @@ -56,7 +56,7 @@
68 #define kCompilerOpts_Compress 0x00000010 /* generate compressed mapping table */
69 #define kCompilerOpts_XML 0x00000020 /* instead of a compiled binary table, generate an XML representation of the mapping */
70
71 -typedef void (CALLBACK *TECkit_ErrorFn)(void* userData, char* msg, char* param, UInt32 line);
72 +typedef void (CALLBACK *TECkit_ErrorFn)(void* userData, const char* msg, const char* param, UInt32 line);
73
74 TECkit_Status
75 WINAPI EXPORTED
76 @@ -75,7 +75,7 @@
77 TECkit_GetCompilerVersion();
78
79 /* new APIs for looking up Unicode names (as NUL-terminated C strings) */
80 -char*
81 +const char*
82 WINAPI EXPORTED
83 TECkit_GetUnicodeName(UInt32 usv);
84 /* returns the Unicode name of usv, if available, else NULL */
85 diff -ur TECkit-2.5.4.orig/source/Sample-tools/TECkit_Compile.cpp TECkit-2.5.4/source/Sample-tools/TECkit_Compile.cpp
86 --- TECkit-2.5.4.orig/source/Sample-tools/TECkit_Compile.cpp 2014-07-01 02:13:39.000000000 +0200
87 +++ TECkit-2.5.4/source/Sample-tools/TECkit_Compile.cpp 2014-07-18 11:07:05.000000000 +0200
88 @@ -24,13 +24,13 @@
89 #endif
90
91 extern "C" {
92 - static void CALLBACK errFunc(void* userData, char* msg, char* param, UInt32 line);
93 + static void CALLBACK errFunc(void* userData, const char* msg, const char* param, UInt32 line);
94 };
95
96 static
97 void
98 CALLBACK
99 -errFunc(void* /*userData*/, char* msg, char* param, UInt32 line)
100 +errFunc(void* /*userData*/, const char* msg, const char* param, UInt32 line)
101 {
102 fprintf(stderr, "%s", msg);
103 if (param != 0)
0 Remove the '#pragma's, they seem to cause problems for MSVC
1 and are certainly not needed otherwise.
2
3 diff -ur TECkit-2.5.4.orig/source/Engine.cpp TECkit-2.5.4/source/Engine.cpp
4 --- TECkit-2.5.4.orig/source/Engine.cpp 2014-07-18 11:01:30.000000000 +0200
5 +++ TECkit-2.5.4/source/Engine.cpp 2014-07-18 11:11:09.000000000 +0200
6 @@ -102,8 +102,6 @@
7 #endif
8 }
9
10 -#pragma mark --- class Stage ---
11 -
12 Stage::Stage()
13 : oBuffer(0)
14 , oBufSize(0)
15 @@ -125,8 +123,6 @@
16 return 0;
17 }
18
19 -#pragma mark --- class Normalizer ---
20 -
21 #include "NormalizationData.c"
22
23 Normalizer::Normalizer(bool compose)
24 @@ -396,8 +392,6 @@
25 return c;
26 }
27
28 -#pragma mark --- class Pass ---
29 -
30 Pass::Pass(const TableHeader* inTable, Converter* cnv)
31 : converter(cnv)
32 , tableHeader(inTable)
33 @@ -1282,8 +1276,6 @@
34 return 0;
35 }
36
37 -#pragma mark --- class Converter ---
38 -
39 Converter::Converter(const Byte* inTable, UInt32 inTableSize, bool inForward,
40 UInt16 inForm, UInt16 outForm)
41 : table(0)
42 @@ -1934,8 +1926,6 @@
43 return true;
44 }
45
46 -#pragma mark --- Public "C" API functions ---
47 -
48 TECkit_Status
49 WINAPI
50 TECkit_CreateConverter(
0 For TeX Live we build a static library and not a Dll.
1
2 diff -ur TECkit-2.5.4.orig/source/Engine.cpp TECkit-2.5.4/source/Engine.cpp
3 --- TECkit-2.5.4.orig/source/Engine.cpp 2014-07-18 11:11:09.000000000 +0200
4 +++ TECkit-2.5.4/source/Engine.cpp 2014-07-18 11:18:02.000000000 +0200
5 @@ -51,12 +51,6 @@
6 # define NOSERVICE
7 # define NOMCX
8 # include <windows.h>
9 -
10 - BOOL WINAPI
11 - DllMain(HINSTANCE /*hInst*/, DWORD /*wDataSeg*/, LPVOID /*lpReserved*/)
12 - {
13 - return true;
14 - }
15 #endif
16
17 #include "Engine.h"
18 diff -ur TECkit-2.5.4.orig/source/Public-headers/TECkit_Compiler.h TECkit-2.5.4/source/Public-headers/TECkit_Compiler.h
19 --- TECkit-2.5.4.orig/source/Public-headers/TECkit_Compiler.h 2014-07-18 11:01:30.000000000 +0200
20 +++ TECkit-2.5.4/source/Public-headers/TECkit_Compiler.h 2014-07-18 11:18:02.000000000 +0200
21 @@ -30,6 +30,9 @@
22 #ifdef _WIN32
23 /* MS compiler has predefined _WIN32, so assume Windows target */
24 #include <windows.h> // apparently just using windef.h fails on VC++6
25 +#undef WINAPI
26 +#define WINAPI
27 +#define EXPORTED
28 #else
29 /* not the MS compiler, so try Metrowerks' platform macros */
30 #ifndef __APPLE__
31 diff -ur TECkit-2.5.4.orig/source/Public-headers/TECkit_Engine.h TECkit-2.5.4/source/Public-headers/TECkit_Engine.h
32 --- TECkit-2.5.4.orig/source/Public-headers/TECkit_Engine.h 2014-07-01 02:13:39.000000000 +0200
33 +++ TECkit-2.5.4/source/Public-headers/TECkit_Engine.h 2014-07-18 11:18:02.000000000 +0200
34 @@ -80,6 +80,9 @@
35 #ifdef _WIN32
36 /* MS compiler has predefined _WIN32, so assume Windows target */
37 #include <windows.h>
38 +#undef WINAPI
39 +#define WINAPI
40 +#define EXPORTED
41 #else
42 /* not the MS compiler, so try Metrowerks' platform macros */
43 #ifndef __APPLE__
0 patch-02-warning
1 patch-03-warnings
2 patch-04-pragmas
3 #patch-05-static