diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-09-29 12:40:48 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2010-09-29 12:40:48 +0200 |
commit | 2626419da67577161eaacd6927bc91b6474b0691 (patch) | |
tree | 5aebe7c9c03ab5c62f6accdc15d6a8ebdb6d9d79 | |
parent | a5abceccb2df8931456277f6f572c3dbbe6d8962 (diff) | |
download | spice-2626419da67577161eaacd6927bc91b6474b0691.tar.gz spice-2626419da67577161eaacd6927bc91b6474b0691.tar.xz spice-2626419da67577161eaacd6927bc91b6474b0691.zip |
client: Don't use basename for argv[0] in --help output
This isn't what other apps do, and it had issues in the OSX port,
so just remove this.
-rw-r--r-- | client/cmd_line_parser.cpp | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/client/cmd_line_parser.cpp b/client/cmd_line_parser.cpp index ef72dba4..3f45551b 100644 --- a/client/cmd_line_parser.cpp +++ b/client/cmd_line_parser.cpp @@ -428,29 +428,13 @@ char* CmdLineParser::next_argument() return _argv[optind++]; } -#ifdef WIN32 -char* basename(char *str) -{ - char *base; - if ((base = strrchr(str, '\\'))) { - return base; - } - - if ((base = strrchr(str, ':'))) { - return base; - } - return str; -} - -#endif - void CmdLineParser::show_help() { static const int HELP_START_POS = 30; static const int HELP_WIDTH = 80 - HELP_START_POS; std::ostringstream os; - os << basename(_argv[0]) << " - " << _description.c_str() << "\n\noptions:\n\n"; + os << _argv[0] << " - " << _description.c_str() << "\n\noptions:\n\n"; Options::iterator iter = _options.begin(); for (; iter != _options.end(); ++iter) { |