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 | 20cd92276aa3ceac492f79f47a61069e61e8925f (patch) | |
tree | 7fb78664e8f23097eb27cd909162c45a585ffb80 /idlc | |
parent | ad04d9f3569677ea3f740709c5beb9ce3355b769 (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 e1ec5dfb9..84bba469c 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; |