Skip to content

Commit

Permalink
Improve command line option processing
Browse files Browse the repository at this point in the history
  • Loading branch information
rasa committed Feb 22, 2015
1 parent dbf104e commit 37d9d37
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## 1.0 (20-Feb-2015)

* Workaround buggy getopt implementation
* Improve command line option processing
* Updated to Visual Studio 2013
* Switch to MIT license

Expand Down
6 changes: 3 additions & 3 deletions time_it.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -781,10 +781,10 @@ int main(int argc, char * argv[]) {
case '?': /* -? | --help Show this help message and quit */
++opt.help;
break;
case ':':
fprintf(stderr, "Option -%c requires an operand\n", optopt);
// fallthrough
default:
if (optarg) {
fprintf(stderr, "Invalid option: '%s'\n", optarg);
}
usage(1);
}
}
Expand Down

0 comments on commit 37d9d37

Please sign in to comment.