[Cmap-cvs] cmap Makefile,1.4,1.5 cmap.cpp,1.34,1.35 evalImpl.h,1.8,1.9 parser.h,1.1,1.2 tokenizer.cp
Status: Beta
Brought to you by:
dyp
From: Denis P. <dy...@us...> - 2004-05-17 16:02:20
|
Update of /cvsroot/cmap/cmap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26204 Modified Files: Makefile cmap.cpp evalImpl.h parser.h tokenizer.cpp tokenizer.h Log Message: Cleanups. Compile on Linux. Index: tokenizer.cpp =================================================================== RCS file: /cvsroot/cmap/cmap/tokenizer.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- tokenizer.cpp 16 May 2004 17:19:39 -0000 1.4 +++ tokenizer.cpp 17 May 2004 16:02:06 -0000 1.5 @@ -60,11 +60,11 @@ } void Tokenizer::commentChar(char c) { - ctype[c] |= CT_COMMENT; + ctype[(int)(unsigned char)c] |= CT_COMMENT; } void Tokenizer::wordChar(char c) { - ctype[c] |= CT_ALPHA; + ctype[(int)(unsigned char)c] |= CT_ALPHA; } void Tokenizer::eolIsSignificant(bool b) { @@ -338,7 +338,7 @@ len = sval.length(); if (len == 0) break; - if ((ctype[sval[(unsigned int)len - 1]] & CT_WHITESPACE) == 0) + if ((ctype[(int)(unsigned char)sval[(unsigned int)len - 1]] & CT_WHITESPACE) == 0) break; sval.resize(len); } @@ -350,7 +350,7 @@ } void Tokenizer::ordinaryChar(char c) { - ctype[c] = 0; + ctype[(int)(unsigned char)c] = 0; } void Tokenizer::ordinaryChars(int a, int b) { @@ -370,7 +370,7 @@ void Tokenizer::parseNumbers() { for (int i = '0'; i <= '9'; i++) ctype[i] |= CT_DIGIT; - ctype['-'] |= CT_DIGIT; + ctype[(int)(unsigned char)'-'] |= CT_DIGIT; } void Tokenizer::pushBack() { @@ -394,14 +394,11 @@ } void Tokenizer::quoteChar(char c) { - ctype[c] |= CT_QUOTE; + ctype[(int)(unsigned char)c] |= CT_QUOTE; } void Tokenizer::clearChar(char a) { - if (a < 0) - a = 0; - - ctype[a] = 0; + ctype[(int)(unsigned char)a] = 0; } void Tokenizer::whitespaceChars(int a, int b) { Index: evalImpl.h =================================================================== RCS file: /cvsroot/cmap/cmap/evalImpl.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- evalImpl.h 17 May 2004 08:46:36 -0000 1.8 +++ evalImpl.h 17 May 2004 16:02:06 -0000 1.9 @@ -15,7 +15,7 @@ class StringLVar : public StringExpr { public: - virtual void setValue(ObjectProp &o, std::string &value) = 0; + virtual void setValue(ObjectProp &o, const std::string &value) = 0; }; class LabelLVar : public StringLVar { @@ -23,7 +23,7 @@ return o.label; } - virtual void setValue(ObjectProp &o, std::string &value) { + virtual void setValue(ObjectProp &o, const std::string &value) { o.label = value; } }; @@ -437,7 +437,7 @@ class Case : public Block { public: - Case(BoolExpr *_expr) : Block(), next(NULL), expr(_expr) { + Case(BoolExpr *_expr) : Block(), expr(_expr), next(NULL) { } virtual void exec(const h_object *obj, ObjectProp &o, int numArray); Index: tokenizer.h =================================================================== RCS file: /cvsroot/cmap/cmap/tokenizer.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- tokenizer.h 16 May 2004 17:19:39 -0000 1.4 +++ tokenizer.h 17 May 2004 16:02:06 -0000 1.5 @@ -6,7 +6,7 @@ #include <string> #include <exception> -class TokenizerException : public exception { +class TokenizerException : public std::exception { public: TokenizerException(const char *_msg); virtual ~TokenizerException() throw (); @@ -17,7 +17,7 @@ const char *msg; }; -class IOException : public exception { +class IOException : public std::exception { public: IOException(); virtual ~IOException() throw (); Index: parser.h =================================================================== RCS file: /cvsroot/cmap/cmap/parser.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- parser.h 15 May 2004 17:49:33 -0000 1.1 +++ parser.h 17 May 2004 16:02:06 -0000 1.2 @@ -3,7 +3,7 @@ #include <exception> -class ParserException : public exception { +class ParserException : public std::exception { public: ParserException(const char *_msg); virtual ~ParserException() throw (); Index: Makefile =================================================================== RCS file: /cvsroot/cmap/cmap/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Makefile 5 May 2004 10:38:16 -0000 1.4 +++ Makefile 17 May 2004 16:02:06 -0000 1.5 @@ -1,8 +1,8 @@ cmap_SOURCES = Geodesy.cpp IngitFile.cpp IngitHeader.cpp IngitTable.cpp \ - PolishFormat.cpp cmap.cpp dbf.cpp common.cpp + PolishFormat.cpp cmap.cpp common.cpp parser.cpp tokenizer.cpp eval.cpp cmap_HEADERS = Geodesy.h IngitFile.h IngitHeader.h IngitTable.h \ - PolishFormat.h cmap.h common.h dbf.h + PolishFormat.h cmap.h common.h parser.h tokenizer.h eval.h evalImpl.h all: cmap Index: cmap.cpp =================================================================== RCS file: /cvsroot/cmap/cmap/cmap.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- cmap.cpp 15 May 2004 18:43:12 -0000 1.34 +++ cmap.cpp 17 May 2004 16:02:06 -0000 1.35 @@ -96,7 +96,8 @@ fprintf(outIMG, ";\n; Created by %s\n;\n\n\n", cmapVersion); if (NameMap[0] != '.') { - for (unsigned int i = 0; NameMap[i] == '.' || NameMap[i] == 0 ; i++) + unsigned int i; + for (i = 0; NameMap[i] == '.' || NameMap[i] == 0 ; i++) ; NameMap[i] = 0; } |