home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume23 / pbmplus / part01 next >
Encoding:
Text File  |  1991-10-16  |  57.0 KB  |  1,404 lines

  1. Newsgroups: comp.sources.misc
  2. From: jef@well.sf.ca.us (Jef Poskanzer)
  3. Subject:  REPOST: v23i036:  pbmplus - Extended Portable Bitmap Toolkit, Part01/24
  4. Message-ID: <1991Oct15.015451.16314@sparky.imd.sterling.com>
  5. X-Md4-Signature: 6af94d7cfa30f80c75087ba750b38c52
  6. Date: Tue, 15 Oct 1991 01:54:51 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: jef@well.sf.ca.us (Jef Poskanzer)
  10. Posting-number: Volume 23, Issue 36
  11. Archive-name: pbmplus/part01
  12. Environment: UNIX
  13.  
  14.                   Extended Portable Bitmap Toolkit
  15.                       Distribution of 27sep91
  16.                    Previous distribution 05feb91
  17.  
  18. PBMPLUS is a toolkit for converting various image formats to and from
  19. portable formats, and therefore to and from each other.  The idea is,
  20. if you want to convert among N image formats, you only need 2*N
  21. conversion filters, instead of the N^2 you would need if you wrote each
  22. one separately.
  23.  
  24. In addition to the converters, the package includes some simple tools
  25. for manipulating the portable formats.
  26.  
  27. The package is broken up into four parts.  First is PBM, for bitmaps (1
  28. bit per pixel).  Then there is PGM, for grayscale images.  Next is PPM,
  29. for full-color images.  Last, there is PNM, which does content-independent
  30. manipulations on any of the three internal formats, and also handles
  31. external formats that have multiple types.
  32.  
  33. The parts are upwards compatible: PGM reads both PGM and PBM files and
  34. writes PGM; PPM reads all three and writes PPM; and PNM reads all three
  35. and writes, usually, the same type as it read.  Whenever PNM makes an
  36. exception and "promotes" a file to a higher format, it lets you know.
  37.  
  38. I've tested this stuff under SysV and BSD, on Sun 3's 4's and 386's and
  39. Sequents and Vaxen and HPs, with cc and gcc.  Nevertheless, I'm sure bugs
  40. remain, and portability to systems like Amigas and IBM compatibles is
  41. an interesting question.  Feedback is welcome; send bug reports,
  42. enhancements, etc. to this address:
  43.  
  44.     jef@well.sf.ca.us
  45.     {apple, ucbvax}!well!jef
  46.  
  47. When sending bug reports, always include the output from running any
  48. PBMPLUS program with the -version flag.  Also include the type of
  49. system you are on, what compiler you used, and whether you are using
  50. Makefiles or Imakefiles.  I try to respond to bug reports and enhancements
  51. promptly; say, within a week.
  52.  
  53. Finally, if you have access to Usenet, there's a newsgroup called
  54. alt.graphics.pixutils which is specifically for discussion of image
  55. conversion and editing packages such as PBMPLUS.  Posting stuff there
  56. is even better than mailing it to me, since it lets other people help
  57. out with the answers.
  58. -----
  59. #! /bin/sh
  60. # This is a shell archive, meaning:
  61. # 1. Remove everything above the #! /bin/sh line.
  62. # 2. Save the resulting text in a file.
  63. # 3. Execute the file with /bin/sh (not csh) to create the files:
  64. #    README
  65. #    CHANGES
  66. #    TODO
  67. #    FORMATS
  68. #    OTHER.SYSTEMS
  69. #    Imakefile
  70. #    Makefile
  71. #    pbmplus.h
  72. #    version.h
  73. #    compat.csh
  74. #    compat.ksh
  75. #    magic
  76. # This archive created: Fri Sep 27 17:50:01 1991
  77. # By:    Jef Poskanzer (Acme Software)
  78. export PATH; PATH=/bin:$PATH
  79. echo shar: extracting "'README'" '(15344 characters)'
  80. if test -f 'README'
  81. then
  82.     echo shar: will not over-write existing file "'README'"
  83. else
  84. sed 's/^X//' << \SHAR_EOF > 'README'
  85. X                  Extended Portable Bitmap Toolkit
  86. X                      Distribution of 27sep91
  87. X                   Previous distribution 05feb91
  88. X
  89. X
  90. XPBMPLUS is a toolkit for converting various image formats to and from
  91. Xportable formats, and therefore to and from each other.  The idea is,
  92. Xif you want to convert among N image formats, you only need 2*N
  93. Xconversion filters, instead of the N^2 you would need if you wrote each
  94. Xone separately.
  95. X
  96. XIn addition to the converters, the package includes some simple tools
  97. Xfor manipulating the portable formats.
  98. X
  99. XThe package is broken up into four parts.  First is PBM, for bitmaps (1
  100. Xbit per pixel).  Then there is PGM, for grayscale images.  Next is PPM,
  101. Xfor full-color images.  Last, there is PNM, which does content-independent
  102. Xmanipulations on any of the three internal formats, and also handles
  103. Xexternal formats that have multiple types.
  104. X
  105. XThe parts are upwards compatible: PGM reads both PGM and PBM files and
  106. Xwrites PGM; PPM reads all three and writes PPM; and PNM reads all three
  107. Xand writes, usually, the same type as it read.  Whenever PNM makes an
  108. Xexception and "promotes" a file to a higher format, it lets you know.
  109. X
  110. X
  111. XINSTALLATION
  112. X
  113. X    Unpack the files.
  114. X    Decide whether you want to use Imakefiles or Makefiles.  If you want
  115. X      to use Makefiles:
  116. X
  117. X    Edit the top-level Makefile, find each line with the string
  118. X      "CONFIGURE", and follow the directions for setting configuration
  119. X      options.
  120. X    Likewise edit pbmplus.h.
  121. X    If you are using gnu make, you have to edit *all* the Makefiles
  122. X      and remove all the imake stuff at the ends, otherwise gnu make
  123. X      will overwrite the Makefiles.
  124. X    Make.
  125. X    When you're happy that things compiled ok, make install.
  126. X    
  127. X    The Imakefiles are pretty minimal, but if you want to use them anyway:
  128. X
  129. X    Edit pbmplus.h, find each line with the string "CONFIGURE", and
  130. X      follow the directions for setting configuration options.
  131. X    Save the original Makefiles, in case you later want to switch back
  132. X      to using them.
  133. X    The usual X11 sequence of xmkmf, make Makefiles, make depend, then
  134. X      make should work.
  135. X    When you're happy that things compiled ok, make install and
  136. X      make install.man.
  137. X
  138. XAfter installing the manual pages, you may want to create the "whatis"
  139. Xfile by doing a catman -w -M <directory>, or whatever the equivalent is
  140. Xon your system.
  141. X
  142. X
  143. XSUPPORT
  144. X
  145. XI've tested this stuff under SysV and BSD, on Sun 3's 4's and 386's and
  146. XSequents and Vaxen and HPs, with cc and gcc.  Nevertheless, I'm sure bugs
  147. Xremain, and portability to systems like Amigas and IBM compatibles is
  148. Xan interesting question.  Feedback is welcome; send bug reports,
  149. Xenhancements, etc. to this address:
  150. X
  151. X    jef@well.sf.ca.us
  152. X    {apple, ucbvax}!well!jef
  153. X
  154. XWhen sending bug reports, always include the output from running any
  155. XPBMPLUS program with the -version flag.  Also include the type of
  156. Xsystem you are on, what compiler you used, and whether you are using
  157. XMakefiles or Imakefiles.  I try to respond to bug reports and enhancements
  158. Xpromptly; say, within a week.
  159. X
  160. XAlso, if there is a new format or feature you would like to have added
  161. Xto the package, feel free to drop me a line.  If it's a format, include
  162. Xwhatever documentation you have, and if possible a uuencoded sample.
  163. XMy response time will depend on how busy I am, and how easy the job
  164. Xlooks.  If you need it right away, or it's a complicated job, you might
  165. Xconsider paying me; lately, that's how a lot of work on the package has
  166. Xgotten done.
  167. X
  168. XFinally, if you have access to Usenet, there's a newsgroup called
  169. Xalt.graphics.pixutils which is specifically for discussion of image
  170. Xconversion and editing packages such as PBMPLUS.  Posting stuff there
  171. Xis even better than mailing it to me, since it lets other people help
  172. Xout with the answers.
  173. X
  174. X
  175. XHOW TO FIND THE RIGHT CONVERTER
  176. X
  177. XSome people get confused by all the different names.  If you want to
  178. Xconvert a pbm file to a Sun raster file, is it pbmtorast, pgmtorast,
  179. Xppmtorast, or pnmtorast?  In this case some of the confusion might be
  180. Xbecause previous versions of the package did in fact have both
  181. Xpbmtorast and ppmtorast.  But mostly it's just too many different
  182. Xthings to hold in your short term memory.  Fine, so don't even try to
  183. Xremember what's what.  That's what computers are for.  Unix, at least
  184. XBSD Unix, has this great indexing feature on the "man" program.  You
  185. Xsay "man -k <keyword>" and it gives you all the one-line descriptions
  186. Xwith that keyword in them.  All the PBMPLUS man pages have nice useful
  187. Xone-line descriptions, that mention all the relevant keywords.  Try it,
  188. Xyou'll like it.
  189. X
  190. X
  191. XCOPYRIGHTS
  192. X
  193. XAll the software in this package, whether by me or by a contributer,
  194. Xhas a copyright similar to this one:
  195. X
  196. X    Permission to use, copy, modify, and distribute this software and its
  197. X    documentation for any purpose and without fee is hereby granted, provided
  198. X    that the above copyright notice appear in all copies and that both that
  199. X    copyright notice and this permission notice appear in supporting
  200. X    documentation.  This software is provided "as is" without express or
  201. X    implied warranty.
  202. X
  203. XMany people get confused by this legalese, especially the part about
  204. X"without fee".  Does this mean you can't charge for any product that
  205. Xuses PBMPLUS?  No.  All it means is that you don't have to pay me.
  206. XYou can do what you want with this software.  Build it into your
  207. Xpackage, steal code from it, whatever.  Just be sure to let people
  208. Xknow where it came from.
  209. X
  210. X
  211. XCONTENTS
  212. X
  213. XFiles in pbmplus.shar:
  214. X
  215. X    README        this
  216. X    CHANGES        list of changes between the various versions of PBM
  217. X    TODO        list of things still to be done
  218. X    FORMATS        list of the formats supported
  219. X    OTHER.SYSTEMS    list of other free image-processing software
  220. X    Makefile        guess
  221. X    Imakefile        for X11-type installations
  222. X    pbmplus.h        header file for PBM, PGM, PPM, and PNM
  223. X
  224. X    compat.csh        csh script for compatibility with old versions
  225. X    compat.ksh        ksh script for compatibility with old versions
  226. X    magic        additions for /etc/magic to recognize some image formats
  227. X
  228. XFiles in pbm.shar?:
  229. X
  230. X    Makefile        guess
  231. X    Imakefile        for X11-type installations
  232. X
  233. X    atktopbm.c        convert Andrew Toolkit raster object to portable bitmap
  234. X    brushtopbm.c    convert Xerox doodle brushes to portable bitmap
  235. X    cmuwmtopbm.c    convert CMU window manager format to portable bitmap
  236. X    g3topbm.c        convert Group 3 FAX to portable bitmap
  237. X    icontopbm.c        convert Sun icon to portable bitmap
  238. X    gemtopbm.c        convert GEM .img format to portable bitmap
  239. X    macptopbm.c        convert MacPaint to portable bitmap
  240. X    mgrtopbm.c        convert MGR format to portable bitmap
  241. X    pi3topbm.c        convert Atari Degas .pi3 to portable bitmap
  242. X    xbmtopbm.c        convert X10 or X11 bitmap to portable bitmap
  243. X    ybmtopbm.c        convert Bennet Yee "face" file into portable bitmap
  244. X
  245. X    pbmto10x.c        convert portable bitmap to Gemini 10x printer graphics
  246. X    pbmtoascii.c    convert portable bitmap to ASCII graphic form
  247. X    pbmtoatk.c        convert portable bitmap to Andrew Toolkit raster object
  248. X    pbmtobbnbg.c    convert portable bitmap to BBN BitGraph graphics
  249. X    pbmtocmuwm.c    convert portable bitmap to CMU window manager format
  250. X    pbmtoepson.c    convert portable bitmap to Epson printer graphics
  251. X    pbmtog3.c        convert portable bitmap to Group 3 FAX
  252. X    pbmtogem.c        convert portable bitmap into GEM .img file
  253. X    pbmtogo.c        convert portable bitmap to GraphOn graphics
  254. X    pbmtoicon.c        convert portable bitmap to Sun icon
  255. X    pbmtolj.c        convert portable bitmap to HP LaserJet graphics
  256. X    pbmtomacp.c        convert portable bitmap to MacPaint
  257. X    pbmtomgr.c        convert portable bitmap to MGR format
  258. X    pbmtopi3.c        convert portable bitmap to Atari Degas .pi3
  259. X    pbmtoplot.c        convert portable bitmap into Unix plot(5) file
  260. X    pbmtoptx.c        convert portable bitmap to Printronix graphics
  261. X    pbmtoxbm.c        convert portable bitmap to X11 bitmap
  262. X    pbmtox10bm.c    convert portable bitmap to X10 bitmap
  263. X    pbmtoybm.c        convert portable bitmap into Bennet Yee "face" file
  264. X    pbmtozinc.c        convert portable bitmap to Zinc Interface Library icon
  265. X
  266. X    pbmlife.c        apply Conway's rules of Life to a portable bitmap
  267. X    pbmmake.c        create a blank bitmap of a specified size
  268. X    pbmmask.c        create a mask bitmap from a regular bitmap
  269. X    pbmreduce.c        reduce a portable bitmap N times, using Floyd-Steinberg
  270. X    pbmtext.c        render text into a bitmap
  271. X    pbmupc.c        create a Universal Product Code bitmap
  272. X
  273. X    libpbm[1-5].c    a few utility routines
  274. X    pbmmerge.c        merge wrapper routine
  275. X    pbm.h        header file for libpbm
  276. X    pbmfont.h        header file for font routines in libpbm
  277. X    libpbm.h        internal header file for libpbm
  278. X    g3.h        definitions for Group 3 FAX
  279. X    macp.h        definitions for MacPaint files
  280. X    bitreverse.h    useful include file
  281. X    *.1            manual entries for all of the tools
  282. X    pbm.5        manual entry for the pbm format
  283. X    libpbm.3        manual entry for the pbm library
  284. X
  285. XFiles in pgm.shar?:
  286. X
  287. X    Makefile        guess
  288. X    Imakefile        for X11-type installations
  289. X
  290. X    fitstopgm.c        convert FITS format to portable graymap
  291. X    fstopgm.c        convert Usenix FaceSaver(tm) format to portable graymap
  292. X    hipstopgm.c        convert HIPS format to portable graymap
  293. X    lispmtopgm.c    convert a Lisp Machine bitmap file into pgm format
  294. X    psidtopgm.c        convert PostScript "image" data to portable graymap
  295. X    rawtopgm.c        convert raw grayscale bytes to portable graymap
  296. X
  297. X    pgmtofits.c        convert portable graymap to FITS format
  298. X    pgmtofs.c        convert portable graymap to Usenix FaceSaver(tm) format
  299. X    pgmtolispm.c    convert a portable graymap into Lisp Machine format
  300. X    pgmtopbm.c        convert portable graymap to portable bitmap
  301. X
  302. X    pgmbentley.c    Bentleyize a portable graymap
  303. X    pgmedge.c        edge-detect a portable graymap
  304. X    pgmenhance.c    edge-enhance a portable graymap
  305. X    pgmhist.c        print a histogram of the values in a portable graymap
  306. X    pgmnorm.c        normalize contrast in a portable graymap
  307. X    pgmoil.c        turn a portable graymap into an oil painting
  308. X    pgmramp.c        generate a grayscale ramp
  309. X    pgmtexture.c    calculate textural features on a portable graymap
  310. X
  311. X    libpgm[1-3].c    a few utility routines
  312. X    pgmmerge.c        merge wrapper routine
  313. X    pgm.h        header file for libpgm
  314. X    libpgm.h        internal header file for libpgm
  315. X    dithers.h        useful include file
  316. X    *.1            manual entries for all of the tools
  317. X    pgm.5        manual entry for the pgm format
  318. X    libpgm.3        manual entry for the pgm library
  319. X
  320. XFiles in ppm.shar?:
  321. X
  322. X    Makefile        guess
  323. X    Imakefile        for X11-type installations
  324. X
  325. X    giftoppm.c        convert GIF to portable pixmap
  326. X    gouldtoppm.c    convert Gould scanner file to portable pixmap
  327. X    ilbmtoppm.c        convert IFF ILBM to portable pixmap
  328. X    imgtoppm.c        convert Img-whatnot to portable pixmap
  329. X    mtvtoppm.c        convert MTV ray-tracer output to portable pixmap
  330. X    pcxtoppm.c        convert PC Paintbrush format to portable pixmap
  331. X    pgmtoppm.c        colorize a portable graymap into a portable pixmap
  332. X    pi1toppm.c        convert Atari Degas .pi1 to portable pixmap
  333. X    picttoppm.c        convert Macintosh PICT to portable pixmap
  334. X    pjtoppm.c        convert HP PaintJet file to portable pixmap
  335. X    qrttoppm.c        convert QRT ray-tracer output to portable pixmap
  336. X    rawtoppm.c        convert raw RGB bytes to portable pixmap
  337. X    rgb3toppm.c        combine three portable graymaps into one portable pixmap
  338. X    spctoppm.c        convert Atari compressed Spectrum to portable pixmap
  339. X    sputoppm.c        convert Atari uncompressed Spectrum to portable pixmap
  340. X    tgatoppm.c        convert TrueVision Targa file to portable pixmap
  341. X    ximtoppm.c        convert Xim to portable pixmap
  342. X    xpmtoppm.c        convert XPM format to portable pixmap
  343. X    yuvtoppm.c        convert Abekas YUV format to portable pixmap
  344. X
  345. X    ppmtogif.c        convert portable pixmap to GIF
  346. X    ppmtoicr.c        convert portable pixmap to NCSA ICR graphics
  347. X    ppmtoilbm.c        convert portable pixmap to IFF ILBM
  348. X    ppmtopcx.c        convert portable pixmap to PC Paintbrush format
  349. X    ppmtopgm.c        convert portable pixmap to portable graymap
  350. X    ppmtopi1.c        convert portable pixmap to Atari Degas .pi1
  351. X    ppmtopict.c        convert portable pixmap to Macintosh PICT
  352. X    ppmtopj.c        convert portable pixmap to HP PaintJet file
  353. X    ppmtopuzz.c        convert portable pixmap to X11 "puzzle" file
  354. X    ppmtorgb3.c        separate a portable pixmap into three portable graymaps
  355. X    ppmtosixel.c    convert portable pixmap to DEC sixel format
  356. X    ppmtotga.c        convert portable pixmap to TrueVision Targa file
  357. X    ppmtouil.c        convert portable pixmap to Motif UIL icon file
  358. X    ppmtoxpm.c        convert portable pixmap to XPM format
  359. X    ppmtoyuv.c        convert portable pixmap to Abekas YUV format
  360. X
  361. X    ppmdither.c        ordered dither for color images
  362. X    ppmhist.c        print a histogram of a portable pixmap
  363. X    ppmpat.c        create a pretty pixmap
  364. X    ppmquant.c        quantize colors down to a specified number
  365. X    ppmquantall        script to run ppmquant on a set of pixmaps
  366. X    ppmrelief.c        run a Laplacian Relief filter on a portable pixmap
  367. X
  368. X    libppm[1-5].c    a few utility routines
  369. X    ppmmerge.c        merge wrapper routine
  370. X    ppm.h        header file for libppm
  371. X    ppmcmap.h        header file for colormap routines in libppm
  372. X    ppmdraw.h        header file for simple drawing routines in libppm
  373. X    libppm.h        internal header file for libppm
  374. X    tga.h        definitions for TrueVision Targa files
  375. X    xim.h        definitions for Xim files
  376. X    *.1            manual entries for all of the tools
  377. X    ppm.5        manual entry for the ppm format
  378. X    libppm.3        manual entry for the ppm library
  379. X
  380. XFiles in pnm.shar?:
  381. X
  382. X    Makefile        guess
  383. X    Imakefile        for X11-type installations
  384. X
  385. X    anytopnm        script to attempt to convert any format to P?M
  386. X    rasttopnm.c        convert Sun raster file to portable anymap
  387. X    tifftopnm.c        convert TIFF file to portable anymap
  388. X    xwdtopnm.c        convert X10 or X11 window dump to portable anymap
  389. X
  390. X    pnmtops.c        convert portable anymap to PostScript
  391. X    pnmtorast.c        convert portable anymap to Sun raster file
  392. X    pnmtotiff.c        convert portable anymap to TIFF file
  393. X    pnmtoxwd.c        convert portable anymap to X11 window dump
  394. X
  395. X    pnmarith.c        perform arithmetic on two portable anymaps
  396. X    pnmcat.c        concatenate portable anymaps
  397. X    pnmconvol.c        general MxN convolution on a portable anymap
  398. X    pnmcrop.c        crop all like-colored borders off a portable anymap
  399. X    pnmcut.c        select a rectangular region from a portable anymap
  400. X    pnmdepth.c        change the maxval in a portable anymap
  401. X    pnmenlarge.c    enlarge a portable anymap N times
  402. X    pnmfile.c        describe a portable anymap
  403. X    pnmflip.c        perform one or more flip operations on a portable anymap
  404. X    pnmgamma.c        perform gamma correction on a portable anymap
  405. X    pnmindex        script to build a visual index of a bunch of anymaps
  406. X    pnminvert.c        invert a portable anymap
  407. X    pnmmargin        script to add a margin to a portable anymap
  408. X    pnmnoraw.c        force a portable anymap into ASCII format
  409. X    pnmpaste.c        paste a rectangle into a portable anymap
  410. X    pnmrotate.c        rotate a portable anymap
  411. X    pnmscale.c        scale a portable anymap
  412. X    pnmshear.c        shear a portable anymap
  413. X    pnmsmooth        script that uses pnmconvol to smooth a anymap
  414. X    pnmtile.c        replicate a portable anymap into a specified size
  415. X
  416. X    libpnm[1-4].c    a few utility routines
  417. X    pnmmerge.c        merge wrapper routine
  418. X    pnm.h        header file for libpnm
  419. X    rast.h        definitions for Sun raster files
  420. X    x10wd.h        definitions for X10 window dumps
  421. X    x11wd.h        definitions for X11 window dumps
  422. X    *.1            manual entries for all of the tools
  423. X    pnm.5        manual entry for the pnm format
  424. X    libpnm.3        manual entry for the pnm library
  425. SHAR_EOF
  426. if test 15344 -ne "`wc -c < 'README'`"
  427. then
  428.     echo shar: error transmitting "'README'" '(should have been 15344 characters)'
  429. fi
  430. fi # end of overwriting check
  431. echo shar: extracting "'CHANGES'" '(10555 characters)'
  432. if test -f 'CHANGES'
  433. then
  434.     echo shar: will not over-write existing file "'CHANGES'"
  435. else
  436. sed 's/^X//' << \SHAR_EOF > 'CHANGES'
  437. XChanges during the extended beta test period, starting on 15jan91:
  438. X
  439. X    Lots of fixes from: Anthony A. Datri, Arthur David Olson, David Brooks,
  440. X      David Elliott, Doug Claar, Duncan Sinclair, Francois Pinard, Gerard
  441. X      Leurs, Jim Hanko, Ken Laprade, Klaus U. Schallhorn, Markus Bolz, Mike
  442. X      Hench, Philip Gladstone, R C Smith, Selden E. Ball, Jr., Stephen Uitti,
  443. X      Steve Allen, Tom Lane, update.kpj-jaakkola@athena.dsv.su.se,
  444. X      Charles Karney, Unmesh Agarwala, Ed Pendzik, Juha Sarlin, Tom Tulinsky,
  445. X      Phillip Smith, Lai-King Mau, David Koblas, Mark Donovan.
  446. X    Added a global -version flag.
  447. X    Added bunches of statics and prototypes.  Now compiles with zero
  448. X      warnings under gcc -ansi -pedantic.
  449. X    Changed #ifdef __STDC__ to #if __STDC__, since some non-compliant
  450. X      compilers define it as 0.
  451. X    Changed pm_message and pm_error to be varargs routines.  Added a
  452. X      portable version of vfprintf for those systems which don't have it.
  453. X    Removed the option of not compiling the pgm and ppm parts.  Very few
  454. X      people used it, and it added amazing complexity to the pnm programs,
  455. X      turning them into maintenance nightmares.
  456. X    Merged pbmpaste into pnmpaste.
  457. X    Merged pgmtops and ppmtops into pnmtops.
  458. X    Added auto-scaling and dpi / page size flags to pnmtops.
  459. X    Changed the interpretation of bits in pbmlife to conform with other
  460. X      tools.
  461. X    Changed xwdtopnm to ignore the pixel number in the xwd color structure.
  462. X    Added a -pseudodepth flag to pnmtoxwd.
  463. X    Updated tifftopnm for libtiff 2.4.
  464. X    Added many option flags to pnmtotiff.  (J.T. Conklin)
  465. X    Added support for X11R5's new color specifiers rgb: and rgbi:.
  466. X    Added pgmtexture.  (James Darrell McCauley)
  467. X    Added ppmtopj, pjtoppm, and ppmdither.  (Christos Zoulas)
  468. X    Added ppmtotga.  (Mark Shand)
  469. X    Added ppmtosixel.  (Rick Vinci)
  470. X    Added pbmtoatk and atktopbm.  (Bill Janssen)
  471. X    Added ppmtoyuv and yuvtoppm.  (Marc Boucher)
  472. X    Fixes to picttoppm.  (George Phillips)
  473. X    Added 24-bit support to ilbmtoppm.  (Mark Thompson)
  474. X
  475. XChanges since the X.V11R4 / comp.sources.misc distribution of 22nov89:
  476. X
  477. X    Added pgmramp, pgmedge, pgmtoppm, rgb3toppm, ppmtoxpm, pnmgamma,
  478. X      ximtoppm, pgmtofs, picttoppm, ppmtopict, ppmquantall, anytopnm,
  479. X      pi1toppm, ppmtopi1, sputoppm, spctoppm, pbmto10x, ppmtoicr, ppmmake,
  480. X      xpmtoppm, ppmtopuzz, ppmtouil, ybmtopbm, pbmtoybm, lispmtopgm,
  481. X      pgmtolispm, pbmtogem, pi3topbm, pbmtopi3, pbmtoepson, pbmtoplot,
  482. X      pbmtozinc, pbmtext, pnmnoraw, pnmmargin, pnmfile, pnmindex,
  483. X      ppmtorgb3, gouldtoppm, pgmbentley, pgmoil, ppmrelief, pnmtotiff,
  484. X      ppmtopcx.
  485. X    Merged some filters:
  486. X      rasttopbm and rasttoppm into rasttopnm;
  487. X      pbmtorast and ppmtorast into pnmtorast;
  488. X      xwdtopbm and xwdtoppm into xwdtopnm;
  489. X      pbmtoxwd and ppmtoxwd into pnmtoxwd.
  490. X    Promoted some filters:
  491. X      pcxtopbm to pcxtoppm;
  492. X      ppmarith to pnmarith;
  493. X      ppmconvol to pnmconvol;
  494. X      ppmcscale to pnmdepth;
  495. X      ppmrotate to pnmrotate;
  496. X      ppmscale to pnmscale;
  497. X      ppmshear to pnmshear;
  498. X      ppmsmooth to pnmsmooth;
  499. X      tifftopgm to tifftopnm - new version based on Sam Leffler's libtiff.
  500. X    Bugfixes to pbmtoicon, ppmtops.
  501. X    The Makefiles now have a "merge" option.
  502. X    All flags are now case-insensitive.
  503. X    Added $(MAKE) stuff to Makefile.
  504. X    Changed pnmsmooth from a csh script to a sh script.
  505. X    Made macro use in pbmtox10bm and pbmtoxbm more portable.
  506. X    Moved compataliases to compat.csh, and added compat.ksh.
  507. X    Made ppmtoilbm less Amiga-specific.
  508. X    Added -headerskip and -rowskip flags to rawtopgm.
  509. X    Enhanced rasttopnm to interpret 8-bit rasters with no colormap as grayscale.
  510. X    Changed sscanf %g to %f - some systems can't handle %g on input.
  511. X    Added -expand flag to pbmmask.
  512. X    Speedup to pnmflip - don't buffer if possible.
  513. X    Added color-name-to-value routine to ppm - uses X11's rgb.txt if present.
  514. X    Updated Imakefile support to reflect X.V11R4.
  515. X    Removed picttopbm.
  516. X    Improved pnmcut argument syntax so that negative coords work like pnmpaste.
  517. X    Added "magic" file, for use with the "file" program.
  518. X    40% speedup for pgmnorm from Robert Stockton (rgs@cs.cmu.edu).
  519. X    Fixed long-standing bug involving colormaps on SPARCstations when
  520. X      compiled with gcc -- had to do with passing structs by value.
  521. X    Removed the -x flag from pnmtorast -- it's not really needed.
  522. X    Fixed subtle bug in the pnm reading code that caused pnmcat to blow
  523. X      it on images that differed greatly in width or height.
  524. X    New version of giftoppm that handles the GIF89a standard, and doesn't
  525. X      use fseek.
  526. X    Fixed fitstopgm to handle three-axis images, such as the Hubble pix.
  527. X    Xwdtopnm and pnmtoxwd finally handle byte-order properly.
  528. X    Added -xysize flag to pnmscale.
  529. X    Added conditional ANSI function prototypes to library routines.
  530. X    Added -noantialias flag to pnmrotate and pnmshear.
  531. X    Removed the TIPS file.  No one ever sent in any new tips, so I just
  532. X      moved the few I had into the relevant man pages.  That's probably
  533. X      where they belonged in the first place.
  534. X    Added justification flags to pnmcat.
  535. X    Added -map flag to ppmquant - user-specifiable colormap.  Also, the
  536. X      Floyd-Steinberg error diffusion finally works right.
  537. X    Added -map flag to pgmtoppm.
  538. X    Added DirectColor support to xwdtopnm and pnmtoxwd.
  539. X    Speedup to pgmtolj from Arthur David Olson: avoid sending whitespace.
  540. X    Fix to pbmtogo from Bo Thide': 2D compression now works.
  541. X
  542. XPatch 1 to the X.V11R4 / comp.sources.misc distribution of 22nov89:
  543. X
  544. X    Fixed bug in pgmtops -rle.
  545. X
  546. XChanges since the alt.sources distribution of 13sep89:
  547. X
  548. X    Small corrections to ppmtorast, pgmtops.
  549. X    Moved pbm/tifftopbm to pgm/tifftopgm - it now handles grayscale TIFF files.
  550. X    Fixed tifftopgm to handle non-native byte order.
  551. X    Changes to tifftopgm to handle bogus AppleScan TIFF files, to have
  552. X      better command syntax, and to use stdio.
  553. X    Optimizations to xbmtopbm, pbmtoxbm, and pbmtox10bm, courtesy of
  554. X      Juha Sarlin, to make them go about three times as fast.
  555. X    Optimization to pgmtops and ppmtops to make them go three times as fast.
  556. X    Optimization to pnmcrop.
  557. X    Added PBMPLUS_BROKENPUTC defines in pbmplus.h to handle systems (such as
  558. X      ULTRIX) which have broken putc() macros.
  559. X    Rewrote ppmscale, pnmcat, and pgmhist to operate line-by-line, instead
  560. X      of reading in the whole image.
  561. X    Rewrote pnmflip to keep only one copy of the image in memory.
  562. X    Added pgmtofits, courtesy of Wilson H. Bent, plus bugfixes to fitstopgm
  563. X      and a patch to giftoppm to handle black&white GIF files.
  564. X    Added picttopbm and rawtopgm.
  565. X    Fixes to xwdtoppm and ppmtoxwd so they compile with SunOS cc as well as gcc.
  566. X    Another small change to ppmtoxwd having to do with colormap size.
  567. X    Changed macptopbm's -headersize flag to be -extraskip.
  568. X    Changed tgatoppm to read color values as BGRA instead of ARGB; the Targa
  569. X      documentation is apparently wrong about the order.
  570. X    Some changes to the Makefiles, partially to work around bugs in gnumake.
  571. X    Got g3topbm working, and added pbmtog3, courtesy of Paul Haeberli.
  572. X    Added some pixrect work-alike code so that rasttopbm, pbmtorast, rasttoppm,
  573. X      and ppmtorast can be used on non-Sun systems.  This also provides a
  574. X      final solution to the persistent byte- and bit-order problems on 386's.
  575. X    Moved the SYSV-checking #ifdefs to *after* the include of pbm.h, which
  576. X      defines SYSV.
  577. X    Made all the #else's and #endif's ANSI-compliant.
  578. X    Added manual pages for libpbm, libpgm, libppm, and libpnm, courtesy
  579. X      of Tony Hansen.
  580. X    Changed man page installation so that pages from different sections
  581. X      can go in different directories.
  582. X    Fixed Imakefiles.
  583. X
  584. XChanges since the expo.lcs.mit.edu FTP distribution of 06sep89:
  585. X
  586. X    Added #ifdefs to pnm/libpnm3.c to allow the PBM-PNM-only configuration.
  587. X    Small corrections to TIPS, pnm/Makefile, pnm/Imakefile, ppm/ppmrotate.1,
  588. X      ppm/ppmshear.1, ppm/ppmtoilbm.c, pbm/xwdtopbm.c, ppm/xwdtoppm.c,
  589. X      ppm/ppmtoxwd.c, ppm/ppmtoxwd.1, pbm/x11wd.h.
  590. X
  591. XChanges since the comp.sources.misc distribution of 31oct88:
  592. X
  593. X    Added pbmreduce, pbmlife, pbmmask, and pbmupc.
  594. X    Added gemtopbm, tifftopbm, pcxtopbm, pbmtogo, mgrtopbm, pbmtomgr,
  595. X      cmuwmtopbm, pbmtocmuwm, g3topbm, and pbmtobg.
  596. X    Minor bugfix to pbmtolj.
  597. X    Slight restructuring of most of the programs to use vastly less memory.
  598. X    Various other minor optimizations.
  599. X    Fixed pbmtorast and rasttopbm to handle byte-swapped big-endian 386 boxes.
  600. X    Slight changes to argument syntax of pbmcrop, pbmmake, pbmreduce.
  601. X    Moved to the new PGM package: pbmtops (which now produces Conforming PS).
  602. X    Moved to the new PPM package: giftopbm.
  603. X    Moved to the new PNM package: pbmcrop pbmcut pbmenlarge pbminvert.
  604. X    Consolidated into a single pnmflip tool: pbmfliplr pbmfliptb pbmtrnspos.
  605. X    Consolidated into a single pnmcat tool: pbmcatlr pbmcattb.
  606. X    Added compataliases script for upward compatability with changed tools.
  607. X    Removed xxxtopbm.
  608. X    Added a -headersize flag to macptopbm, to help get around annoying
  609. X      problems in MacPaint file format.
  610. X    Added the RAWBITS compilation-time option, to use a more compact and
  611. X      much faster (but less portable) external format.
  612. X    Removed the CBM format - use compress(1) and / or RAWBITS instead.
  613. X    Pbmpaste (and the new pnmpaste) now accepts negative x and y coords,
  614. X      which are interpreted relative to the right and bottom sides.
  615. X    Changed all programs to accept a "-" file argument as meaning standard
  616. X      input.
  617. X    Removed pbmtox10wd, since it was never very useful (X10 doesn't have xwud).
  618. X    Added Imakefiles, for X11 types to use.
  619. X
  620. XChanges since the X.V11R3 distribution of 31aug88:
  621. X
  622. X    The cbm format has been revised to support run-length encoding.
  623. X    Pbmtops now does run-length encoding.
  624. X
  625. XMajor changes since the X.V11R2 distribution of 28mar88:
  626. X
  627. X    The pbm format now has a "magic number".
  628. X    New conversion filters: brushtopbm, giftopbm, pbmtolj, pbmtomacp,
  629. X      pbmtoxwd, and pbmtox10wd.
  630. X    Icontopbm converter has a better parser -- it knows to skip over
  631. X      any extraneous comments at the beginning of the icon file.
  632. X    Pbmtops generates a different PostScript wrapper program -- it should
  633. X      handle huge bitmaps better.
  634. X    Xwdtopbm now handles byte-swapping correctly.
  635. X    Pbmmake takes a flag to specify the color of the new bitmap.
  636. X    Pbmpaste now implements 'or', 'and', and 'xor' operations as well
  637. X      as the default 'replace'.
  638. SHAR_EOF
  639. if test 10555 -ne "`wc -c < 'CHANGES'`"
  640. then
  641.     echo shar: error transmitting "'CHANGES'" '(should have been 10555 characters)'
  642. fi
  643. fi # end of overwriting check
  644. echo shar: extracting "'TODO'" '(827 characters)'
  645. if test -f 'TODO'
  646. then
  647.     echo shar: will not over-write existing file "'TODO'"
  648. else
  649. sed 's/^X//' << \SHAR_EOF > 'TODO'
  650. XThings still to be done, in approximate order of likelihood:
  651. X
  652. X
  653. XThe hash table in ppmquant is not really the right data structure.
  654. X
  655. XImakefile fixes from David Lawrence.
  656. X
  657. XVMS fixes from Terry Poot.
  658. X
  659. XAdd IBM, Mac, and Amiga stuff to OTHER.SYSTEMS file.
  660. X
  661. Xhipstopgm should have a -image flag like fitstopgm and giftoppm.
  662. X
  663. XAdd ppmtocmyk4.
  664. X
  665. XUpgrade xpmtoppm and ppmtoxpm to handle XPM2.
  666. X
  667. XFigure out why compiling pnmconvol makes gcc die on some systems.
  668. X
  669. XConvert to line-by-line mode:
  670. Xpbmtext.c pbmtoascii.c pbmtoepson.c pbmtomacp.c pbmtoplot.c
  671. X
  672. XThe Converter Generator reorganization: all filters become three library
  673. Xroutines, one to initialize, one to handle each line, and one to finish off.
  674. XThis will make it possible to generate self-contained pipelines on demand,
  675. Xand they should run substantially faster without all that I/O.
  676. SHAR_EOF
  677. if test 827 -ne "`wc -c < 'TODO'`"
  678. then
  679.     echo shar: error transmitting "'TODO'" '(should have been 827 characters)'
  680. fi
  681. fi # end of overwriting check
  682. echo shar: extracting "'FORMATS'" '(2092 characters)'
  683. if test -f 'FORMATS'
  684. then
  685.     echo shar: will not over-write existing file "'FORMATS'"
  686. else
  687. sed 's/^X//' << \SHAR_EOF > 'FORMATS'
  688. XPBM handles the following black&white formats:
  689. X
  690. X    Sun icon file                reading    writing
  691. X    X10 and X11 bitmap file            reading    writing
  692. X    MacPaint                    reading    writing
  693. X    CMU window manager format            reading    writing
  694. X    MGR format                    reading    writing
  695. X    Group 3 FAX                    reading    writing
  696. X    GEM .img format                reading    writing
  697. X    Bennet Yee's "face" format            reading    writing
  698. X    Atari Degas .pi3 format            reading    writing
  699. X    Andrew Toolkit raster object           reading    writing
  700. X    Xerox doodle brushes            reading
  701. X    ASCII graphics                    writing
  702. X    HP LaserJet format                    writing
  703. X    GraphOn graphics                    writing
  704. X    BBN BitGraph graphics                writing
  705. X    Printronix format                    writing
  706. X    Gemini 10x printer format                writing
  707. X    Epson printer format                writing
  708. X    Unix plot(5) file                    writing
  709. X    Zinc Interface Library icon                writing
  710. X
  711. XPGM handles the following grayscale formats:
  712. X
  713. X    Usenix FaceSaver(tm) file            reading    writing
  714. X    FITS                    reading    writing
  715. X    Lisp Machine bit-array-file            reading    writing
  716. X    raw grayscale bytes                reading
  717. X    HIPS                    reading
  718. X    PostScript "image" data            reading
  719. X
  720. XPPM handles the following color formats:
  721. X
  722. X    GIF                        reading    writing
  723. X    IFF ILBM                    reading    writing
  724. X    PICT                    reading    writing
  725. X    Atari Degas .pi1 format            reading    writing
  726. X    XPM (X Window System ASCII pixmaps)        reading    writing
  727. X    PC Paintbrush .pcx format            reading    writing
  728. X    TrueVision Targa file            reading    writing
  729. X    HP PaintJet format                reading    writing
  730. X    Abekas YUV format                reading    writing
  731. X    MTV/PRT ray-tracer output            reading
  732. X    QRT ray-tracer output            reading
  733. X    Img-whatnot file                reading
  734. X    Xim file                    reading
  735. X    Atari uncompressed Spectrum            reading
  736. X    Atari compressed Spectrum            reading
  737. X    NCSA Interactive Color Raster            writing
  738. X    X11 "puzzle" file                    writing
  739. X    Motif UIL icon file                    writing
  740. X    DEC sixel format                    writing
  741. X
  742. XPNM handles the following multi-type formats:
  743. X
  744. X    Sun raster file                reading    writing
  745. X    TIFF                    reading    writing
  746. X    X11 window dump file            reading    writing
  747. X    X10 window dump file            reading
  748. X    PostScript                    writing
  749. SHAR_EOF
  750. if test 2092 -ne "`wc -c < 'FORMATS'`"
  751. then
  752.     echo shar: error transmitting "'FORMATS'" '(should have been 2092 characters)'
  753. fi
  754. fi # end of overwriting check
  755. echo shar: extracting "'OTHER.SYSTEMS'" '(3959 characters)'
  756. if test -f 'OTHER.SYSTEMS'
  757. then
  758.     echo shar: will not over-write existing file "'OTHER.SYSTEMS'"
  759. else
  760. sed 's/^X//' << \SHAR_EOF > 'OTHER.SYSTEMS'
  761. X             List of Other Free Image-Processing Software
  762. X
  763. X    IM Raster Toolkit, by Alan Paeth (awpaeth@watcgl.uwaterloo.ca).
  764. X    Provides a portable and efficient format and related toolkit.  The
  765. X    format is versatile in supporting pixels of arbitrary channels,
  766. X    components, and bit precisions while allowing compression and machine
  767. X    byte-order independence.  The kit contains more than 50 tools with
  768. X    extensive support of image manipulation, digital halftoning and format
  769. X    conversion.  Previously distributed on tape c/o the University of
  770. X    Waterloo, an FTP version will appear someday.
  771. X
  772. X    Utah RLE Toolkit.  Conversion and manipulation package, similar to
  773. X    PBMPLUS.  Available via FTP as cs.utah.edu:pub/toolkit-2.0.tar.Z and
  774. X    ucsd.edu:graphics/utah-raster-toolkit.tar.Z.
  775. X
  776. X    Fuzzy Pixmap Manipulation, by Michael Mauldin <mlm@nl.cs.cmu.edu>.
  777. X    Conversion and manipulation package, similar to PBMPLUS.  Version 1.0
  778. X    available via FTP as nl.cs.cmu.edu:/usr/mlm/ftp/fbm.tar.Z,
  779. X    uunet.uu.net:pub/fbm.tar.Z, and ucsd.edu:graphics/fbm.tar.Z.
  780. X
  781. X    Img Software Set, by Paul Raveling <raveling@venera.isi.edu>.  Reads and
  782. X    writes its own image format, displays on an X11 screen, and does some
  783. X    image manipulations.  Version 1.3 is available via FTP as
  784. X    export.lcs.mit.edu:contrib/img_1.3.tar.Z, and
  785. X    venera.isi.edu:pub/img_1.3.tar.Z along with a large collection of color
  786. X    images.
  787. X
  788. X    Xim, by Philip R. Thompson.  Reads and writes its own image format,
  789. X    displays on an X11 screen, and does some image manipulations.
  790. X    Available in your nearest X11R4 source tree as contrib/clients/xim.
  791. X    A more recent version is available via ftp from video.mit.edu.  It uses
  792. X    x11r4 and the OSF/Motif toolkit to provide basic interactive image
  793. X    manipulation and reads/writes GIF, xwd, xbm, tiff, rle, xim, and other
  794. X    formats.
  795. X
  796. X    xloadimage, by Jim Frost <madd@std.com>.  Reads in images in various
  797. X    formats and displays them on an X11 screen.  Available via FTP as
  798. X    export.lcs.mit.edu:contrib/xloadimage*, and in your nearest comp.sources.x
  799. X    archive.
  800. X
  801. X    TIFF Software, by Sam Leffler <sam@okeeffe.berkeley.edu>.  Nice
  802. X    portable library for reading and writing TIFF files, plus a few tools
  803. X    for manipulating them and reading other formats.  Available via FTP as
  804. X    ucbvax.berkeley.edu:pub/tiff/*.tar.Z or uunet.uu.net:graphics/tiff.tar.Z
  805. X
  806. X    ALV, a Sun-specific image toolkit.  Version 2.0.6 posted to
  807. X    comp.sources.sun on 11dec89.  Also available via email to
  808. X    alv-users-request@cs.bris.ac.uk.
  809. X
  810. X    popi, an image manipulation language.  Version 2.1 posted to
  811. X    comp.sources.misc on 12dec89.
  812. X
  813. X    ImageMagick, an X11 package for display and interactive manipulation
  814. X    of images.  Uses its own format (MIFF), and includes some converters.
  815. X    Available via FTP as export.lcs.mit.edu:contrib/ImageMagick.tar.Z
  816. X
  817. X    Khoros, a huge (~100 meg) graphical development environment based on
  818. X    X11R4.  Khoros components include a visual programming language, code
  819. X    generators for extending the visual language and adding new application
  820. X    packages to the system, an interactive user interface editor, an
  821. X    interactive image display package, an extensive library of image and
  822. X    signal processing routines, and 2D/3D plotting packages.  Available via
  823. X    FTP as pprg.unm.edu:pub/khoros/*.
  824. X
  825. XDon't forget to set binary mode when you FTP tar files.  For you MILNET
  826. Xfolks who still don't have name servers, the IP addresses are:
  827. X
  828. X    export.lcs.mit.edu        18.24.0.12
  829. X    ftp.ee.lbl.gov        128.3.112.20
  830. X    cs.utah.edu            128.110.4.21
  831. X    nl.cs.cmu.edu        128.2.222.56
  832. X    venera.isi.edu        128.9.0.32
  833. X    ucbvax.berkeley.edu        128.32.133.1
  834. X    weedeater.math.yale.edu    130.132.23.17
  835. X    freebie.engin.umich.edu    141.212.68.23
  836. X    pprg.eece.unm.edu        129.24.24.10
  837. X
  838. XAlso, the newsgroup alt.graphics.pixutils is specifically for discussion
  839. Xof software like this.  You may find useful information there.
  840. SHAR_EOF
  841. if test 3959 -ne "`wc -c < 'OTHER.SYSTEMS'`"
  842. then
  843.     echo shar: error transmitting "'OTHER.SYSTEMS'" '(should have been 3959 characters)'
  844. fi
  845. fi # end of overwriting check
  846. echo shar: extracting "'Imakefile'" '(613 characters)'
  847. if test -f 'Imakefile'
  848. then
  849.     echo shar: will not over-write existing file "'Imakefile'"
  850. else
  851. sed 's/^X//' << \SHAR_EOF > 'Imakefile'
  852. X# Imakefile for pbmplus tools.
  853. X#
  854. X# Copyright (C) 1989, 1991 by Jef Poskanzer.
  855. X#
  856. X# Permission to use, copy, modify, and distribute this software and its
  857. X# documentation for any purpose and without fee is hereby granted, provided
  858. X# that the above copyright notice appear in all copies and that both that
  859. X# copyright notice and this permission notice appear in supporting
  860. X# documentation.  This software is provided "as is" without express or
  861. X# implied warranty.
  862. X
  863. X#define IHaveSubdirs
  864. X#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
  865. X
  866. XSUBDIRS =    pbm pgm ppm pnm
  867. X
  868. XMakeSubdirs($(SUBDIRS))
  869. XDependSubdirs($(SUBDIRS))
  870. SHAR_EOF
  871. if test 613 -ne "`wc -c < 'Imakefile'`"
  872. then
  873.     echo shar: error transmitting "'Imakefile'" '(should have been 613 characters)'
  874. fi
  875. fi # end of overwriting check
  876. echo shar: extracting "'Makefile'" '(6032 characters)'
  877. if test -f 'Makefile'
  878. then
  879.     echo shar: will not over-write existing file "'Makefile'"
  880. else
  881. sed 's/^X//' << \SHAR_EOF > 'Makefile'
  882. X# Makefile for pbmplus tools.
  883. X#
  884. X# Copyright (C) 1989, 1991 by Jef Poskanzer.
  885. X#
  886. X# Permission to use, copy, modify, and distribute this software and its
  887. X# documentation for any purpose and without fee is hereby granted, provided
  888. X# that the above copyright notice appear in all copies and that both that
  889. X# copyright notice and this permission notice appear in supporting
  890. X# documentation.  This software is provided "as is" without express or
  891. X# implied warranty.
  892. X
  893. X# CONFIGURE: gcc makes things go faster on some machines, but not everyone
  894. X# has it.  Warning: do not use gcc's -finline-functions or -fstrength-reduce
  895. X# flags, they can produce incorrect code.  (This is with gcc versions 1.35,
  896. X# 1.36, and 1.37, later versions may fix these bugs.)  Also, on some systems
  897. X# gcc can't compile pnmconvol - dunno why.  And on some systems you can't
  898. X# use the -ansi flag, it gives compilation errors in <math.h>.
  899. XCC =        cc
  900. X#CC =        gcc
  901. X#CC =        gcc -fcombine-regs -fpcc-struct-return
  902. X#CC =        gcc -ansi -pedantic -fcombine-regs -fpcc-struct-return
  903. X
  904. X# CONFIGURE: cc flags go here.
  905. XCFLAGS =    -O
  906. X#CFLAGS =    -g
  907. X#CFLAGS =    -g -O
  908. X
  909. X# CONFIGURE: ld flags go here.  Eunice users may want to use -noshare so that
  910. X# the binaries can run standalone.
  911. XLDFLAGS =    -s
  912. X#LDFLAGS =    
  913. X#LDFLAGS =    -noshare
  914. X
  915. X# CONFIGURE: If you have an X11-style rgb color names file, define its
  916. X# path here.  This is used by PPM to parse color names into rgb values.
  917. X# If you don't have such a file, comment this out and use the alternative
  918. X# hex and decimal forms to specify colors (see ppm/pgmtoppm.1 for details).
  919. XRGBDEF =    -DRGB_DB=\"/usr/lib/X11/rgb.txt\"
  920. X
  921. X# CONFIGURE: PBMPLUS's support for TIFF files depends on the library from
  922. X# Sam Leffler's TIFF Software package - see the OTHER.SYSTEMS file for a
  923. X# full description and access information.  To configure PBMPLUS to use the
  924. X# library: first, if necessary, fetch the TIFF Software, unpack it in a
  925. X# scratch directory somewhere, and move the libtiff subdirectory right here
  926. X# into the PBMPLUS top-level directory.  Configure and "make" in the
  927. X# libtiff directory.  Yes, you do have to do the TIFF make by hand, the
  928. X# general PBMPLUS make will *not* make libtiff.  Finally, uncomment the
  929. X# following five definitions.
  930. X#
  931. X# Libtiff is pretty good about portability, but there are some machines
  932. X# it has problems on.  If you run into problems, you may wish to contact
  933. X# Sam directly, at the address listed in the OTHER.SYSTEMS file.
  934. XTIFFDEF =    -DLIBTIFF
  935. XTIFFINC =    -I../libtiff
  936. XTIFFLIB =    ../libtiff/libtiff.a
  937. XTIFFBINARIES =    tifftopnm pnmtotiff
  938. XTIFFOBJECTS =    tifftopnm.o pnmtotiff.o
  939. X
  940. X# CONFIGURE: Define the directory that you want the binaries copied to.
  941. X# If you need scripts and binaries to be in different directories, you
  942. X# can set that up too.
  943. XINSTALLBINARIES =    /usr/new/pbmplus
  944. XINSTALLSCRIPTS =    $(INSTALLBINARIES)
  945. X
  946. X# CONFIGURE: Define the directories that you want the manual sources copied to,
  947. X# plus the suffix you want them to have.
  948. XINSTALLMANUALS1 =    /usr/man/mann
  949. XSUFFIXMANUALS1 =    n
  950. XINSTALLMANUALS3 =    /usr/man/mann
  951. XSUFFIXMANUALS3 =    n
  952. XINSTALLMANUALS5 =    /usr/man/mann
  953. XSUFFIXMANUALS5 =    n
  954. X
  955. X# CONFIGURE: Normally the man pages are installed using "cp".  By changing
  956. X# this define you can use something else, for example a script that calls
  957. X# compress or pack.
  958. XMANCP =            cp
  959. X
  960. X# CONFIGURE: Normally the Makefiles build and install separate binaries for
  961. X# each program.  However, on some systems (especially those without shared
  962. X# libraries) this can mean a lot of space.  In this case you might try
  963. X# building a "merge" instead.  The idea here is to link all the binaries
  964. X# together into one huge executable, with a tiny dispatch program as the
  965. X# main.  Then the merged binary is installed with file-system links for
  966. X# each program it includes.  The dispatch routine can tell which program
  967. X# to run by looking at argv[0].  On a Sun3 under SunOS 3.5 the space for
  968. X# executables went from 2.9 meg to .36 meg.
  969. X#
  970. X# Note that if you make a "merge", the executables don't get created
  971. X# until you do the install.
  972. Xall:        binaries
  973. Xinstall:    install.bin install.man
  974. X#all:        merge
  975. X#install:    install.merge install.man
  976. X
  977. X# End of configurable definitions.
  978. X
  979. XSHELL =        /bin/sh
  980. XMAKE =        make
  981. XSUBDIRS =    pbm pgm ppm pnm
  982. X
  983. Xbinaries:
  984. X    for i in $(SUBDIRS) ; do \
  985. X        ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'RGBDEF=$(RGBDEF)' 'TIFFDEF=$(TIFFDEF)' 'TIFFINC=$(TIFFINC)' 'TIFFLIB=$(TIFFLIB)' 'TIFFBINARIES=$(TIFFBINARIES)' 'TIFFOBJECTS=$(TIFFOBJECTS)' 'LDFLAGS=$(LDFLAGS)' binaries ); \
  986. X    done
  987. X
  988. Xmerge:
  989. X    for i in $(SUBDIRS) ; do \
  990. X        ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'RGBDEF=$(RGBDEF)' 'TIFFDEF=$(TIFFDEF)' 'TIFFINC=$(TIFFINC)' 'TIFFLIB=$(TIFFLIB)' 'TIFFBINARIES=$(TIFFBINARIES)' 'TIFFOBJECTS=$(TIFFOBJECTS)' 'LDFLAGS=$(LDFLAGS)' merge ); \
  991. X    done
  992. X
  993. Xinstall.bin:
  994. X    for i in $(SUBDIRS) ; do \
  995. X        ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'RGBDEF=$(RGBDEF)' 'TIFFDEF=$(TIFFDEF)' 'TIFFINC=$(TIFFINC)' 'TIFFLIB=$(TIFFLIB)' 'TIFFBINARIES=$(TIFFBINARIES)' 'TIFFOBJECTS=$(TIFFOBJECTS)' 'LDFLAGS=$(LDFLAGS)' 'INSTALLBINARIES=$(INSTALLBINARIES)' 'INSTALLSCRIPTS=$(INSTALLSCRIPTS)' install.bin ); \
  996. X    done
  997. X
  998. Xinstall.merge:
  999. X    for i in $(SUBDIRS) ; do \
  1000. X        ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) 'CC=$(CC)' 'CFLAGS=$(CFLAGS)' 'RGBDEF=$(RGBDEF)' 'TIFFDEF=$(TIFFDEF)' 'TIFFINC=$(TIFFINC)' 'TIFFLIB=$(TIFFLIB)' 'TIFFBINARIES=$(TIFFBINARIES)' 'TIFFOBJECTS=$(TIFFOBJECTS)' 'LDFLAGS=$(LDFLAGS)' 'INSTALLBINARIES=$(INSTALLBINARIES)' 'INSTALLSCRIPTS=$(INSTALLSCRIPTS)' install.merge ); \
  1001. X    done
  1002. X
  1003. Xinstall.man:
  1004. X    for i in $(SUBDIRS) ; do \
  1005. X        ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) 'TIFFBINARIES=$(TIFFBINARIES)' 'INSTALLMANUALS1=$(INSTALLMANUALS1)' 'SUFFIXMANUALS1=$(SUFFIXMANUALS1)' 'INSTALLMANUALS3=$(INSTALLMANUALS3)' 'SUFFIXMANUALS3=$(SUFFIXMANUALS3)' 'INSTALLMANUALS5=$(INSTALLMANUALS5)' 'SUFFIXMANUALS5=$(SUFFIXMANUALS5)' 'MANCP=$(MANCP)' install.man ); \
  1006. X    done
  1007. X
  1008. Xclean:
  1009. X    -rm -f *.shar *.shar? art.*
  1010. X    for i in $(SUBDIRS) ; do \
  1011. X        ( echo $$i ; cd $$i ; $(MAKE) $(MFLAGS) clean ); \
  1012. X    done
  1013. SHAR_EOF
  1014. if test 6032 -ne "`wc -c < 'Makefile'`"
  1015. then
  1016.     echo shar: error transmitting "'Makefile'" '(should have been 6032 characters)'
  1017. fi
  1018. fi # end of overwriting check
  1019. echo shar: extracting "'pbmplus.h'" '(6877 characters)'
  1020. if test -f 'pbmplus.h'
  1021. then
  1022.     echo shar: will not over-write existing file "'pbmplus.h'"
  1023. else
  1024. sed 's/^X//' << \SHAR_EOF > 'pbmplus.h'
  1025. X/* pbmplus.h - header file for PBM, PGM, PPM, and PNM
  1026. X**
  1027. X** Copyright (C) 1988, 1989, 1991 by Jef Poskanzer.
  1028. X**
  1029. X** Permission to use, copy, modify, and distribute this software and its
  1030. X** documentation for any purpose and without fee is hereby granted, provided
  1031. X** that the above copyright notice appear in all copies and that both that
  1032. X** copyright notice and this permission notice appear in supporting
  1033. X** documentation.  This software is provided "as is" without express or
  1034. X** implied warranty.
  1035. X*/
  1036. X
  1037. X#ifndef _PBMPLUS_H_
  1038. X#define _PBMPLUS_H_
  1039. X
  1040. X#include <sys/types.h>
  1041. X#include <ctype.h>
  1042. X#include <stdio.h>
  1043. X
  1044. X#if ! ( defined(BSD) || defined(SYSV) || defined(MSDOS))
  1045. X/* CONFIGURE: If your system is >= 4.2BSD, set the BSD option; if you're a
  1046. X** System V site, set the SYSV option; and if you're IBM-compatible, set
  1047. X** MSDOS.  If your compiler is ANSI C, you're probably better off setting
  1048. X** SYSV.
  1049. X*/
  1050. X#define BSD
  1051. X/* #define SYSV */
  1052. X/* #define MSDOS */
  1053. X#endif
  1054. X
  1055. X/* CONFIGURE: If you want to enable writing "raw" files, set this option.
  1056. X** "Raw" files are smaller, and much faster to read and write, but you
  1057. X** must have a filesystem that allows all 256 ASCII characters to be read
  1058. X** and written.  You will no longer be able to mail P?M files without 
  1059. X** using uuencode or the equivalent, or running the files through pnmnoraw.
  1060. X** Note that reading "raw" files works whether writing is enabled or not.
  1061. X*/
  1062. X#define PBMPLUS_RAWBITS
  1063. X
  1064. X/* CONFIGURE: On some systems, the putc() macro is broken and will return
  1065. X** EOF when you write out a 255.  For example, ULTRIX does this.  This
  1066. X** only matters if you have defined RAWBITS.  To test whether your system
  1067. X** is broken this way, go ahead and compile things with RAWBITS defined,
  1068. X** and then try "pbmmake -b 8 1 > file".  If it works, fine.  If not,
  1069. X** define BROKENPUTC1 and try again - if that works, good.  Otherwise,
  1070. X** BROKENPUTC2 is guaranteed to work, although it's about twice as slow.
  1071. X*/
  1072. X/* #define PBMPLUS_BROKENPUTC1 */
  1073. X/* #define PBMPLUS_BROKENPUTC2 */
  1074. X
  1075. X#ifdef PBMPLUS_BROKENPUTC1
  1076. X#undef putc
  1077. X/* This is a fixed version of putc() that should work on most Unix systems. */
  1078. X#define putc(x,p) (--(p)->_cnt>=0? ((int)(unsigned char)(*(p)->_ptr++=(unsigned char)(x))) : _flsbuf((unsigned char)(x),p))
  1079. X#endif /*PBMPLUS_BROKENPUTC1*/
  1080. X#ifdef PBMPLUS_BROKENPUTC2
  1081. X#undef putc
  1082. X/* For this one, putc() becomes a function, defined in pbm/libpbm1.c. */
  1083. X#endif /*PBMPLUS_BROKENPUTC2*/
  1084. X
  1085. X/* CONFIGURE: PGM can store gray values as either bytes or shorts.  For most
  1086. X** applications, bytes will be big enough, and the memory savings can be
  1087. X** substantial.  However, if you need more than 8 bits of grayscale resolution,
  1088. X** then define this symbol.
  1089. X*/
  1090. X/* #define PGM_BIGGRAYS */
  1091. X
  1092. X/* CONFIGURE: Normally, PPM handles a pixel as a struct of three grays.
  1093. X** If grays are stored in bytes, that's 24 bits per color pixel; if
  1094. X** grays are stored as shorts, that's 48 bits per color pixel.  PPM
  1095. X** can also be configured to pack the three grays into a single longword,
  1096. X** 10 bits each, 30 bits per pixel.
  1097. X**
  1098. X** If you have configured PGM with the PGM_BIGGRAYS option, AND you don't
  1099. X** need more than 10 bits for each color component, AND you care more about
  1100. X** memory use than speed, then this option might be a win.  Under these
  1101. X** circumstances it will make some of the programs use 1.5 times less space,
  1102. X** but all of the programs will run about 1.4 times slower.
  1103. X**
  1104. X** If you are not using PGM_BIGGRAYS, then this option is useless -- it
  1105. X** doesn't save any space, but it still slows things down.
  1106. X*/
  1107. X/* #define PPM_PACKCOLORS */
  1108. X
  1109. X/* CONFIGURE: uncomment this to enable debugging checks. */
  1110. X/* #define DEBUG */
  1111. X
  1112. X#ifdef SYSV
  1113. X
  1114. X#include <string.h>
  1115. X#define index(s,c) strchr(s,c)
  1116. X#define rindex(s,c) strrchr(s,c)
  1117. X#define srandom(s) srand(s)
  1118. X#define random rand
  1119. X#define bzero(dst,len) memset(dst,0,len)
  1120. X#define bcopy(src,dst,len) memcpy(dst,src,len)
  1121. X#define bcmp memcmp
  1122. Xextern int rand();
  1123. X
  1124. X#else /*SYSV*/
  1125. X
  1126. X#include <strings.h>
  1127. Xextern long random();
  1128. X
  1129. X#endif /*SYSV*/
  1130. X
  1131. Xextern int atoi();
  1132. Xextern void exit();
  1133. Xextern void srandom();
  1134. Xextern long time();
  1135. Xextern int write();
  1136. X
  1137. X/* CONFIGURE: On some systems, malloc.h doesn't declare these, so we have
  1138. X** to do it.  On other systems, for example HP/UX, it declares them
  1139. X** incompatibly.  And some systems, for example Dynix, don't have a
  1140. X** malloc.h at all.  A sad situation.  If you have compilation problems
  1141. X** that point here, feel free to tweak or remove these declarations.
  1142. X*/
  1143. X#include <malloc.h>
  1144. Xextern char* malloc();
  1145. Xextern char* realloc();
  1146. Xextern char* calloc();
  1147. X
  1148. X/* CONFIGURE: Some systems don't have vfprintf(), which we need for the
  1149. X** error-reporting routines.  If you compile and get a link error about
  1150. X** this routine, uncomment the first define, which gives you a vfprintf
  1151. X** that uses the theoretically non-portable but fairly common routine
  1152. X** _doprnt().  If you then get a link error about _doprnt, or
  1153. X** message-printing doesn't look like it's working, try the second
  1154. X** define instead.
  1155. X*/
  1156. X/* #define NEED_VFPRINTF1 */
  1157. X/* #define NEED_VFPRINTF2 */
  1158. X
  1159. X/* End of configurable definitions. */
  1160. X
  1161. X
  1162. X#undef max
  1163. X#define max(a,b) ((a) > (b) ? (a) : (b))
  1164. X#undef min
  1165. X#define min(a,b) ((a) < (b) ? (a) : (b))
  1166. X#undef abs
  1167. X#define abs(a) ((a) >= 0 ? (a) : -(a))
  1168. X#undef odd
  1169. X#define odd(n) ((n) & 1)
  1170. X
  1171. X
  1172. X/* Definitions to make PBMPLUS work with either ANSI C or C Classic. */
  1173. X
  1174. X#if __STDC__
  1175. X#define ARGS(alist) alist
  1176. X#else /*__STDC__*/
  1177. X#define ARGS(alist) ()
  1178. X#define const
  1179. X#endif /*__STDC__*/
  1180. X
  1181. X
  1182. X/* Initialization. */
  1183. X
  1184. Xvoid pm_init ARGS(( int* argcP, char* argv[] ));
  1185. X
  1186. X
  1187. X/* Variable-sized arrays definitions. */
  1188. X
  1189. Xchar** pm_allocarray ARGS(( int cols, int rows, int size ));
  1190. Xchar* pm_allocrow ARGS(( int cols, int size ));
  1191. Xvoid pm_freearray ARGS(( char** its, int rows ));
  1192. Xvoid pm_freerow ARGS(( char* itrow ));
  1193. X
  1194. X
  1195. X/* Case-insensitive keyword matcher. */
  1196. X
  1197. Xint pm_keymatch ARGS(( char* str, char* keyword, int minchars ));
  1198. X
  1199. X
  1200. X/* Log base two hacks. */
  1201. X
  1202. Xint pm_maxvaltobits ARGS(( int maxval ));
  1203. Xint pm_bitstomaxval ARGS(( int bits ));
  1204. X
  1205. X
  1206. X/* Error handling definitions. */
  1207. X
  1208. Xvoid pm_message ARGS(( char*, ... ));
  1209. Xvoid pm_error ARGS(( char*, ... ));            /* doesn't return */
  1210. Xvoid pm_perror ARGS(( char* reason ));            /* doesn't return */
  1211. Xvoid pm_usage ARGS(( char* usage ));            /* doesn't return */
  1212. X
  1213. X
  1214. X/* File open/close that handles "-" as stdin and checks errors. */
  1215. X
  1216. XFILE* pm_openr ARGS(( char* name ));
  1217. XFILE* pm_openw ARGS(( char* name ));
  1218. Xvoid pm_close ARGS(( FILE* f ));
  1219. X
  1220. X
  1221. X/* Endian I/O. */
  1222. X
  1223. Xint pm_readbigshort ARGS(( FILE* in, short* sP ));
  1224. Xint pm_writebigshort ARGS(( FILE* out, short s ));
  1225. Xint pm_readbiglong ARGS(( FILE* in, long* lP ));
  1226. Xint pm_writebiglong ARGS(( FILE* out, long l ));
  1227. Xint pm_readlittleshort ARGS(( FILE* in, short* sP ));
  1228. Xint pm_writelittleshort ARGS(( FILE* out, short s ));
  1229. Xint pm_readlittlelong ARGS(( FILE* in, long* lP ));
  1230. Xint pm_writelittlelong ARGS(( FILE* out, long l ));
  1231. X
  1232. X
  1233. X#endif /*_PBMPLUS_H_*/
  1234. SHAR_EOF
  1235. if test 6877 -ne "`wc -c < 'pbmplus.h'`"
  1236. then
  1237.     echo shar: error transmitting "'pbmplus.h'" '(should have been 6877 characters)'
  1238. fi
  1239. fi # end of overwriting check
  1240. echo shar: extracting "'version.h'" '(106 characters)'
  1241. if test -f 'version.h'
  1242. then
  1243.     echo shar: will not over-write existing file "'version.h'"
  1244. else
  1245. sed 's/^X//' << \SHAR_EOF > 'version.h'
  1246. X/* version.h - define the current version of PBM, PGM, PPM, and PNM
  1247. X*/
  1248. X
  1249. X#define PBMPLUS_VERSION "27sep91"
  1250. SHAR_EOF
  1251. if test 106 -ne "`wc -c < 'version.h'`"
  1252. then
  1253.     echo shar: error transmitting "'version.h'" '(should have been 106 characters)'
  1254. fi
  1255. fi # end of overwriting check
  1256. echo shar: extracting "'compat.csh'" '(1023 characters)'
  1257. if test -f 'compat.csh'
  1258. then
  1259.     echo shar: will not over-write existing file "'compat.csh'"
  1260. else
  1261. sed 's/^X//' << \SHAR_EOF > 'compat.csh'
  1262. X# compat.csh - csh aliases to allow users of old versions of PBM to keep
  1263. X#                 their habits.
  1264. X#
  1265. X# This script must be sourced - it will not work if you run it in a sub-shell.
  1266. X
  1267. Xalias pbmcatlr 'pnmcat -lr'
  1268. Xalias pbmcattb 'pnmcat -tb'
  1269. Xalias pbmcrop 'pnmcrop'
  1270. Xalias pbmcut 'pnmcut'
  1271. Xalias pbmenlarge 'pnmenlarge'
  1272. Xalias pbmfliplr 'pnmflip -lr'
  1273. Xalias pbmfliptb 'pnmflip -tb'
  1274. Xalias pbmpaste 'pnmpaste'
  1275. Xalias pbmtops 'pnmtops'
  1276. Xalias pbmtorast 'pnmtorast'
  1277. Xalias pbmtoxwd 'pnmtoxwd'
  1278. Xalias pbmtrnspos 'pnmflip -xy'
  1279. Xalias pcxtopbm 'pcxtoppm'
  1280. Xalias pgmtops 'pnmtops'
  1281. Xalias picttopbm 'picttoppm'
  1282. Xalias ppmarith 'pnmarith'
  1283. Xalias ppmconvol 'pnmconvol'
  1284. Xalias ppmcscale 'pnmdepth'
  1285. Xalias ppmrotate 'pnmrotate'
  1286. Xalias ppmscale 'pnmscale'
  1287. Xalias ppmshear 'pnmshear'
  1288. Xalias ppmsmooth 'pnmsmooth'
  1289. Xalias ppmtops 'pnmtops'
  1290. Xalias ppmtorast 'pnmtorast'
  1291. Xalias ppmtoxwd 'pnmtoxwd'
  1292. Xalias rasttopbm 'rasttopnm'
  1293. Xalias rasttoppm 'rasttopnm'
  1294. Xalias tifftopbm 'tifftopnm'
  1295. Xalias tifftopgm 'tifftopnm'
  1296. Xalias xwdtopbm 'xwdtopnm'
  1297. Xalias xwdtoppm 'xwdtopnm'
  1298. SHAR_EOF
  1299. if test 1023 -ne "`wc -c < 'compat.csh'`"
  1300. then
  1301.     echo shar: error transmitting "'compat.csh'" '(should have been 1023 characters)'
  1302. fi
  1303. fi # end of overwriting check
  1304. echo shar: extracting "'compat.ksh'" '(1023 characters)'
  1305. if test -f 'compat.ksh'
  1306. then
  1307.     echo shar: will not over-write existing file "'compat.ksh'"
  1308. else
  1309. sed 's/^X//' << \SHAR_EOF > 'compat.ksh'
  1310. X# compat.ksh - ksh aliases to allow users of old versions of PBM to keep
  1311. X#                 their habits.
  1312. X#
  1313. X# This script must be sourced - it will not work if you run it in a sub-shell.
  1314. X
  1315. Xalias pbmcatlr='pnmcat -lr'
  1316. Xalias pbmcattb='pnmcat -tb'
  1317. Xalias pbmcrop='pnmcrop'
  1318. Xalias pbmcut='pnmcut'
  1319. Xalias pbmenlarge='pnmenlarge'
  1320. Xalias pbmfliplr='pnmflip -lr'
  1321. Xalias pbmfliptb='pnmflip -tb'
  1322. Xalias pbmpaste='pnmpaste'
  1323. Xalias pbmtops='pnmtops'
  1324. Xalias pbmtorast='pnmtorast'
  1325. Xalias pbmtoxwd='pnmtoxwd'
  1326. Xalias pbmtrnspos='pnmflip -xy'
  1327. Xalias pcxtopbm='pcxtoppm'
  1328. Xalias picttopbm='picttoppm'
  1329. Xalias ppmarith='pnmarith'
  1330. Xalias ppmconvol='pnmconvol'
  1331. Xalias ppmcscale='pnmdepth'
  1332. Xalias ppmrotate='pnmrotate'
  1333. Xalias ppmscale='pnmscale'
  1334. Xalias ppmshear='pnmshear'
  1335. Xalias ppmsmooth='pnmsmooth'
  1336. Xalias ppmtops='pnmtops'
  1337. Xalias ppmtops='pnmtops'
  1338. Xalias ppmtorast='pnmtorast'
  1339. Xalias ppmtoxwd='pnmtoxwd'
  1340. Xalias rasttopbm='rasttopnm'
  1341. Xalias rasttoppm='rasttopnm'
  1342. Xalias tifftopbm='tifftopnm'
  1343. Xalias tifftopgm='tifftopnm'
  1344. Xalias xwdtopbm='xwdtopnm'
  1345. Xalias xwdtoppm='xwdtopnm'
  1346. SHAR_EOF
  1347. if test 1023 -ne "`wc -c < 'compat.ksh'`"
  1348. then
  1349.     echo shar: error transmitting "'compat.ksh'" '(should have been 1023 characters)'
  1350. fi
  1351. fi # end of overwriting check
  1352. echo shar: extracting "'magic'" '(1080 characters)'
  1353. if test -f 'magic'
  1354. then
  1355.     echo shar: will not over-write existing file "'magic'"
  1356. else
  1357. sed 's/^X//' << \SHAR_EOF > 'magic'
  1358. X# PBMPLUS auxiliary magic numbers file
  1359. X#
  1360. X# These are meant to be used with the "file" program to help determine
  1361. X# the type of a file.  You can add these entries to the system's /etc/magic
  1362. X# file, or if your version of "file" supports the -m flag you can use
  1363. X# them that way.
  1364. X#
  1365. X# All of these entries use the "string" format so that they will work on
  1366. X# both big-endian and little-endian machines.
  1367. X
  1368. X0    string        \037\235        compressed file
  1369. X0    string        begin            uuencoded file
  1370. X0    string        xbtoa            btoa'd file
  1371. X
  1372. X0    string        P1            PBM file
  1373. X0    string        P2            PGM file
  1374. X0    string        P3            PPM file
  1375. X0    string        P4            PBM "rawbits" file
  1376. X0    string        P5            PGM "rawbits" file
  1377. X0    string        P6            PPM "rawbits" file
  1378. X
  1379. X0    string        \361\0\100\273        CMU window manager bitmap
  1380. X0    string        \131\246\152\225    Sun rasterfile
  1381. X0    string        yz            MGR bitmap
  1382. X0    string        \115\115        TIFF file, big-endian
  1383. X0    string        \111\111        TIFF file, little-endian
  1384. X0    string        GIF87a            GIF file
  1385. X0    string        GIF89a            GIF file
  1386. X8    string        ILBM            IFF ILBM file
  1387. X0    string        This\040is\040a\040BitMap\040file    Lisp Machine bit-array-file
  1388. X0    string        !!            Bennet Yee's "face" format
  1389. SHAR_EOF
  1390. if test 1080 -ne "`wc -c < 'magic'`"
  1391. then
  1392.     echo shar: error transmitting "'magic'" '(should have been 1080 characters)'
  1393. fi
  1394. fi # end of overwriting check
  1395. #    End of shell archive
  1396. exit 0
  1397.  
  1398. exit 0 # Just in case...
  1399. -- 
  1400. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  1401. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  1402. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  1403. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  1404.