summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xBuild/source/libs/teckit/source/Compiler.cpp4
-rwxr-xr-xBuild/source/libs/teckit/source/Compiler.h1
-rw-r--r--Build/source/libs/teckit/source/Sample-tools/TECkit_Compile.cpp11
3 files changed, 10 insertions, 6 deletions
diff --git a/Build/source/libs/teckit/source/Compiler.cpp b/Build/source/libs/teckit/source/Compiler.cpp
index f1597b4925f..66caa5cee45 100755
--- a/Build/source/libs/teckit/source/Compiler.cpp
+++ b/Build/source/libs/teckit/source/Compiler.cpp
@@ -608,7 +608,7 @@ Compiler::Compiler(const char* txt, UInt32 len, char inForm, bool cmp, bool genX
if (inputForm != kForm_Bytes) {
// discard initial BOM if present
- currCh = getChar();
+ UInt32 currCh = getChar();
if (currCh != 0xfeff)
ungetChar(currCh);
}
@@ -1698,7 +1698,7 @@ void
Compiler::SkipSpaces(void)
{
while (textPtr < textEnd) {
- currCh = getChar();
+ UInt32 currCh = getChar();
if (currCh != ' ' && currCh != '\t') {
ungetChar(currCh);
break;
diff --git a/Build/source/libs/teckit/source/Compiler.h b/Build/source/libs/teckit/source/Compiler.h
index fa3b4c682c3..b849821d10d 100755
--- a/Build/source/libs/teckit/source/Compiler.h
+++ b/Build/source/libs/teckit/source/Compiler.h
@@ -120,7 +120,6 @@ protected:
char idBuffer[256];
// used by the front end parser
- UInt32 currCh;
UInt32 ungotten;
Token tok;
const unsigned char* tokStart;
diff --git a/Build/source/libs/teckit/source/Sample-tools/TECkit_Compile.cpp b/Build/source/libs/teckit/source/Sample-tools/TECkit_Compile.cpp
index cda7d74e66e..f61618394d1 100644
--- a/Build/source/libs/teckit/source/Sample-tools/TECkit_Compile.cpp
+++ b/Build/source/libs/teckit/source/Sample-tools/TECkit_Compile.cpp
@@ -8,6 +8,7 @@
5-May-2005 jk added include <stdlib.h> to keep gcc happy
24-May-2005 jk change placement of CALLBACK for VC++6 (Ulrik)
+ 1-Apr-2008 jk extern "C" decl for errFunc; const char* progName
*/
#include "TECkit_Compiler.h"
@@ -22,12 +23,16 @@
#include "console.h"
#endif
+extern "C" {
+ static void CALLBACK errFunc(void* userData, char* msg, char* param, UInt32 line);
+};
+
static
void
CALLBACK
-errFunc(void* usedData, char* msg, char* param, UInt32 line)
+errFunc(void* userData, char* msg, char* param, UInt32 line)
{
-#pragma unused(usedData)
+#pragma unused(userData)
fprintf(stderr, "%s", msg);
if (param != 0)
@@ -40,7 +45,7 @@ errFunc(void* usedData, char* msg, char* param, UInt32 line)
int
main(int argc, char** argv)
{
- char* progName = argv[0];
+ const char* progName = argv[0];
char* mapFileName = 0;
char* tecFileName = 0;
int errorCount = 0;