diff --git a/ChangeLog b/ChangeLog index bd85ad90..a88ce448 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-12-11 Jay Berkenbilt + + * qpdf/qpdf.cc (main): Accept -help and -version as well as --help + and --version + 2008-11-23 Jay Berkenbilt * Include stdio.h in a few files for proper compilation with (yet diff --git a/qpdf/qpdf.cc b/qpdf/qpdf.cc index b95b9ca8..06d41ece 100644 --- a/qpdf/qpdf.cc +++ b/qpdf/qpdf.cc @@ -436,7 +436,9 @@ int main(int argc, char* argv[]) whoami += 3; } - if ((argc == 2) && (strcmp(argv[1], "--version") == 0)) + if ((argc == 2) && + ((strcmp(argv[1], "--version") == 0) || + (strcmp(argv[1], "-version") == 0))) { // make_dist looks for the line of code here that actually // prints the version number, so read make_dist if you change @@ -459,7 +461,9 @@ int main(int argc, char* argv[]) exit(0); } - if ((argc == 2) && (strcmp(argv[1], "--help") == 0)) + if ((argc == 2) && + ((strcmp(argv[1], "--help") == 0) || + (strcmp(argv[1], "-help") == 0))) { std::cout << help; exit(0);