diff options
author | Bernard Normier <bernard@zeroc.com> | 2004-05-10 20:09:58 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2004-05-10 20:09:58 +0000 |
commit | 090ec4ccf45fbde8456e97b6dc099391005079d2 (patch) | |
tree | 44b503f7ca07815c6fec905687c85bc921500f8f /cpp/src/IceStorm/Parser.cpp | |
parent | Added slice2cs to the "all" project and fixed a header file bug. (diff) | |
download | ice-090ec4ccf45fbde8456e97b6dc099391005079d2.tar.bz2 ice-090ec4ccf45fbde8456e97b6dc099391005079d2.tar.xz ice-090ec4ccf45fbde8456e97b6dc099391005079d2.zip |
Added banner and show commands to icepackadmin and icestormadmin
Diffstat (limited to 'cpp/src/IceStorm/Parser.cpp')
-rw-r--r-- | cpp/src/IceStorm/Parser.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/cpp/src/IceStorm/Parser.cpp b/cpp/src/IceStorm/Parser.cpp index bd238b8846d..2175b72d94f 100644 --- a/cpp/src/IceStorm/Parser.cpp +++ b/cpp/src/IceStorm/Parser.cpp @@ -17,6 +17,10 @@ #include <IceStorm/WeightedGraph.h> #include <algorithm> +#ifdef GPL_BUILD +# include <IcePack/GPL.h> +#endif + #ifdef HAVE_READLINE # include <readline/readline.h> # include <readline/history.h> @@ -54,6 +58,10 @@ Parser::usage() "unlink FROM TO Unlink TO from FROM.\n" "graph DATA COST Construct the link graph as described in DATA with COST\n" "list [TOPICS] Display information on TOPICS or all topics.\n" +#ifdef GPL_BUILD + "show copying Show conditions for redistributing copies of this program.\n" + "show warranty Show the warranty for this program.\n" +#endif ; } @@ -380,6 +388,35 @@ Parser::graph(const list<string>& _args) } void +Parser::showBanner() +{ + cout << "Ice " << ICE_STRING_VERSION << " Copyright 2003-2004 ZeroC, Inc." << endl; +#ifdef GPL_BUILD + cout << gplBanner << endl; +#endif +} + +void +Parser::showCopying() +{ +#if defined(GPL_BUILD) + cout << gplCopying << endl; +#else + cout << "This command is not implemented yet." << endl; +#endif +} + +void +Parser::showWarranty() +{ +#if defined(GPL_BUILD) + cout << gplWarranty << endl; +#else + cout << "This command is not implemented yet." << endl; +#endif +} + +void Parser::getInput(char* buf, int& result, int maxSize) { if(!_commands.empty()) |