diff options
author | Juergen Schmidt <jsc@openoffice.org> | 2011-02-24 10:51:05 +0100 |
---|---|---|
committer | Juergen Schmidt <jsc@openoffice.org> | 2011-02-24 10:51:05 +0100 |
commit | 228e4d2915a12802bf08303b750494c0f88e3d4a (patch) | |
tree | 30271fdfdc36b04e0c6b29ba74f7947501faaafa /idlc | |
parent | 35c319c209f34e62cebd0193693727c30795c8cc (diff) |
jsc340: i114847: fix name
Diffstat (limited to 'idlc')
-rw-r--r-- | idlc/source/options.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
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: <cstring>*/ <string.h> #include <idlc/options.hxx> +#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; |