about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--converter/ppm/sldtoppm.c36
-rw-r--r--doc/HISTORY9
-rw-r--r--version.mk2
3 files changed, 28 insertions, 19 deletions
diff --git a/converter/ppm/sldtoppm.c b/converter/ppm/sldtoppm.c
index 6ba4cb40..707f6d6f 100644
--- a/converter/ppm/sldtoppm.c
+++ b/converter/ppm/sldtoppm.c
@@ -210,27 +210,27 @@ slidefind(const char * const sname,
             eof = true;
         else if (strlen((char *)libent) == 0)
             eof = true;
-    }
-    if (!eof) {
-        pos += 36;
-        if (dironly) {
-            pm_message("  %s", libent);
-        } else if (streq((char *)libent, uname)) {
-            long dpos;
-
-            dpos = (((((libent[35] << 8) | libent[34]) << 8) |
-                     libent[33]) << 8) | libent[32];
-
-            if ((slfile == stdin) || (fseek(slfile, dpos, 0) == -1)) {
-                dpos -= pos;
+
+        if (!eof) {
+            pos += 36;
+            if (dironly) {
+                pm_message("  %s", libent);
+            } else if (streq((char *)libent, uname)) {
+                long dpos;
+
+                dpos = (((((libent[35] << 8) | libent[34]) << 8) |
+                         libent[33]) << 8) | libent[32];
         
-                while (dpos-- > 0)
-                    getc(slfile);
+                if ((slfile == stdin) || (fseek(slfile, dpos, 0) == -1)) {
+                    dpos -= pos;
+
+                    while (dpos-- > 0)
+                        getc(slfile);
+                }
+                found = true;
             }
-            found = true;
         }
     }
-
     if (!found && !dironly)
         pm_error("slide '%s' not in library.", sname);
 }
@@ -350,7 +350,7 @@ slider(slvecfn   slvec,
 
     /* Verify that slide format is compatible with this program. */
 
-    if (streq(slfrof.slh, slhi.slh))
+    if (!streq(slfrof.slh, slhi.slh))
         pm_error("this is not an AutoCAD slide file.");
 
     /* Verify that the number format and file level in the header  are
diff --git a/doc/HISTORY b/doc/HISTORY
index d54b89be..69948c09 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -4,6 +4,15 @@ Netpbm.
 CHANGE HISTORY 
 --------------
 
+17.10.21 BJH  Release 10.81.00
+
+              sldtoppm: -lib and -dir don't work - always says slide not
+              found.  Broken in Netpbm 10.63 (June 2013).
+
+              sldtoppm: fix bug: says AutoCAD slide file isn't an AutoCAD
+              slide file.  Broken after Netpbm 10.26 (January 2005), but no
+              later than 10.35 (August 2006).
+
 17.09.30 BJH  Release 10.80.00
 
               pnmtopalm: Refuse to create a compressed image with more than 8
diff --git a/version.mk b/version.mk
index 04bdfba1..534a65b2 100644
--- a/version.mk
+++ b/version.mk
@@ -1,3 +1,3 @@
 NETPBM_MAJOR_RELEASE = 10
 NETPBM_MINOR_RELEASE = 80
-NETPBM_POINT_RELEASE = 0
+NETPBM_POINT_RELEASE = 1