Codebase list teckit / 3333d97 debian / patches / patch-07-warnings-and-static
3333d97

Tree @3333d97 (Download .tar.gz)

patch-07-warnings-and-static @3333d97raw · history · blame

Index: teckit/source/Compiler.cpp
===================================================================
--- teckit.orig/source/Compiler.cpp
+++ teckit/source/Compiler.cpp
@@ -189,7 +189,7 @@ TECkit_DisposeCompiled(Byte* table)
 		free(table);
 }
 
-char*
+const char*
 WINAPI
 TECkit_GetUnicodeName(UInt32 usv)
 {
Index: teckit/source/Compiler.h
===================================================================
--- teckit.orig/source/Compiler.h
+++ teckit/source/Compiler.h
@@ -229,7 +229,7 @@ protected:
 		vector<UInt32>		byteClassLines;
 		vector<UInt32>		uniClassLines;
 
-		long				passType;
+		UInt32				passType;
 		UInt32				uniDefault;
 		UInt8				byteDefault;
 		bool				supplementaryChars;
Index: teckit/source/Engine.cpp
===================================================================
--- teckit.orig/source/Engine.cpp
+++ teckit/source/Engine.cpp
@@ -51,12 +51,6 @@ Description:
 #	define NOSERVICE
 #	define NOMCX
 #	include <windows.h>
-
-	BOOL WINAPI
-	DllMain(HINSTANCE /*hInst*/, DWORD /*wDataSeg*/, LPVOID /*lpReserved*/)
-	{
-		return true;
-	}
 #endif
 
 #include "Engine.h"
Index: teckit/source/Public-headers/TECkit_Compiler.h
===================================================================
--- teckit.orig/source/Public-headers/TECkit_Compiler.h
+++ teckit/source/Public-headers/TECkit_Compiler.h
@@ -29,6 +29,9 @@ extern "C" {
 #ifdef _WIN32
 /* MS compiler has predefined _WIN32, so assume Windows target  */
 #include <windows.h>	// apparently just using windef.h fails on VC++6
+#undef WINAPI
+#define WINAPI
+#define EXPORTED
 #else
 /* not the MS compiler, so try Metrowerks' platform macros */
 #ifndef __APPLE__
@@ -55,7 +58,7 @@ extern "C" {
 #define kCompilerOpts_Compress	0x00000010	/* generate compressed mapping table */
 #define kCompilerOpts_XML		0x00000020	/* instead of a compiled binary table, generate an XML representation of the mapping */
 
-typedef void (CALLBACK *TECkit_ErrorFn)(void* userData, char* msg, char* param, UInt32 line);
+typedef void (CALLBACK *TECkit_ErrorFn)(void* userData, const char* msg, const char* param, UInt32 line);
 
 TECkit_Status
 WINAPI EXPORTED
@@ -74,7 +77,7 @@ WINAPI EXPORTED
 TECkit_GetCompilerVersion();
 
 /* new APIs for looking up Unicode names (as NUL-terminated C strings) */
-char*
+const char*
 WINAPI EXPORTED
 TECkit_GetUnicodeName(UInt32 usv);
 	/* returns the Unicode name of usv, if available, else NULL */
Index: teckit/source/Public-headers/TECkit_Engine.h
===================================================================
--- teckit.orig/source/Public-headers/TECkit_Engine.h
+++ teckit/source/Public-headers/TECkit_Engine.h
@@ -79,6 +79,9 @@ extern "C" {
 #ifdef _WIN32
 /* MS compiler has predefined _WIN32, so assume Windows target  */
 #include <windows.h>
+#undef WINAPI
+#define WINAPI
+#define EXPORTED
 #else
 /* not the MS compiler, so try Metrowerks' platform macros */
 #ifndef __APPLE__
Index: teckit/source/Sample-tools/TECkit_Compile.cpp
===================================================================
--- teckit.orig/source/Sample-tools/TECkit_Compile.cpp
+++ teckit/source/Sample-tools/TECkit_Compile.cpp
@@ -24,13 +24,13 @@
 #endif
 
 extern "C" {
-	static void CALLBACK errFunc(void* userData, char* msg, char* param, UInt32 line);
+	static void CALLBACK errFunc(void* userData, const char* msg, const char* param, UInt32 line);
 };
 
 static
 void
 CALLBACK
-errFunc(void* /*userData*/, char* msg, char* param, UInt32 line)
+errFunc(void* /* userData */, const char* msg, const char* param, UInt32 line)
 {
 	fprintf(stderr, "%s", msg);
 	if (param != 0)