sng-1.0.2/0000777000000000000000000000000007755503014006022 5sng-1.0.2/README0000444000002700000270000000264507651235223006644 sng -- a compiler for an editable PNG representation SNG (Scriptable Network Graphics) is a minilanguage designed to reflect the data and structure of PNG (Portable Network Graphics) files in an editable form. The sng program translates between SNG and PNG. It can be useful especially for viewing and editing data in obscure ancillary chanks that graphics editors won't handle. Also, since SNG is easy to generate from scripts, sng may be useful at the end of a pipeline that programmatically generates PNG images. This program requires libpng-1.0.9beta7 or later. All these should be handled correctly with 1.0.9 final; however the default build of 1.0.9 doesn't support the iTXT chunk correctly, so sng won't either. With the 1.1.x version of libpng, all chunks including iTXT are handled correctly. For more details, consult the manual page. Files in this distribution: README this file Makefile Makefile for building sng sng.h common declarations for compiler and decompiler main.c handle options sng.1 the manual page sngc.c SNG to PNG compiler sngd.c PNG to SNG decompiler test.sng Test file exercising all chunk types TODO unfinished business sng_regress regression-test harness for sng The sng code has been tested on all 155 of the non-broken images in the PNG test suite at using sng_regress. Eric S. Raymond esr@thyrsus.com http://www.catb.org sng-1.0.2/AUTHORS0000644000002700000270000000004407030211020007001 Eric S. Raymond . sng-1.0.2/COPYING0000644000002700000270000000244607053244634007022 LICENSE TERMS This program is provided under the libpng/zlib license: The sng code Copyright (C) 1999 by Eric S. Raymond. ----------------------------------------------------------------------------- This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. ----------------------------------------------------------------------------- The PNG specification is available from . Obviously, without the PNG effort this program wouldn't have been possible or necessary (or even conceivable). sng-1.0.2/ChangeLog0000644000002700000270000000646107755501152007542 2003-11-15 Eric S. Raymond * configure.in: ersion bump. 2003-06-09 Eric S. Raymond * Ready to upgrade to Edition 2 of the PNG spec. * Ready to upgrade to Edition 2 of the PNG spec. 2002-09-18 Eric S. Raymond * configure.in: Change png signature function. 2002-07-30 Eric S. Raymond * configure.in: Version bump. * sng.xml: XML conversion and repackaging. * Makefile.am: XML conversion and repackaging. * indexgen.sh: XML conversion and repackaging. 2002-07-12 Eric S. Raymond * sng.sgml: bsol elimination. * Makefile.am: SGML conversion. * sng.1: SGML conversion. * sngd.c: 8-bit character fixes. * sngc.c: 8-bit character fixes. 2001-07-07 Eric S. Raymond * sngc.c: Regression test passed. * sng.1: Regression test passed. * main.c: Regression test passed. * indexgen.sh: Regression test passed. * configure.in: Regression test passed. 2001-02-28 Eric S. Raymond * sng.1: Corrected home page. * sng.1: Update the PNG website. * configure.in: Version bump. * sngc.c: Fixed core dump reported by Eduardo Santiago. 2001-02-18 Eric S. Raymond * indexgen.sh: Markup fix. * indexgen.sh: Correct the download location. 2000-12-28 Eric S. Raymond * test.sng: Make iCCP work. * test.sng: Make sure the iCCP profiler has a length. * configure.in: Version bump. * Makefile.am: Add test.sng. * indexgen.sh: 1.0.9beta7 is out. * README: 1.0.9beta7 is out. * Makefile.am: Nasty hacks to make RPMS. * README: Passes regression with both versions. 2000-12-27 Eric S. Raymond * main.c, sng.1: Add -V option. * configure.in: Version bump. * sng_regress: Make eyeball-test viewer configurable. * indexgen.sh: Update PNG website. * sngc.c: Now it passes all its regression tests. * sngd.c: Properly conditionalize handling of iTXT. * sngc.c: We finally seem to have gotten the size check right. * sng_regress: Don't do extra work when a test stage fails. 2000-12-19 Eric S. Raymond * sngc.c: Be explicit about color_type default. 2000-12-17 Eric S. Raymond * indexgen.sh: We need 1.1.0f. * indexgen.sh: Get these locally. * sngd.c: This version builds with 1.1.0f. * sngc.c: This version builds with 1.1.0f. * main.c: This version builds with 1.1.0f. 2000-02-06 Eric S. Raymond * Release 0.92. * sngd.c, sngc.c, main.c: forward port to 1.1.0c. 2000-01-13 Eric S. Raymond * sngd.c: Fix for new interface. * sngc.c: Fix for new interface. * Makefile.am: Fix regression. 2000-01-10 Eric S. Raymond * sngd.c: Handle either old or new interface. * test.sng: New IMAGE syntax. 2000-01-09 Eric S. Raymond * Release 0.91 2000-01-07 Eric S. Raymond * sngc.c, sngd.c: Can use the new high-level interface to libpng now. * sng_regress: Don't remove tempfiles when you exit on error. 1999-12-28 Eric S. Raymond * sngc.c: Various small compiler fixes. * Makefile.am: Use the test harness. * TODO: Updated TODO list. * Autoconf/automake now rule... sng-1.0.2/INSTALL0000644000002700000270000001202707032225623007006 Quick Installation for Unix =========================== On Unix systems, to build from sources it is usually only necessary to run: configure make and then (as root) install with: make install The rest of this file describes details and unusual circumstances. Instructions for compiling under non-Unix operating systems can be found at the end of the file. If your libpng library and header files are in an unusual place, it may be helpful to specify the --with-png option; type configure --help for details. Installation Details ==================== The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' and config.h. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Type `make install' to install the programs and any data files and documentation. 4. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure SGI IRIX has a very old version of libpng that won't work with gif2png. If you have installed a newer version of libpng and zlib in /usr/local, use this: CC="cc -n32 -L/usr/local/lib" CPPFLAGS="-I/usr/local/include" ./configure Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. Options Specific to sng ======================= If your libpng library and header files are in an unusual place, it may be helpful to specify the --with-png option; type configure --help There is one other option: `--with-rgbtxt=FILE' Specifies the location of the X window system's color-names to RGB-values file. sng-1.0.2/Makefile.am0000644000002700000270000000244607755502763010034 ## Process this file with automake to produce Makefile.in bin_PROGRAMS = sng #bin_SCRIPTS = sng_regress sng_SOURCES = main.c sngc.c sngd.c sng.h man_MANS = sng.1 # The man pages and script are here because automake has a bug EXTRA_DIST = Makefile sng.spec.in sng.spec sng.xml sng.1 sng_regress indexgen.sh lsmgen.sh test.sng # This is necessary because as of version 1.4, automake generates a dist # production that runs a broken automake command sng-@VERSION@.tar.gz: MANIFEST (cd ..; ln -sf sng sng-@VERSION@) (cd ..; tar -czf sng-@VERSION@.tar.gz `sed MANIFEST @wc -l MANIFEST sng.1: sng.xml xmlto man sng.xml # Make RPMs. You need to be root to make this work RPMROOT=/usr/src/redhat rpm: dist rpmbuild --define 'myversion @VERSION@' -ta sng-@VERSION@.tar.gz cp $(RPMROOT)/RPMS/*/sng-@VERSION@*.rpm . cp $(RPMROOT)/SRPMS/sng-@VERSION@*.src.rpm . zip: $(DISTFILES) zip @PACKAGE@-@VERSION@.zip $(DISTFILES) # Regression-test sng. Passes if no differences show up. # Assumes we have a copy of Willem van Schaik's PNG test suite under pngsuite regress: sng_regress test.sng -s pngsuite/[a-wyz]*.png sng-1.0.2/Makefile.in0000644000002700000270000003635607755502772010054 # Makefile.in generated by automake 1.6.3 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_HEADER = $(INSTALL_DATA) transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : EXEEXT = @EXEEXT@ OBJEXT = @OBJEXT@ PATH_SEPARATOR = @PATH_SEPARATOR@ AMTAR = @AMTAR@ AWK = @AWK@ CC = @CC@ CPP = @CPP@ DEPDIR = @DEPDIR@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ PACKAGE = @PACKAGE@ STRIP = @STRIP@ VERSION = @VERSION@ am__include = @am__include@ am__quote = @am__quote@ install_sh = @install_sh@ bin_PROGRAMS = sng #bin_SCRIPTS = sng_regress sng_SOURCES = main.c sngc.c sngd.c sng.h man_MANS = sng.1 # The man pages and script are here because automake has a bug EXTRA_DIST = Makefile sng.spec.in sng.spec sng.xml sng.1 sng_regress indexgen.sh lsmgen.sh test.sng # Make RPMs. You need to be root to make this work RPMROOT = /usr/src/redhat subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = sng.spec bin_PROGRAMS = sng$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) am_sng_OBJECTS = main.$(OBJEXT) sngc.$(OBJEXT) sngd.$(OBJEXT) sng_OBJECTS = $(am_sng_OBJECTS) sng_LDADD = $(LDADD) sng_DEPENDENCIES = sng_LDFLAGS = DEFS = @DEFS@ DEFAULT_INCLUDES = -I. -I$(srcdir) -I. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/main.Po ./$(DEPDIR)/sngc.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/sngd.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ CFLAGS = @CFLAGS@ DIST_SOURCES = $(sng_SOURCES) NROFF = nroff MANS = $(man_MANS) DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ Makefile.in NEWS TODO aclocal.m4 config.h.in configure \ configure.in depcomp install-sh missing mkinstalldirs \ sng.spec.in SOURCES = $(sng_SOURCES) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .o .obj am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe) $(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): configure.in cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOHEADER) touch $(srcdir)/config.h.in distclean-hdr: -rm -f config.h stamp-h1 sng.spec: $(top_builddir)/config.status sng.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ rm -f $(DESTDIR)$(bindir)/$$f; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) sng$(EXEEXT): $(sng_OBJECTS) $(sng_DEPENDENCIES) @rm -f sng$(EXEEXT) $(LINK) $(sng_LDFLAGS) $(sng_OBJECTS) $(sng_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sngc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sngd.Po@am__quote@ distclean-depend: -rm -rf ./$(DEPDIR) .c.o: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< .c.obj: @AMDEP_TRUE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ $(COMPILE) -c `cygpath -w $<` CCDEPMODE = @CCDEPMODE@ uninstall-info-am: man1dir = $(mandir)/man1 install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(man1dir) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ rm -f $(DESTDIR)$(man1dir)/$$inst; \ done ETAGS = etags ETAGSFLAGS = tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = . distdir = $(PACKAGE)-$(VERSION) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } GZIP_ENV = --best distcleancheck_listfiles = find . -type f -print distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) $(mkinstalldirs) $(distdir)/. @list='$(DISTFILES)'; for file in $$list; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist dist-all: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist $(am__remove_distdir) GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/=build mkdir $(distdir)/=inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/=inst && pwd` \ && cd $(distdir)/=build \ && ../configure --srcdir=.. --prefix=$$dc_install_base \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && (test `find $$dc_install_base -type f -print | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ find $$dc_install_base -type f -print ; \ exit 1; } >&2 ) \ && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \ && rm -f $(distdir).tar.gz \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @echo "$(distdir).tar.gz is ready for distribution" | \ sed 'h;s/./=/g;p;x;p;x' distcleancheck: distclean if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(MANS) config.h installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir) install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) distclean-am: clean-am distclean-compile distclean-depend \ distclean-generic distclean-hdr distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-man install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: install-man1 installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf autom4te.cache maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-man uninstall-man: uninstall-man1 .PHONY: GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic dist dist-all dist-gzip distcheck distclean \ distclean-compile distclean-depend distclean-generic \ distclean-hdr distclean-tags distcleancheck distdir dvi dvi-am \ info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-man1 \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-info-am \ uninstall-man uninstall-man1 # This is necessary because as of version 1.4, automake generates a dist # production that runs a broken automake command sng-@VERSION@.tar.gz: MANIFEST (cd ..; ln -sf sng sng-@VERSION@) (cd ..; tar -czf sng-@VERSION@.tar.gz `sed MANIFEST @wc -l MANIFEST sng.1: sng.xml xmlto man sng.xml rpm: dist rpmbuild --define 'myversion @VERSION@' -ta sng-@VERSION@.tar.gz cp $(RPMROOT)/RPMS/*/sng-@VERSION@*.rpm . cp $(RPMROOT)/SRPMS/sng-@VERSION@*.src.rpm . zip: $(DISTFILES) zip @PACKAGE@-@VERSION@.zip $(DISTFILES) # Regression-test sng. Passes if no differences show up. # Assumes we have a copy of Willem van Schaik's PNG test suite under pngsuite regress: sng_regress test.sng -s pngsuite/[a-wyz]*.png # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: sng-1.0.2/NEWS0000644000002700000270000000166707755500534006475 History See the file ChangeLog for the gory details. 1.0.2: * Changed the signature function for libpng in Configure.in. * Cosmetic fixes to code from the Debian packager. 1.0.1: * Lift documentation to XML-DocBook 1.0.0: * gcc -Wall cleanup for production release. * John Zaitseff's patch to fix bugs with decompilation of 8-bit chars. 0.9.4: * Fixed an off-by-one allocation error that caused occasional SEGVs. Thanks to Eduardo Santiago for reporting the bug and sending a patch. 0.9.3: * Forward port to 1.0.8/1.0.9. * Added -V option. 0.9.2: * Forward port to use 1.1.0 API if it's available. 0.9.1: * IMAGE chunk syntax changed; added write transformations. 0.9.0: * Public alpha release. See TODO for known problems. * Configuration now handled with automake/autoconf. * Syntax cleanup. String-pasting now supported. 0.1: * Pre-alpha private release; passes the regression test. sng-1.0.2/TODO0000444000002700000270000000746007230512456006453 To-do list: Author's tasks: * Make the -i option work (once the library can support suppressing normal IDAT processing). * MNG support? (May mean an MNG library has to be written first...) MNG test images are at ftp://swrinde.nde.swri.edu/pub/mng/images. Glenn adds: Also you can make all the test images you want by capturing animated GIF ad banners and converting them with ImageMagick's "convert". I've made about 450 of them and haven't yet found one that wouldn't convert. Can't post them though because they don't belong to me. Use "-quality 90" to get the best compression of typical GIF banners. Blue-sky stuff: Structured syntax for ICC profiles. See . The following is a plausible XML syntax. Would it be an improvement? [|]* {data} # Colorimetry intent, range 0-3 # International Color Consortium profile {data} {short} [, {short}]* # Count must match palette size or [{byte}]* # Paletted images only