diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2017-10-21 18:23:07 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2017-10-21 18:23:07 +0000 |
commit | a5fb397b3ab3ac6b2c17c72598036bedbdca1816 (patch) | |
tree | cafd05c53b4bdbf58cefe40619946ab7262ee052 /converter/ppm/sldtoppm.c | |
parent | 8b2ff6a4ae59c1ab37af590a7340656f93dbddee (diff) | |
download | netpbm-mirror-a5fb397b3ab3ac6b2c17c72598036bedbdca1816.tar.gz netpbm-mirror-a5fb397b3ab3ac6b2c17c72598036bedbdca1816.tar.xz netpbm-mirror-a5fb397b3ab3ac6b2c17c72598036bedbdca1816.zip |
Release 10.80.01
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@3090 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/ppm/sldtoppm.c')
-rw-r--r-- | converter/ppm/sldtoppm.c | 36 |
1 files changed, 18 insertions, 18 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 |