From f3de0f63df974b9ca01817d46d5fc8c831f72918 Mon Sep 17 00:00:00 2001 From: Juergen Schmidt Date: Fri, 1 Oct 2010 14:20:45 +0200 Subject: jsc340: i14847: clean up cmdline help fo devtools --- idlc/source/options.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'idlc') diff --git a/idlc/source/options.cxx b/idlc/source/options.cxx index c90bce43b3bc..a115a2262fe1 100644 --- a/idlc/source/options.cxx +++ b/idlc/source/options.cxx @@ -343,8 +343,8 @@ OString Options::prepareHelp() OString Options::prepareVersion() { - OString version("\nSun Microsystems (R) "); - version += m_program + " Version 1.1\n\n"; + OString version(m_program); + version += " Version 1.1\n\n"; return version; } -- cgit From 228e4d2915a12802bf08303b750494c0f88e3d4a Mon Sep 17 00:00:00 2001 From: Juergen Schmidt Date: Thu, 24 Feb 2011 10:51:05 +0100 Subject: jsc340: i114847: fix name --- idlc/source/options.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'idlc') diff --git a/idlc/source/options.cxx b/idlc/source/options.cxx index a115a2262fe1..edf8648c31c3 100644 --- a/idlc/source/options.cxx +++ b/idlc/source/options.cxx @@ -32,6 +32,12 @@ #include /*MSVC trouble: */ #include +#ifdef SAL_UNX +#define SEPARATOR '/' +#else +#define SEPARATOR '\\' +#endif + using namespace rtl; Options::Options(): m_stdin(false), m_verbose(false), m_quiet(false) @@ -52,7 +58,9 @@ sal_Bool Options::initOptions(int ac, char* av[], sal_Bool bCmdFile) { bCmdFile = sal_True; - m_program = av[0]; + OString name(av[0]); + sal_Int32 index = name.lastIndexOf(SEPARATOR); + m_program = name.copy((index > 0 ? index+1 : 0)); if (ac < 2) { @@ -335,7 +343,7 @@ OString Options::prepareHelp() help += " requirements.\n"; help += " -w = display warning messages.\n"; help += " -we = treat warnings as errors.\n"; - help += " -h|-? = print this help message and exit.\n"; + help += " -h|-? = print this help message and exit.\n\n"; help += prepareVersion(); return help; -- cgit