diff options
author | Marc Laukien <marc@zeroc.com> | 2001-09-08 23:51:12 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2001-09-08 23:51:12 +0000 |
commit | cc3dc08617c56f8e73cb9306789c129b9fdb4bb9 (patch) | |
tree | c9b6bd228e676beb0601719a34402e17e0360eb8 /cpp/src | |
parent | win fixes (diff) | |
download | ice-cc3dc08617c56f8e73cb9306789c129b9fdb4bb9.tar.bz2 ice-cc3dc08617c56f8e73cb9306789c129b9fdb4bb9.tar.xz ice-cc3dc08617c56f8e73cb9306789c129b9fdb4bb9.zip |
fix
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/IcePack/Parser.cpp | 4 | ||||
-rw-r--r-- | cpp/src/IcePack/Parser.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/cpp/src/IcePack/Parser.cpp b/cpp/src/IcePack/Parser.cpp index 6f5d9d27d7d..9c82492b6bf 100644 --- a/cpp/src/IcePack/Parser.cpp +++ b/cpp/src/IcePack/Parser.cpp @@ -146,8 +146,12 @@ IcePack::Parser::getInput(char* buf, int& result, int maxSize) } else { +#ifdef WIN32 // COMPILERBUG: Stupid Visual C++ defined min and max as macros result = _MIN(maxSize, static_cast<int>(_commands.length())); +#else + result = min(maxSize, static_cast<int>(_commands.length())); +#endif strncpy(buf, _commands.c_str(), result); _commands.erase(0, result); if (_commands.empty()) diff --git a/cpp/src/IcePack/Parser.h b/cpp/src/IcePack/Parser.h index 4d97895d8f6..514fe78cdad 100644 --- a/cpp/src/IcePack/Parser.h +++ b/cpp/src/IcePack/Parser.h @@ -64,7 +64,7 @@ public: void getAll(); void shutdown(); - void getInput(char*, int, int); + void getInput(char*, int&, int); void nextLine(); void continueLine(); char* getPrompt(); @@ -83,7 +83,7 @@ private: Parser(const Ice::CommunicatorPtr&, const IcePack::AdminPrx&); - const char* _commands; + std::string _commands; Ice::CommunicatorPtr _communicator; IcePack::AdminPrx _admin; bool _continue; |