2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 02:49:00 +00:00

-help and -version

git-svn-id: svn+q:///qpdf/trunk@643 71b93d88-0707-0410-a8cf-f5a4172ac649
This commit is contained in:
Jay Berkenbilt 2008-12-12 03:17:25 +00:00
parent 07dc592182
commit caad089789
2 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2008-12-11 Jay Berkenbilt <ejb@ql.org>
* qpdf/qpdf.cc (main): Accept -help and -version as well as --help
and --version
2008-11-23 Jay Berkenbilt <ejb@ql.org>
* Include stdio.h in a few files for proper compilation with (yet

View File

@ -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);