From aedffa791e2c28eccf2534eba50b82c3b38fba8b Mon Sep 17 00:00:00 2001 From: pixel Date: Sun, 2 May 2004 00:41:38 +0000 Subject: Final features in cd-tool. --- cd-tool.cpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'cd-tool.cpp') diff --git a/cd-tool.cpp b/cd-tool.cpp index efb7bfd..8b4102c 100644 --- a/cd-tool.cpp +++ b/cd-tool.cpp @@ -17,7 +17,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: cd-tool.cpp,v 1.26 2004-05-01 11:48:57 pixel Exp $ */ +/* $Id: cd-tool.cpp,v 1.27 2004-05-02 00:41:38 pixel Exp $ */ + +#define VERSION "0.5" #include #include "Input.h" @@ -118,8 +120,8 @@ enum cdtool_functions_t { }; struct lua_functypes_t cdtool_functions[] = { - { CDTOOL_PRINT, "print", 0, 1, { LUA_STRING } }, - { CDTOOL_PRINTN, "printn", 1, 1, { LUA_STRING } }, + { CDTOOL_PRINT, "print", 0, 1, { LUA_ANY } }, + { CDTOOL_PRINTN, "printn", 1, 1, { LUA_ANY } }, { CDTOOL_QUIT, "quit", 0, 0, 0 }, { CDTOOL_EXIT, "exit", 0, 0, 0 }, { CDTOOL_INFOS, "infos", 0, 1, { LUA_OBJECT } }, @@ -268,6 +270,13 @@ Lua * start_full_lua(void) { return L; } +void showbanner() { + printm(M_BARE, +"CD-Tool version " VERSION " (c) 2003-2004 Nicolas \"Pixel\" Noble\n" +"This is free software with ABSOLUTELY NO WARRANTY.\n" +"\n"); +} + void showhelp(bool longhelp = false) { printm(M_BARE, "Usage:\n" @@ -284,7 +293,7 @@ void showhelp(bool longhelp = false) { " -i to start interactive mode.\n" " -l to turn off the exec on end line.\n" " -e to execute this single command in LUA.\n" -" -h for this help page.\n" +" -h for a help page.\n" , argv[0]); if (longhelp) @@ -333,6 +342,8 @@ virtual int startup() throw (GeneralException) { int pos; verbosity = M_STATUS; + + showbanner(); /* Let's start parsing options */ @@ -341,7 +352,7 @@ virtual int startup() throw (GeneralException) { case 'h': case 'H': case '?': - showhelp(); + showhelp(true); throw Exit(0); case 'v': verbosity = M_INFO; -- cgit v1.2.3