home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1991-08-11 | 165.4 KB | 4,890 lines
diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/all.bat pbmplus.new/all.bat *** pbmplus.old/all.bat --- pbmplus.new/all.bat Sat Jul 20 14:13:32 1991 *************** *** 0 **** --- 1,15 ---- + @rem Batch program to make separate pbmplus utilities. + + cd pbm + make all + call exepbm + cd ..\pgm + make all + call exepgm + cd ..\ppm + make all + call exeppm + cd ..\pnm + make all + call exepnm + cd .. diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/merge.bat pbmplus.new/merge.bat *** pbmplus.old/merge.bat --- pbmplus.new/merge.bat Sat Jul 20 14:14:42 1991 *************** *** 0 **** --- 1,11 ---- + @rem Batch program to make merged pbmplus utilities. + + cd pbm + make merge + cd ..\pgm + make merge + cd ..\ppm + make merge + cd ..\pnm + make merge + cd .. diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/brushtop.c pbmplus.new/pbm/brushtop.c *** pbmplus.old/pbm/brushtop.c Fri Apr 12 00:30:32 1991 --- pbmplus.new/pbm/brushtop.c Sat Jun 15 10:58:56 1991 *************** *** 33,38 **** --- 33,41 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + getinit( ifp, &cols, &rows ); pbm_writepbminit( stdout, cols, rows, 0 ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/cmuwmtop.c pbmplus.new/pbm/cmuwmtop.c *** pbmplus.old/pbm/cmuwmtop.c Fri Apr 12 00:30:34 1991 --- pbmplus.new/pbm/cmuwmtop.c Sat Jun 15 11:01:10 1991 *************** *** 35,40 **** --- 35,43 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + getinit( ifp, &cols, &rows, &depth, &padright ); if ( depth != 1 ) pm_error( diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/delpbm.bat pbmplus.new/pbm/delpbm.bat *** pbmplus.old/pbm/delpbm.bat --- pbmplus.new/pbm/delpbm.bat Fri Apr 12 22:46:42 1991 *************** *** 0 **** --- 1,36 ---- + del BRUSHTOP + del CMUWMTOP + del G3TOPBM + del GEMTOPBM + del ICONTOPB + del MACPTOPB + del MGRTOPBM + del PBMLIFE + del PBMMAKE + del PBMMASK + del PBMPASTE + del PBMREDUC + del PBMTEXT + del PBMTO10X + del PBMTOASC + del PBMTOBBN + del PBMTOCMU + del PBMTOEPS + del PBMTOG3 + del PBMTOGEM + del PBMTOGO + del PBMTOICO + del PBMTOLJ + del PBMTOMAC + del PBMTOMGR + del PBMTOPI3 + del PBMTOPLO + del PBMTOPTX + del PBMTOX10 + del PBMTOXBM + del PBMTOYBM + del PBMTOZIN + del PBMUPC + del PI3TOPBM + del XBMTOPBM + del YBMTOPBM diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/exepbm.bat pbmplus.new/pbm/exepbm.bat *** pbmplus.old/pbm/exepbm.bat --- pbmplus.new/pbm/exepbm.bat Fri Apr 12 22:46:26 1991 *************** *** 0 **** --- 1,36 ---- + copy /b c:\gcc\bin\stub.exe+BRUSHTOP BRUSHTOP.exe + copy /b c:\gcc\bin\stub.exe+CMUWMTOP CMUWMTOP.exe + copy /b c:\gcc\bin\stub.exe+G3TOPBM G3TOPBM.exe + copy /b c:\gcc\bin\stub.exe+GEMTOPBM GEMTOPBM.exe + copy /b c:\gcc\bin\stub.exe+ICONTOPB ICONTOPB.exe + copy /b c:\gcc\bin\stub.exe+MACPTOPB MACPTOPB.exe + copy /b c:\gcc\bin\stub.exe+MGRTOPBM MGRTOPBM.exe + copy /b c:\gcc\bin\stub.exe+PBMLIFE PBMLIFE.exe + copy /b c:\gcc\bin\stub.exe+PBMMAKE PBMMAKE.exe + copy /b c:\gcc\bin\stub.exe+PBMMASK PBMMASK.exe + copy /b c:\gcc\bin\stub.exe+PBMPASTE PBMPASTE.exe + copy /b c:\gcc\bin\stub.exe+PBMREDUC PBMREDUC.exe + copy /b c:\gcc\bin\stub.exe+PBMTEXT PBMTEXT.exe + copy /b c:\gcc\bin\stub.exe+PBMTO10X PBMTO10X.exe + copy /b c:\gcc\bin\stub.exe+PBMTOASC PBMTOASC.exe + copy /b c:\gcc\bin\stub.exe+PBMTOBBN PBMTOBBN.exe + copy /b c:\gcc\bin\stub.exe+PBMTOCMU PBMTOCMU.exe + copy /b c:\gcc\bin\stub.exe+PBMTOEPS PBMTOEPS.exe + copy /b c:\gcc\bin\stub.exe+PBMTOG3 PBMTOG3.exe + copy /b c:\gcc\bin\stub.exe+PBMTOGEM PBMTOGEM.exe + copy /b c:\gcc\bin\stub.exe+PBMTOGO PBMTOGO.exe + copy /b c:\gcc\bin\stub.exe+PBMTOICO PBMTOICO.exe + copy /b c:\gcc\bin\stub.exe+PBMTOLJ PBMTOLJ.exe + copy /b c:\gcc\bin\stub.exe+PBMTOMAC PBMTOMAC.exe + copy /b c:\gcc\bin\stub.exe+PBMTOMGR PBMTOMGR.exe + copy /b c:\gcc\bin\stub.exe+PBMTOPI3 PBMTOPI3.exe + copy /b c:\gcc\bin\stub.exe+PBMTOPLO PBMTOPLO.exe + copy /b c:\gcc\bin\stub.exe+PBMTOPTX PBMTOPTX.exe + copy /b c:\gcc\bin\stub.exe+PBMTOX10 PBMTOX10.exe + copy /b c:\gcc\bin\stub.exe+PBMTOXBM PBMTOXBM.exe + copy /b c:\gcc\bin\stub.exe+PBMTOYBM PBMTOYBM.exe + copy /b c:\gcc\bin\stub.exe+PBMTOZIN PBMTOZIN.exe + copy /b c:\gcc\bin\stub.exe+PBMUPC PBMUPC.exe + copy /b c:\gcc\bin\stub.exe+PI3TOPBM PI3TOPBM.exe + copy /b c:\gcc\bin\stub.exe+XBMTOPBM XBMTOPBM.exe + copy /b c:\gcc\bin\stub.exe+YBMTOPBM YBMTOPBM.exe diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/g3topbm.c pbmplus.new/pbm/g3topbm.c *** pbmplus.old/pbm/g3topbm.c Fri Apr 12 00:30:30 1991 --- pbmplus.new/pbm/g3topbm.c Sat Jun 15 10:52:50 1991 *************** *** 76,81 **** --- 76,84 ---- if ( argn != argc ) pm_usage( usage ); + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + eols = 0; if ( kludge ) diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/gemtopbm.c pbmplus.new/pbm/gemtopbm.c *** pbmplus.old/pbm/gemtopbm.c Fri Apr 12 00:30:32 1991 --- pbmplus.new/pbm/gemtopbm.c Sat Jun 15 20:40:00 1991 *************** *** 112,117 **** --- 112,120 ---- f = pm_openr( argv[1] ); + setmode( fileno( f ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if (fread(&hd, sizeof hd, 1, f) != 1) pm_perror( "read" ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/icontopb.c pbmplus.new/pbm/icontopb.c *** pbmplus.old/pbm/icontopb.c Fri Apr 12 00:30:28 1991 --- pbmplus.new/pbm/icontopb.c Sat Jun 15 10:55:26 1991 *************** *** 31,36 **** --- 31,39 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + ReadIconFile( ifp, &cols, &rows, &data ); pm_close( ifp ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/imakefil pbmplus.new/pbm/imakefil *** pbmplus.old/pbm/imakefil Fri Apr 12 00:30:28 1991 --- pbmplus.new/pbm/imakefil *************** *** 1,64 **** - # Imakefile for pbm tools. - # - # Copyright (C) 1989, 1991 by Jef Poskanzer. - # - # Permission to use, copy, modify, and distribute this software and its - # documentation for any purpose and without fee is hereby granted, provided - # that the above copyright notice appear in all copies and that both that - # copyright notice and this permission notice appear in supporting - # documentation. This software is provided "as is" without express or - # implied warranty. - - ALLCFLAGS = $(CFLAGS) - LIBPBM = libpbm.a - - BINARIES = brushtopbm cmuwmtopbm g3topbm icontopbm gemtopbm \ - macptopbm mgrtopbm pbmlife pbmmake pbmmask \ - pbmpaste pbmreduce pbmtext pbmto10x pbmtoascii \ - pbmtobbnbg pbmtocmuwm pbmtoepson pbmtog3 \ - pbmtogem pbmtogo pbmtoicon pbmtolj pbmtomacp \ - pbmtomgr pbmtopi3 pbmtoplot pbmtoptx \ - pbmtox10bm pbmtoxbm pbmtoybm pbmtozinc \ - pbmupc pi3topbm xbmtopbm \ - ybmtopbm - - MANUALS1 = brushtopbm.1 cmuwmtopbm.1 g3topbm.1 icontopbm.1 gemtopbm.1 \ - macptopbm.1 mgrtopbm.1 pbmlife.1 pbmmake.1 pbmmask.1 \ - pbmpaste.1 pbmreduce.1 pbmtext.1 pbmto10x.1 pbmtoascii.1 \ - pbmtobbnbg.1 pbmtocmuwm.1 pbmtoepson.1 pbmtog3.1 \ - pbmtogem.1 pbmtogo.1 pbmtoicon.1 pbmtolj.1 pbmtomacp.1 \ - pbmtomgr.1 pbmtopi3.1 pbmtoplot.1 pbmtoptx.1 \ - pbmtox10bm.1 pbmtoxbm.1 pbmtoybm.1 pbmtozinc.1 \ - pbmupc.1 pi3topbm.1 xbmtopbm.1 \ - ybmtopbm.1 - MANUALS3 = libpbm.3 - MANUALS5 = pbm.5 - - all: $(BINARIES) - - install:: all - cp $(BINARIES) $(BINDIR) - - install.man:: - cp $(MANUALS1) $(MANUALS3) $(MANUALS5) $(MANDIR) - - # Rule for plain programs. - $(BINARIES): pbm.h ../pbmplus.h $(LIBPBM) - $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBPBM) - - # And library. - $(LIBPBM): libpbm1.o libpbm2.o libpbm3.o libpbm4.o libpbm5.o - -rm $(LIBPBM) - $(AR) $(LIBPBM) libpbm1.o libpbm2.o libpbm3.o libpbm4.o libpbm5.o - -$(RANLIB) $(LIBPBM) - - libpbm1.o: pbm.h ../pbmplus.h libpbm.h libpbm1.c - $(CC) $(ALLCFLAGS) -c libpbm1.c - libpbm2.o: pbm.h ../pbmplus.h libpbm.h libpbm2.c - $(CC) $(ALLCFLAGS) -c libpbm2.c - libpbm3.o: pbm.h ../pbmplus.h libpbm.h libpbm3.c - $(CC) $(ALLCFLAGS) -c libpbm3.c - libpbm4.o: pbm.h ../pbmplus.h libpbm.h libpbm4.c - $(CC) $(ALLCFLAGS) -c libpbm4.c - libpbm5.o: pbm.h ../pbmplus.h pbmfont.h libpbm5.c - $(CC) $(ALLCFLAGS) -c libpbm5.c --- 0 ---- diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/macptopb.c pbmplus.new/pbm/macptopb.c *** pbmplus.old/pbm/macptopb.c Fri Apr 12 00:30:28 1991 --- pbmplus.new/pbm/macptopb.c Sat Jun 15 10:46:16 1991 *************** *** 53,58 **** --- 53,61 ---- if ( argn != argc ) pm_usage( usage ); + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + ReadMacPaintFile( ifp, extraskip, &scanLine, Pic ); pm_close( ifp ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/makefile pbmplus.new/pbm/makefile *** pbmplus.old/pbm/makefile Fri Apr 12 00:30:28 1991 --- pbmplus.new/pbm/makefile Fri Jul 19 18:15:08 1991 *************** *** 1,3 **** --- 1,4 ---- + .SUFFIXES: .out .o .c .e .r # Makefile for pbm tools. # # Copyright (C) 1989, 1991 by Jef Poskanzer. *************** *** 10,22 **** # implied warranty. # Default values, usually overridden by top-level Makefile. ! CC = cc ! #CC = gcc -fcombine-regs -fpcc-struct-return ! #CFLAGS = -O ! CFLAGS = -g #CFLAGS = -g -O ! #LDFLAGS = -s ! LDFLAGS = INSTALLBINARIES = /usr/new/pbm INSTALLMANUALS1 = /usr/man/man1 SUFFIXMANUALS1 = 1 --- 11,23 ---- # implied warranty. # Default values, usually overridden by top-level Makefile. ! #CC = cc ! CC = gcc -fcombine-regs ! CFLAGS = -O ! #CFLAGS = -g #CFLAGS = -g -O ! LDFLAGS = -s ! #LDFLAGS = INSTALLBINARIES = /usr/new/pbm INSTALLMANUALS1 = /usr/man/man1 SUFFIXMANUALS1 = 1 *************** *** 26,32 **** SUFFIXMANUALS5 = 5 MANCP = cp ! SHELL = /bin/sh ALLCFLAGS = $(CFLAGS) LIBPBM = libpbm.a --- 27,33 ---- SUFFIXMANUALS5 = 5 MANCP = cp ! SHELL = command ALLCFLAGS = $(CFLAGS) LIBPBM = libpbm.a *************** *** 56,63 **** all: binaries - binaries: $(BINARIES) installbinaries: binaries --- 57,65 ---- all: binaries + command /c exepbm + command /c delpbm binaries: $(BINARIES) installbinaries: binaries *************** *** 61,80 **** binaries: $(BINARIES) installbinaries: binaries ! cd $(INSTALLBINARIES) ; rm -f $(BINARIES) cp $(BINARIES) $(INSTALLBINARIES) merge: pbmmerge pbmmerge: pbmmerge.c $(OBJECTS) $(LIBPBM) ! $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(OBJECTS) $(LIBPBM) installmerge: installpbmmerge installpbmmerge: pbmmerge ! cd $(INSTALLBINARIES) ; rm -f $(BINARIES) cp pbmmerge $(INSTALLBINARIES) cd $(INSTALLBINARIES) ; for i in $(BINARIES) ; do ln pbmmerge $$i ; done ! rm $(INSTALLBINARIES)/pbmmerge installmanuals: --- 63,82 ---- binaries: $(BINARIES) installbinaries: binaries ! cd $(INSTALLBINARIES) ; -command /c rm -f $(BINARIES) cp $(BINARIES) $(INSTALLBINARIES) merge: pbmmerge pbmmerge: pbmmerge.c $(OBJECTS) $(LIBPBM) ! $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c @pbmmerge.lst installmerge: installpbmmerge installpbmmerge: pbmmerge ! cd $(INSTALLBINARIES) ; command /c rm -f $(BINARIES) cp pbmmerge $(INSTALLBINARIES) cd $(INSTALLBINARIES) ; for i in $(BINARIES) ; do ln pbmmerge $$i ; done ! command /c rm $(INSTALLBINARIES)/pbmmerge installmanuals: *************** *** 85,91 **** # Rules for plain programs. $(BINARIES): pbm.h ../pbmplus.h $(LIBPBM) ! $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBPBM) $(OBJECTS): pbm.h ../pbmplus.h $(CC) $(ALLCFLAGS) "-Dmain=$*_main" -c $*.c --- 87,93 ---- # Rules for plain programs. $(BINARIES): pbm.h ../pbmplus.h $(LIBPBM) ! $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c @pbmall.lst $(OBJECTS): pbm.h ../pbmplus.h $(CC) $(ALLCFLAGS) "-Dmain=$*_main" -c $*.c *************** *** 92,100 **** # And library. lib: $(LIBPBM) $(LIBPBM): libpbm1.o libpbm2.o libpbm3.o libpbm4.o libpbm5.o ! -rm $(LIBPBM) ar rc $(LIBPBM) libpbm1.o libpbm2.o libpbm3.o libpbm4.o libpbm5.o - -ranlib $(LIBPBM) libpbm1.o: pbm.h ../pbmplus.h libpbm.h libpbm1.c $(CC) $(ALLCFLAGS) -c libpbm1.c --- 94,101 ---- # And library. lib: $(LIBPBM) $(LIBPBM): libpbm1.o libpbm2.o libpbm3.o libpbm4.o libpbm5.o ! -command /c rm $(LIBPBM) ar rc $(LIBPBM) libpbm1.o libpbm2.o libpbm3.o libpbm4.o libpbm5.o libpbm1.o: pbm.h ../pbmplus.h libpbm.h libpbm1.c $(CC) $(ALLCFLAGS) -c libpbm1.c *************** *** 146,152 **** ybmtopbm ybmtopbm.o: ybmtopbm.c clean: ! -rm -f *.o *.a *.cat core $(BINARIES) pbmmerge # Imakefile stuff. Ignore if you're not an X11 type. --- 147,153 ---- ybmtopbm ybmtopbm.o: ybmtopbm.c clean: ! -command /c rm -f *.o *.a *.cat core $(BINARIES) pbmmerge # Imakefile stuff. Ignore if you're not an X11 type. diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/mgrtopbm.c pbmplus.new/pbm/mgrtopbm.c *** pbmplus.old/pbm/mgrtopbm.c Fri Apr 12 00:30:32 1991 --- pbmplus.new/pbm/mgrtopbm.c Sat Jun 15 10:59:38 1991 *************** *** 34,39 **** --- 34,42 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + getinit( ifp, &cols, &rows, &depth, &padright ); if ( depth != 1 ) pm_error( "MGR file has depth of %d, must be 1", depth, 0,0,0,0 ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmall.lst pbmplus.new/pbm/pbmall.lst *** pbmplus.old/pbm/pbmall.lst --- pbmplus.new/pbm/pbmall.lst Thu Jul 18 18:22:04 1991 *************** *** 0 **** --- 1 ---- + libpbm.a diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmlife.c pbmplus.new/pbm/pbmlife.c *** pbmplus.old/pbm/pbmlife.c Fri Apr 12 00:30:32 1991 --- pbmplus.new/pbm/pbmlife.c Sat Jun 15 10:59:02 1991 *************** *** 30,35 **** --- 30,38 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + bits = pbm_readpbm( ifp, &cols, &rows ); pbm_writepbminit( stdout, cols, rows, 0 ); bitrow = pbm_allocrow( cols ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmmake.c pbmplus.new/pbm/pbmmake.c *** pbmplus.old/pbm/pbmmake.c Fri Apr 12 00:30:30 1991 --- pbmplus.new/pbm/pbmmake.c Sat Jun 15 20:50:52 1991 *************** *** 55,60 **** --- 55,62 ---- if ( argn != argc ) pm_usage( usage ); + setmode( fileno( stdout ), O_BINARY ); + pbm_writepbminit( stdout, cols, rows, 0 ); bitrow = pbm_allocrow( cols ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmmask.c pbmplus.new/pbm/pbmmask.c *** pbmplus.old/pbm/pbmmask.c Fri Apr 12 00:30:36 1991 --- pbmplus.new/pbm/pbmmask.c Sat Jun 15 10:46:46 1991 *************** *** 55,60 **** --- 55,63 ---- if ( argn != argc ) pm_usage( usage ); + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + bits = pbm_readpbm( ifp, &cols, &rows ); pm_close( ifp ); mask = pbm_allocarray( cols, rows ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmmerge.c pbmplus.new/pbm/pbmmerge.c *** pbmplus.old/pbm/pbmmerge.c Fri Apr 12 00:30:36 1991 --- pbmplus.new/pbm/pbmmerge.c Thu Jul 18 20:47:04 1991 *************** *** 28,69 **** #define TRY(s,m) { if ( strcmp( cp, s ) == 0 ) m( argc, argv ); } ! TRY( "brushtopbm", brushtopbm_main ); ! TRY( "cmuwmtopbm", cmuwmtopbm_main ); ! TRY( "g3topbm", g3topbm_main ); ! TRY( "icontopbm", icontopbm_main ); ! TRY( "gemtopbm", gemtopbm_main ); ! TRY( "macptopbm", macptopbm_main ); ! TRY( "mgrtopbm", mgrtopbm_main ); ! TRY( "pbmlife", pbmlife_main ); ! TRY( "pbmmake", pbmmake_main ); ! TRY( "pbmmask", pbmmask_main ); ! TRY( "pbmpaste", pbmpaste_main ); ! TRY( "pbmreduce", pbmreduce_main ); ! TRY( "pbmtext", pbmtext_main ); ! TRY( "pbmto10x", pbmto10x_main ); ! TRY( "pbmtoascii", pbmtoascii_main ); ! TRY( "pbmtobbnbg", pbmtobbnbg_main ); ! TRY( "pbmtocmuwm", pbmtocmuwm_main ); ! TRY( "pbmtoepson", pbmtoepson_main ); ! TRY( "pbmtog3", pbmtog3_main ); ! TRY( "pbmtogem", pbmtogem_main ); ! TRY( "pbmtogo", pbmtogo_main ); ! TRY( "pbmtoicon", pbmtoicon_main ); ! TRY( "pbmtolj", pbmtolj_main ); ! TRY( "pbmtomacp", pbmtomacp_main ); ! TRY( "pbmtomgr", pbmtomgr_main ); ! TRY( "pbmtopi3", pbmtopi3_main ); ! TRY( "pbmtoplot", pbmtoplot_main ); ! TRY( "pbmtoptx", pbmtoptx_main ); ! TRY( "pbmtox10bm", pbmtox10bm_main ); ! TRY( "pbmtoxbm", pbmtoxbm_main ); ! TRY( "pbmtoybm", pbmtoybm_main ); ! TRY( "pbmtozinc", pbmtozinc_main ); ! TRY( "pbmupc", pbmupc_main ); ! TRY( "pi3topbm", pi3topbm_main ); ! TRY( "xbmtopbm", xbmtopbm_main ); ! TRY( "ybmtopbm", ybmtopbm_main ); (void) fprintf( stderr, "pbmmerge: \"%s\" is an unknown PBM program!\n", cp ); --- 28,69 ---- #define TRY(s,m) { if ( strcmp( cp, s ) == 0 ) m( argc, argv ); } ! TRY( "brushtop.exe", brushtopbm_main ); ! TRY( "cmuwmtop.exe", cmuwmtopbm_main ); ! TRY( "g3topbm.exe", g3topbm_main ); ! TRY( "icontopb.exe", icontopbm_main ); ! TRY( "gemtopbm.exe", gemtopbm_main ); ! TRY( "macptopb.exe", macptopbm_main ); ! TRY( "mgrtopbm.exe", mgrtopbm_main ); ! TRY( "pbmlife.exe", pbmlife_main ); ! TRY( "pbmmake.exe", pbmmake_main ); ! TRY( "pbmmask.exe", pbmmask_main ); ! TRY( "pbmpaste.exe", pbmpaste_main ); ! TRY( "pbmreduc.exe", pbmreduce_main ); ! TRY( "pbmtext.exe", pbmtext_main ); ! TRY( "pbmto10x.exe", pbmto10x_main ); ! TRY( "pbmtoasc.exe", pbmtoascii_main ); ! TRY( "pbmtobbn.exe", pbmtobbnbg_main ); ! TRY( "pbmtocmu.exe", pbmtocmuwm_main ); ! TRY( "pbmtoeps.exe", pbmtoepson_main ); ! TRY( "pbmtog3.exe", pbmtog3_main ); ! TRY( "pbmtogem.exe", pbmtogem_main ); ! TRY( "pbmtogo.exe", pbmtogo_main ); ! TRY( "pbmtoico.exe", pbmtoicon_main ); ! TRY( "pbmtolj.exe", pbmtolj_main ); ! TRY( "pbmtomac.exe", pbmtomacp_main ); ! TRY( "pbmtomgr.exe", pbmtomgr_main ); ! TRY( "pbmtopi3.exe", pbmtopi3_main ); ! TRY( "pbmtoplo.exe", pbmtoplot_main ); ! TRY( "pbmtoptx.exe", pbmtoptx_main ); ! TRY( "pbmtox10.exe", pbmtox10bm_main ); ! TRY( "pbmtoxbm.exe", pbmtoxbm_main ); ! TRY( "pbmtoybm.exe", pbmtoybm_main ); ! TRY( "pbmtozin.exe", pbmtozinc_main ); ! TRY( "pbmupc.exe", pbmupc_main ); ! TRY( "pi3topbm.exe", pi3topbm_main ); ! TRY( "xbmtopbm.exe", xbmtopbm_main ); ! TRY( "ybmtopbm.exe", ybmtopbm_main ); (void) fprintf( stderr, "pbmmerge: \"%s\" is an unknown PBM program!\n", cp ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmmerge.lst pbmplus.new/pbm/pbmmerge.lst *** pbmplus.old/pbm/pbmmerge.lst --- pbmplus.new/pbm/pbmmerge.lst Thu Jul 18 20:44:16 1991 *************** *** 0 **** --- 1,37 ---- + brushtop.o + cmuwmtop.o + g3topbm.o + icontopb.o + gemtopbm.o + macptopb.o + mgrtopbm.o + pbmlife.o + pbmmake.o + pbmmask.o + pbmpaste.o + pbmreduc.o + pbmtext.o + pbmto10x.o + pbmtoasc.o + pbmtobbn.o + pbmtocmu.o + pbmtoeps.o + pbmtog3.o + pbmtogem.o + pbmtogo.o + pbmtoico.o + pbmtolj.o + pbmtomac.o + pbmtomgr.o + pbmtopi3.o + pbmtoplo.o + pbmtoptx.o + pbmtox10.o + pbmtoxbm.o + pbmtoybm.o + pbmtozin.o + pbmupc.o + pi3topbm.o + xbmtopbm.o + ybmtopbm.o + libpbm.a diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmpaste.c pbmplus.new/pbm/pbmpaste.c *** pbmplus.old/pbm/pbmpaste.c Fri Apr 12 00:30:30 1991 --- pbmplus.new/pbm/pbmpaste.c Sat Jun 15 10:54:20 1991 *************** *** 72,77 **** --- 72,82 ---- ifp2 = pm_openr( argv[argn] ); ++argn; } + + setmode( fileno( ifp1 ), O_BINARY ); + setmode( fileno( ifp2 ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + bits2 = pbm_readpbm( ifp2, &cols2, &rows2 ); pm_close( ifp2 ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmreduc.c pbmplus.new/pbm/pbmreduc.c *** pbmplus.old/pbm/pbmreduc.c Fri Apr 12 00:30:32 1991 --- pbmplus.new/pbm/pbmreduc.c Sat Jun 15 11:00:08 1991 *************** *** 75,80 **** --- 75,83 ---- if ( argn != argc ) pm_usage( usage ); + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pbm_readpbminit( ifp, &cols, &rows, &format ); bitslice = pbm_allocarray( cols, n ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmtext.c pbmplus.new/pbm/pbmtext.c *** pbmplus.old/pbm/pbmtext.c Fri Apr 12 00:30:34 1991 --- pbmplus.new/pbm/pbmtext.c Sat Jun 15 10:58:44 1991 *************** *** 52,57 **** --- 52,58 ---- if ( argn == argc ) pm_usage( usage ); ifp = pm_openr( argv[argn] ); + setmode( fileno( ifp ), O_BINARY ); pbm_freearray( font, frows ); font = pbm_readpbm( ifp, &fcols, &frows ); pm_close( ifp ); *************** *** 63,68 **** --- 64,72 ---- pm_usage( usage ); ++argn; } + + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); if ( dump ) { diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmto10x.c pbmplus.new/pbm/pbmto10x.c *** pbmplus.old/pbm/pbmto10x.c Fri Apr 12 00:30:36 1991 --- pbmplus.new/pbm/pbmto10x.c Sat Jun 15 10:48:06 1991 *************** *** 37,42 **** --- 37,45 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pbm_readpbminit(ifp, &cols, &rows, &format); if (highres) res_120x144(); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmtoasc.c pbmplus.new/pbm/pbmtoasc.c *** pbmplus.old/pbm/pbmtoasc.c Fri Apr 12 00:30:30 1991 --- pbmplus.new/pbm/pbmtoasc.c Sat Jun 15 10:52:58 1991 *************** *** 30,35 **** --- 30,38 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + bits = pbm_readpbm( ifp, &cols, &rows ); pm_close( ifp ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmtobbn.c pbmplus.new/pbm/pbmtobbn.c *** pbmplus.old/pbm/pbmtobbn.c Fri Apr 12 00:30:36 1991 --- pbmplus.new/pbm/pbmtobbn.c Sat Jun 15 10:56:06 1991 *************** *** 37,42 **** --- 37,45 ---- pbm_init( &argc, argv ); + setmode( fileno( stdin ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + op = 3; switch (argc) { case 1: diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmtocmu.c pbmplus.new/pbm/pbmtocmu.c *** pbmplus.old/pbm/pbmtocmu.c Fri Apr 12 00:30:34 1991 --- pbmplus.new/pbm/pbmtocmu.c Sat Jun 15 10:58:50 1991 *************** *** 33,38 **** --- 33,41 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pbm_readpbminit( ifp, &cols, &rows, &format ); bitrow = pbm_allocrow( cols ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmtoeps.c pbmplus.new/pbm/pbmtoeps.c *** pbmplus.old/pbm/pbmtoeps.c Fri Apr 12 00:30:36 1991 --- pbmplus.new/pbm/pbmtoeps.c Sat Jun 15 10:46:40 1991 *************** *** 37,42 **** --- 37,45 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + bits = pbm_readpbm( ifp, &cols, &rows ); pm_close( ifp ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmtog3.c pbmplus.new/pbm/pbmtog3.c *** pbmplus.old/pbm/pbmtog3.c Fri Apr 12 00:30:32 1991 --- pbmplus.new/pbm/pbmtog3.c Sat Jun 15 11:01:22 1991 *************** *** 52,57 **** --- 52,60 ---- if ( argn != argc ) pm_usage( usage ); + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pbm_readpbminit( ifp, &cols, &rows, &format ); bigcols = max( 1728, cols ); bitrow = pbm_allocrow( bigcols ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmtogem.c pbmplus.new/pbm/pbmtogem.c *** pbmplus.old/pbm/pbmtogem.c Fri Apr 12 00:30:36 1991 --- pbmplus.new/pbm/pbmtogem.c Sat Jun 15 10:47:08 1991 *************** *** 60,65 **** --- 60,68 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pbm_readpbminit( ifp, &cols, &rows, &format ); if (cols > MAXCOL * 16) diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmtogo.c pbmplus.new/pbm/pbmtogo.c *** pbmplus.old/pbm/pbmtogo.c Fri Apr 12 00:30:32 1991 --- pbmplus.new/pbm/pbmtogo.c Sat Jun 15 10:59:32 1991 *************** *** 77,82 **** --- 77,85 ---- else ifd = stdin; + setmode( fileno( ifd ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pbm_readpbminit(ifd, &cols, &rows, &format); bitrow = pbm_allocrow(cols); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmtoico.c pbmplus.new/pbm/pbmtoico.c *** pbmplus.old/pbm/pbmtoico.c Fri Apr 12 00:30:30 1991 --- pbmplus.new/pbm/pbmtoico.c Sat Jun 15 10:54:58 1991 *************** *** 32,37 **** --- 32,40 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pbm_readpbminit( ifp, &cols, &rows, &format ); bitrow = pbm_allocrow( cols ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmtolj.c pbmplus.new/pbm/pbmtolj.c *** pbmplus.old/pbm/pbmtolj.c Fri Apr 12 00:30:30 1991 --- pbmplus.new/pbm/pbmtolj.c Sat Jun 15 10:52:18 1991 *************** *** 65,70 **** --- 65,73 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmtomac.c pbmplus.new/pbm/pbmtomac.c *** pbmplus.old/pbm/pbmtomac.c Fri Apr 12 00:30:32 1991 --- pbmplus.new/pbm/pbmtomac.c Sat Jun 15 11:01:50 1991 *************** *** 83,88 **** --- 83,91 ---- if ( argn != argc ) pm_usage( usage ); + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + bitsr = pbm_readpbm( ifp, &cols, &rows ); pm_close( ifp ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmtomgr.c pbmplus.new/pbm/pbmtomgr.c *** pbmplus.old/pbm/pbmtomgr.c Fri Apr 12 00:30:36 1991 --- pbmplus.new/pbm/pbmtomgr.c Sat Jun 15 10:48:18 1991 *************** *** 33,38 **** --- 33,41 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pbm_readpbminit( ifp, &cols, &rows, &format ); bitrow = pbm_allocrow( cols ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmtopi3.c pbmplus.new/pbm/pbmtopi3.c *** pbmplus.old/pbm/pbmtopi3.c Fri Apr 12 00:30:36 1991 --- pbmplus.new/pbm/pbmtopi3.c Sat Jun 15 10:46:52 1991 *************** *** 36,41 **** --- 36,44 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pbm_readpbminit( ifp, &cols, &rows, &format ); if (cols > 640) cols = 640; diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmtoplo.c pbmplus.new/pbm/pbmtoplo.c *** pbmplus.old/pbm/pbmtoplo.c Fri Apr 12 00:30:32 1991 --- pbmplus.new/pbm/pbmtoplo.c Sat Jun 15 11:00:38 1991 *************** *** 37,42 **** --- 37,45 ---- ifp = (argc == 2) ? pm_openr( argv[1] ) : stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + bits = pbm_readpbm( ifp, &cols, &rows ); pm_close( ifp ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmtoptx.c pbmplus.new/pbm/pbmtoptx.c *** pbmplus.old/pbm/pbmtoptx.c Fri Apr 12 00:30:30 1991 --- pbmplus.new/pbm/pbmtoptx.c Sat Jun 15 10:55:04 1991 *************** *** 33,38 **** --- 33,41 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pbm_readpbminit( ifp, &cols, &rows, &format ); bitrow = pbm_allocrow( cols ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmtox10.c pbmplus.new/pbm/pbmtox10.c *** pbmplus.old/pbm/pbmtox10.c Fri Apr 12 00:30:30 1991 --- pbmplus.new/pbm/pbmtox10.c Sat Jun 15 10:54:28 1991 *************** *** 49,54 **** --- 49,57 ---- strcpy( name, "noname" ); } + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pbm_readpbminit( ifp, &cols, &rows, &format ); bitrow = pbm_allocrow( cols ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmtoxbm.c pbmplus.new/pbm/pbmtoxbm.c *** pbmplus.old/pbm/pbmtoxbm.c Fri Apr 12 00:30:30 1991 --- pbmplus.new/pbm/pbmtoxbm.c Sat Jun 15 10:54:52 1991 *************** *** 49,54 **** --- 49,57 ---- strcpy( name, "noname" ); } + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pbm_readpbminit( ifp, &cols, &rows, &format ); bitrow = pbm_allocrow( cols ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmtoybm.c pbmplus.new/pbm/pbmtoybm.c *** pbmplus.old/pbm/pbmtoybm.c Fri Apr 12 00:30:36 1991 --- pbmplus.new/pbm/pbmtoybm.c Sat Jun 15 10:47:16 1991 *************** *** 36,41 **** --- 36,44 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pbm_readpbminit( ifp, &cols, &rows, &format ); bitrow = pbm_allocrow( cols ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmtozin.c pbmplus.new/pbm/pbmtozin.c *** pbmplus.old/pbm/pbmtozin.c Fri Apr 12 00:30:36 1991 --- pbmplus.new/pbm/pbmtozin.c Sat Jun 15 10:46:30 1991 *************** *** 59,64 **** --- 59,67 ---- strcpy( name, "noname" ); } + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pbm_readpbminit( ifp, &cols, &rows, &format ); bitrow = pbm_allocrow( cols ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pbmupc.c pbmplus.new/pbm/pbmupc.c *** pbmplus.old/pbm/pbmupc.c Fri Apr 12 00:30:34 1991 --- pbmplus.new/pbm/pbmupc.c Sat Jun 15 21:01:54 1991 *************** *** 63,68 **** --- 63,70 ---- if ( argn != argc ) pm_usage( usage ); + setmode( fileno( stdout ), O_BINARY ); + if ( strlen( typecode ) != 1 || ( ! alldig( typecode ) ) || strlen( manufcode ) != 5 || ( ! alldig ( manufcode ) ) || strlen( prodcode ) != 5 || ( ! alldig ( prodcode ) ) ) diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/pi3topbm.c pbmplus.new/pbm/pi3topbm.c *** pbmplus.old/pbm/pi3topbm.c Fri Apr 12 00:30:36 1991 --- pbmplus.new/pbm/pi3topbm.c Sat Jun 15 11:00:56 1991 *************** *** 61,66 **** --- 61,69 ---- else pm_usage("[-d] [pi3file]"); + setmode( fileno( f ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if (fread(&hd, sizeof hd, 1, f) != 1) pm_perror( "read" ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/xbmtopbm.c pbmplus.new/pbm/xbmtopbm.c *** pbmplus.old/pbm/xbmtopbm.c Fri Apr 12 00:30:28 1991 --- pbmplus.new/pbm/xbmtopbm.c Sat Jun 15 10:46:58 1991 *************** *** 31,36 **** --- 31,39 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + ReadBitmapFile( ifp, &cols, &rows, &data ); pm_close( ifp ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbm/ybmtopbm.c pbmplus.new/pbm/ybmtopbm.c *** pbmplus.old/pbm/ybmtopbm.c Fri Apr 12 00:30:36 1991 --- pbmplus.new/pbm/ybmtopbm.c Sat Jun 15 10:55:16 1991 *************** *** 36,41 **** --- 36,44 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + getinit( ifp, &cols, &rows, &depth, &padright ); if ( depth != 1 ) pm_error( diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pbmplus.h pbmplus.new/pbmplus.h *** pbmplus.old/pbmplus.h Fri Apr 12 00:30:52 1991 --- pbmplus.new/pbmplus.h Wed Jul 17 20:24:34 1991 *************** *** 16,21 **** --- 16,22 ---- #include <sys/types.h> #include <ctype.h> #include <stdio.h> + #include <fcntl.h> #if ! ( defined(BSD) || defined(SYSV) || defined(MSDOS)) /* CONFIGURE: If your system is >= 4.2BSD, set the BSD option; if you're a *************** *** 106,114 **** ** that point here, feel free to tweak or remove these declarations. */ #include <malloc.h> ! extern char* malloc(); extern char* realloc(); ! extern char* calloc(); /* End of configurable definitions. */ --- 107,115 ---- ** that point here, feel free to tweak or remove these declarations. */ #include <malloc.h> ! /* extern char* malloc(); extern char* realloc(); ! extern char* calloc(); */ /* End of configurable definitions. */ diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pgm/delpgm.bat pbmplus.new/pgm/delpgm.bat *** pbmplus.old/pgm/delpgm.bat --- pbmplus.new/pgm/delpgm.bat Fri Apr 12 22:47:50 1991 *************** *** 0 **** --- 1,18 ---- + del FITSTOPG + del FSTOPGM + del HIPSTOPG + del LISPMTOP + del PGMBENTL + del PGMEDGE + del PGMENHAN + del PGMHIST + del PGMNORM + del PGMOIL + del PGMRAMP + del PGMTOFIT + del PGMTOFS + del PGMTOLIS + del PGMTOPBM + del PGMTOPS + del PSIDTOPG + del RAWTOPGM diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pgm/exepgm.bat pbmplus.new/pgm/exepgm.bat *** pbmplus.old/pgm/exepgm.bat --- pbmplus.new/pgm/exepgm.bat Fri Apr 12 22:48:48 1991 *************** *** 0 **** --- 1,18 ---- + copy /b c:\gcc\bin\stub.exe+FITSTOPG FITSTOPG.exe + copy /b c:\gcc\bin\stub.exe+FSTOPGM FSTOPGM.exe + copy /b c:\gcc\bin\stub.exe+HIPSTOPG HIPSTOPG.exe + copy /b c:\gcc\bin\stub.exe+LISPMTOP LISPMTOP.exe + copy /b c:\gcc\bin\stub.exe+PGMBENTL PGMBENTL.exe + copy /b c:\gcc\bin\stub.exe+PGMEDGE PGMEDGE.exe + copy /b c:\gcc\bin\stub.exe+PGMENHAN PGMENHAN.exe + copy /b c:\gcc\bin\stub.exe+PGMHIST PGMHIST.exe + copy /b c:\gcc\bin\stub.exe+PGMNORM PGMNORM.exe + copy /b c:\gcc\bin\stub.exe+PGMOIL PGMOIL.exe + copy /b c:\gcc\bin\stub.exe+PGMRAMP PGMRAMP.exe + copy /b c:\gcc\bin\stub.exe+PGMTOFIT PGMTOFIT.exe + copy /b c:\gcc\bin\stub.exe+PGMTOFS PGMTOFS.exe + copy /b c:\gcc\bin\stub.exe+PGMTOLIS PGMTOLIS.exe + copy /b c:\gcc\bin\stub.exe+PGMTOPBM PGMTOPBM.exe + copy /b c:\gcc\bin\stub.exe+PGMTOPS PGMTOPS.exe + copy /b c:\gcc\bin\stub.exe+PSIDTOPG PSIDTOPG.exe + copy /b c:\gcc\bin\stub.exe+RAWTOPGM RAWTOPGM.exe diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pgm/fitstopg.c pbmplus.new/pgm/fitstopg.c *** pbmplus.old/pgm/fitstopg.c Fri Apr 12 00:30:56 1991 --- pbmplus.new/pgm/fitstopg.c Sat Jun 15 20:21:46 1991 *************** *** 69,74 **** --- 69,77 ---- if ( argn != argc ) pm_usage( usage ); + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + read_fits_header( ifp, &h ); if ( ! h.simple ) diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pgm/fstopgm.c pbmplus.new/pgm/fstopgm.c *** pbmplus.old/pgm/fstopgm.c Fri Apr 12 00:30:54 1991 --- pbmplus.new/pgm/fstopgm.c Sat Jun 15 20:28:02 1991 *************** *** 39,44 **** --- 39,47 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( "[fsfile]" ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pgm/hipstopg.c pbmplus.new/pgm/hipstopg.c *** pbmplus.old/pgm/hipstopg.c Fri Apr 12 00:30:54 1991 --- pbmplus.new/pgm/hipstopg.c Sat Jun 15 20:26:12 1991 *************** *** 63,68 **** --- 63,71 ---- if ( argn != argc ) pm_usage( "[hipsfile]" ); + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + read_hips_header( ifp, &h ); cols = h.cols; diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pgm/lispmtop.c pbmplus.new/pgm/lispmtop.c *** pbmplus.old/pgm/lispmtop.c Fri Apr 12 00:30:56 1991 --- pbmplus.new/pgm/lispmtop.c Sat Jun 15 20:25:44 1991 *************** *** 45,50 **** --- 45,53 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + getinit( ifp, &cols, &rows, &depth, &padright ); maxval = 1 << depth; diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pgm/makefile pbmplus.new/pgm/makefile *** pbmplus.old/pgm/makefile Fri Apr 12 00:30:54 1991 --- pbmplus.new/pgm/makefile Fri Jul 19 18:16:14 1991 *************** *** 1,3 **** --- 1,4 ---- + .SUFFIXES: .out .o .c .e .r # Makefile for pgm tools. # # Copyright (C) 1989, 1991 by Jef Poskanzer. *************** *** 10,22 **** # implied warranty. # Default values, usually overridden by top-level Makefile. ! CC = cc ! #CC = gcc -fcombine-regs -fpcc-struct-return ! #CFLAGS = -O ! CFLAGS = -g #CFLAGS = -g -O ! #LDFLAGS = -s ! LDFLAGS = INSTALLBINARIES = /usr/new/pbm INSTALLMANUALS1 = /usr/man/man1 SUFFIXMANUALS1 = 1 --- 11,23 ---- # implied warranty. # Default values, usually overridden by top-level Makefile. ! #CC = cc ! CC = gcc -fcombine-regs ! CFLAGS = -O ! #CFLAGS = -g #CFLAGS = -g -O ! LDFLAGS = -s ! #LDFLAGS = INSTALLBINARIES = /usr/new/pbm INSTALLMANUALS1 = /usr/man/man1 SUFFIXMANUALS1 = 1 *************** *** 32,38 **** DEFPBM = $(PBMDIR)/pbm.h ../pbmplus.h DEFLIBPBM = $(PBMDIR)/libpbm.h ! SHELL = /bin/sh INCLUDE = $(INCLUDEPBM) ALLCFLAGS = $(CFLAGS) $(INCLUDE) LIBPGM = libpgm.a --- 33,39 ---- DEFPBM = $(PBMDIR)/pbm.h ../pbmplus.h DEFLIBPBM = $(PBMDIR)/libpbm.h ! SHELL = command INCLUDE = $(INCLUDEPBM) ALLCFLAGS = $(CFLAGS) $(INCLUDE) LIBPGM = libpgm.a *************** *** 60,79 **** binaries: $(BINARIES) installbinaries: binaries ! cd $(INSTALLBINARIES) ; rm -f $(BINARIES) cp $(BINARIES) $(INSTALLBINARIES) merge: pgmmerge pgmmerge: pgmmerge.c $(OBJECTS) $(LIBPGM) $(LIBPBM) ! $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(OBJECTS) -lm $(LIBPGM) $(LIBPBM) installmerge: installpgmmerge installpgmmerge: pgmmerge ! cd $(INSTALLBINARIES) ; rm -f $(BINARIES) cp pgmmerge $(INSTALLBINARIES) cd $(INSTALLBINARIES) ; for i in $(BINARIES) ; do ln pgmmerge $$i ; done ! rm $(INSTALLBINARIES)/pgmmerge installmanuals: --- 61,80 ---- binaries: $(BINARIES) installbinaries: binaries ! cd $(INSTALLBINARIES) ; command /c rm -f $(BINARIES) cp $(BINARIES) $(INSTALLBINARIES) merge: pgmmerge pgmmerge: pgmmerge.c $(OBJECTS) $(LIBPGM) $(LIBPBM) ! $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c @pgmmerge.lst -lm installmerge: installpgmmerge installpgmmerge: pgmmerge ! cd $(INSTALLBINARIES) ; command /c rm -f $(BINARIES) cp pgmmerge $(INSTALLBINARIES) cd $(INSTALLBINARIES) ; for i in $(BINARIES) ; do ln pgmmerge $$i ; done ! command /c rm $(INSTALLBINARIES)/pgmmerge installmanuals: *************** *** 84,94 **** # Rule for plain programs. $(PORTBINARIES): pgm.h $(DEFPBM) $(LIBPGM) $(LIBPBM) ! $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBPGM) $(LIBPBM) # Rule for math-dependent programs. $(MATHBINARIES): pgm.h $(DEFPBM) $(LIBPGM) $(LIBPBM) ! $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c -lm $(LIBPGM) $(LIBPBM) # Rule for objects. $(OBJECTS): pgm.h $(DEFPBM) --- 85,95 ---- # Rule for plain programs. $(PORTBINARIES): pgm.h $(DEFPBM) $(LIBPGM) $(LIBPBM) ! $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c @pgmall.lst # Rule for math-dependent programs. $(MATHBINARIES): pgm.h $(DEFPBM) $(LIBPGM) $(LIBPBM) ! $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c @pgmall.lst -lm # Rule for objects. $(OBJECTS): pgm.h $(DEFPBM) *************** *** 99,107 **** cd $(PBMDIR) ; make lib lib: $(LIBPGM) $(LIBPGM): libpgm1.o libpgm2.o ! -rm $(LIBPGM) ar rc $(LIBPGM) libpgm1.o libpgm2.o - -ranlib $(LIBPGM) libpgm1.o: pgm.h $(DEFPBM) libpgm.h libpgm1.c $(CC) $(ALLCFLAGS) -c libpgm1.c --- 100,107 ---- cd $(PBMDIR) ; make lib lib: $(LIBPGM) $(LIBPGM): libpgm1.o libpgm2.o ! -command /c rm $(LIBPGM) ar rc $(LIBPGM) libpgm1.o libpgm2.o libpgm1.o: pgm.h $(DEFPBM) libpgm.h libpgm1.c $(CC) $(ALLCFLAGS) -c libpgm1.c *************** *** 129,135 **** rawtopgm rawtopgm.o: rawtopgm.c clean: ! -rm -f *.o *.a *.cat core $(BINARIES) pgmmerge # Imakefile stuff. Ignore if you're not an X11 type. --- 129,135 ---- rawtopgm rawtopgm.o: rawtopgm.c clean: ! -command /c rm -f *.o *.a *.cat core $(BINARIES) pgmmerge # Imakefile stuff. Ignore if you're not an X11 type. diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pgm/pgmall.lst pbmplus.new/pgm/pgmall.lst *** pbmplus.old/pgm/pgmall.lst --- pbmplus.new/pgm/pgmall.lst Thu Jul 18 18:38:10 1991 *************** *** 0 **** --- 1,2 ---- + libpgm.a + ../pbm/libpbm.a diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pgm/pgmbentl.c pbmplus.new/pgm/pgmbentl.c *** pbmplus.old/pgm/pgmbentl.c Fri Apr 12 00:30:58 1991 --- pbmplus.new/pgm/pgmbentl.c Sat Jun 15 20:25:16 1991 *************** *** 40,45 **** --- 40,48 ---- if ( argn != argc ) pm_usage( usage ); + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + gin = pgm_readpgm( ifp, &cols, &rows, &maxval ); pm_close( ifp ); gout = pgm_allocarray( cols, rows ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pgm/pgmedge.c pbmplus.new/pgm/pgmedge.c *** pbmplus.old/pgm/pgmedge.c Fri Apr 12 00:30:58 1991 --- pbmplus.new/pgm/pgmedge.c Sat Jun 15 20:25:06 1991 *************** *** 42,47 **** --- 42,50 ---- pgm_pbmmaxval = 255; /* use larger value for better results */ + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pgm_readpgminit( ifp, &cols, &rows, &maxval, &format ); if ( cols < 3 || rows < 3 ) pm_error( "the image is too small", 0,0,0,0,0 ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pgm/pgmenhan.c pbmplus.new/pgm/pgmenhan.c *** pbmplus.old/pgm/pgmenhan.c Fri Apr 12 00:30:54 1991 --- pbmplus.new/pgm/pgmenhan.c Sat Jun 15 20:24:50 1991 *************** *** 50,55 **** --- 50,58 ---- if ( argn != argc ) pm_usage( usage ); + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pgm_pbmmaxval = 255; /* use a larger value for better (?) results */ grays = pgm_readpgm( ifp, &cols, &rows, &maxval ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pgm/pgmhist.c pbmplus.new/pgm/pgmhist.c *** pbmplus.old/pgm/pgmhist.c Fri Apr 12 00:30:56 1991 --- pbmplus.new/pgm/pgmhist.c Sat Jun 15 20:24:34 1991 *************** *** 39,44 **** --- 39,47 ---- if ( argn != argc ) pm_usage( usage ); + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pgm_readpgminit( ifp, &cols, &rows, &maxval, &format ); grayrow = pgm_allocrow( cols ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pgm/pgmmerge.c pbmplus.new/pgm/pgmmerge.c *** pbmplus.old/pgm/pgmmerge.c Fri Apr 12 00:30:58 1991 --- pbmplus.new/pgm/pgmmerge.c Thu Jul 18 21:04:22 1991 *************** *** 28,51 **** #define TRY(s,m) { if ( strcmp( cp, s ) == 0 ) m( argc, argv ); } ! TRY("fitstopgm", fitstopgm_main); ! TRY("fstopgm", fstopgm_main); ! TRY("hipstopgm", hipstopgm_main); ! TRY("lispmtopgm", lispmtopgm_main); ! TRY("pgmbentley", pgmbentley_main); ! TRY("pgmedge", pgmedge_main); ! TRY("pgmenhance", pgmenhance_main); ! TRY("pgmhist", pgmhist_main); ! TRY("pgmnorm", pgmnorm_main); ! TRY("pgmoil", pgmoil_main); ! TRY("pgmramp", pgmramp_main); ! TRY("pgmtopbm", pgmtopbm_main); ! TRY("pgmtofits", pgmtofits_main); ! TRY("pgmtofs", pgmtofs_main); ! TRY("pgmtolispm", pgmtolispm_main); ! TRY("pgmtops", pgmtops_main); ! TRY("psidtopgm", psidtopgm_main); ! TRY("rawtopgm", rawtopgm_main); (void) fprintf( stderr, "pgmmerge: \"%s\" is an unknown PGM program!\n", cp ); --- 28,51 ---- #define TRY(s,m) { if ( strcmp( cp, s ) == 0 ) m( argc, argv ); } ! TRY("fitstopg.exe", fitstopgm_main); ! TRY("fstopgm.exe", fstopgm_main); ! TRY("hipstopg.exe", hipstopgm_main); ! TRY("lispmtop.exe", lispmtopgm_main); ! TRY("pgmbentl.exe", pgmbentley_main); ! TRY("pgmedge.exe", pgmedge_main); ! TRY("pgmenhan.exe", pgmenhance_main); ! TRY("pgmhist.exe", pgmhist_main); ! TRY("pgmnorm.exe", pgmnorm_main); ! TRY("pgmoil.exe", pgmoil_main); ! TRY("pgmramp.exe", pgmramp_main); ! TRY("pgmtopbm.exe", pgmtopbm_main); ! TRY("pgmtofit.exe", pgmtofits_main); ! TRY("pgmtofs.exe", pgmtofs_main); ! TRY("pgmtolis.exe", pgmtolispm_main); ! TRY("pgmtops.exe", pgmtops_main); ! TRY("psidtopg.exe", psidtopgm_main); ! TRY("rawtopgm.exe", rawtopgm_main); (void) fprintf( stderr, "pgmmerge: \"%s\" is an unknown PGM program!\n", cp ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pgm/pgmmerge.lst pbmplus.new/pgm/pgmmerge.lst *** pbmplus.old/pgm/pgmmerge.lst --- pbmplus.new/pgm/pgmmerge.lst Thu Jul 18 21:02:20 1991 *************** *** 0 **** --- 1,20 ---- + fitstopg.o + fstopgm.o + hipstopg.o + lispmtop.o + pgmbentl.o + pgmenhan.o + pgmhist.o + pgmnorm.o + pgmoil.o + pgmramp.o + pgmtopbm.o + pgmtofit.o + pgmtofs.o + pgmtolis.o + pgmtops.o + psidtopg.o + rawtopgm.o + pgmedge.o + libpgm.a + ../pbm/libpbm.a diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pgm/pgmnorm.c pbmplus.new/pgm/pgmnorm.c *** pbmplus.old/pgm/pgmnorm.c Fri Apr 12 00:30:56 1991 --- pbmplus.new/pgm/pgmnorm.c Sat Jun 15 20:24:22 1991 *************** *** 106,111 **** --- 106,114 ---- if ( argn != argc ) pm_usage( usage ); + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( specbvalue && specwvalue ) { /* Rescale so that bvalue maps to 0, wvalue maps to maxval. */ diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pgm/pgmoil.c pbmplus.new/pgm/pgmoil.c *** pbmplus.old/pgm/pgmoil.c Fri Apr 12 00:30:58 1991 --- pbmplus.new/pgm/pgmoil.c Sat Jun 15 20:24:06 1991 *************** *** 55,60 **** --- 55,63 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pgm/pgmramp.c pbmplus.new/pgm/pgmramp.c *** pbmplus.old/pgm/pgmramp.c Fri Apr 12 00:30:56 1991 --- pbmplus.new/pgm/pgmramp.c Sat Jun 15 21:20:18 1991 *************** *** 51,56 **** --- 51,58 ---- colso2 = cols / 2; rowso2 = rows / 2; + setmode( fileno( stdout ), O_BINARY ); + pgm_writepgminit( stdout, cols, rows, PGM_MAXMAXVAL, 0 ); grayrow = pgm_allocrow( cols ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pgm/pgmtofit.c pbmplus.new/pgm/pgmtofit.c *** pbmplus.old/pgm/pgmtofit.c Fri Apr 12 00:30:54 1991 --- pbmplus.new/pgm/pgmtofit.c Sat Jun 15 20:23:48 1991 *************** *** 37,42 **** --- 37,45 ---- if ( argn != argc ) pm_usage( "[pgmfile]" ); + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pgm_readpgminit( ifp, &cols, &rows, &maxval, &format ); if ( maxval > 255 ) pm_error( "maxval (%d) is greater than maximum of 255", maxval, 0,0,0,0 ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pgm/pgmtofs.c pbmplus.new/pgm/pgmtofs.c *** pbmplus.old/pgm/pgmtofs.c Fri Apr 12 00:30:58 1991 --- pbmplus.new/pgm/pgmtofs.c Sat Jun 15 20:23:42 1991 *************** *** 41,46 **** --- 41,49 ---- if ( argn != argc ) pm_usage( usage ); + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + grays = pgm_readpgm( ifp, &cols, &rows, &maxval ); pm_close( ifp ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pgm/pgmtolis.c pbmplus.new/pgm/pgmtolis.c *** pbmplus.old/pgm/pgmtolis.c Fri Apr 12 00:30:56 1991 --- pbmplus.new/pgm/pgmtolis.c Sat Jun 15 20:23:24 1991 *************** *** 42,47 **** --- 42,50 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pgm_readpgminit( ifp, &cols, &rows, &maxval, &format ); grayrow = pgm_allocrow( cols ); depth = pm_maxvaltobits( maxval ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pgm/pgmtopbm.c pbmplus.new/pgm/pgmtopbm.c *** pbmplus.old/pgm/pgmtopbm.c Fri Apr 12 00:30:56 1991 --- pbmplus.new/pgm/pgmtopbm.c Sat Jun 15 20:23:00 1991 *************** *** 90,95 **** --- 90,98 ---- if ( argn != argc ) pm_usage( usage ); + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pgm_readpgminit( ifp, &cols, &rows, &maxval, &format ); grayrow = pgm_allocrow( cols ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pgm/pgmtops.c pbmplus.new/pgm/pgmtops.c *** pbmplus.old/pgm/pgmtops.c Fri Apr 12 00:30:56 1991 --- pbmplus.new/pgm/pgmtops.c Sat Jun 15 20:22:46 1991 *************** *** 73,78 **** --- 73,81 ---- if ( argn != argc ) pm_usage( usage ); + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pgm_readpgminit( ifp, &cols, &rows, &maxval, &format ); grayrow = pgm_allocrow( cols ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pgm/psidtopg.c pbmplus.new/pgm/psidtopg.c *** pbmplus.old/pgm/psidtopg.c Fri Apr 12 00:30:56 1991 --- pbmplus.new/pgm/psidtopg.c Sat Jun 15 20:22:26 1991 *************** *** 50,55 **** --- 50,58 ---- if ( argn != argc ) pm_usage( usage ); + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + maxval = pm_bitstomaxval( bitspersample ); if ( maxval > PGM_MAXMAXVAL ) pm_error( diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pgm/rawtopgm.c pbmplus.new/pgm/rawtopgm.c *** pbmplus.old/pgm/rawtopgm.c Fri Apr 12 00:30:54 1991 --- pbmplus.new/pgm/rawtopgm.c Sat Jun 15 20:21:58 1991 *************** *** 77,82 **** --- 77,85 ---- "maxval of 255 is too large - try recompiling with a larger gray type", 0,0,0,0,0 ); + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pgm_writepgminit( stdout, cols, rows, (gray) 255, 0 ); grayrow = pgm_allocrow( cols ); for ( i = 0; i < headerskip; ++i ) diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/bitrever.h pbmplus.new/pnm/bitrever.h *** pbmplus.old/pnm/bitrever.h --- pbmplus.new/pnm/bitrever.h Fri Apr 12 00:30:32 1991 *************** *** 0 **** --- 1,44 ---- + /* + ** bitreverse.h + ** + ** This particular array seems to be useful in a lot of bitmap + ** conversion programs. It's not used in pbm because bits are + ** stored one per byte, for easier manipulation. But if you wanted + ** to write, for example, a program to directly convert Sun raster + ** format into X bitmaps, you could use this. + ** + ** Of course, you could also use this fairly slick chunk of code: + ** + ** c = ((c >> 1) & 0x55) | ((c << 1) & 0xaa); + ** c = ((c >> 2) & 0x33) | ((c << 2) & 0xcc); + ** c = ((c >> 4) & 0x0f) | ((c << 4) & 0xf0); + */ + + #ifndef _BITR_H_ + #define _BITR_H_ + + static unsigned char bitreverse[256] = { + 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, + 0x30, 0xb0, 0x70, 0xf0, 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, + 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, 0x04, 0x84, 0x44, 0xc4, + 0x24, 0xa4, 0x64, 0xe4, 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, + 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, 0x1c, 0x9c, 0x5c, 0xdc, + 0x3c, 0xbc, 0x7c, 0xfc, 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, + 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, 0x0a, 0x8a, 0x4a, 0xca, + 0x2a, 0xaa, 0x6a, 0xea, 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, + 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, 0x16, 0x96, 0x56, 0xd6, + 0x36, 0xb6, 0x76, 0xf6, 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, + 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, 0x01, 0x81, 0x41, 0xc1, + 0x21, 0xa1, 0x61, 0xe1, 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, + 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, 0x19, 0x99, 0x59, 0xd9, + 0x39, 0xb9, 0x79, 0xf9, 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, + 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, 0x0d, 0x8d, 0x4d, 0xcd, + 0x2d, 0xad, 0x6d, 0xed, 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, + 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, 0x13, 0x93, 0x53, 0xd3, + 0x33, 0xb3, 0x73, 0xf3, 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, + 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, 0x07, 0x87, 0x47, 0xc7, + 0x27, 0xa7, 0x67, 0xe7, 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, + 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, 0x1f, 0x9f, 0x5f, 0xdf, + 0x3f, 0xbf, 0x7f, 0xff}; + + #endif /*_BITR_H_*/ diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/cmuwm.h pbmplus.new/pnm/cmuwm.h *** pbmplus.old/pnm/cmuwm.h --- pbmplus.new/pnm/cmuwm.h Fri Apr 12 00:30:34 1991 *************** *** 0 **** --- 1,17 ---- + /* cmuwm.h - definitions for the CMU window manager format + */ + + #ifndef _CMUWM_H_ + #define _CMUWM_H_ + + struct cmuwm_header + { + long magic; + long width; + long height; + short depth; + }; + + #define CMUWM_MAGIC 0xf10040bb + + #endif /*_CMUWM_H_*/ diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/delpnm.bat pbmplus.new/pnm/delpnm.bat *** pbmplus.old/pnm/delpnm.bat --- pbmplus.new/pnm/delpnm.bat Fri Apr 12 22:53:10 1991 *************** *** 0 **** --- 1,21 ---- + del PNMARITH + del PNMCAT + del PNMCONVO + del PNMCROP + del PNMCUT + del PNMDEPTH + del PNMENLAR + del PNMFILE + del PNMFLIP + del PNMGAMMA + del PNMINVER + del PNMNORAW + del PNMPASTE + del PNMROTAT + del PNMSCALE + del PNMSHEAR + del PNMTILE + del PNMTORAS + del PNMTOXWD + del RASTTOPN + del XWDTOPNM diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/dithers.h pbmplus.new/pnm/dithers.h *** pbmplus.old/pnm/dithers.h --- pbmplus.new/pnm/dithers.h Fri Apr 12 00:30:56 1991 *************** *** 0 **** --- 1,78 ---- + /* + ** dithers.h + ** + ** Here are some dithering matrices. They are all taken from "Digital + ** Halftoning" by Robert Ulichney, MIT Press, ISBN 0-262-21009-6. + */ + + /* + ** Order-6 ordered dithering matrix. Note that smaller ordered dithers + ** have no advantage over larger ones, so use dither8 instead. + */ + static int dither6[8][8] = { + 1, 59, 15, 55, 2, 56, 12, 52, + 33, 17, 47, 31, 34, 18, 44, 28, + 9, 49, 5, 63, 10, 50, 6, 60, + 41, 25, 37, 21, 42, 26, 38, 22, + 3, 57, 13, 53, 0, 58, 14, 54, + 35, 19, 45, 29, 32, 16, 46, 30, + 11, 51, 7, 61, 8, 48, 4, 62, + 43, 27, 39, 23, 40, 24, 36, 20 }; + + /* Order-8 ordered dithering matrix. */ + static int dither8[16][16] = { + 1,235, 59,219, 15,231, 55,215, 2,232, 56,216, 12,228, 52,212, + 129, 65,187,123,143, 79,183,119,130, 66,184,120,140, 76,180,116, + 33,193, 17,251, 47,207, 31,247, 34,194, 18,248, 44,204, 28,244, + 161, 97,145, 81,175,111,159, 95,162, 98,146, 82,172,108,156, 92, + 9,225, 49,209, 5,239, 63,223, 10,226, 50,210, 6,236, 60,220, + 137, 73,177,113,133, 69,191,127,138, 74,178,114,134, 70,188,124, + 41,201, 25,241, 37,197, 21,255, 42,202, 26,242, 38,198, 22,252, + 169,105,153, 89,165,101,149, 85,170,106,154, 90,166,102,150, 86, + 3,233, 57,217, 13,229, 53,213, 0,234, 58,218, 14,230, 54,214, + 131, 67,185,121,141, 77,181,117,128, 64,186,122,142, 78,182,118, + 35,195, 19,249, 45,205, 29,245, 32,192, 16,250, 46,206, 30,246, + 163, 99,147, 83,173,109,157, 93,160, 96,144, 80,174,110,158, 94, + 11,227, 51,211, 7,237, 61,221, 8,224, 48,208, 4,238, 62,222, + 139, 75,179,115,135, 71,189,125,136, 72,176,112,132, 68,190,126, + 43,203, 27,243, 39,199, 23,253, 40,200, 24,240, 36,196, 20,254, + 171,107,155, 91,167,103,151, 87,168,104,152, 88,164,100,148, 84 }; + + /* Order-3 clustered dithering matrix. */ + static int cluster3[6][6] = { + 9,11,10, 8, 6, 7, + 12,17,16, 5, 0, 1, + 13,14,15, 4, 3, 2, + 8, 6, 7, 9,11,10, + 5, 0, 1,12,17,16, + 4, 3, 2,13,14,15 }; + + /* Order-4 clustered dithering matrix. */ + static int cluster4[8][8] = { + 18,20,19,16,13,11,12,15, + 27,28,29,22, 4, 3, 2, 9, + 26,31,30,21, 5, 0, 1,10, + 23,25,24,17, 8, 6, 7,14, + 13,11,12,15,18,20,19,16, + 4, 3, 2, 9,27,28,29,22, + 5, 0, 1,10,26,31,30,21, + 8, 6, 7,14,23,25,24,17 }; + + /* Order-8 clustered dithering matrix. */ + static int cluster8[16][16] = { + 64, 69, 77, 87, 86, 76, 68, 67, 63, 58, 50, 40, 41, 51, 59, 60, + 70, 94,100,109,108, 99, 93, 75, 57, 33, 27, 18, 19, 28, 34, 52, + 78,101,114,116,115,112, 98, 83, 49, 26, 13, 11, 12, 15, 29, 44, + 88,110,123,124,125,118,107, 85, 39, 17, 4, 3, 2, 9, 20, 42, + 89,111,122,127,126,117,106, 84, 38, 16, 5, 0, 1, 10, 21, 43, + 79,102,119,121,120,113, 97, 82, 48, 25, 8, 6, 7, 14, 30, 45, + 71, 95,103,104,105, 96, 92, 74, 56, 32, 24, 23, 22, 31, 35, 53, + 65, 72, 80, 90, 91, 81, 73, 66, 62, 55, 47, 37, 36, 46, 54, 61, + 63, 58, 50, 40, 41, 51, 59, 60, 64, 69, 77, 87, 86, 76, 68, 67, + 57, 33, 27, 18, 19, 28, 34, 52, 70, 94,100,109,108, 99, 93, 75, + 49, 26, 13, 11, 12, 15, 29, 44, 78,101,114,116,115,112, 98, 83, + 39, 17, 4, 3, 2, 9, 20, 42, 88,110,123,124,125,118,107, 85, + 38, 16, 5, 0, 1, 10, 21, 43, 89,111,122,127,126,117,106, 84, + 48, 25, 8, 6, 7, 14, 30, 45, 79,102,119,121,120,113, 97, 82, + 56, 32, 24, 23, 22, 31, 35, 53, 71, 95,103,104,105, 96, 92, 74, + 62, 55, 47, 37, 36, 46, 54, 61, 65, 72, 80, 90, 91, 81, 73, 66 }; diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/exepnm.bat pbmplus.new/pnm/exepnm.bat *** pbmplus.old/pnm/exepnm.bat --- pbmplus.new/pnm/exepnm.bat Fri Apr 12 22:51:54 1991 *************** *** 0 **** --- 1,21 ---- + copy /b c:\gcc\bin\stub.exe+PNMARITH PNMARITH.exe + copy /b c:\gcc\bin\stub.exe+PNMCAT PNMCAT.exe + copy /b c:\gcc\bin\stub.exe+PNMCONVO PNMCONVO.exe + copy /b c:\gcc\bin\stub.exe+PNMCROP PNMCROP.exe + copy /b c:\gcc\bin\stub.exe+PNMCUT PNMCUT.exe + copy /b c:\gcc\bin\stub.exe+PNMDEPTH PNMDEPTH.exe + copy /b c:\gcc\bin\stub.exe+PNMENLAR PNMENLAR.exe + copy /b c:\gcc\bin\stub.exe+PNMFILE PNMFILE.exe + copy /b c:\gcc\bin\stub.exe+PNMFLIP PNMFLIP.exe + copy /b c:\gcc\bin\stub.exe+PNMGAMMA PNMGAMMA.exe + copy /b c:\gcc\bin\stub.exe+PNMINVER PNMINVER.exe + copy /b c:\gcc\bin\stub.exe+PNMNORAW PNMNORAW.exe + copy /b c:\gcc\bin\stub.exe+PNMPASTE PNMPASTE.exe + copy /b c:\gcc\bin\stub.exe+PNMROTAT PNMROTAT.exe + copy /b c:\gcc\bin\stub.exe+PNMSCALE PNMSCALE.exe + copy /b c:\gcc\bin\stub.exe+PNMSHEAR PNMSHEAR.exe + copy /b c:\gcc\bin\stub.exe+PNMTILE PNMTILE.exe + copy /b c:\gcc\bin\stub.exe+PNMTORAS PNMTORAS.exe + copy /b c:\gcc\bin\stub.exe+PNMTOXWD PNMTOXWD.exe + copy /b c:\gcc\bin\stub.exe+RASTTOPN RASTTOPN.exe + copy /b c:\gcc\bin\stub.exe+XWDTOPNM XWDTOPNM.exe diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/g3.h pbmplus.new/pnm/g3.h *** pbmplus.old/pnm/g3.h --- pbmplus.new/pnm/g3.h Fri Apr 12 00:30:30 1991 *************** *** 0 **** --- 1,231 ---- + /* g3.h - header file for group 3 FAX compression filters + */ + + #ifndef _G3_H_ + #define _G3_H_ + + typedef struct tableentry { + int tabid; + int code; + int length; + int count; + } tableentry; + + #define TWTABLE 23 + #define MWTABLE 24 + #define TBTABLE 25 + #define MBTABLE 26 + #define EXTABLE 27 + #define VRTABLE 28 + + static struct tableentry twtable[] = { + { TWTABLE, 0x35, 8, 0 }, + { TWTABLE, 0x7, 6, 1 }, + { TWTABLE, 0x7, 4, 2 }, + { TWTABLE, 0x8, 4, 3 }, + { TWTABLE, 0xb, 4, 4 }, + { TWTABLE, 0xc, 4, 5 }, + { TWTABLE, 0xe, 4, 6 }, + { TWTABLE, 0xf, 4, 7 }, + { TWTABLE, 0x13, 5, 8 }, + { TWTABLE, 0x14, 5, 9 }, + { TWTABLE, 0x7, 5, 10 }, + { TWTABLE, 0x8, 5, 11 }, + { TWTABLE, 0x8, 6, 12 }, + { TWTABLE, 0x3, 6, 13 }, + { TWTABLE, 0x34, 6, 14 }, + { TWTABLE, 0x35, 6, 15 }, + { TWTABLE, 0x2a, 6, 16 }, + { TWTABLE, 0x2b, 6, 17 }, + { TWTABLE, 0x27, 7, 18 }, + { TWTABLE, 0xc, 7, 19 }, + { TWTABLE, 0x8, 7, 20 }, + { TWTABLE, 0x17, 7, 21 }, + { TWTABLE, 0x3, 7, 22 }, + { TWTABLE, 0x4, 7, 23 }, + { TWTABLE, 0x28, 7, 24 }, + { TWTABLE, 0x2b, 7, 25 }, + { TWTABLE, 0x13, 7, 26 }, + { TWTABLE, 0x24, 7, 27 }, + { TWTABLE, 0x18, 7, 28 }, + { TWTABLE, 0x2, 8, 29 }, + { TWTABLE, 0x3, 8, 30 }, + { TWTABLE, 0x1a, 8, 31 }, + { TWTABLE, 0x1b, 8, 32 }, + { TWTABLE, 0x12, 8, 33 }, + { TWTABLE, 0x13, 8, 34 }, + { TWTABLE, 0x14, 8, 35 }, + { TWTABLE, 0x15, 8, 36 }, + { TWTABLE, 0x16, 8, 37 }, + { TWTABLE, 0x17, 8, 38 }, + { TWTABLE, 0x28, 8, 39 }, + { TWTABLE, 0x29, 8, 40 }, + { TWTABLE, 0x2a, 8, 41 }, + { TWTABLE, 0x2b, 8, 42 }, + { TWTABLE, 0x2c, 8, 43 }, + { TWTABLE, 0x2d, 8, 44 }, + { TWTABLE, 0x4, 8, 45 }, + { TWTABLE, 0x5, 8, 46 }, + { TWTABLE, 0xa, 8, 47 }, + { TWTABLE, 0xb, 8, 48 }, + { TWTABLE, 0x52, 8, 49 }, + { TWTABLE, 0x53, 8, 50 }, + { TWTABLE, 0x54, 8, 51 }, + { TWTABLE, 0x55, 8, 52 }, + { TWTABLE, 0x24, 8, 53 }, + { TWTABLE, 0x25, 8, 54 }, + { TWTABLE, 0x58, 8, 55 }, + { TWTABLE, 0x59, 8, 56 }, + { TWTABLE, 0x5a, 8, 57 }, + { TWTABLE, 0x5b, 8, 58 }, + { TWTABLE, 0x4a, 8, 59 }, + { TWTABLE, 0x4b, 8, 60 }, + { TWTABLE, 0x32, 8, 61 }, + { TWTABLE, 0x33, 8, 62 }, + { TWTABLE, 0x34, 8, 63 }, + }; + + static struct tableentry mwtable[] = { + { MWTABLE, 0x1b, 5, 64 }, + { MWTABLE, 0x12, 5, 128 }, + { MWTABLE, 0x17, 6, 192 }, + { MWTABLE, 0x37, 7, 256 }, + { MWTABLE, 0x36, 8, 320 }, + { MWTABLE, 0x37, 8, 384 }, + { MWTABLE, 0x64, 8, 448 }, + { MWTABLE, 0x65, 8, 512 }, + { MWTABLE, 0x68, 8, 576 }, + { MWTABLE, 0x67, 8, 640 }, + { MWTABLE, 0xcc, 9, 704 }, + { MWTABLE, 0xcd, 9, 768 }, + { MWTABLE, 0xd2, 9, 832 }, + { MWTABLE, 0xd3, 9, 896 }, + { MWTABLE, 0xd4, 9, 960 }, + { MWTABLE, 0xd5, 9, 1024 }, + { MWTABLE, 0xd6, 9, 1088 }, + { MWTABLE, 0xd7, 9, 1152 }, + { MWTABLE, 0xd8, 9, 1216 }, + { MWTABLE, 0xd9, 9, 1280 }, + { MWTABLE, 0xda, 9, 1344 }, + { MWTABLE, 0xdb, 9, 1408 }, + { MWTABLE, 0x98, 9, 1472 }, + { MWTABLE, 0x99, 9, 1536 }, + { MWTABLE, 0x9a, 9, 1600 }, + { MWTABLE, 0x18, 6, 1664 }, + { MWTABLE, 0x9b, 9, 1728 }, + }; + + static struct tableentry tbtable[] = { + { TBTABLE, 0x37, 10, 0 }, + { TBTABLE, 0x2, 3, 1 }, + { TBTABLE, 0x3, 2, 2 }, + { TBTABLE, 0x2, 2, 3 }, + { TBTABLE, 0x3, 3, 4 }, + { TBTABLE, 0x3, 4, 5 }, + { TBTABLE, 0x2, 4, 6 }, + { TBTABLE, 0x3, 5, 7 }, + { TBTABLE, 0x5, 6, 8 }, + { TBTABLE, 0x4, 6, 9 }, + { TBTABLE, 0x4, 7, 10 }, + { TBTABLE, 0x5, 7, 11 }, + { TBTABLE, 0x7, 7, 12 }, + { TBTABLE, 0x4, 8, 13 }, + { TBTABLE, 0x7, 8, 14 }, + { TBTABLE, 0x18, 9, 15 }, + { TBTABLE, 0x17, 10, 16 }, + { TBTABLE, 0x18, 10, 17 }, + { TBTABLE, 0x8, 10, 18 }, + { TBTABLE, 0x67, 11, 19 }, + { TBTABLE, 0x68, 11, 20 }, + { TBTABLE, 0x6c, 11, 21 }, + { TBTABLE, 0x37, 11, 22 }, + { TBTABLE, 0x28, 11, 23 }, + { TBTABLE, 0x17, 11, 24 }, + { TBTABLE, 0x18, 11, 25 }, + { TBTABLE, 0xca, 12, 26 }, + { TBTABLE, 0xcb, 12, 27 }, + { TBTABLE, 0xcc, 12, 28 }, + { TBTABLE, 0xcd, 12, 29 }, + { TBTABLE, 0x68, 12, 30 }, + { TBTABLE, 0x69, 12, 31 }, + { TBTABLE, 0x6a, 12, 32 }, + { TBTABLE, 0x6b, 12, 33 }, + { TBTABLE, 0xd2, 12, 34 }, + { TBTABLE, 0xd3, 12, 35 }, + { TBTABLE, 0xd4, 12, 36 }, + { TBTABLE, 0xd5, 12, 37 }, + { TBTABLE, 0xd6, 12, 38 }, + { TBTABLE, 0xd7, 12, 39 }, + { TBTABLE, 0x6c, 12, 40 }, + { TBTABLE, 0x6d, 12, 41 }, + { TBTABLE, 0xda, 12, 42 }, + { TBTABLE, 0xdb, 12, 43 }, + { TBTABLE, 0x54, 12, 44 }, + { TBTABLE, 0x55, 12, 45 }, + { TBTABLE, 0x56, 12, 46 }, + { TBTABLE, 0x57, 12, 47 }, + { TBTABLE, 0x64, 12, 48 }, + { TBTABLE, 0x65, 12, 49 }, + { TBTABLE, 0x52, 12, 50 }, + { TBTABLE, 0x53, 12, 51 }, + { TBTABLE, 0x24, 12, 52 }, + { TBTABLE, 0x37, 12, 53 }, + { TBTABLE, 0x38, 12, 54 }, + { TBTABLE, 0x27, 12, 55 }, + { TBTABLE, 0x28, 12, 56 }, + { TBTABLE, 0x58, 12, 57 }, + { TBTABLE, 0x59, 12, 58 }, + { TBTABLE, 0x2b, 12, 59 }, + { TBTABLE, 0x2c, 12, 60 }, + { TBTABLE, 0x5a, 12, 61 }, + { TBTABLE, 0x66, 12, 62 }, + { TBTABLE, 0x67, 12, 63 }, + }; + + static struct tableentry mbtable[] = { + { MBTABLE, 0xf, 10, 64 }, + { MBTABLE, 0xc8, 12, 128 }, + { MBTABLE, 0xc9, 12, 192 }, + { MBTABLE, 0x5b, 12, 256 }, + { MBTABLE, 0x33, 12, 320 }, + { MBTABLE, 0x34, 12, 384 }, + { MBTABLE, 0x35, 12, 448 }, + { MBTABLE, 0x6c, 13, 512 }, + { MBTABLE, 0x6d, 13, 576 }, + { MBTABLE, 0x4a, 13, 640 }, + { MBTABLE, 0x4b, 13, 704 }, + { MBTABLE, 0x4c, 13, 768 }, + { MBTABLE, 0x4d, 13, 832 }, + { MBTABLE, 0x72, 13, 896 }, + { MBTABLE, 0x73, 13, 960 }, + { MBTABLE, 0x74, 13, 1024 }, + { MBTABLE, 0x75, 13, 1088 }, + { MBTABLE, 0x76, 13, 1152 }, + { MBTABLE, 0x77, 13, 1216 }, + { MBTABLE, 0x52, 13, 1280 }, + { MBTABLE, 0x53, 13, 1344 }, + { MBTABLE, 0x54, 13, 1408 }, + { MBTABLE, 0x55, 13, 1472 }, + { MBTABLE, 0x5a, 13, 1536 }, + { MBTABLE, 0x5b, 13, 1600 }, + { MBTABLE, 0x64, 13, 1664 }, + { MBTABLE, 0x65, 13, 1728 }, + }; + + static struct tableentry extable[] = { + { EXTABLE, 0x8, 11, 1792 }, + { EXTABLE, 0xc, 11, 1856 }, + { EXTABLE, 0xd, 11, 1920 }, + { EXTABLE, 0x12, 12, 1984 }, + { EXTABLE, 0x13, 12, 2048 }, + { EXTABLE, 0x14, 12, 2112 }, + { EXTABLE, 0x15, 12, 2176 }, + { EXTABLE, 0x16, 12, 2240 }, + { EXTABLE, 0x17, 12, 2304 }, + { EXTABLE, 0x1c, 12, 2368 }, + { EXTABLE, 0x1d, 12, 2432 }, + { EXTABLE, 0x1e, 12, 2496 }, + { EXTABLE, 0x1f, 12, 2560 }, + }; + + #endif /*_G3_H_*/ diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/ilbm.h pbmplus.new/pnm/ilbm.h *** pbmplus.old/pnm/ilbm.h --- pbmplus.new/pnm/ilbm.h Fri Apr 12 00:31:16 1991 *************** *** 0 **** --- 1,36 ---- + /* ilbm.h - header file for IFF ILBM files + */ + + #define RowBytes(cols) ( ( ( (cols) + 15 ) / 16 ) * 2 ) + + /* definitions for BMHD */ + + typedef struct + { + unsigned short w, h; + short x, y; + unsigned char nPlanes, masking, compression, pad1; + unsigned short transparentColor; + unsigned char xAspect, yAspect; + short pageWidth, pageHeight; + } BitMapHeader; + + #define mskNone 0 + #define mskHasMask 1 + #define mskHasTransparentColor 2 + #define mskLasso 3 + + #define cmpNone 0 + #define cmpByteRun1 1 + + /* definitions for CMAP */ + + typedef struct + { + unsigned char r, g, b; + } ColorRegister; + + /* definitions for CAMG */ + + #define vmEXTRA_HALFBRITE 0x80 + #define vmHAM 0x800 diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/libpbm.h pbmplus.new/pnm/libpbm.h *** pbmplus.old/pnm/libpbm.h --- pbmplus.new/pnm/libpbm.h Fri Apr 12 00:30:32 1991 *************** *** 0 **** --- 1,17 ---- + /* libpbm.h - internal header file for libpbm portable bitmap library + */ + + #ifndef _LIBPBM_H_ + #define _LIBPBM_H_ + + /* Here are some routines internal to the pbm library. */ + + char pbm_getc ARGS(( FILE* file )); + unsigned char pbm_getrawbyte ARGS(( FILE* file )); + int pbm_getint ARGS(( FILE* file )); + + int pbm_readmagicnumber ARGS(( FILE* file )); + + void pbm_readpbminitrest ARGS(( FILE* file, int* colsP, int* rowsP )); + + #endif /*_LIBPBM_H_*/ diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/libpgm.h pbmplus.new/pnm/libpgm.h *** pbmplus.old/pnm/libpgm.h --- pbmplus.new/pnm/libpgm.h Fri Apr 12 00:30:54 1991 *************** *** 0 **** --- 1,11 ---- + /* libpgm.h - internal header file for libpgm portable graymap library + */ + + #ifndef _LIBPGM_H_ + #define _LIBPGM_H_ + + /* Here are some routines internal to the pgm library. */ + + void pgm_readpgminitrest ARGS(( FILE* file, int* colsP, int* rowsP, gray* maxvalP )); + + #endif /*_LIBPGM_H_*/ diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/libppm.h pbmplus.new/pnm/libppm.h *** pbmplus.old/pnm/libppm.h --- pbmplus.new/pnm/libppm.h Fri Apr 12 00:31:14 1991 *************** *** 0 **** --- 1,11 ---- + /* libppm.h - internal header file for libppm portable pixmap library + */ + + #ifndef _LIBPPM_H_ + #define _LIBPPM_H_ + + /* Here are some routines internal to the ppm library. */ + + void ppm_readppminitrest ARGS(( FILE* file, int* colsP, int* rowsP, pixval* maxvalP )); + + #endif /*_LIBPPM_H_*/ diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/macp.h pbmplus.new/pnm/macp.h *** pbmplus.old/pnm/macp.h --- pbmplus.new/pnm/macp.h Fri Apr 12 00:30:32 1991 *************** *** 0 **** --- 1,12 ---- + /* macp.h - header file for MacPaint files + */ + + #ifndef _MACP_H_ + #define _MACP_H_ + + #define HEADER_LENGTH 512 + #define MAX_LINES 720 + #define BYTES_WIDE 72 + #define MAX_COLS 576 /* = BYTES_WIDE * 8 */ + + #endif /*_MACP_H_*/ diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/makefile pbmplus.new/pnm/makefile *** pbmplus.old/pnm/makefile Fri Apr 12 00:30:58 1991 --- pbmplus.new/pnm/makefile Fri Jul 19 19:26:40 1991 *************** *** 1,3 **** --- 1,4 ---- + .SUFFIXES: .out .o .c .e .r # Makefile for pnm tools. # # Copyright (C) 1989, 1991 by Jef Poskanzer. *************** *** 10,32 **** # implied warranty. # Default values, usually overridden by top-level Makefile. ! CC = cc ! #CC = gcc -fcombine-regs -fpcc-struct-return ! #CFLAGS = -O ! CFLAGS = -g #CFLAGS = -g -O ! #TIFFDEF = ! #TIFFINC = ! #TIFFLIB = ! #TIFFBINARIES = ! #TIFFOBJECTS = ! TIFFDEF = -DLIBTIFF ! TIFFINC = -I../libtiff ! TIFFLIB = ../libtiff/libtiff.a ! TIFFBINARIES = tifftopnm pnmtotiff ! TIFFOBJECTS = tifftopnm.o pnmtotiff.o ! #LDFLAGS = -s ! LDFLAGS = INSTALLBINARIES = /usr/new/pbm INSTALLSCRIPTS = $(INSTALLBINARIES) INSTALLMANUALS1 = /usr/man/man1 --- 11,33 ---- # implied warranty. # Default values, usually overridden by top-level Makefile. ! #CC = cc ! CC = gcc -fcombine-regs ! CFLAGS = -O ! #CFLAGS = -g #CFLAGS = -g -O ! TIFFDEF = ! TIFFINC = ! TIFFLIB = ! TIFFBINARIES = ! TIFFOBJECTS = ! #TIFFDEF = -DLIBTIFF ! #TIFFINC = -I../libtiff ! #TIFFLIB = ../libtiff/libtiff.a ! #TIFFBINARIES = tifftopnm pnmtotiff ! #TIFFOBJECTS = tifftopnm.o pnmtotiff.o ! LDFLAGS = -s ! #LDFLAGS = INSTALLBINARIES = /usr/new/pbm INSTALLSCRIPTS = $(INSTALLBINARIES) INSTALLMANUALS1 = /usr/man/man1 *************** *** 64,70 **** DEFPBM = $(PBMDIR)/pbm.h DEFLIBPBM = $(PBMDIR)/libpbm.h ! SHELL = /bin/sh INCLUDE = $(INCLUDEPPM) $(INCLUDEPGM) $(INCLUDEPBM) ALLCFLAGS = $(CFLAGS) $(PPMOPT) $(PGMOPT) $(PBMOPT) $(INCLUDE) $(TIFFDEF) $(TIFFINC) LIBPNM = libpnm.a --- 65,71 ---- DEFPBM = $(PBMDIR)/pbm.h DEFLIBPBM = $(PBMDIR)/libpbm.h ! SHELL = command INCLUDE = $(INCLUDEPPM) $(INCLUDEPGM) $(INCLUDEPBM) ALLCFLAGS = $(CFLAGS) $(PPMOPT) $(PGMOPT) $(PBMOPT) $(INCLUDE) $(TIFFDEF) $(TIFFINC) LIBPNM = libpnm.a *************** *** 95,103 **** binaries: $(BINARIES) installbinaries: binaries ! cd $(INSTALLBINARIES) ; rm -f $(BINARIES) cp $(BINARIES) $(INSTALLBINARIES) ! cd $(INSTALLSCRIPTS) ; rm -f $(SCRIPTS) cp $(SCRIPTS) $(INSTALLSCRIPTS) cd $(INSTALLSCRIPTS) ; chmod +x $(SCRIPTS) --- 96,104 ---- binaries: $(BINARIES) installbinaries: binaries ! cd $(INSTALLBINARIES) ; command /c rm -f $(BINARIES) cp $(BINARIES) $(INSTALLBINARIES) ! cd $(INSTALLSCRIPTS) ; command /c rm -f $(SCRIPTS) cp $(SCRIPTS) $(INSTALLSCRIPTS) cd $(INSTALLSCRIPTS) ; chmod +x $(SCRIPTS) *************** *** 104,118 **** merge: pnmmerge pnmmerge: pnmmerge.c $(OBJECTS) $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) ! $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(OBJECTS) -lm $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) $(TIFFLIB) installmerge: installpnmmerge installpnmmerge: pnmmerge ! cd $(INSTALLBINARIES) ; rm -f $(BINARIES) cp pnmmerge $(INSTALLBINARIES) cd $(INSTALLBINARIES) ; for i in $(BINARIES) ; do ln pnmmerge $$i ; done ! rm $(INSTALLBINARIES)/pnmmerge ! cd $(INSTALLSCRIPTS) ; rm -f $(SCRIPTS) cp $(SCRIPTS) $(INSTALLSCRIPTS) cd $(INSTALLSCRIPTS) ; chmod +x $(SCRIPTS) --- 105,119 ---- merge: pnmmerge pnmmerge: pnmmerge.c $(OBJECTS) $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) ! $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c @pnmmerge.lst -lm installmerge: installpnmmerge installpnmmerge: pnmmerge ! cd $(INSTALLBINARIES) ; command /c rm -f $(BINARIES) cp pnmmerge $(INSTALLBINARIES) cd $(INSTALLBINARIES) ; for i in $(BINARIES) ; do ln pnmmerge $$i ; done ! command /c rm $(INSTALLBINARIES)/pnmmerge ! cd $(INSTALLSCRIPTS) ; command /c rm -f $(SCRIPTS) cp $(SCRIPTS) $(INSTALLSCRIPTS) cd $(INSTALLSCRIPTS) ; chmod +x $(SCRIPTS) *************** *** 125,136 **** # Rules for plain programs. $(PORTBINARIES) $(TIFFBINARIES): pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) $(TIFFLIB) ! $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) $(TIFFLIB) # Rule for math-dependent programs. $(MATHBINARIES): pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) $(LIBPNM) \ $(LIBPPM) $(LIBPGM) $(LIBPBM) ! $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c -lm $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) # Rule for objects. $(OBJECTS): pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) --- 126,137 ---- # Rules for plain programs. $(PORTBINARIES) $(TIFFBINARIES): pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) $(LIBPNM) $(LIBPPM) $(LIBPGM) $(LIBPBM) $(TIFFLIB) ! $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c @pnmall.lst # Rule for math-dependent programs. $(MATHBINARIES): pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) $(LIBPNM) \ $(LIBPPM) $(LIBPGM) $(LIBPBM) ! $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c @pnmall.lst -lm # Rule for objects. $(OBJECTS): pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) *************** *** 145,153 **** cd $(PPMDIR) ; make lib lib: $(LIBPNM) $(LIBPNM): libpnm1.o libpnm2.o libpnm3.o libpnm4.o ! -rm $(LIBPNM) ar rc $(LIBPNM) libpnm1.o libpnm2.o libpnm3.o libpnm4.o - -ranlib $(LIBPNM) libpnm1.o: pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm1.c $(CC) $(ALLCFLAGS) -c libpnm1.c --- 146,153 ---- cd $(PPMDIR) ; make lib lib: $(LIBPNM) $(LIBPNM): libpnm1.o libpnm2.o libpnm3.o libpnm4.o ! -command /c rm $(LIBPNM) ar rc $(LIBPNM) libpnm1.o libpnm2.o libpnm3.o libpnm4.o libpnm1.o: pnm.h $(DEFPPM) $(DEFPGM) $(DEFPBM) libpnm1.c $(CC) $(ALLCFLAGS) -c libpnm1.c *************** *** 186,192 **** xwdtopnm xwdtopnm.o: xwdtopnm.c x10wd.h x11wd.h clean: ! -rm -f *.o *.a *.cat core $(BINARIES) pnmmerge # Imakefile stuff. Ignore if you're not an X11 type. --- 186,192 ---- xwdtopnm xwdtopnm.o: xwdtopnm.c x10wd.h x11wd.h clean: ! -command /c rm -f *.o *.a *.cat core $(BINARIES) pnmmerge # Imakefile stuff. Ignore if you're not an X11 type. diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/mgr.h pbmplus.new/pnm/mgr.h *** pbmplus.old/pnm/mgr.h --- pbmplus.new/pnm/mgr.h Fri Apr 12 00:30:32 1991 *************** *** 0 **** --- 1,25 ---- + /* mgr.h - the following defs are taken from the MGR header file lib/dump.h + */ + + #ifndef _MGR_H_ + #define _MGR_H_ + + struct old_b_header { + char magic[2]; + char h_wide; + char l_wide; + char h_high; + char l_high; + }; + + struct b_header { + char magic[2]; + char h_wide; + char l_wide; + char h_high; + char l_high; + char depth; + char _reserved; + }; + + #endif /*_MGR_H_*/ diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pbm.h pbmplus.new/pnm/pbm.h *** pbmplus.old/pnm/pbm.h --- pbmplus.new/pnm/pbm.h Fri Apr 12 00:30:28 1991 *************** *** 0 **** --- 1,46 ---- + /* pbm.h - header file for libpbm portable bitmap library + */ + + #ifndef _PBM_H_ + #define _PBM_H_ + + #include "../pbmplus.h" + + typedef unsigned char bit; + #define PBM_WHITE 0 + #define PBM_BLACK 1 + + + /* Magic constants. */ + + #define PBM_MAGIC1 'P' + #define PBM_MAGIC2 '1' + #define RPBM_MAGIC2 '4' + #define PBM_FORMAT (PBM_MAGIC1 * 256 + PBM_MAGIC2) + #define RPBM_FORMAT (PBM_MAGIC1 * 256 + RPBM_MAGIC2) + #define PBM_TYPE PBM_FORMAT + + + /* Macro for turning a format number into a type number. */ + + #define PBM_FORMAT_TYPE(f) ((f) == PBM_FORMAT || (f) == RPBM_FORMAT ? PBM_TYPE : -1) + + + /* Declarations of routines. */ + + void pbm_init ARGS(( int* argcP, char* argv[] )); + + #define pbm_allocarray( cols, rows ) ((bit**) pm_allocarray( cols, rows, sizeof(bit) )) + #define pbm_allocrow( cols ) ((bit*) pm_allocrow( cols, sizeof(bit) )) + #define pbm_freearray( bits, rows ) pm_freearray( (char**) bits, rows ) + #define pbm_freerow( bitrow ) pm_freerow( (char*) bitrow ) + + bit** pbm_readpbm ARGS(( FILE* file, int* colsP, int* rowsP )); + void pbm_readpbminit ARGS(( FILE* file, int* colsP, int* rowsP, int* formatP )); + void pbm_readpbmrow ARGS(( FILE* file, bit* bitrow, int cols, int format )); + + void pbm_writepbm ARGS(( FILE* file, bit** bits, int cols, int rows, int forceplain )); + void pbm_writepbminit ARGS(( FILE* file, int cols, int rows, int forceplain )); + void pbm_writepbmrow ARGS(( FILE* file, bit* bitrow, int cols, int forceplain )); + + #endif /*_PBM_H_*/ diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pbmfont.h pbmplus.new/pnm/pbmfont.h *** pbmplus.old/pnm/pbmfont.h --- pbmplus.new/pnm/pbmfont.h Fri Apr 12 00:30:34 1991 *************** *** 0 **** --- 1,8 ---- + /* pbmfont.h - header file for font routines in libpbm + */ + + bit** pbm_defaultfont ARGS(( int* fcolsP, int* frowsP )); + + void pbm_dissectfont ARGS(( bit** font, int frows, int fcols, int* char_heightP, int* char_widthP, int char_row0[], int char_col0[] )); + + void pbm_dumpfont ARGS(( bit** font, int fcols, int frows )); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pgm.h pbmplus.new/pnm/pgm.h *** pbmplus.old/pnm/pgm.h --- pbmplus.new/pnm/pgm.h Fri Apr 12 00:30:54 1991 *************** *** 0 **** --- 1,55 ---- + /* pgm.h - header file for libpgm portable graymap library + */ + + #ifndef _PGM_H_ + #define _PGM_H_ + + #include "pbm.h" + + #ifdef PGM_BIGGRAYS + typedef unsigned short gray; + #define PGM_MAXMAXVAL 65535 + #else /*PGM_BIGGRAYS*/ + typedef unsigned char gray; + #define PGM_MAXMAXVAL 255 + #endif /*PGM_BIGGRAYS*/ + + + /* Magic constants. */ + + #define PGM_MAGIC1 'P' + #define PGM_MAGIC2 '2' + #define RPGM_MAGIC2 '5' + #define PGM_FORMAT (PGM_MAGIC1 * 256 + PGM_MAGIC2) + #define RPGM_FORMAT (PGM_MAGIC1 * 256 + RPGM_MAGIC2) + #define PGM_TYPE PGM_FORMAT + + + /* Macro for turning a format number into a type number. */ + + #define PGM_FORMAT_TYPE(f) ((f) == PGM_FORMAT || (f) == RPGM_FORMAT ? PGM_TYPE : PBM_FORMAT_TYPE(f)) + + + /* Declarations of routines. */ + + void pgm_init ARGS(( int* argcP, char* argv[] )); + + #define pgm_allocarray( cols, rows ) ((gray**) pm_allocarray( cols, rows, sizeof(gray) )) + #define pgm_allocrow( cols ) ((gray*) pm_allocrow( cols, sizeof(gray) )) + #define pgm_freearray( grays, rows ) pm_freearray( (char**) grays, rows ) + #define pgm_freerow( grayrow ) pm_freerow( (char*) grayrow ) + + gray** pgm_readpgm ARGS(( FILE* file, int* colsP, int* rowsP, gray* maxvalP )); + void pgm_readpgminit ARGS(( FILE* file, int* colsP, int* rowsP, gray* maxvalP, int* formatP )); + void pgm_readpgmrow ARGS(( FILE* file, gray* grayrow, int cols, gray maxval, int format )); + + void pgm_writepgm ARGS(( FILE* file, gray** grays, int cols, int rows, gray maxval, int forceplain )); + void pgm_writepgminit ARGS(( FILE* file, int cols, int rows, gray maxval, int forceplain )); + void pgm_writepgmrow ARGS(( FILE* file, gray* grayrow, int cols, gray maxval, int forceplain )); + + extern gray pgm_pbmmaxval; + /* This is the maxval used when a PGM program reads a PBM file. Normally + ** it is 1; however, for some programs, a larger value gives better results + */ + + #endif /*_PGM_H_*/ diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pnmall.lst pbmplus.new/pnm/pnmall.lst *** pbmplus.old/pnm/pnmall.lst --- pbmplus.new/pnm/pnmall.lst Thu Jul 18 19:06:26 1991 *************** *** 0 **** --- 1,4 ---- + libpnm.a + ../ppm/libppm.a + ../pgm/libpgm.a + ../pbm/libpbm.a diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pnmarith.c pbmplus.new/pnm/pnmarith.c *** pbmplus.old/pnm/pnmarith.c Fri Apr 12 00:31:06 1991 --- pbmplus.new/pnm/pnmarith.c Sat Jun 15 22:21:40 1991 *************** *** 59,64 **** --- 59,68 ---- ifp2 = pm_openr( argv[argn] ); ++argn; + setmode( fileno( ifp1 ), O_BINARY ); + setmode( fileno( ifp2 ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pnmcat.c pbmplus.new/pnm/pnmcat.c *** pbmplus.old/pnm/pnmcat.c Fri Apr 12 00:31:00 1991 --- pbmplus.new/pnm/pnmcat.c Sat Jun 15 22:30:36 1991 *************** *** 101,106 **** --- 101,110 ---- else ifp[0] = stdin; + for ( i = 0; i < nfiles; ++i ) + setmode( fileno( ifp[i] ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + newcols = 0; newrows = 0; for ( i = 0; i < nfiles; ++i ) diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pnmconvo.c pbmplus.new/pnm/pnmconvo.c *** pbmplus.old/pnm/pnmconvo.c Fri Apr 12 00:31:06 1991 --- pbmplus.new/pnm/pnmconvo.c Sat Jun 15 22:20:22 1991 *************** *** 54,59 **** --- 54,63 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( cifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pnmcrop.c pbmplus.new/pnm/pnmcrop.c *** pbmplus.old/pnm/pnmcrop.c Fri Apr 12 00:31:06 1991 --- pbmplus.new/pnm/pnmcrop.c Sat Jun 15 22:19:52 1991 *************** *** 56,61 **** --- 56,64 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pnmcut.c pbmplus.new/pnm/pnmcut.c *** pbmplus.old/pnm/pnmcut.c Fri Apr 12 00:31:00 1991 --- pbmplus.new/pnm/pnmcut.c Sat Jun 15 22:19:48 1991 *************** *** 46,51 **** --- 46,54 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pnm_readpnminit( ifp, &cols, &rows, &maxval, &format ); xelrow = pnm_allocrow( cols ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pnmdepth.c pbmplus.new/pnm/pnmdepth.c *** pbmplus.old/pnm/pnmdepth.c Fri Apr 12 00:31:10 1991 --- pbmplus.new/pnm/pnmdepth.c Sat Jun 15 22:19:44 1991 *************** *** 47,52 **** --- 47,55 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pnmenlar.c pbmplus.new/pnm/pnmenlar.c *** pbmplus.old/pnm/pnmenlar.c Fri Apr 12 00:31:02 1991 --- pbmplus.new/pnm/pnmenlar.c Sat Jun 15 22:19:40 1991 *************** *** 42,47 **** --- 42,50 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pnmfile.c pbmplus.new/pnm/pnmfile.c *** pbmplus.old/pnm/pnmfile.c Fri Apr 12 00:31:02 1991 --- pbmplus.new/pnm/pnmfile.c Sat Jun 15 22:19:34 1991 *************** *** 30,35 **** --- 30,37 ---- for ( argn = 1; argn < argc; ++argn ) { ifp = pm_openr( argv[argn] ); + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); describe_one( argv[argn], ifp ); pm_close( ifp ); } diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pnmflip.c pbmplus.new/pnm/pnmflip.c *** pbmplus.old/pnm/pnmflip.c Fri Apr 12 00:31:00 1991 --- pbmplus.new/pnm/pnmflip.c Sat Jun 15 22:19:10 1991 *************** *** 64,69 **** --- 64,72 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pnmgamma.c pbmplus.new/pnm/pnmgamma.c *** pbmplus.old/pnm/pnmgamma.c Fri Apr 12 00:31:06 1991 --- pbmplus.new/pnm/pnmgamma.c Sat Jun 15 22:19:06 1991 *************** *** 79,84 **** --- 79,87 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pnminver.c pbmplus.new/pnm/pnminver.c *** pbmplus.old/pnm/pnminver.c Fri Apr 12 00:31:00 1991 --- pbmplus.new/pnm/pnminver.c Sat Jun 15 22:19:02 1991 *************** *** 32,37 **** --- 32,40 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pnm_readpnminit( ifp, &cols, &rows, &maxval, &format ); pnm_writepnminit( stdout, cols, rows, maxval, format, 0 ); xelrow = pnm_allocrow( cols ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pnmmerge.c pbmplus.new/pnm/pnmmerge.c *** pbmplus.old/pnm/pnmmerge.c Fri Apr 12 00:31:02 1991 --- pbmplus.new/pnm/pnmmerge.c Fri Jul 19 19:42:06 1991 *************** *** 28,60 **** #define TRY(s,m) { if ( strcmp( cp, s ) == 0 ) m( argc, argv ); } ! TRY("pnmarith", pnmarith_main); ! TRY("pnmcat", pnmcat_main); ! TRY("pnmconvol", pnmconvol_main); ! TRY("pnmcrop", pnmcrop_main); ! TRY("pnmcut", pnmcut_main); ! TRY("pnmdepth", pnmdepth_main); ! TRY("pnmenlarge", pnmenlarge_main); ! TRY("pnmfile", pnmfile_main); ! TRY("pnmflip", pnmflip_main); ! TRY("pnmgamma", pnmgamma_main); ! TRY("pnminvert", pnminvert_main); ! TRY("pnmnoraw", pnmnoraw_main); ! TRY("pnmpaste", pnmpaste_main); ! TRY("pnmrotate", pnmrotate_main); ! TRY("pnmscale", pnmscale_main); ! TRY("pnmshear", pnmshear_main); ! TRY("pnmtile", pnmtile_main); ! TRY("pnmtorast", pnmtorast_main); #ifdef LIBTIFF ! TRY("pnmtotiff", pnmtotiff_main); #endif /*LIBTIFF*/ ! TRY("pnmtoxwd", pnmtoxwd_main); ! TRY("rasttopnm", rasttopnm_main); #ifdef LIBTIFF ! TRY("tifftopnm", tifftopnm_main); #endif /*LIBTIFF*/ ! TRY("xwdtopnm", xwdtopnm_main); (void) fprintf( stderr, "pnmmerge: \"%s\" is an unknown PNM program!\n", cp ); --- 28,60 ---- #define TRY(s,m) { if ( strcmp( cp, s ) == 0 ) m( argc, argv ); } ! TRY("pnmarith.exe", pnmarith_main); ! TRY("pnmcat.exe", pnmcat_main); ! TRY("pnmconvo.exe", pnmconvol_main); ! TRY("pnmcrop.exe", pnmcrop_main); ! TRY("pnmcut.exe", pnmcut_main); ! TRY("pnmdepth.exe", pnmdepth_main); ! TRY("pnmenlar.exe", pnmenlarge_main); ! TRY("pnmfile.exe", pnmfile_main); ! TRY("pnmflip.exe", pnmflip_main); ! TRY("pnmgamma.exe", pnmgamma_main); ! TRY("pnminver.exe", pnminvert_main); ! TRY("pnmnoraw.exe", pnmnoraw_main); ! TRY("pnmpaste.exe", pnmpaste_main); ! TRY("pnmrotat.exe", pnmrotate_main); ! TRY("pnmscale.exe", pnmscale_main); ! TRY("pnmshear.exe", pnmshear_main); ! TRY("pnmtile.exe", pnmtile_main); ! TRY("pnmtoras.exe", pnmtorast_main); #ifdef LIBTIFF ! TRY("pnmtotif.exe", pnmtotiff_main); #endif /*LIBTIFF*/ ! TRY("pnmtoxwd.exe", pnmtoxwd_main); ! TRY("rasttopn.exe", rasttopnm_main); #ifdef LIBTIFF ! TRY("tifftopn.exe", tifftopnm_main); #endif /*LIBTIFF*/ ! TRY("xwdtopnm.exe", xwdtopnm_main); (void) fprintf( stderr, "pnmmerge: \"%s\" is an unknown PNM program!\n", cp ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pnmmerge.lst pbmplus.new/pnm/pnmmerge.lst *** pbmplus.old/pnm/pnmmerge.lst --- pbmplus.new/pnm/pnmmerge.lst Fri Jul 19 19:39:46 1991 *************** *** 0 **** --- 1,25 ---- + pnmarith.o + pnmcat.o + pnmconvo.o + pnmcrop.o + pnmcut.o + pnmdepth.o + pnmenlar.o + pnmfile.o + pnmflip.o + pnminver.o + pnmnoraw.o + pnmpaste.o + pnmscale.o + pnmtile.o + pnmtoras.o + pnmtoxwd.o + rasttopn.o + xwdtopnm.o + pnmgamma.o + pnmrotat.o + pnmshear.o + libpnm.a + ../ppm/libppm.a + ../pgm/libpgm.a + ../pbm/libpbm.a diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pnmnoraw.c pbmplus.new/pnm/pnmnoraw.c *** pbmplus.old/pnm/pnmnoraw.c Fri Apr 12 00:31:02 1991 --- pbmplus.new/pnm/pnmnoraw.c Sat Jun 15 22:18:52 1991 *************** *** 31,36 **** --- 31,39 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pnm_readpnminit( ifp, &cols, &rows, &maxval, &format ); pnm_writepnminit( stdout, cols, rows, maxval, format, 1 ); xelrow = pnm_allocrow( cols ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pnmpaste.c pbmplus.new/pnm/pnmpaste.c *** pbmplus.old/pnm/pnmpaste.c Fri Apr 12 00:31:00 1991 --- pbmplus.new/pnm/pnmpaste.c Sat Jun 15 22:18:44 1991 *************** *** 56,61 **** --- 56,65 ---- else ifp2 = stdin; + setmode( fileno( ifp1 ), O_BINARY ); + setmode( fileno( ifp2 ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pnmrotat.c pbmplus.new/pnm/pnmrotat.c *** pbmplus.old/pnm/pnmrotat.c Fri Apr 12 00:31:10 1991 --- pbmplus.new/pnm/pnmrotat.c Sat Jun 15 22:18:14 1991 *************** *** 80,85 **** --- 80,88 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pnmscale.c pbmplus.new/pnm/pnmscale.c *** pbmplus.old/pnm/pnmscale.c Fri Apr 12 00:31:10 1991 --- pbmplus.new/pnm/pnmscale.c Sat Jun 15 22:18:10 1991 *************** *** 152,157 **** --- 152,160 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pnmshear.c pbmplus.new/pnm/pnmshear.c *** pbmplus.old/pnm/pnmshear.c Fri Apr 12 00:31:10 1991 --- pbmplus.new/pnm/pnmshear.c Sat Jun 15 22:18:06 1991 *************** *** 73,78 **** --- 73,81 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pnmtile.c pbmplus.new/pnm/pnmtile.c *** pbmplus.old/pnm/pnmtile.c Fri Apr 12 00:31:00 1991 --- pbmplus.new/pnm/pnmtile.c Sat Jun 15 22:18:02 1991 *************** *** 42,47 **** --- 42,50 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + xels = pnm_readpnm( ifp, &cols, &rows, &maxval, &format ); pm_close( ifp ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pnmtoras.c pbmplus.new/pnm/pnmtoras.c *** pbmplus.old/pnm/pnmtoras.c Fri Apr 12 00:31:04 1991 --- pbmplus.new/pnm/pnmtoras.c Sat Jun 15 22:17:58 1991 *************** *** 66,71 **** --- 66,74 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pnmtotif.c pbmplus.new/pnm/pnmtotif.c *** pbmplus.old/pnm/pnmtotif.c Fri Apr 12 00:31:08 1991 --- pbmplus.new/pnm/pnmtotif.c Sat Jun 15 22:17:52 1991 *************** *** 72,77 **** --- 72,80 ---- ifp = stdin; } + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + xels = pnm_readpnm( ifp, &cols, &rows, &maxval, &format ); pm_close( ifp ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/pnmtoxwd.c pbmplus.new/pnm/pnmtoxwd.c *** pbmplus.old/pnm/pnmtoxwd.c Fri Apr 12 00:31:06 1991 --- pbmplus.new/pnm/pnmtoxwd.c Sat Jun 15 22:17:40 1991 *************** *** 63,68 **** --- 63,71 ---- dumpname = "stdin"; ifp = stdin; } + + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/ppm.h pbmplus.new/pnm/ppm.h *** pbmplus.old/pnm/ppm.h --- pbmplus.new/pnm/ppm.h Fri Apr 12 00:31:14 1991 *************** *** 0 **** --- 1,91 ---- + /* ppm.h - header file for libppm portable pixmap library + */ + + #ifndef _PPM_H_ + #define _PPM_H_ + + #include "pgm.h" + + typedef gray pixval; + + #ifdef PPM_PACKCOLORS + + #define PPM_MAXMAXVAL 1023 + typedef unsigned long pixel; + #define PPM_GETR(p) (((p) & 0x3ff00000) >> 20) + #define PPM_GETG(p) (((p) & 0xffc00) >> 10) + #define PPM_GETB(p) ((p) & 0x3ff) + #define PPM_ASSIGN(p,red,grn,blu) (p) = ((pixel) (red) << 20) | ((pixel) (grn) << 10) | (pixel) (blu) + #define PPM_EQUAL(p,q) ((p) == (q)) + + #else /*PPM_PACKCOLORS*/ + + #define PPM_MAXMAXVAL PGM_MAXMAXVAL + typedef struct + { + pixval r, g, b; + } pixel; + #define PPM_GETR(p) ((p).r) + #define PPM_GETG(p) ((p).g) + #define PPM_GETB(p) ((p).b) + #define PPM_ASSIGN(p,red,grn,blu) do { (p).r = (red); (p).g = (grn); (p).b = (blu); } while ( 0 ) + #define PPM_EQUAL(p,q) ( (p).r == (q).r && (p).g == (q).g && (p).b == (q).b ) + + #endif /*PPM_PACKCOLORS*/ + + + /* Magic constants. */ + + #define PPM_MAGIC1 'P' + #define PPM_MAGIC2 '3' + #define RPPM_MAGIC2 '6' + #define PPM_FORMAT (PPM_MAGIC1 * 256 + PPM_MAGIC2) + #define RPPM_FORMAT (PPM_MAGIC1 * 256 + RPPM_MAGIC2) + #define PPM_TYPE PPM_FORMAT + + + /* Macro for turning a format number into a type number. */ + + #define PPM_FORMAT_TYPE(f) ((f) == PPM_FORMAT || (f) == RPPM_FORMAT ? PPM_TYPE : PGM_FORMAT_TYPE(f)) + + + /* Declarations of routines. */ + + void ppm_init ARGS(( int* argcP, char* argv[] )); + + #define ppm_allocarray( cols, rows ) ((pixel**) pm_allocarray( cols, rows, sizeof(pixel) )) + #define ppm_allocrow( cols ) ((pixel*) pm_allocrow( cols, sizeof(pixel) )) + #define ppm_freearray( pixels, rows ) pm_freearray( (char**) pixels, rows ) + #define ppm_freerow( pixelrow ) pm_freerow( (char*) pixelrow ) + + pixel** ppm_readppm ARGS(( FILE* file, int* colsP, int* rowsP, pixval* maxvalP )); + void ppm_readppminit ARGS(( FILE* file, int* colsP, int* rowsP, pixval* maxvalP, int* formatP )); + void ppm_readppmrow ARGS(( FILE* file, pixel* pixelrow, int cols, pixval maxval, int format )); + + void ppm_writeppm ARGS(( FILE* file, pixel** pixels, int cols, int rows, pixval maxval, int forceplain )); + void ppm_writeppminit ARGS(( FILE* file, int cols, int rows, pixval maxval, int forceplain )); + void ppm_writeppmrow ARGS(( FILE* file, pixel* pixelrow, int cols, pixval maxval, int forceplain )); + + pixel ppm_parsecolor ARGS(( char* colorname, pixval maxval )); + char* ppm_colorname ARGS(( pixel* colorP, pixval maxval, int hexok )); + + extern pixval ppm_pbmmaxval; + /* This is the maxval used when a PPM program reads a PBM file. Normally + ** it is 1; however, for some programs, a larger value gives better results + */ + + + /* Color scaling macro -- to make writing ppmtowhatever easier. */ + + #define PPM_DEPTH(newp,p,oldmaxval,newmaxval) \ + PPM_ASSIGN( (newp), \ + (int) PPM_GETR(p) * (newmaxval) / (oldmaxval), \ + (int) PPM_GETG(p) * (newmaxval) / (oldmaxval), \ + (int) PPM_GETB(p) * (newmaxval) / (oldmaxval) ) + + + /* Luminance macro. */ + + #define PPM_LUMIN(p) ( 0.299 * PPM_GETR(p) + 0.587 * PPM_GETG(p) + 0.114 * PPM_GETB(p) ) + + #endif /*_PPM_H_*/ diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/ppmcmap.h pbmplus.new/pnm/ppmcmap.h *** pbmplus.old/pnm/ppmcmap.h --- pbmplus.new/pnm/ppmcmap.h Fri Apr 12 00:31:14 1991 *************** *** 0 **** --- 1,44 ---- + /* ppmcmap.h - header file for colormap routines in libppm + */ + + /* Color histogram stuff. */ + + typedef struct colorhist_item* colorhist_vector; + struct colorhist_item + { + pixel color; + int value; + }; + + typedef struct colorhist_list_item* colorhist_list; + struct colorhist_list_item + { + struct colorhist_item ch; + colorhist_list next; + }; + + colorhist_vector ppm_computecolorhist ARGS(( pixel** pixels, int cols, int rows, int maxcolors, int* colorsP )); + /* (Returns a colorhist *colorsP long (with space allocated for maxcolors). */ + + void ppm_addtocolorhist ARGS(( colorhist_vector chv, int* colorsP, int maxcolors, pixel* colorP, int value, int position )); + + void ppm_freecolorhist ARGS(( colorhist_vector chv )); + + + /* Color hash table stuff. */ + + typedef colorhist_list* colorhash_table; + + colorhash_table ppm_computecolorhash ARGS(( pixel** pixels, int cols, int rows, int maxcolors, int* colorsP )); + + int + ppm_lookupcolor ARGS(( colorhash_table cht, pixel* colorP )); + + colorhist_vector ppm_colorhashtocolorhist ARGS(( colorhash_table cht, int maxcolors )); + colorhash_table ppm_colorhisttocolorhash ARGS(( colorhist_vector chv, int colors )); + + void ppm_addtocolorhash ARGS(( colorhash_table cht, pixel* colorP, int value )); + + colorhash_table ppm_alloccolorhash ARGS(( void )); + + void ppm_freecolorhash ARGS(( colorhash_table cht )); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/ppmdraw.h pbmplus.new/pnm/ppmdraw.h *** pbmplus.old/pnm/ppmdraw.h --- pbmplus.new/pnm/ppmdraw.h Fri Apr 12 00:31:14 1991 *************** *** 0 **** --- 1,102 ---- + /* ppmdraw.h - header file for simple drawing routines in libppm + ** + ** Simple, yes, and also fairly slow if the truth be told; but also very + ** flexible and powerful. + ** + ** The two basic concepts are the drawproc and clientdata. All the drawing + ** routines take a drawproc that does the actual drawing. A drawproc draws + ** a single point, and it looks like this: + */ + void ppmd_point_drawproc ARGS(( pixel** pixels, int cols, int rows, pixval maxval, int x, int y, char* clientdata )); + /* + ** So, you call a drawing routine, e.g. ppmd_line(), and pass it a drawproc; + ** it calls the drawproc for each point it wants to draw. Why so complicated? + ** Because you can define your own drawprocs to do more interesting things than + ** simply draw the point. For example, you could make one that calls back into + ** another drawing routine, say ppmd_circle() to draw a circle at each point + ** of a line. + ** + ** Slow? Well sure, we're talking results here, not realtime. You can do + ** tricks with this arrangement that you couldn't even think of before. + ** Still, to speed things up for the 90% case you can use this: + */ + #ifdef __STDC__ + #define PPMD_NULLDRAWPROC (void (*)(pixel**, int, int, pixval, int, int, char*)) 0 + #else /*__STDC__*/ + #define PPMD_NULLDRAWPROC (void (*)()) 0 + #endif /*__STDC__*/ + /* + ** Just like ppmd_point_drawproc() it simply draws the point, but it's done + ** inline, and clipping is assumed to be handled at a higher level. + ** + ** Now, what about clientdata. Well, it's an arbitrary pointer, and can + ** mean something different to each different drawproc. For the above two + ** drawprocs, clientdata should be a pointer to a pixel holding the color + ** to be drawn. Other drawprocs can use it to point to something else, + ** e.g. some structure to be modified, or they can ignore it. + */ + + + /* Outline drawing routines. Lines, splines, circles, etc. */ + + int ppmd_setlinetype ARGS(( int type )); + #define PPMD_LINETYPE_NORMAL 0 + #define PPMD_LINETYPE_NODIAGS 1 + /* If you set NODIAGS, all pixels drawn by ppmd_line() will be 4-connected + ** instead of 8-connected; in other words, no diagonals. This is useful + ** for some applications, for example when you draw many parallel lines + ** and you want them to fit together without gaps. + */ + + int ppmd_setlineclipping ARGS(( int clip )); + /* Normally, ppmd_line() clips to the edges of the pixmap. You can use this + ** routine to disable the clipping, for example if you are using a drawproc + ** that wants to do its own clipping. + */ + + void ppmd_line ARGS(( pixel** pixels, int cols, int rows, pixval maxval, int x0, int y0, int x1, int y1, void (*drawprocP)(pixel**, int, int, pixval, int, int, char*), char* clientdata )); + /* Draws a line from (x0, y0) to (x1, y1). + */ + + void ppmd_spline3 ARGS(( pixel** pixels, int cols, int rows, pixval maxval, int x0, int y0, int x1, int y1, int x2, int y2, void (*drawprocP)(pixel**, int, int, pixval, int, int, char*), char* clientdata )); + /* Draws a three-point spline from (x0, y0) to (x2, y2), with (x1, y1) as + ** the control point. All drawing is done via ppmd_line(), so the routines + ** that control it control ppmd_spline3() as well. + */ + + void ppmd_polyspline ARGS(( pixel** pixels, int cols, int rows, pixval maxval, int x0, int y0, int nc, int* xc, int* yc, int x1, int y1, void (*drawprocP)(pixel**, int, int, pixval, int, int, char*), char* clientdata )); + /* Draws a bunch of splines end to end. (x0, y0) and (x1, y1) are the initial + ** and final points, and the xc and yc are the intermediate control points. + ** nc is the number of these control points. + */ + + void ppmd_circle ARGS(( pixel** pixels, int cols, int rows, pixval maxval, int cx, int cy, int radius, void (*drawprocP)(pixel**, int, int, pixval, int, int, char*), char* clientdata )); + /* Draws a circle centered at (cx, cy) with the specified radius. + */ + + + /* Simple filling routines. Ok, so there's only one. */ + + void ppmd_filledrectangle ARGS(( pixel** pixels, int cols, int rows, pixval maxval, int x, int y, int width, int height, void (*drawprocP)(pixel**, int, int, pixval, int, int, char*), char* clientdata )); + /* Fills in the rectangle [x, y, width, height]. + */ + + + /* Arbitrary filling routines. With these you can fill any outline that + ** you can draw with the outline routines. + */ + + char* ppmd_fill_init( ); + /* Returns a blank fillhandle. + */ + + void ppmd_fill_drawproc ARGS(( pixel** pixels, int cols, int rows, pixval maxval, int x, int y, char* clientdata )); + /* Use this drawproc to trace the outline you want filled. Be sure to use + ** the fillhandle as the clientdata. + */ + + void ppmd_fill ARGS(( pixel** pixels, int cols, int rows, pixval maxval, char* fillhandle, void (*drawprocP)(pixel**, int, int, pixval, int, int, char*), char* clientdata )); + /* Once you've traced the outline, give the fillhandle to this routine to + ** do the actual drawing. As usual, it takes a drawproc and clientdata; + ** you could define drawprocs to do stipple fills and such. + */ diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/rasttopn.c pbmplus.new/pnm/rasttopn.c *** pbmplus.old/pnm/rasttopn.c Fri Apr 12 00:31:04 1991 --- pbmplus.new/pnm/rasttopn.c Sat Jun 15 22:17:34 1991 *************** *** 44,49 **** --- 44,52 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( "[rastfile]" ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/tga.h pbmplus.new/pnm/tga.h *** pbmplus.old/pnm/tga.h --- pbmplus.new/pnm/tga.h Fri Apr 12 00:31:14 1991 *************** *** 0 **** --- 1,39 ---- + /* tga.h - header file for Targa files + */ + + /* Header definition. */ + struct ImageHeader { + unsigned char IDLength; /* length of Identifier String */ + unsigned char CoMapType; /* 0 = no map */ + unsigned char ImgType; /* image type (see below for values) */ + unsigned char Index_lo, Index_hi; /* index of first color map entry */ + unsigned char Length_lo, Length_hi; /* number of entries in color map */ + unsigned char CoSize; /* size of color map entry (15,16,24,32) */ + unsigned char X_org_lo, X_org_hi; /* x origin of image */ + unsigned char Y_org_lo, Y_org_hi; /* y origin of image */ + unsigned char Width_lo, Width_hi; /* width of image */ + unsigned char Height_lo, Height_hi; /* height of image */ + unsigned char PixelSize; /* pixel size (8,16,24,32) */ + unsigned char AttBits; /* 4 bits, number of attribute bits per pixel */ + unsigned char Rsrvd; /* 1 bit, reserved */ + unsigned char OrgBit; /* 1 bit, origin: 0=lower left, 1=upper left */ + unsigned char IntrLve; /* 2 bits, interleaving flag */ + }; + + typedef char ImageIDField[256]; + + /* Definitions for image types. */ + #define TGA_Null 0 + #define TGA_Map 1 + #define TGA_RGB 2 + #define TGA_Mono 3 + #define TGA_RLEMap 9 + #define TGA_RLERGB 10 + #define TGA_RLEMono 11 + #define TGA_CompMap 32 + #define TGA_CompMap4 33 + + /* Definitions for interleave flag. */ + #define TGA_IL_None 0 + #define TGA_IL_Two 1 + #define TGA_IL_Four 2 diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/tifftopn.c pbmplus.new/pnm/tifftopn.c *** pbmplus.old/pnm/tifftopn.c Fri Apr 12 00:31:08 1991 --- pbmplus.new/pnm/tifftopn.c Sat Jun 15 22:17:28 1991 *************** *** 73,78 **** --- 73,82 ---- pm_error( "error opening standard input as TIFF file", 0,0,0,0,0 ); } + + setmode( fileno( tif ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/xim.h pbmplus.new/pnm/xim.h *** pbmplus.old/pnm/xim.h --- pbmplus.new/pnm/xim.h Fri Apr 12 00:32:48 1991 *************** *** 0 **** --- 1,121 ---- + /* xim.h - header file for Xim files + ** + ** Taken from the X.V11R4 version of XimHeader.h: + ** + ** Author: Philip R. Thompson + ** Address: phils@athena.mit.edu, 9-526 + ** Note: size of header should be 1024 (1K) bytes. + ** $Header: /mit/phils/X/RCS/XimHeader.h,v 1.7 89/11/09 17:26:54 phils Exp Locker: phils $ + ** $Date: 89/11/09 17:26:54 $ + ** $Source: /mit/phils/X/RCS/XimHeader.h,v $ + */ + + #define IMAGE_VERSION 3 + #ifndef _BYTE + typedef unsigned char byte; + #define _BYTE 1 + #endif + + /* External ascii file format. */ + typedef struct ImageHeader { + char file_version[8]; /* header version */ + char header_size[8]; /* Size of file header in bytes */ + char image_width[8]; /* Width of the raster image */ + char image_height[8]; /* Height of the raster imgage */ + char num_colors[8]; /* Actual number of entries in c_map */ + char num_channels[3]; /* 0 or 1 = pixmap, 3 = RG&B buffers */ + char bytes_per_line[5]; /* bytes per scanline */ + char num_pictures[4]; /* Number of pictures in file */ + char bits_per_channel[4]; /* usually 1 or 8 */ + char alpha_channel[4]; /* Alpha channel flag */ + char runlength[4]; /* Runlength encoded flag */ + char author[48]; /* Name of who made it */ + char date[32]; /* Date and time image was made */ + char program[16]; /* Program that created this file */ + char comment[96]; /* other viewing info. for this image */ + unsigned char c_map[256][3]; /* RGB values of the pixmap indices */ + } ImageHeader, XimAsciiHeader; + + + /* Internal binary format. */ + typedef struct Color { + byte pixel, red, grn, blu; + } Color; + + typedef struct XimImage { + int width; /* width of the image in pixels */ + int height; /* height of the image in pixels */ + unsigned datasize; /* size of one channel of data */ + short nchannels; /* number data channels in image */ + short bits_channel; /* usually 1 or 8 */ + short bytes_per_line; /* bytes to hold one scanline */ + byte* data; /* pixmap or red channel data */ + byte* grn_data; /* green channel data */ + byte* blu_data; /* blue channel data */ + byte* other; /* other (alpha) data */ + unsigned alpha_flag :1; /* alpha channel flag */ + unsigned packed_flag:1; /* data packed in one chunk of memory */ + unsigned runlen_flag:1; /* runlength encoded data flag */ + unsigned : 0; /* future flags, word alignment */ + short tpics, npics; /* number of images, total & left in file */ + short ncolors; /* " " colors in the color table */ + Color* colors; /* colortable, one byte per r/g/b & pixel */ + char* author; /* author credit, copyright, etc */ + char* date; /* date image was made, grabbed, etc. */ + char* program; /* program used to make this */ + short ncomments; /* number of comments strings */ + char** comments; /* pointers to null terminated strings */ + char* offset; /* original offset in machine memory */ + float chroma_red[2]; /* x, y image chromacity coords */ + float chroma_grn[2]; + float chroma_blu[2]; + float chroma_wht[2]; + float gamma; /* image storage gamma */ + } XimImage; + + /* Future external ascii variable length header - under review. */ + #if (VERSION == 4) + typedef struct XimAsciiHeader { + char file_version[4]; /* header version */ + char header_size[8]; /* Size of file header (fixed part only) */ + char image_height[8]; /* Height of the raster imgage in pixels */ + char image_width[8]; /* Width of the raster image in pixels */ + char bytes_line[8]; /* Actual # of bytes separating scanlines */ + char bits_channel[4]; /* Bits per channel (usually 1 or 8) */ + char num_channels[4]; /* 1 = pixmap, 3 = RG&B buffers */ + char alpha_channel[2]; /* Alpha channel flag */ + char num_colors[4]; /* Number of entries in c_map (if any) */ + char num_pictures[4]; /* Number of images in file */ + char runlength_flag[2]; /* Runlength encoded flag */ + char future_flags[8]; + char author[48]; /* Name of who made it, from passwd entry */ + char date[32]; /* Unix format date */ + char program[32]; /* Program that created this */ + char gamma[12]; /* image storage gamma */ + char chroma_red[24]; /* image red primary chromaticity coords. */ + char chroma_grn[24]; /* " green " " " */ + char chroma_blu[24]; /* " blue " " " */ + char chroma_wht[24]; /* " white point " " */ + char comment_length[8] /* Total length of comments */ + /* char* comment; Null separated comments */ + /* unsigned char c_map[]; RGB Colortable, (ncolors * 3 bytes) */ + } XimAsciiHeader; + #endif /*VERSION 4*/ + + #ifndef rnd + #define rnd(x) ((int)((float)(x) + 0.5)) /* round a float to an int */ + #endif + + /* Note: + * - All data is in char's in order to maintain easily portability + * across machines, and some human readibility. + * - Images may be stored as pixmaps (8 bits/pixel) or as seperate + * red, green, blue channel data (24+ bits/pixel). + * - An alpha channel is optional and is found after every num_channels + * of data. + * - Pixmaps or RGB (and alpha) channel data are stored respectively + * after the header. + * - If num_channels = 1, a pixmap is assumed and the colormap in the + * header is used. + * - Data size = image_width * image_height. + */ diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/pnm/xwdtopnm.c pbmplus.new/pnm/xwdtopnm.c *** pbmplus.old/pnm/xwdtopnm.c Fri Apr 12 00:31:04 1991 --- pbmplus.new/pnm/xwdtopnm.c Sat Jun 15 22:16:38 1991 *************** *** 41,46 **** --- 41,49 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + getinit( ifp, &cols, &rows, &padright, &maxval, &visualclass, &format, &colors ); pnm_writepnminit( stdout, cols, rows, (xelval) maxval, format, 0 ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/delppm.bat pbmplus.new/ppm/delppm.bat *** pbmplus.old/ppm/delppm.bat --- pbmplus.new/ppm/delppm.bat Fri Apr 12 22:49:26 1991 *************** *** 0 **** --- 1,34 ---- + del GIFTOPPM + del GOULDTOP + del ILBMTOPP + del IMGTOPPM + del MTVTOPPM + del PCXTOPPM + del PGMTOPPM + del PI1TOPPM + del PICTTOPP + del PPMHIST + del PPMMAKE + del PPMPAT + del PPMQUANT + del PPMRELIE + del PPMTOGIF + del PPMTOICR + del PPMTOILB + del PPMTOPCX + del PPMTOPGM + del PPMTOPI1 + del PPMTOPIC + del PPMTOPS + del PPMTOPUZ + del PPMTORGB + del PPMTOUIL + del PPMTOXPM + del QRTTOPPM + del RAWTOPPM + del RGB3TOPP + del SPCTOPPM + del SPUTOPPM + del TGATOPPM + del XIMTOPPM + del XPMTOPPM diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/exeppm.bat pbmplus.new/ppm/exeppm.bat *** pbmplus.old/ppm/exeppm.bat --- pbmplus.new/ppm/exeppm.bat Fri Apr 12 22:48:58 1991 *************** *** 0 **** --- 1,34 ---- + copy /b c:\gcc\bin\stub.exe+GIFTOPPM GIFTOPPM.exe + copy /b c:\gcc\bin\stub.exe+GOULDTOP GOULDTOP.exe + copy /b c:\gcc\bin\stub.exe+ILBMTOPP ILBMTOPP.exe + copy /b c:\gcc\bin\stub.exe+IMGTOPPM IMGTOPPM.exe + copy /b c:\gcc\bin\stub.exe+MTVTOPPM MTVTOPPM.exe + copy /b c:\gcc\bin\stub.exe+PCXTOPPM PCXTOPPM.exe + copy /b c:\gcc\bin\stub.exe+PGMTOPPM PGMTOPPM.exe + copy /b c:\gcc\bin\stub.exe+PI1TOPPM PI1TOPPM.exe + copy /b c:\gcc\bin\stub.exe+PICTTOPP PICTTOPP.exe + copy /b c:\gcc\bin\stub.exe+PPMHIST PPMHIST.exe + copy /b c:\gcc\bin\stub.exe+PPMMAKE PPMMAKE.exe + copy /b c:\gcc\bin\stub.exe+PPMPAT PPMPAT.exe + copy /b c:\gcc\bin\stub.exe+PPMQUANT PPMQUANT.exe + copy /b c:\gcc\bin\stub.exe+PPMRELIE PPMRELIE.exe + copy /b c:\gcc\bin\stub.exe+PPMTOGIF PPMTOGIF.exe + copy /b c:\gcc\bin\stub.exe+PPMTOICR PPMTOICR.exe + copy /b c:\gcc\bin\stub.exe+PPMTOILB PPMTOILB.exe + copy /b c:\gcc\bin\stub.exe+PPMTOPCX PPMTOPCX.exe + copy /b c:\gcc\bin\stub.exe+PPMTOPGM PPMTOPGM.exe + copy /b c:\gcc\bin\stub.exe+PPMTOPI1 PPMTOPI1.exe + copy /b c:\gcc\bin\stub.exe+PPMTOPIC PPMTOPIC.exe + copy /b c:\gcc\bin\stub.exe+PPMTOPS PPMTOPS.exe + copy /b c:\gcc\bin\stub.exe+PPMTOPUZ PPMTOPUZ.exe + copy /b c:\gcc\bin\stub.exe+PPMTORGB PPMTORGB.exe + copy /b c:\gcc\bin\stub.exe+PPMTOUIL PPMTOUIL.exe + copy /b c:\gcc\bin\stub.exe+PPMTOXPM PPMTOXPM.exe + copy /b c:\gcc\bin\stub.exe+QRTTOPPM QRTTOPPM.exe + copy /b c:\gcc\bin\stub.exe+RAWTOPPM RAWTOPPM.exe + copy /b c:\gcc\bin\stub.exe+RGB3TOPP RGB3TOPP.exe + copy /b c:\gcc\bin\stub.exe+SPCTOPPM SPCTOPPM.exe + copy /b c:\gcc\bin\stub.exe+SPUTOPPM SPUTOPPM.exe + copy /b c:\gcc\bin\stub.exe+TGATOPPM TGATOPPM.exe + copy /b c:\gcc\bin\stub.exe+XIMTOPPM XIMTOPPM.exe + copy /b c:\gcc\bin\stub.exe+XPMTOPPM XPMTOPPM.exe diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/giftoppm.c pbmplus.new/ppm/giftoppm.c *** pbmplus.old/ppm/giftoppm.c Fri Apr 12 00:31:16 1991 --- pbmplus.new/ppm/giftoppm.c Sat Jun 15 21:40:56 1991 *************** *** 96,101 **** --- 96,104 ---- in = stdin; } + setmode( fileno( in ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if (argn != argc) pm_usage(usage); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/gouldtop.c pbmplus.new/ppm/gouldtop.c *** pbmplus.old/ppm/gouldtop.c Fri Apr 12 00:32:48 1991 --- pbmplus.new/ppm/gouldtop.c Sat Jun 15 21:39:16 1991 *************** *** 39,44 **** --- 39,47 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + getgouldheader( ifp, &cols, &nlines, &bytesperline, &bitsperpixel, &NB); ppm_writeppminit(stdout, cols, nlines, MAXVAL, 0); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/ilbmtopp.c pbmplus.new/ppm/ilbmtopp.c *** pbmplus.old/ppm/ilbmtopp.c Fri Apr 12 00:31:16 1991 --- pbmplus.new/ppm/ilbmtopp.c Sat Jun 15 21:39:10 1991 *************** *** 40,45 **** --- 40,48 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( "[ilbmfile]" ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/imgtoppm.c pbmplus.new/ppm/imgtoppm.c *** pbmplus.old/ppm/imgtoppm.c Fri Apr 12 00:31:22 1991 --- pbmplus.new/ppm/imgtoppm.c Sat Jun 15 21:39:06 1991 *************** *** 40,45 **** --- 40,48 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( "[imgfile]" ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/makefile pbmplus.new/ppm/makefile *** pbmplus.old/ppm/makefile Fri Apr 12 00:31:12 1991 --- pbmplus.new/ppm/makefile Fri Jul 19 19:27:26 1991 *************** *** 1,3 **** --- 1,4 ---- + .SUFFIXES: .out .o .c .e .r # Makefile for ppm tools. # # Copyright (C) 1989, 1991 by Jef Poskanzer. *************** *** 10,23 **** # implied warranty. # Default values, usually overridden by top-level Makefile. ! CC = cc ! #CC = gcc -fcombine-regs -fpcc-struct-return ! #CFLAGS = -O ! CFLAGS = -g #CFLAGS = -g -O ! RGBDEF = -DRGB_DB=\"/usr/lib/X11/rgb.txt\" ! #LDFLAGS = -s ! LDFLAGS = INSTALLBINARIES = /usr/new/pbm INSTALLSCRIPTS = $(INSTALLBINARIES) INSTALLMANUALS1 = /usr/man/mann --- 11,24 ---- # implied warranty. # Default values, usually overridden by top-level Makefile. ! #CC = cc ! CC = gcc -fcombine-regs ! CFLAGS = -O ! #CFLAGS = -g #CFLAGS = -g -O ! #RGBDEF = -DRGB_DB=\"/usr/lib/X11/rgb.txt\" ! LDFLAGS = -s ! #LDFLAGS = INSTALLBINARIES = /usr/new/pbm INSTALLSCRIPTS = $(INSTALLBINARIES) INSTALLMANUALS1 = /usr/man/mann *************** *** 40,46 **** DEFPBM = $(PBMDIR)/pbm.h ../pbmplus.h DEFLIBPBM = $(PBMDIR)/libpbm.h ! SHELL = /bin/sh INCLUDE = $(INCLUDEPGM) $(INCLUDEPBM) ALLCFLAGS = $(CFLAGS) $(RGBDEF) $(INCLUDE) LIBPPM = libppm.a --- 41,47 ---- DEFPBM = $(PBMDIR)/pbm.h ../pbmplus.h DEFLIBPBM = $(PBMDIR)/libpbm.h ! SHELL = command INCLUDE = $(INCLUDEPGM) $(INCLUDEPBM) ALLCFLAGS = $(CFLAGS) $(RGBDEF) $(INCLUDE) LIBPPM = libppm.a *************** *** 78,86 **** binaries: $(BINARIES) installbinaries: binaries ! cd $(INSTALLBINARIES) ; rm -f $(BINARIES) cp $(BINARIES) $(INSTALLBINARIES) ! cd $(INSTALLSCRIPTS) ; rm -f $(SCRIPTS) cp $(SCRIPTS) $(INSTALLSCRIPTS) cd $(INSTALLSCRIPTS) ; chmod +x $(SCRIPTS) --- 79,87 ---- binaries: $(BINARIES) installbinaries: binaries ! cd $(INSTALLBINARIES) ; command /c rm -f $(BINARIES) cp $(BINARIES) $(INSTALLBINARIES) ! cd $(INSTALLSCRIPTS) ; command /c rm -f $(SCRIPTS) cp $(SCRIPTS) $(INSTALLSCRIPTS) cd $(INSTALLSCRIPTS) ; chmod +x $(SCRIPTS) *************** *** 87,101 **** merge: ppmmerge ppmmerge: ppmmerge.c $(OBJECTS) $(LIBPPM) $(LIBPGM) $(LIBPBM) ! $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(OBJECTS) -lm $(LIBPPM) $(LIBPGM) $(LIBPBM) installmerge: installppmmerge installppmmerge: ppmmerge ! cd $(INSTALLBINARIES) ; rm -f $(BINARIES) cp ppmmerge $(INSTALLBINARIES) cd $(INSTALLBINARIES) ; for i in $(BINARIES) ; do ln ppmmerge $$i ; done ! rm $(INSTALLBINARIES)/ppmmerge ! cd $(INSTALLSCRIPTS) ; rm -f $(SCRIPTS) cp $(SCRIPTS) $(INSTALLSCRIPTS) cd $(INSTALLSCRIPTS) ; chmod +x $(SCRIPTS) --- 88,102 ---- merge: ppmmerge ppmmerge: ppmmerge.c $(OBJECTS) $(LIBPPM) $(LIBPGM) $(LIBPBM) ! $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c @ppmmerge.lst -lm installmerge: installppmmerge installppmmerge: ppmmerge ! cd $(INSTALLBINARIES) ; command /c rm -f $(BINARIES) cp ppmmerge $(INSTALLBINARIES) cd $(INSTALLBINARIES) ; for i in $(BINARIES) ; do ln ppmmerge $$i ; done ! command /c rm $(INSTALLBINARIES)/ppmmerge ! cd $(INSTALLSCRIPTS) ; command /c rm -f $(SCRIPTS) cp $(SCRIPTS) $(INSTALLSCRIPTS) cd $(INSTALLSCRIPTS) ; chmod +x $(SCRIPTS) *************** *** 108,118 **** # Rule for plain programs. $(PORTBINARIES): ppm.h $(DEFPGM) $(DEFPBM) $(LIBPPM) $(LIBPGM) $(LIBPBM) ! $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c $(LIBPPM) $(LIBPGM) $(LIBPBM) # Rule for math-dependent programs. $(MATHBINARIES): ppm.h $(DEFPGM) $(DEFPBM) $(LIBPPM) $(LIBPGM) $(LIBPBM) ! $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c -lm $(LIBPPM) $(LIBPGM) $(LIBPBM) # Rule for objects. $(OBJECTS): ppm.h $(DEFPGM) $(DEFPBM) --- 109,119 ---- # Rule for plain programs. $(PORTBINARIES): ppm.h $(DEFPGM) $(DEFPBM) $(LIBPPM) $(LIBPGM) $(LIBPBM) ! $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c @ppmall.lst # Rule for math-dependent programs. $(MATHBINARIES): ppm.h $(DEFPGM) $(DEFPBM) $(LIBPPM) $(LIBPGM) $(LIBPBM) ! $(CC) $(ALLCFLAGS) $(LDFLAGS) -o $@ $@.c @ppmall.lst -lm # Rule for objects. $(OBJECTS): ppm.h $(DEFPGM) $(DEFPBM) *************** *** 125,133 **** cd $(PGMDIR) ; make lib lib: $(LIBPPM) $(LIBPPM): libppm1.o libppm2.o libppm3.o libppm4.o libppm5.o ! -rm $(LIBPPM) ar rc $(LIBPPM) libppm1.o libppm2.o libppm3.o libppm4.o libppm5.o - -ranlib $(LIBPPM) libppm1.o: ppm.h $(DEFPGM) $(DEFPBM) libppm.h libppm1.c $(CC) $(ALLCFLAGS) -c libppm1.c --- 126,133 ---- cd $(PGMDIR) ; make lib lib: $(LIBPPM) $(LIBPPM): libppm1.o libppm2.o libppm3.o libppm4.o libppm5.o ! -command /c rm $(LIBPPM) ar rc $(LIBPPM) libppm1.o libppm2.o libppm3.o libppm4.o libppm5.o libppm1.o: ppm.h $(DEFPGM) $(DEFPBM) libppm.h libppm1.c $(CC) $(ALLCFLAGS) -c libppm1.c *************** *** 178,184 **** xpmtoppm xpmtoppm.o: xpmtoppm.c clean: ! -rm -f *.o *.a *.cat core $(BINARIES) ppmmerge # Imakefile stuff. Ignore if you're not an X11 type. --- 178,184 ---- xpmtoppm xpmtoppm.o: xpmtoppm.c clean: ! -command /c rm -f *.o *.a *.cat core $(BINARIES) ppmmerge # Imakefile stuff. Ignore if you're not an X11 type. diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/mtvtoppm.c pbmplus.new/ppm/mtvtoppm.c *** pbmplus.old/ppm/mtvtoppm.c Fri Apr 12 00:31:14 1991 --- pbmplus.new/ppm/mtvtoppm.c Sat Jun 15 21:38:30 1991 *************** *** 34,39 **** --- 34,42 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + /* Read in the MTV file. First the header. */ if ( fgets( line, MAXLINE, ifp ) == NULL ) pm_error( "unable to read MTV file header", 0,0,0,0,0 ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/pcxtoppm.c pbmplus.new/ppm/pcxtoppm.c *** pbmplus.old/ppm/pcxtoppm.c Fri Apr 12 00:32:46 1991 --- pbmplus.new/ppm/pcxtoppm.c Sat Jun 15 21:38:22 1991 *************** *** 65,70 **** --- 65,73 ---- break; } + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + /* * read the PCX header */ diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/pgmtoppm.c pbmplus.new/ppm/pgmtoppm.c *** pbmplus.old/ppm/pgmtoppm.c Fri Apr 12 00:32:48 1991 --- pbmplus.new/ppm/pgmtoppm.c Sat Jun 15 21:38:14 1991 *************** *** 45,50 **** --- 45,54 ---- if ( argn == argc ) pm_usage( usage ); ifp = pm_openr( argv[argn] ); + + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + mappixels = ppm_readppm( ifp, &mapcols, &maprows, &mapmaxval ); pm_close( ifp ); mapmaxcolor = maprows * mapcols - 1; *************** *** 69,74 **** --- 73,81 ---- } else ifp = stdin; + + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/pi1toppm.c pbmplus.new/ppm/pi1toppm.c *** pbmplus.old/ppm/pi1toppm.c Fri Apr 12 00:32:46 1991 --- pbmplus.new/ppm/pi1toppm.c Sat Jun 15 21:37:22 1991 *************** *** 39,44 **** --- 39,47 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + /* Check resolution word */ (void) pm_readbiglong( ifp, &j ); if ( j != 0 ) diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/picttopp.c pbmplus.new/ppm/picttopp.c *** pbmplus.old/ppm/picttopp.c Fri Apr 12 00:31:26 1991 --- pbmplus.new/ppm/picttopp.c Sat Jun 15 21:37:18 1991 *************** *** 319,324 **** --- 319,327 ---- } else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if (argn != argc) pm_usage(usage); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/ppmall.lst pbmplus.new/ppm/ppmall.lst *** pbmplus.old/ppm/ppmall.lst --- pbmplus.new/ppm/ppmall.lst Thu Jul 18 18:42:14 1991 *************** *** 0 **** --- 1,3 ---- + libppm.a + ../pgm/libpgm.a + ../pbm/libpbm.a diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/ppmhist.c pbmplus.new/ppm/ppmhist.c *** pbmplus.old/ppm/ppmhist.c Fri Apr 12 00:31:22 1991 --- pbmplus.new/ppm/ppmhist.c Sat Jun 15 21:48:42 1991 *************** *** 39,44 **** --- 39,47 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/ppmmake.c pbmplus.new/ppm/ppmmake.c *** pbmplus.old/ppm/ppmmake.c Fri Apr 12 00:32:46 1991 --- pbmplus.new/ppm/ppmmake.c Sat Jun 15 21:37:00 1991 *************** *** 44,49 **** --- 44,51 ---- if ( argn != argc ) pm_usage( usage ); + setmode( fileno( stdout ), O_BINARY ); + ppm_writeppminit( stdout, cols, rows, PPM_MAXMAXVAL, 0 ); pixrow = ppm_allocrow( cols ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/ppmmerge.c pbmplus.new/ppm/ppmmerge.c *** pbmplus.old/ppm/ppmmerge.c Fri Apr 12 00:31:22 1991 --- pbmplus.new/ppm/ppmmerge.c Fri Jul 19 18:47:56 1991 *************** *** 28,66 **** #define TRY(s,m) { if ( strcmp( cp, s ) == 0 ) m( argc, argv ); } ! TRY("giftoppm", giftoppm_main); ! TRY("gouldtoppm", gouldtoppm_main); ! TRY("ilbmtoppm", ilbmtoppm_main); ! TRY("imgtoppm", imgtoppm_main); ! TRY("mtvtoppm", mtvtoppm_main); ! TRY("pcxtoppm", pcxtoppm_main); ! TRY("pgmtoppm", pgmtoppm_main); ! TRY("pi1toppm", pi1toppm_main); ! TRY("picttoppm", picttoppm_main); ! TRY("ppmhist", ppmhist_main); ! TRY("ppmmake", ppmmake_main); ! TRY("ppmpat", ppmpat_main); ! TRY("ppmquant", ppmquant_main); ! TRY("ppmrelief", ppmrelief_main); ! TRY("ppmtogif", ppmtogif_main); ! TRY("ppmtoilbm", ppmtoilbm_main); ! TRY("ppmtopcx", ppmtopcx_main); ! TRY("ppmtopgm", ppmtopgm_main); ! TRY("ppmtopi1", ppmtopi1_main); ! TRY("ppmtopict", ppmtopict_main); ! TRY("ppmtops", ppmtops_main); ! TRY("ppmtopuzz", ppmtopuzz_main); ! TRY("ppmtorgb3", ppmtorgb3_main); ! TRY("ppmtouil", ppmtouil_main); ! TRY("ppmtoxpm", ppmtoxpm_main); ! TRY("qrttoppm", qrttoppm_main); ! TRY("rawtoppm", rawtoppm_main); ! TRY("rgb3toppm", rgb3toppm_main); ! TRY("spctoppm", spctoppm_main); ! TRY("sputoppm", sputoppm_main); ! TRY("tgatoppm", tgatoppm_main); ! TRY("ximtoppm", ximtoppm_main); ! TRY("xpmtoppm", xpmtoppm_main); (void) fprintf( stderr, "ppmmerge: \"%s\" is an unknown PPM program!\n", cp ); --- 28,66 ---- #define TRY(s,m) { if ( strcmp( cp, s ) == 0 ) m( argc, argv ); } ! TRY("giftoppm.exe", giftoppm_main); ! TRY("gouldtop.exe", gouldtoppm_main); ! TRY("ilbmtopp.exe", ilbmtoppm_main); ! TRY("imgtoppm.exe", imgtoppm_main); ! TRY("mtvtoppm.exe", mtvtoppm_main); ! TRY("pcxtoppm.exe", pcxtoppm_main); ! TRY("pgmtoppm.exe", pgmtoppm_main); ! TRY("pi1toppm.exe", pi1toppm_main); ! TRY("picttopp.exe", picttoppm_main); ! TRY("ppmhist.exe", ppmhist_main); ! TRY("ppmmake.exe", ppmmake_main); ! TRY("ppmpat.exe", ppmpat_main); ! TRY("ppmquant.exe", ppmquant_main); ! TRY("ppmrelie.exe", ppmrelief_main); ! TRY("ppmtogif.exe", ppmtogif_main); ! TRY("ppmtoilb.exe", ppmtoilbm_main); ! TRY("ppmtopcx.exe", ppmtopcx_main); ! TRY("ppmtopgm.exe", ppmtopgm_main); ! TRY("ppmtopi1.exe", ppmtopi1_main); ! TRY("ppmtopic.exe", ppmtopict_main); ! TRY("ppmtops.exe", ppmtops_main); ! TRY("ppmtopuz.exe", ppmtopuzz_main); ! TRY("ppmtorgb.exe", ppmtorgb3_main); ! TRY("ppmtouil.exe", ppmtouil_main); ! TRY("ppmtoxpm.exe", ppmtoxpm_main); ! TRY("qrttoppm.exe", qrttoppm_main); ! TRY("rawtoppm.exe", rawtoppm_main); ! TRY("rgb3topp.exe", rgb3toppm_main); ! TRY("spctoppm.exe", spctoppm_main); ! TRY("sputoppm.exe", sputoppm_main); ! TRY("tgatoppm.exe", tgatoppm_main); ! TRY("ximtoppm.exe", ximtoppm_main); ! TRY("xpmtoppm.exe", xpmtoppm_main); (void) fprintf( stderr, "ppmmerge: \"%s\" is an unknown PPM program!\n", cp ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/ppmmerge.lst pbmplus.new/ppm/ppmmerge.lst *** pbmplus.old/ppm/ppmmerge.lst --- pbmplus.new/ppm/ppmmerge.lst Fri Jul 19 18:40:56 1991 *************** *** 0 **** --- 1,37 ---- + giftoppm.o + gouldtop.o + ilbmtopp.o + imgtoppm.o + mtvtoppm.o + pcxtoppm.o + pgmtoppm.o + pi1toppm.o + picttopp.o + ppmhist.o + ppmmake.o + ppmquant.o + ppmrelie.o + ppmtogif.o + ppmtoicr.o + ppmtoilb.o + ppmtopcx.o + ppmtopgm.o + ppmtopi1.o + ppmtopic.o + ppmtops.o + ppmtopuz.o + ppmtorgb.o + ppmtouil.o + ppmtoxpm.o + qrttoppm.o + rawtoppm.o + rgb3topp.o + spctoppm.o + sputoppm.o + tgatoppm.o + ximtoppm.o + xpmtoppm.o + ppmpat.o + libppm.a + ../pgm/libpgm.a + ../pbm/libpbm.a diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/ppmpat.c pbmplus.new/ppm/ppmpat.c *** pbmplus.old/ppm/ppmpat.c Fri Apr 12 00:31:18 1991 --- pbmplus.new/ppm/ppmpat.c Sat Jun 15 21:36:44 1991 *************** *** 37,42 **** --- 37,44 ---- ppm_init( &argc, argv ); + setmode( fileno( stdout ), O_BINARY ); + argn = 1; pattern = PAT_NONE; diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/ppmquant pbmplus.new/ppm/ppmquant *** pbmplus.old/ppm/ppmquant Fri Apr 12 00:31:26 1991 --- pbmplus.new/ppm/ppmquant *************** *** 1,45 **** - #!/bin/csh -f - # - # ppmquantall - run ppmquant on a bunch of files all at once, so they share - # a common colormap - # - # WARNING: overwrites the source files with the results!!! - # - # Verbose explanation: Let's say you've got a dozen pixmaps that you want - # to display on the screen all at the same time. Your screen can only - # display 256 different colors, but the pixmaps have a total of a thousand - # or so different colors. For a single pixmap you solve this problem with - # ppmquant; this script solves it for multiple pixmaps. All it does is - # concatenate them together into one big pixmap, run ppmquant on that, and - # then split it up into little pixmaps again. - - if ( $#argv < 3 ) then - echo "usage: ppmquantall <newcolors> <ppmfile> <ppmfile> ..." - exit 1 - endif - - set newcolors=$argv[1] - set files=( $argv[2-] ) - - set heights=() - foreach i ( $files ) - set heights=( $heights `head -2 $i | tail -1 | sed 's/.* //'` ) - end - - set all=/tmp/pqa.all.$$ - rm -f $all - pnmcat -tb -white $files | ppmquant -quiet $newcolors > $all - if ( $status != 0 ) exit $status - - set width=`head -2 $all | tail -1 | sed 's/ .*//'` - - @ y = 0 - @ i = 1 - while ( $i <= $#files ) - pnmcut 0 $y $width $heights[$i] $all | pnmcrop -white > $files[$i] - if ( $status != 0 ) exit $status - @ y = $y + $heights[$i] - @ i++ - end - - rm -f $all --- 0 ---- diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/ppmquant.c pbmplus.new/ppm/ppmquant.c *** pbmplus.old/ppm/ppmquant.c Fri Apr 12 00:31:18 1991 --- pbmplus.new/ppm/ppmquant.c Sat Jun 15 21:36:20 1991 *************** *** 105,112 **** --- 105,118 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); + + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); /* ** Step 1: read in the image. diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/ppmrelie.c pbmplus.new/ppm/ppmrelie.c *** pbmplus.old/ppm/ppmrelie.c Fri Apr 12 00:32:48 1991 --- pbmplus.new/ppm/ppmrelie.c Sat Jun 15 21:36:16 1991 *************** *** 37,42 **** --- 37,45 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/ppmtogif.c pbmplus.new/ppm/ppmtogif.c *** pbmplus.old/ppm/ppmtogif.c Fri Apr 12 00:31:20 1991 --- pbmplus.new/ppm/ppmtogif.c Thu Jun 20 15:03:40 1991 *************** *** 22,27 **** --- 22,29 ---- #define MAXCOLORS 256 + int comp( struct colorhist_item *i, struct colorhist_item *j ); + static int colorstobpp(), GetPixel(), GIFNextPixel(); static void BumpPixel(), GIFEncode(), Putword(), compress(), output(), cl_block(), cl_hash(), writeerr(), char_init(), char_out(), flush_char(); *************** *** 65,70 **** --- 67,75 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); *************** *** 80,85 **** --- 85,92 ---- "too many colors - try doing a 'ppmquant %d'", MAXCOLORS, 0,0,0,0 ); pm_message( "%d colors found", colors, 0,0,0,0 ); + qsort( chv, colors, sizeof( chv[0] ), comp ); + /* Now turn the ppm colormap into the appropriate GIF colormap. */ if ( maxval > 255 ) pm_message( *************** *** 826,828 **** --- 833,844 ---- } /* The End */ + + comp( struct colorhist_item *i, struct colorhist_item *j ) { + + return (PPM_GETR( i->color )*287+ + PPM_GETG( i->color )*589+ + PPM_GETB( i->color )*114)- + (PPM_GETR( j->color )*287+ + PPM_GETG( j->color )*589+ + PPM_GETB( j->color )*114); } diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/ppmtoicr.c pbmplus.new/ppm/ppmtoicr.c *** pbmplus.old/ppm/ppmtoicr.c Fri Apr 12 00:32:48 1991 --- pbmplus.new/ppm/ppmtoicr.c Sat Jun 15 21:36:10 1991 *************** *** 84,89 **** --- 84,92 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/ppmtoilb.c pbmplus.new/ppm/ppmtoilb.c *** pbmplus.old/ppm/ppmtoilb.c Fri Apr 12 00:31:22 1991 --- pbmplus.new/ppm/ppmtoilb.c Sat Jun 15 21:36:06 1991 *************** *** 57,62 **** --- 57,65 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/ppmtopcx.c pbmplus.new/ppm/ppmtopcx.c *** pbmplus.old/ppm/ppmtopcx.c Fri Apr 12 00:32:46 1991 --- pbmplus.new/ppm/ppmtopcx.c Sat Jun 15 21:36:02 1991 *************** *** 46,51 **** --- 46,54 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/ppmtopgm.c pbmplus.new/ppm/ppmtopgm.c *** pbmplus.old/ppm/ppmtopgm.c Fri Apr 12 00:31:20 1991 --- pbmplus.new/ppm/ppmtopgm.c Sat Jun 15 21:35:58 1991 *************** *** 137,142 **** --- 137,145 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + ppm_readppminit( ifp, &cols, &rows, &maxval, &format ); pgm_writepgminit( stdout, cols, rows, maxval, 0 ); pixelrow = ppm_allocrow( cols ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/ppmtopi1.c pbmplus.new/ppm/ppmtopi1.c *** pbmplus.old/ppm/ppmtopi1.c Fri Apr 12 00:32:48 1991 --- pbmplus.new/ppm/ppmtopi1.c Sat Jun 15 21:35:52 1991 *************** *** 42,47 **** --- 42,50 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pixels = ppm_readppm( ifp, &cols, &rows, &maxval ); pm_close( ifp ); if ( (cols > COLS) || (rows > ROWS) ) diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/ppmtopic.c pbmplus.new/ppm/ppmtopic.c *** pbmplus.old/ppm/ppmtopic.c Fri Apr 12 00:31:26 1991 --- pbmplus.new/ppm/ppmtopic.c Sat Jun 15 21:35:48 1991 *************** *** 155,160 **** --- 155,163 ---- if (argn != argc) pm_usage("[ppmfile]"); + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pixels = ppm_readppm(ifp, &cols, &rows, &maxval); if (cols < 8) pm_error("ppm input too narrow, must be >= 8 pixels wide", 0,0,0,0,0); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/ppmtops.c pbmplus.new/ppm/ppmtops.c *** pbmplus.old/ppm/ppmtops.c Fri Apr 12 00:31:20 1991 --- pbmplus.new/ppm/ppmtops.c Sat Jun 15 21:33:34 1991 *************** *** 62,67 **** --- 62,70 ---- strcpy( name, "noname" ); } + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/ppmtopuz.c pbmplus.new/ppm/ppmtopuz.c *** pbmplus.old/ppm/ppmtopuz.c Fri Apr 12 00:32:46 1991 --- pbmplus.new/ppm/ppmtopuz.c Sat Jun 15 21:33:26 1991 *************** *** 39,44 **** --- 39,47 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pixels = ppm_readppm( ifp, &cols, &rows, &maxval ); pm_close( ifp ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/ppmtorgb.c pbmplus.new/ppm/ppmtorgb.c *** pbmplus.old/ppm/ppmtorgb.c Fri Apr 12 00:32:48 1991 --- pbmplus.new/ppm/ppmtorgb.c Sat Jun 15 21:33:22 1991 *************** *** 51,56 **** --- 51,59 ---- basename = "noname"; } + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + ppm_readppminit( ifp, &cols, &rows, &maxval, &format ); pixelrow = ppm_allocrow( cols ); (void) strcpy( filename, basename ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/ppmtouil.c pbmplus.new/ppm/ppmtouil.c *** pbmplus.old/ppm/ppmtouil.c Fri Apr 12 00:32:46 1991 --- pbmplus.new/ppm/ppmtouil.c Sat Jun 15 21:33:16 1991 *************** *** 91,96 **** --- 91,99 ---- (void) strcpy( out_name, "noname" ); } + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/ppmtoxpm.c pbmplus.new/ppm/ppmtoxpm.c *** pbmplus.old/ppm/ppmtoxpm.c Fri Apr 12 00:31:24 1991 --- pbmplus.new/ppm/ppmtoxpm.c Sat Jun 15 21:33:06 1991 *************** *** 95,100 **** --- 95,103 ---- (void) strcpy( out_name, "noname" ); } + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/qrttoppm.c pbmplus.new/ppm/qrttoppm.c *** pbmplus.old/ppm/qrttoppm.c Fri Apr 12 00:31:20 1991 --- pbmplus.new/ppm/qrttoppm.c Sat Jun 15 21:32:52 1991 *************** *** 32,37 **** --- 32,40 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + /* Read in the QRT file. First the header. */ cols = getc( ifp ); cols += getc( ifp ) << 8; diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/rawtoppm.c pbmplus.new/ppm/rawtoppm.c *** pbmplus.old/ppm/rawtoppm.c Fri Apr 12 00:32:48 1991 --- pbmplus.new/ppm/rawtoppm.c Sat Jun 15 21:32:46 1991 *************** *** 104,109 **** --- 104,112 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/rgb3topp.c pbmplus.new/ppm/rgb3topp.c *** pbmplus.old/ppm/rgb3topp.c Fri Apr 12 00:31:24 1991 --- pbmplus.new/ppm/rgb3topp.c Sat Jun 15 21:32:34 1991 *************** *** 33,38 **** --- 33,43 ---- gfd = pm_openr( argv[2] ); bfd = pm_openr( argv[3] ); + setmode( fileno( rfd ), O_BINARY ); + setmode( fileno( gfd ), O_BINARY ); + setmode( fileno( bfd ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + pgm_readpgminit( rfd, &cols, &rows, &rmaxval, &rformat ); pgm_readpgminit( gfd, &tcols, &trows, &gmaxval, &gformat ); if ( tcols != cols || trows != rows ) diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/spctoppm.c pbmplus.new/ppm/spctoppm.c *** pbmplus.old/ppm/spctoppm.c Fri Apr 12 00:32:48 1991 --- pbmplus.new/ppm/spctoppm.c Sat Jun 15 21:32:02 1991 *************** *** 46,51 **** --- 46,54 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + /* Check SPC file header. */ c1 = getc( ifp ); c2 = getc( ifp ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/sputoppm.c pbmplus.new/ppm/sputoppm.c *** pbmplus.old/ppm/sputoppm.c Fri Apr 12 00:32:48 1991 --- pbmplus.new/ppm/sputoppm.c Sat Jun 15 21:31:58 1991 *************** *** 38,43 **** --- 38,46 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + /* Read the SPU file */ /* Read the screen data. */ diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/tgatoppm.c pbmplus.new/ppm/tgatoppm.c *** pbmplus.old/ppm/tgatoppm.c Fri Apr 12 00:31:22 1991 --- pbmplus.new/ppm/tgatoppm.c Sat Jun 15 21:31:54 1991 *************** *** 59,66 **** --- 59,72 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( usage ); + + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); /* Read the Targa file header. */ readtga( ifp, &tga_head ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/ximtoppm.c pbmplus.new/ppm/ximtoppm.c *** pbmplus.old/ppm/ximtoppm.c Fri Apr 12 00:31:24 1991 --- pbmplus.new/ppm/ximtoppm.c Sat Jun 15 21:31:48 1991 *************** *** 37,42 **** --- 37,45 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + if ( argn != argc ) pm_usage( "[ximfile]" ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/ppm/xpmtoppm.c pbmplus.new/ppm/xpmtoppm.c *** pbmplus.old/ppm/xpmtoppm.c Fri Apr 12 00:32:46 1991 --- pbmplus.new/ppm/xpmtoppm.c Sat Jun 15 21:31:42 1991 *************** *** 37,42 **** --- 37,45 ---- else ifp = stdin; + setmode( fileno( ifp ), O_BINARY ); + setmode( fileno( stdout ), O_BINARY ); + ReadXPMFile( ifp, &cols, &rows, &ncolors, &chars_per_pixel, &colors, &data ); diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/readme.bak pbmplus.new/readme.bak *** pbmplus.old/readme.bak --- pbmplus.new/readme.bak Mon Jul 22 08:44:46 1991 *************** *** 0 **** --- 1,195 ---- + This is my second (and hopefully better) attempt at porting the PBMPlus package + to MS-DOS. + + I used D.J. Delorie's port of the GNU GCC compiler to DOS to compile the + package. The GCC compiler generates 386 specific, protected mode code. Used + with DJ's DOS extender (built into the executables distributed with this + package) allows for some pretty powerful programs. The current DOS extender + (or rather, the one I'm currently using, there may be newer version with more + compatibilities), is not compatible with much of anything besides vanilla DOS. + No HIMEM.SYS, EMM386.SYS, QEMM.SYS, Desqview, Windows, etc. Source for the + DOS extender is available with the GCC package. You can obtain the package + from the internet at grape.ecs.clarkson.edu:pub/msdos/djgcc/* or + (315)268-6667:pub/msdos/djgcc/*. Feel free to add VCPI or DPMI support. + + Improvements: + + o RAWBITS binary formats for p?m files. This allows MUCH faster + executions times, as well as smaller temporary files. This same + fix also allows for the familiar unix-style pipings, such as: + + tgatoppm dkbtest.tga | ppmquant 256 | ppmtogif > dkbtest.gif + + This makes for this source code to be much closer to the PBMPLUS + package as distributed by Jef Poskanzer. + + The only minor problem this causes is when you want to use an ASCII + only p?m file, you have to change all the LF/CR sequences into LF only + (that is, run it through a DOS-to-UNIX text file filter). + + o MERGE option for binaries. This essentially creates one big exectuable + file rather than a bunch of smaller ones. On unix systems, you can use + this option, as well as file links (pointers to a file, rather than an + actuall file) to point to this one exectuable. It can save a + tremendous amount of space. How the program works depends on what the + name is of program when you execute it. On a DOS machine, you have to + copy or rename the executable to get the appropriate function (remember, + how the program works depends on how it's named). If you want the whole + package, the MERGE option will take up more room on a DOS machine, but + it makes for a smaller package to send around the net, and smaller and + putting all the unused files into an archive if you only want part of + the package. + + The entire PBMPLUS package, when compiled into separate binaries, takes + up just over 6 Megs of diskspace. The equivalent package compiled using + the merge option takes up about 300k. + + The executables I plan to distribute are the merged binaries. The binaries can + be renamed/copied to the following to get the desired results: + + pbmmerge.exe to brushtop.exe + cmuwmtop.exe + g3topbm.exe + icontopb.exe + gemtopbm.exe + macptopb.exe + mgrtopbm.exe + pbmlife.exe + pbmmake.exe + pbmmask.exe + pbmpaste.exe + pbmreduc.exe + pbmtext.exe + pbmto10x.exe + pbmtoasc.exe + pbmtobbn.exe + pbmtocmu.exe + pbmtoeps.exe + pbmtog3.exe + pbmtogem.exe + pbmtogo.exe + pbmtoico.exe + pbmtolj.exe + pbmtomac.exe + pbmtomgr.exe + pbmtopi3.exe + pbmtoplo.exe + pbmtoptx.exe + pbmtox10.exe + pbmtoxbm.exe + pbmtoybm.exe + pbmtozin.exe + pbmupc.exe + pi3topbm.exe + xbmtopbm.exe + ybmtopbm.exe + + pgmmerge.exe to fitstopg.exe + fstopgm.exe + hipstopg.exe + lispmtop.exe + pgmbentl.exe + pgmenhan.exe + pgmhist.exe + pgmnorm.exe + pgmoil.exe + pgmramp.exe + pgmtopbm.exe + pgmtofit.exe + pgmtofs.exe + pgmtolis.exe + pgmtops.exe + psidtopg.exe + rawtopgm.exe + pgmedge.exe + + ppmmerge.exe to giftoppm.exe + gouldtop.exe + ilbmtopp.exe + imgtoppm.exe + mtvtoppm.exe + pcxtoppm.exe + pgmtoppm.exe + pi1toppm.exe + picttopp.exe + ppmhist.exe + ppmmake.exe + ppmquant.exe + ppmrelie.exe + ppmtogif.exe + ppmtoicr.exe + ppmtoilb.exe + ppmtopcx.exe + ppmtopgm.exe + ppmtopi1.exe + ppmtopic.exe + ppmtops.exe + ppmtopuz.exe + ppmtorgb.exe + ppmtouil.exe + ppmtoxpm.exe + qrttoppm.exe + rawtoppm.exe + rgb3topp.exe + spctoppm.exe + sputoppm.exe + tgatoppm.exe + ximtoppm.exe + xpmtoppm.exe + ppmpat.exe + + + pnmmerge.exe to pnmarith.exe + pnmcat.exe + pnmconvo.exe + pnmcrop.exe + pnmcut.exe + pnmdepth.exe + pnmenlar.exe + pnmfile.exe + pnmflip.exe + pnminver.exe + pnmnoraw.exe + pnmpaste.exe + pnmscale.exe + pnmtile.exe + pnmtoras.exe + pnmtoxwd.exe + rasttopn.exe + xwdtopnm.exe + pnmgamma.exe + pnmrotat.exe + pnmshear.exe + + + Diffs will be also be distributed for those who want to compile the package on + their own (The DOS port of GCC is necessary for this). Aside from the + introduction of the fmod() function to all the main programs, there are some + minor adjustments made to the makefiles to make them work with the DOS port of + GNU-Make. Two batch files, all.bat and merge.bat are provided to run the make + process. ALL.BAT will complete make all of the stand alone executables (.exe's + files). MERGE.BAT will only make the 32-bit code in a file called + p?mmerge. which will have to be manually appended to the appropriate STUB.EXE + or GO32.EXE which comes with the DOS port of GCC. These two batch files are + found in the root directory. In each of the p?m directory, there are two more + batch files called delp?m.bat and exep?m.bat. DELP?M.BAT just goes through and + cleans up all the 32-bit code generated by the compiler and should be used after + you make all of the .exe files. EXEP?M.BAT goes through and prepends with the + go32.exe or stub.exe DOS extenders to each of the 32-bit code segments. Edit + that batch file to have the appropriate environment variable point to whichever + you want. I used the BETA TEST distribution of 05feb91 to generate this + version of pbmplus (I no longer have net access, so at this time I'm not sure if + this is the latest version). + + NOTICE: I made one minor modification to ppmtogif.c. It now sorts the palette + based on it's luminisity. This makes the darkest color the background color, + which is a personal preference. + + I no longer have net access, but can be reached via phone and snail mail at + the following: + + Mike Castle + Deer Run Apartments + Apt #29 + Wright City, MO 63390 + (314) 745-3164 diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/readme.dos pbmplus.new/readme.dos *** pbmplus.old/readme.dos --- pbmplus.new/readme.dos Wed Jul 24 22:55:40 1991 *************** *** 0 **** --- 1,195 ---- + This is my second (and hopefully better) attempt at porting the PBMPlus package + to MS-DOS. + + I used D.J. Delorie's port of the GNU GCC compiler to DOS to compile the + package. The GCC compiler generates 386 specific, protected mode code. Used + with DJ's DOS extender (built into the executables distributed with this + package) allows for some pretty powerful programs. The current DOS extender + (or rather, the one I'm currently using, there may be newer version with more + compatibilities), is not compatible with much of anything besides vanilla DOS. + No HIMEM.SYS, EMM386.SYS, QEMM.SYS, Desqview, Windows, etc. Source for the + DOS extender is available with the GCC package. You can obtain the package + from the internet at grape.ecs.clarkson.edu:pub/msdos/djgcc/* or + (315)268-6667:pub/msdos/djgcc/*. Feel free to add VCPI or DPMI support. + + Improvements: + + o RAWBITS binary formats for p?m files. This allows MUCH faster + executions times, as well as smaller temporary files. This same + fix also allows for the familiar unix-style pipings, such as: + + tgatoppm dkbtest.tga | ppmquant 256 | ppmtogif > dkbtest.gif + + This makes for this source code to be much closer to the PBMPLUS + package as distributed by Jef Poskanzer. + + The only minor problem this causes is when you want to use an ASCII + only p?m file, you have to change all the LF/CR sequences into LF only + (that is, run it through a DOS-to-UNIX text file filter). + + o MERGE option for binaries. This essentially creates one big exectuable + file rather than a bunch of smaller ones. On unix systems, you can use + this option, as well as file links (pointers to a file, rather than an + actuall file) to point to this one exectuable. It can save a + tremendous amount of space. How the program works depends on what the + name is of program when you execute it. On a DOS machine, you have to + copy or rename the executable to get the appropriate function (remember, + how the program works depends on how it's named). If you want the whole + package, the MERGE option will take up more room on a DOS machine, but + it makes for a smaller package to send around the net, and smaller and + putting all the unused files into an archive if you only want part of + the package. + + The entire PBMPLUS package, when compiled into separate binaries, takes + up just over 6 Megs of diskspace. The equivalent package compiled using + the merge option takes up about 300k. + + The executables I plan to distribute are the merged binaries. The binaries can + be renamed/copied to the following to get the desired results: + + pbmmerge.exe to brushtop.exe + cmuwmtop.exe + g3topbm.exe + icontopb.exe + gemtopbm.exe + macptopb.exe + mgrtopbm.exe + pbmlife.exe + pbmmake.exe + pbmmask.exe + pbmpaste.exe + pbmreduc.exe + pbmtext.exe + pbmto10x.exe + pbmtoasc.exe + pbmtobbn.exe + pbmtocmu.exe + pbmtoeps.exe + pbmtog3.exe + pbmtogem.exe + pbmtogo.exe + pbmtoico.exe + pbmtolj.exe + pbmtomac.exe + pbmtomgr.exe + pbmtopi3.exe + pbmtoplo.exe + pbmtoptx.exe + pbmtox10.exe + pbmtoxbm.exe + pbmtoybm.exe + pbmtozin.exe + pbmupc.exe + pi3topbm.exe + xbmtopbm.exe + ybmtopbm.exe + + pgmmerge.exe to fitstopg.exe + fstopgm.exe + hipstopg.exe + lispmtop.exe + pgmbentl.exe + pgmenhan.exe + pgmhist.exe + pgmnorm.exe + pgmoil.exe + pgmramp.exe + pgmtopbm.exe + pgmtofit.exe + pgmtofs.exe + pgmtolis.exe + pgmtops.exe + psidtopg.exe + rawtopgm.exe + pgmedge.exe + + ppmmerge.exe to giftoppm.exe + gouldtop.exe + ilbmtopp.exe + imgtoppm.exe + mtvtoppm.exe + pcxtoppm.exe + pgmtoppm.exe + pi1toppm.exe + picttopp.exe + ppmhist.exe + ppmmake.exe + ppmquant.exe + ppmrelie.exe + ppmtogif.exe + ppmtoicr.exe + ppmtoilb.exe + ppmtopcx.exe + ppmtopgm.exe + ppmtopi1.exe + ppmtopic.exe + ppmtops.exe + ppmtopuz.exe + ppmtorgb.exe + ppmtouil.exe + ppmtoxpm.exe + qrttoppm.exe + rawtoppm.exe + rgb3topp.exe + spctoppm.exe + sputoppm.exe + tgatoppm.exe + ximtoppm.exe + xpmtoppm.exe + ppmpat.exe + + + pnmmerge.exe to pnmarith.exe + pnmcat.exe + pnmconvo.exe + pnmcrop.exe + pnmcut.exe + pnmdepth.exe + pnmenlar.exe + pnmfile.exe + pnmflip.exe + pnminver.exe + pnmnoraw.exe + pnmpaste.exe + pnmscale.exe + pnmtile.exe + pnmtoras.exe + pnmtoxwd.exe + rasttopn.exe + xwdtopnm.exe + pnmgamma.exe + pnmrotat.exe + pnmshear.exe + + + Diffs will be also be distributed for those who want to compile the package on + their own (The DOS port of GCC is necessary for this). Aside from the + introduction of the fmod() function to all the main programs, there are some + minor adjustments made to the makefiles to make them work with the DOS port of + GNU-Make. Two batch files, all.bat and merge.bat are provided to run the make + process. ALL.BAT will complete make all of the stand alone executables (.exe's + files). MERGE.BAT will only make the 32-bit code in a file called + p?mmerge. which will have to be manually appended to the appropriate STUB.EXE + or GO32.EXE which comes with the DOS port of GCC. These two batch files are + found in the root directory. In each of the p?m directory, there are two more + batch files called delp?m.bat and exep?m.bat. DELP?M.BAT just goes through and + cleans up all the 32-bit code generated by the compiler and should be used after + you make all of the .exe files. EXEP?M.BAT goes through and prepends with the + go32.exe or stub.exe DOS extenders to each of the 32-bit code segments. Edit + that batch file to have the appropriate environment variable point to whichever + you want. I used the BETA TEST distribution of 05feb91 to generate this + version of pbmplus (I no longer have net access, so at this time I'm not sure if + this is the latest version). + + NOTICE: I made one minor modification to ppmtogif.c. It now sorts the palette + based on it's luminisity. This makes the darkest color the background color, + which is a personal preference. + + I no longer have *reliable* net access, but can be reached via phone and snail + mail at the following: + + Mike Castle + Deer Run Apartments + Apt #29 + Wright City, MO 63390 + (314) 745-3164 diff +ignore-blank-lines +context=3 +new-file +ignore-space-change +recursive pbmplus.old/rm.bat pbmplus.new/rm.bat *** pbmplus.old/rm.bat --- pbmplus.new/rm.bat Fri Jul 19 19:57:24 1991 *************** *** 0 **** --- 1,9 ---- + @rem Quick hack to get rm to work for pbmplus makefiles. + @rem Place in path if you don't have any unix like utilities. + @echo off + :start + if '%1'=='' goto end + del %1 + shift + goto start + :end