summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorTor Andersson <tor@ghostscript.com>2010-07-17 11:48:11 +0000
committerTor Andersson <tor@ghostscript.com>2010-07-17 11:48:11 +0000
commit5de6910dd12025185e15fb483d5047c399212423 (patch)
treebcc67d97e60b410f2cadc11249e224984376ea37 /apps
parentde57fd12183a63235b46386c5be38e83212b635d (diff)
downloadmupdf-5de6910dd12025185e15fb483d5047c399212423.tar.xz
Minor edits.
Diffstat (limited to 'apps')
-rw-r--r--apps/pdfclean.c10
-rw-r--r--apps/pdfdraw.c6
2 files changed, 11 insertions, 5 deletions
diff --git a/apps/pdfclean.c b/apps/pdfclean.c
index f3e57ed5..f3f1e202 100644
--- a/apps/pdfclean.c
+++ b/apps/pdfclean.c
@@ -210,8 +210,10 @@ static void removeduplicateobjs(void)
{
fz_obj *a, *b;
- /* pdf_isstream() calls pdf_cacheobject() and thus
- ensures that the objects are in xref afterwards. */
+ /*
+ pdf_isstream calls pdf_cacheobject and ensures
+ that the xref table has the objects loaded
+ */
if (num == other ||
pdf_isstream(xref, num, 0) ||
pdf_isstream(xref, other, 0))
@@ -271,9 +273,7 @@ static void retainpages(int argc, char **argv)
fz_dropobj(pages);
fz_dropobj(type);
- /* Create a new kids array too add into pages dict
- * since each element must be replaced to point to
- * a retained page */
+ /* Create a new kids array with only the pages we want to keep. */
kids = fz_newarray(1);
count = 0;
diff --git a/apps/pdfdraw.c b/apps/pdfdraw.c
index e0003246..cf2a2d45 100644
--- a/apps/pdfdraw.c
+++ b/apps/pdfdraw.c
@@ -287,6 +287,12 @@ int main(int argc, char **argv)
if (fz_optind == argc)
usage();
+ if (!showtext && !showxml && !showtime && !showmd5 && !output)
+ {
+ printf("nothing to do\n");
+ exit(0);
+ }
+
if (accelerate)
fz_accelerate();