[poppler] utils/pdffonts.cc utils/pdfimages.cc utils/pdfinfo.cc utils/pdftoppm.cc utils/pdftops.cc utils/pdftotext.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Sun Dec 12 15:29:11 PST 2010


 utils/pdffonts.cc  |    2 ++
 utils/pdfimages.cc |    2 ++
 utils/pdfinfo.cc   |    3 +++
 utils/pdftoppm.cc  |    2 ++
 utils/pdftops.cc   |    5 ++++-
 utils/pdftotext.cc |    3 +++
 6 files changed, 16 insertions(+), 1 deletion(-)

New commits:
commit 7313e0a4de6f2146c1dcb3d235f18a3c844d12d5
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sun Dec 12 23:28:18 2010 +0000

    Do not return 99 (or 1) with -h, -v and -printenc
    
    Bug 32149

diff --git a/utils/pdffonts.cc b/utils/pdffonts.cc
index e3d8960..f2e49e5 100644
--- a/utils/pdffonts.cc
+++ b/utils/pdffonts.cc
@@ -100,6 +100,8 @@ int main(int argc, char *argv[]) {
     if (!printVersion) {
       printUsage("pdffonts", "<PDF-file>", argDesc);
     }
+    if (printVersion || printHelp)
+      exitCode = 0;
     goto err0;
   }
   fileName = new GooString(argv[1]);
diff --git a/utils/pdfimages.cc b/utils/pdfimages.cc
index d9d0d55..ac47331 100644
--- a/utils/pdfimages.cc
+++ b/utils/pdfimages.cc
@@ -104,6 +104,8 @@ int main(int argc, char *argv[]) {
     if (!printVersion) {
       printUsage("pdfimages", "<PDF-file> <image-root>", argDesc);
     }
+    if (printVersion || printHelp)
+      exitCode = 0;
     goto err0;
   }
   fileName = new GooString(argv[1]);
diff --git a/utils/pdfinfo.cc b/utils/pdfinfo.cc
index a94e4e8..c9b4c58 100644
--- a/utils/pdfinfo.cc
+++ b/utils/pdfinfo.cc
@@ -123,6 +123,8 @@ int main(int argc, char *argv[]) {
     if (!printVersion) {
       printUsage("pdfinfo", "<PDF-file>", argDesc);
     }
+    if (printVersion || printHelp)
+      exitCode = 0;
     goto err0;
   }
 
@@ -132,6 +134,7 @@ int main(int argc, char *argv[]) {
   if (printEnc) {
     printEncodings();
     delete globalParams;
+    exitCode = 0;
     goto err0;
   }
 
diff --git a/utils/pdftoppm.cc b/utils/pdftoppm.cc
index c4cc43b..f600e5b 100644
--- a/utils/pdftoppm.cc
+++ b/utils/pdftoppm.cc
@@ -242,6 +242,8 @@ int main(int argc, char *argv[]) {
     if (!printVersion) {
       printUsage("pdftoppm", "[PDF-file [PPM-file-prefix]]", argDesc);
     }
+    if (printVersion || printHelp)
+      exitCode = 0;
     goto err0;
   }
   if (argc > 1) fileName = new GooString(argv[1]);
diff --git a/utils/pdftops.cc b/utils/pdftops.cc
index 2807b6b..1ef2342 100644
--- a/utils/pdftops.cc
+++ b/utils/pdftops.cc
@@ -202,7 +202,10 @@ int main(int argc, char *argv[]) {
     if (!printVersion) {
       printUsage("pdftops", "<PDF-file> [<PS-file>]", argDesc);
     }
-    exit(1);
+    if (printVersion || printHelp)
+      exit(0);
+    else
+      exit(1);
   }
   if ((level1 ? 1 : 0) +
       (level1Sep ? 1 : 0) +
diff --git a/utils/pdftotext.cc b/utils/pdftotext.cc
index b189e84..4d5cd09 100644
--- a/utils/pdftotext.cc
+++ b/utils/pdftotext.cc
@@ -178,6 +178,8 @@ int main(int argc, char *argv[]) {
     if (!printVersion) {
       printUsage("pdftotext", "<PDF-file> [<text-file>]", argDesc);
     }
+    if (printVersion || printHelp)
+      exitCode = 0;
     goto err0;
   }
 
@@ -187,6 +189,7 @@ int main(int argc, char *argv[]) {
   if (printEnc) {
     printEncodings();
     delete globalParams;
+    exitCode = 0;
     goto err0;
   }
 


More information about the poppler mailing list