summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2001-09-08 23:47:19 +0000
committerMarc Laukien <marc@zeroc.com>2001-09-08 23:47:19 +0000
commit35a36b1632bff0b5ce73931666d24cae9359a6f4 (patch)
tree0c96bcff1fb63c249f5708690262de3fc927450e /cpp
parentfix (diff)
downloadice-35a36b1632bff0b5ce73931666d24cae9359a6f4.tar.bz2
ice-35a36b1632bff0b5ce73931666d24cae9359a6f4.tar.xz
ice-35a36b1632bff0b5ce73931666d24cae9359a6f4.zip
win fixes
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/IcePack/Parser.cpp7
-rw-r--r--cpp/src/IcePack/Scanner.l3
2 files changed, 4 insertions, 6 deletions
diff --git a/cpp/src/IcePack/Parser.cpp b/cpp/src/IcePack/Parser.cpp
index af3acfb8c39..6f5d9d27d7d 100644
--- a/cpp/src/IcePack/Parser.cpp
+++ b/cpp/src/IcePack/Parser.cpp
@@ -146,7 +146,8 @@ IcePack::Parser::getInput(char* buf, int& result, int maxSize)
}
else
{
- result = std::min(maxSize, static_cast<int>(_commands.length()));
+ // COMPILERBUG: Stupid Visual C++ defined min and max as macros
+ result = _MIN(maxSize, static_cast<int>(_commands.length()));
strncpy(buf, _commands.c_str(), result);
_commands.erase(0, result);
if (_commands.empty())
@@ -202,7 +203,7 @@ IcePack::Parser::getInput(char* buf, int& result, int maxSize)
}
}
- result = strlen(line);
+ result = line.length();
if (result > maxSize)
{
error("input line too long");
@@ -348,7 +349,7 @@ IcePack::Parser::parse(FILE* file, bool debug)
parser = this;
_errors = 0;
- _commands.clear();
+ _commands.empty();
yyin = file;
assert(yyin);
diff --git a/cpp/src/IcePack/Scanner.l b/cpp/src/IcePack/Scanner.l
index 5e0ca4ee348..9fe7335714c 100644
--- a/cpp/src/IcePack/Scanner.l
+++ b/cpp/src/IcePack/Scanner.l
@@ -18,9 +18,6 @@ using namespace std;
using namespace Ice;
using namespace IcePack;
-#include <readline/readline.h>
-#include <readline/history.h>
-
#define YY_INPUT(buf, result, maxSize) parser->getInput(buf, result, maxSize)
%}