diff options
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()) |