--- xli-1.17.0+20061110.orig/debian/changelog +++ xli-1.17.0+20061110/debian/changelog @@ -0,0 +1,337 @@ +xli (1.17.0+20061110-3ubuntu1) precise; urgency=low + + * Build-depend on libjpeg-dev rather than libjpeg62-dev. + + -- Colin Watson Mon, 14 Nov 2011 01:14:36 +0000 + +xli (1.17.0+20061110-3) unstable; urgency=low + + * New maintainer (Closes: 431760) + * Fix X resources leak (Closes: 471121) + Thanks to Alex Perry, who made the patch for xloadimage that fixes + this. All I did was ported his changes over to xli. Thanks to Tim + Connors for testing. + + -- Ryan Niebur Mon, 24 Nov 2008 01:27:55 -0800 + +xli (1.17.0+20061110-2) unstable; urgency=low + + * QA upload + * incorporate "-zoom auto" patch from Alan Curry (Closes: 440768) + * document < and > for zooming (Closes: 166541) + * move Homepage pseudo-header to proper header + * bump Standards-Version to 3.7.3 + * set debhelper compatibility to 5 + + -- Bernhard R. Link Thu, 21 Feb 2008 16:01:44 +0100 + +xli (1.17.0+20061110-1) unstable; urgency=low + + * QA upload + + [ Florian Ernst ] + * New upstream snapshot, released on 20061110, which incoporates many + of the patches already previously applied + * quilt'ify package + * debian/control: add link to Homepage + * MIME entries now point to /usr/bin/xli (Closes: #366066, #387347, thanks + Matthias Urlichs and Glyn Kennington), also adding -quiet (Closes: #433191) + * List all copyright holders and licenses (Closes: #433212) + * Standards-Version 3.7.2 + * New patches applied to upstream from Debian BTS: + * Fix FTBFS on GNU/kFreeBSD (Closes: #396935, thanks to Petr Salinger and + Cyril Brulebois) + * -fillscreen now carries over to >1 image (Closes: #48878, #389198) + * -onroot with multiple images doesn't SEGV anymore (Closes: #289147) + * Don't complain about "None" pixmap color (Closes: #220965) + * Enable arrow keys (Closes: #179268) + + [ Bernhard R. Link ] + * modified changelog and control to reflect Florian Erns no longer wants to + adopt it and shortened it a bit. + * modified debian/rules to look more like I like it + * change build-dependency xutils -> xutils-dev + * modify manpage to escape hashes and document the new -forall option + * choose other fix to #396935, as that also quiets many compiler warnings + + -- Bernhard R. Link Sun, 29 Jul 2007 16:13:23 +0200 + +xli (1.17.0-22) unstable; urgency=low + + * Install to /usr, instead of /usr/X11R6. (closes: #362311) + + -- Graham Wilson Sat, 22 Apr 2006 05:14:56 +0000 + +xli (1.17.0-21) unstable; urgency=low + + * Add CVE number to the last changelog entry. + * Fix an error in zio.c where data was read past the end of a buffer + when reading files shorter than 128 bytes with no newlines. + (closes: #343718) + + * In pbm.c in isPBM, out of bounds checks were always true due to the + limited range of the types. Use signed ints instead of unsigned ints + to fix this. + + * Also in pbm.c, check that the value of maxval is correctly read from + the file if we expect it to be. + + -- Graham Wilson Fri, 30 Dec 2005 23:08:13 +0000 + +xli (1.17.0-20) unstable; urgency=low + + * Apply patch from the security team. I don't believe that xli is + specifically vulnerable; however the extra bounds checks are useful + nonetheless. Addresses (as much as it could) CAN-2005-3178. + + -- Graham Wilson Thu, 13 Oct 2005 16:38:43 +0000 + +xli (1.17.0-19) unstable; urgency=low + + * Man page cleanup. Thanks to all who submitted patches. (closes: #300665, + #310024, #326540) + * Clarify the synopsis. (closes: #299945) + * Build depend on libpng12-dev, rather than libpng2-dev, since the latter is + going to be dropped. + * Update standards version. No changes. + + -- Graham Wilson Mon, 05 Sep 2005 20:59:31 +0000 + +xli (1.17.0-18) unstable; urgency=high + + * Properly quote shell meta-characters when uncompressing files. + Addresses CAN-2005-0638. + * Enable on-the-fly decompression using gunzip. + * Add CVE numbers to the previous changelog entry. + + -- Graham Wilson Sun, 20 Mar 2005 23:00:33 +0000 + +xli (1.17.0-17) unstable; urgency=high + + * Fix some old and new security bugs. (closes: #298039) + + * In face.c, use strncat instead of strcat, which won't overflow the image + name buffer in case the first and last names are too long. Addresses + CAN-2001-0775. + + * In new.c, check that new*Image functions don't overflow when determining + how much memory to allocate for images. Addresses CAN-2005-0639. + + * Use upstream's code to avoid an overflow in buildIndex, rather than the + code I wrote to fix #274310. + + -- Graham Wilson Tue, 08 Mar 2005 06:04:31 +0000 + +xli (1.17.0-16) unstable; urgency=low + + * Always create indexes for zooming from 0 to new_width - 1. Thanks to + Sebastian Rasmussen for pointing this out. (closes: #274310) + + -- Graham Wilson Sun, 31 Oct 2004 00:39:01 +0000 + +xli (1.17.0-15) unstable; urgency=low + + * New maintainer. Thanks James. + * Update the URL in the copyright file. + * Update the watch file. + * Rewrite the rules file to use debhelper. + * Don't create installation directories that we don't need. + * Update the standards version. No changes needed. + * Update build dependencies: + - xlibs-dev -> libx11-dev, libxext-dev + - remove duplicate xutils build dependency + + -- Graham Wilson Thu, 16 Sep 2004 20:44:42 +0000 + +xli (1.17.0-14) unstable; urgency=low + + * debian/control: update to policy 3.5.9 + * rlelib.c: Don't #include varargs.h (which was not being used anyway) + (Closes:bug#196321) + + -- James R. Van Zandt Fri, 13 Jun 2003 13:21:39 -0400 + +xli (1.17.0-13) unstable; urgency=low + + * debian/control: depend on xlibs-dev instead of old xlib6g-dev (Closes: + 170159) + + -- James R. Van Zandt Tue, 26 Nov 2002 21:24:57 -0500 + +xli (1.17.0-12) unstable; urgency=low + + * xli.1: really eliminate mention of xsetbg and xview since they are not + packaged (closes:Bug#164732) + + -- James R. Van Zandt Mon, 28 Oct 2002 21:20:03 -0500 + +xli (1.17.0-11) unstable; urgency=low + + * xli.1: eliminate mention of xsetbg and xview since they are not + packaged (closes:Bug#99597) + + -- James R. Van Zandt Sat, 30 Mar 2002 17:41:57 -0500 + +xli (1.17.0-10) unstable; urgency=low + + * pcx.c: display RGB images (thanks to Alexandre Duret-Lutz + ) (closes:Bug#124084) + + -- James R. Van Zandt Sat, 22 Dec 2001 09:51:44 -0500 + +xli (1.17.0-9) unstable; urgency=low + + * Remove xview and xsetbg from the name line in the xli man page, and + add a note that the programs are not included. (closes:bug#99597) + + -- James R. Van Zandt Sun, 5 Aug 2001 18:43:37 -0400 + +xli (1.17.0-8) unstable; urgency=low + + * Imakefile: delete compiler switches conditioned on HPArchitecture, + which are (1) being triggered inappropriately for hppa, and (2) + apparently invalid syntax for gcc. (Closes:Bug#104720) + * new maintainer email + + -- James R. Van Zandt Wed, 18 Jul 2001 20:40:31 -0400 + +xli (1.17.0-7) unstable; urgency=low + + * compress.c: fix spelling of "improvement". + * debian/control: new maintainer email + + -- James R. Van Zandt Mon, 9 Jul 2001 21:39:40 -0400 + +xli (1.17.0-6) unstable; urgency=low + + * debian/control: build-depend also on xutils (Closes:bug#93692) + + -- James R. Van Zandt Mon, 28 May 2001 21:33:39 -0400 + +xli (1.17.0-5) unstable; urgency=low + + * debian/control: more build-dependencies (Closes:bug#93692) + + -- James R. Van Zandt Sun, 13 May 2001 18:02:39 -0400 + +xli (1.17.0-4) unstable; urgency=low + + * debian/control: move Build-Depends line to source section. Policy + version 3.5.2. + * debian/rules: Honor DEB_BUILD_OPTIONS. + + -- James R. Van Zandt Sat, 31 Mar 2001 09:50:49 -0500 + +xli (1.17.0-3) unstable; urgency=low + + * Don't define bcopy and bzero with macros when system headers declare + them as functions (Thanks to Paul Slootman , + Closes:Bug#81859) + + -- James R. Van Zandt Sun, 14 Jan 2001 15:30:18 -0500 + +xli (1.17.0-2) unstable; urgency=low + + * Correct MIME types: image/bmp -> image/x-ms-bmp and image/cmu-raster + -> image/x-cmu-raster (Closes:#72837) + * Imakefile: omit creation of xview and xsetbg links, since those + files would overlap files from xloadimage + * Recompile with libpng2 1.0.8 (Closes:#75271,#72715) + + -- James R. Van Zandt Mon, 30 Oct 2000 22:54:11 -0500 + +xli (1.17.0-1) unstable; urgency=low + + * New upstream version: handles progressive JPEGs. + * Build-Depends on debmake. + + -- James R. Van Zandt Sun, 13 Feb 2000 07:46:36 -0500 + +xli (1.16-12) frozen unstable; urgency=low + + * recompile with new libpng, so it won't segfault on a png file + (closes:#53284) + + -- James R. Van Zandt Sat, 15 Jan 2000 18:35:01 -0500 + +xli (1.16-11) unstable; urgency=low + + * manage compatibility symlink /usr/doc/xli + + -- James R. Van Zandt Sun, 24 Oct 1999 11:44:16 -0400 + +xli (1.16-10) unstable; urgency=low + + * Link against glibc2.1 + * Update to FHS + + -- James R. Van Zandt Thu, 2 Sep 1999 21:17:16 -0400 + +xli (1.16-9) unstable; urgency=low + + * Add PNG support to package description. Remove cruft from source package. + + -- James R. Van Zandt Sun, 20 Jun 1999 13:06:52 -0400 + +Xli (1.16-8) unstable; urgency=low + + * Add support for Portable Network Graphics courtesy of patches by + Smarasderagd (http://www.reptiles.org/~smar/) + * Omit declaration of index() in misc.c (Bug#39159) + + -- James R. Van Zandt Mon, 31 May 1999 17:01:34 -0400 + +xli (1.16-7) unstable; urgency=low + + * Don't depend on execution order of increments within an expression in + send.c - fix courtesy of ka@socrates.hr.lucent.com (Kenneth Almquist). + + -- James R. Van Zandt Tue, 4 May 1999 20:49:49 -0400 + +xli (1.16-6) unstable; urgency=low + + * Install MIME entry in correct directory. + + -- James R. Van Zandt Wed, 31 Mar 1999 17:49:26 -0500 + +xli (1.16-5) unstable; urgency=low + + * Register as a MIME viewer in /etc/mailcap. + + -- James R. Van Zandt Sat, 6 Feb 1999 10:18:54 -0500 + +xli (1.16-4) frozen unstable; urgency=low + + * Recompilation to remove dependency on libc6 2.0.7u + + -- James R. Van Zandt Wed, 9 Dec 1998 22:08:35 -0500 + +xli (1.16-3) frozen unstable; urgency=low + + * Use /usr/X11R6/lib instead of /usr/lib/X11 to avoid file overlap + (Bug#25873) + + -- James R. Van Zandt Sat, 28 Nov 1998 21:12:05 -0500 + +xli (1.16-2) unstable; urgency=low + + * Incorporated Paul Slootman's patches for the alpha. + + -- James R. Van Zandt Mon, 31 Aug 1998 22:03:11 -0400 + +xli (1.16-1.1) unstable; urgency=low + + * non-maintainer upload (binary-only) for Alpha + * fixed ddxli.h so that it knows to include string.h on linux + * couple of casts to unsigned long added to shut egcs up about pointer/int + conversion between different sizes. Now compiles without any warnings! + + -- Paul Slootman Mon, 31 Aug 1998 23:04:52 +0200 + +xli (1.16-1) unstable; urgency=low + + * Initial Release. + + -- James R. Van Zandt Sun, 12 Jul 1998 21:54:22 -0400 + + --- xli-1.17.0+20061110.orig/debian/rules +++ xli-1.17.0+20061110/debian/rules @@ -0,0 +1,64 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# This file is public domain software, originally written by Joey Hess. + +# include quilt stuff +include /usr/share/quilt/quilt.make + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS=-Wall -g -O0 +else + CFLAGS=-Wall -g -O2 +endif + +pkgdir="$(CURDIR)/debian/xli" + +build-arch: build-arch-stamp +build-arch-stamp: $(QUILT_STAMPFN) + dh_testdir + xmkmf + make CDEBUGFLAGS="$(CFLAGS)" + touch build-arch-stamp + +build-indep: build-indep-stamp +build-indep-stamp: + # nothing to do + touch build-indep-stamp + +clean: unpatch + dh_testdir + dh_testroot + [ ! -f Makefile ] || $(MAKE) clean + dh_clean + rm -f build-arch-stamp build-indep-stamp Makefile + +# Build architecture-independent files here. +binary-indep: build-indep +# nothing to do + +# Build architecture-dependent files here. +binary-arch: build-arch + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + dh_installman xli.man xlito.man + $(MAKE) install DESTDIR="$(pkgdir)" + dh_installchangelogs + dh_installdocs + dh_installexamples + dh_install + dh_installmime + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +build: build-indep build-arch +.PHONY: build build-arch build-indep clean binary-indep binary-arch binary patch unpatch --- xli-1.17.0+20061110.orig/debian/watch +++ xli-1.17.0+20061110/debian/watch @@ -0,0 +1,2 @@ +version=2 +http://pantransit.reptiles.org/prog/xli-([\d.]*)\.tar\.gz --- xli-1.17.0+20061110.orig/debian/compat +++ xli-1.17.0+20061110/debian/compat @@ -0,0 +1 @@ +5 --- xli-1.17.0+20061110.orig/debian/control +++ xli-1.17.0+20061110/debian/control @@ -0,0 +1,19 @@ +Source: xli +Section: graphics +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Ryan Niebur +Build-Depends: debhelper (>= 5), libjpeg-dev, libpng12-dev, libx11-dev, libxext-dev, xutils-dev, zlib1g-dev, quilt (>= 0.40) +Standards-Version: 3.7.3 +Homepage: http://pantransit.reptiles.org/prog/ + +Package: xli +Architecture: any +Depends: ${shlibs:Depends} +Description: command line tool for viewing images in X11 + xli can view the following image types under X11: FBM Image, Sun + Rasterfile, CMU WM Raster, Portable Bit Map (PBM, PGM, PPM), Portable + Network Graphics (PNG), Faces Project, GIF Image, JFIF style jpeg + Image, Utah RLE Image, Windows, OS/2 RLE Image, Photograph on CD + Image, X Window Dump, Targa Image, McIDAS areafile, G3 FAX Image, PC + Paintbrush Image, GEM Bit Image, MacPaint Image, X Pixmap, X Bitmap. --- xli-1.17.0+20061110.orig/debian/README.debian +++ xli-1.17.0+20061110/debian/README.debian @@ -0,0 +1,153 @@ +xli for DEBIAN +---------------------- + +xli displays images under X11. Debian includes other packages for +image display: xv, xloadimage, and display from the imagemagick +package. The xli README file describes the relationship between xli +and xloadimage as follows: + + xli version 1.00 was based on xloadimage version 3.01. + xli version 1.16 has many improvements over xli 1.00. + + xloadimage is maintained by Jim Frost - jimf@saber.com + + xli is maintained by Graeme Gill - graeme@labtam.oz.au + +xli handles some image formats that neither xloadimage nor xv do. +Also, xv is non-free (shareware). + +The xli package also supplies xlito, which appends a trailing option +string to an image file. xli will look for this string, and take +default display options from it. + +xli takes some special actions if it called by the name xsetbg or +xview, and the upstream package installs two symbolic links by these +names. However, the Debian package xloadimage creates links with the +same names. In order to prevent overlaps between the packages, this +package omits the links. Later releases of both packages will handle +this with Debian's "alternatives" mechanism (with symbolic links +through /etc/alternatives.) + +The following table shows the image handling capabilities of xli, +xloadimage, imagemagick, and xv, and the translations provided by the +netpbm package. R and W indicate read and right respectively. A +lower case letter indicates some restriction (e.g. xv handles +PostScript only if ghostscript is installed) or problem (at least in +my tests). (Try it yourself - it may work okay for you.) + +-------------------- black and white formats -------------------------- +xli imagemagick netpbm + xloadimage xv +R RW RW G3 FAX images +R R RW X10 bitmap files +R R RW RW RW X11 bitmap files +R R RW CMU WM Raster +R R RW GEM Bit Image (.img) +R R RW MacPaint Image +R R RW R RW Monochrome PC Paintbrush (.pcx) images +R RW RW RW Portable Bit Map (PBM) +R RW RW Windows, OS/2 BMP Image +R RW Sun monochrome rasterfiles + R Xerox doodle brushes + RW Andrew Toolkit raster object + RW Atari Degas .pi3 format + RW Bennet Yee's "face" format + RW MGR format + RW Sun icon file + W ASCII graphics + W BBN BitGraph graphics + W Epson printer format + W Gemini 10x printer format + W GraphOn graphics + W HP LaserJet format + W Printronix format + W Unix plot(5) file + W Zinc Interface Library icon + +-------------------- grayscale formats -------------------------- +xli imagemagick netpbm + xloadimage xv +R RW RW RW RW Portable Bit Map (PGM) + RW RW RW FITS + R Biorad CSLM images + R HIPS + R PostScript "image" data + R raw grayscale bytes (e.g. the Molecular Dynamics and Leica CSLM formats) + RW Lisp Machine bit-array-file + RW Usenix FaceSaver(tm) file + +-------------------- color formats -------------------------- +xli imagemagick netpbm + xloadimage xv +R Photograph on CD Image +R RW RW Sun color RGB rasterfiles +R RW Rw RW Targa (.tga) files +R R RW RW RW GIF Image +R R RW RW Rw X pixmap (.xpm) files +R RW RW RW JFIF style jpeg images +r RW RW RW RW Portable Bit Map (PPM) + RW IRIS RGB + RW PM + R Atari compressed Spectrum + R Atari uncompressed Spectrum + R Img-whatnot file + RW R MTV/PRT ray-tracer output + R QRT ray-tracer output + R Xim file + RW Abekas YUV format + RW Atari Degas .pi1 format + RW RW Color PC Paintbrush (.pcx) images + RW HP PaintJet format + RW IFF ILBM + RW RW PICT + W AutoCAD DXB format + W AutoCAD slide format + W DEC sixel format + RW W Motif UIL icon file + W NCSA Interactive Color Raster + W X11 "puzzle" file + +-------------------- multi-type formats -------------------------- +xli imagemagick netpbm + xloadimage xv +R R RW RW X Window Dump + R RW RW RW Sun Rasterfile + RW RW RW RW TIFF image + RW RW W PostScript + R Zeiss CSLM images (the old format) +R RW RW Portable Network Graphics (png) + +-------------------- other formats -------------------------- +xli imagemagick netpbm + xloadimage xv +R Fuzzy Bitmap (.fbm) images +R R FBM Image +R R McIDAS areafile +R R R R Utah Raster Toolkit (.rle) files +R R Faces Project + R Sun Visualization File Format + R R VICAR Image + RW Native Image File Format (NIFF) + + +As of summer 1998, xli is not actively maintained. Here is what the +last maintainer wrote: + + Date: Mon, 8 Jun 1998 18:25:23 +1000 + From: Graeme Gill + To: jrv@vanzandt.mv.com + Subject: Re: intent to package: xli + + > I have been looking at xli, and am thinking about preparing a Debian + > package. Are you still maintaining xli? Is xli.1.16.tar.gz the most + > recent version? + + I haven't done anything to it in about 4 years. 1.16 is the latest + release. I have a stack of email patches, but not the time + to deal with them ... + + Graeme Gill. + +If you are interested in working with xli, please let us know. + +James R. Van Zandt , Sun, 12 Jul 1998 21:54:22 -0400 --- xli-1.17.0+20061110.orig/debian/dirs +++ xli-1.17.0+20061110/debian/dirs @@ -0,0 +1,4 @@ +usr/bin +usr/share/man/man1 +usr/share/doc/xli/examples +usr/lib/mime/packages --- xli-1.17.0+20061110.orig/debian/copyright +++ xli-1.17.0+20061110/debian/copyright @@ -0,0 +1,134 @@ +This package was debianized by James R. Van Zandt on +Sun, 12 Jul 1998 21:54:22 -0400. +Then Graham Wilson maintained the package. +Later Florian Ernst prepared some modifications but +did finaly not adopt it. Bernhard R. Link took those +and made a QA upload based on those and with some more modifications. + +Current maintainer: smar@reptiles.org +It was downloaded from: http://pantransit.reptiles.org/prog/ + +Copyright: + +* Copyright 1989, 1990, 1991 Jim Frost +* +* Permission to use, copy, modify, distribute, and sell this software +* and its documentation for any purpose is hereby granted without fee, +* provided that the above copyright notice appear in all copies and +* that both that copyright notice and this permission notice appear +* in supporting documentation. The author makes no representations +* about the suitability of this software for any purpose. It is +* provided "as is" without express or implied warranty. +* +* THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN +* NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR +* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE +* USE OR PERFORMANCE OF THIS SOFTWARE. + +the files dither.c,gif.c,gif.h are based on code that is: +Copyright 1989, 1990 Kirk L. Johnson +with an otherwise identical notice as above. + +the files img.c,img.h,pcx.c are +Copyright (C) 1991 Tim Northrup +with an otherwise identical notice as above. + +the files fbm.c,mac.c,mac.h are +Copyright 1990 Mark Majhor +with an otherwise identical notice as above. + +the file pcx.c additionall contains code that is: +** Copyright (C) 1988 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. + +the file fbm.h is: + * This file is based on fbm.h by Michael Mauldin + * The original file had the following copyright: + * + * Copyright (C) 1989,1990 by Michael Mauldin. Permission is granted + * to use this file in whole or in part for any purpose, educational, + * recreational or commercial, provided that this copyright notice + * is retained unchanged. This software is available to all free of + * charge by anonymous FTP and in the UUNET archives. + +the file rle.h states: +* This software is copyrighted as noted below. It may be freely copied, +* modified, and redistributed, provided that the copyright notice is +* preserved on all copies. +* +* There is no warranty or other guarantee of fitness for this software, +* it is provided solely "as is". Bug reports or fixes may be sent +* to the author, who may or may not act on them as he desires. +* +* You may not include this software in a program or other software product +* without supplying the source, or without informing the end-user that the +* source is available for no extra charge. +* +* If you modify this software, you should include a notice giving the +* name of the person performing the modification, the date of modification, +* and the reason for such modification. +[...] +* Author: Todd W. Fuqua +* Computer Science Dept. +* University of Utah +* Date: Sun Jul 29 1984 +* Copyright (c) 1984 Todd W. Fuqua + +the file rlelib.c has the same notice but with +* Author: Spencer W. Thomas +* Computer Science Dept. +* University of Utah +* Date: Mon Aug 9 1982 +* Copyright (c) 1982 Spencer W. Thomas +and +* Date: Thu Apr 25 1985 +* Copyright (c) 1985,1986 Spencer W. Thomas +and +* Date: Mon Aug 9 1982 +* Copyright (c) 1982,1986 Spencer W. Thomas +and +* Date: Sat Jan 24 1987 +* Date: Sun Jan 25 1987 +* Copyright (c) 1987, University of Utah +and +* Date: Mon Aug 9 1982 +* Copyright (c) 1982,1986 Spencer W. Thomas +and +* Date: Wed Apr 10 1985 +* Copyright (c) 1985 Spencer W. Thomas + +the file xbitmap.c contains code that is +* Copyright, 1987, Massachusetts Institute of Technology +with the following notice #included: +* Copyright 1989 Massachusetts Institute of Technology +* +* Permission to use, copy, modify, distribute, and sell this software and its +* documentation for any purpose is hereby granted without fee, provided that +* the above copyright notice appear in all copies and that both that +* copyright notice and this permission notice appear in supporting +* documentation, and that the name of M.I.T. not be used in advertising or +* publicity pertaining to distribution of the software without specific, +* written prior permission. M.I.T. makes no representations about the +* suitability of this software for any purpose. It is provided "as is" +* without express or implied warranty. +* +* M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL +* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL M.I.T. +* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +rotate.c is contributed by Tom Tatlow (tatlow@dash.enet.dec.com) +and #includes the very first notice from Jim Frost. + +Various changes to different files by Graeme W. Gill, Smarasderagd, +Mike Muuss et al. --- xli-1.17.0+20061110.orig/debian/mime +++ xli-1.17.0+20061110/debian/mime @@ -0,0 +1,13 @@ +image/png; /usr/bin/xli -quiet '%s'; test=test -n "$DISPLAY"; description=PNG Image; nametemplate=%s.png; priority=3 +image/x-ms-bmp; /usr/bin/xli -quiet '%s'; test=test -n "$DISPLAY"; description=BMP Image; nametemplate=%s.bmp; priority=3 +image/x-cmu-raster; /usr/bin/xli -quiet '%s'; test=test -n "$DISPLAY"; description=CMU-RasterFile Image; nametemplate=%s.ras; priority=3 +image/g3fax; /usr/bin/xli -quiet '%s'; test=test -n "$DISPLAY"; description=G3-FAX Image; nametemplate=%s.g3; priority=3 +image/gif; /usr/bin/xli -quiet '%s'; test=test -n "$DISPLAY"; description=GIF Image; nametemplate=%s.gif; priority=3 +image/jpeg; /usr/bin/xli -quiet '%s'; test=test -n "$DISPLAY"; description=JPEG Image; nametemplate=%s.jpg; priority=3 +image/targa; /usr/bin/xli -quiet '%s'; test=test -n "$DISPLAY"; description=TARGA Image; nametemplate=%s.tga; priority=3 +image/x-portable-bitmap; /usr/bin/xli -quiet '%s'; test=test -n "$DISPLAY"; description=PBM Image; nametemplate=%s.pbm; priority=3 +image/x-portable-graymap; /usr/bin/xli -quiet '%s'; test=test -n "$DISPLAY"; description=PGM Image; nametemplate=%s.pgm; priority=3 +image/x-portable-pixmap; /usr/bin/xli -quiet '%s'; test=test -n "$DISPLAY"; description=PPM Image; nametemplate=%s.ppm; priority=3 +image/x-rgb; /usr/bin/xli -quiet '%s'; test=test -n "$DISPLAY"; description=RGB Image; nametemplate=%s.rgb; priority=3 +image/x-xbitmap; /usr/bin/xli -quiet '%s'; test=test -n "$DISPLAY"; description=XBM Image; nametemplate=%s.xbm; priority=3 +image/x-xpixmap; /usr/bin/xli -quiet '%s'; test=test -n "$DISPLAY"; description=XPM Image; nametemplate=%s.xpm; priority=3 --- xli-1.17.0+20061110.orig/debian/docs +++ xli-1.17.0+20061110/debian/docs @@ -0,0 +1 @@ +README --- xli-1.17.0+20061110.orig/debian/examples +++ xli-1.17.0+20061110/debian/examples @@ -0,0 +1 @@ +chkgamma.jpg --- xli-1.17.0+20061110.orig/debian/patches/fillscreen_forall.diff +++ xli-1.17.0+20061110/debian/patches/fillscreen_forall.diff @@ -0,0 +1,100 @@ +This patch adds a -forall option, that avoids -fillscreen and +-onroot to be be limited on the first image, and keeps -fillscreen +over rotating images. by Bernhard R. Link in #48878 +Index: xli-2006-11-10/options.c +=================================================================== +--- xli-2006-11-10.orig/options.c 2006-11-11 06:52:14.000000000 +0100 ++++ xli-2006-11-10/options.c 2007-07-28 14:04:15.000000000 +0200 +@@ -42,6 +42,8 @@ + it will be zoomed to completely fill the screen.",}, + {"fit", FIT, NULL, "\ + Force the image(s) to use the default colormap.",}, ++ {"forall", FORALL, NULL, "\ ++Avoid fillscreen and onroot handling the first image specially.\n",}, + {"fork", FORK, NULL, "\ + Background automatically. Turns on -quiet.",}, + {"fullscreen", FULLSCREEN, NULL, "\ +@@ -392,6 +394,10 @@ + globals.fit = TRUE; + break; + ++ case FORALL: ++ globals.forall = TRUE; ++ break; ++ + case FORK: + globals.do_fork = TRUE; + /* background processes should be seen but not heard */ +Index: xli-2006-11-10/options.h +=================================================================== +--- xli-2006-11-10.orig/options.h 1999-10-25 04:15:00.000000000 +0200 ++++ xli-2006-11-10/options.h 2007-07-28 14:04:15.000000000 +0200 +@@ -34,6 +34,7 @@ + FILLSCREEN, + FIT, + FORK, ++ FORALL, + FULLSCREEN, + GOTO, + GEOMETRY, +Index: xli-2006-11-10/xli.c +=================================================================== +--- xli-2006-11-10.orig/xli.c 2006-11-11 06:52:14.000000000 +0100 ++++ xli-2006-11-10/xli.c 2007-07-28 14:04:16.000000000 +0200 +@@ -154,6 +154,7 @@ + + globals.dname = NULL; + globals.fit = FALSE; ++ globals.forall = FALSE; + globals.fillscreen = FALSE; + globals.fullscreen = FALSE; + globals.go_to = NULL; +@@ -331,7 +332,8 @@ + * in fullscreen mode, set zoom factors to something reasonable + */ + +- if (first && ((globals.onroot && globals.fullscreen) || ++ if ( (first || globals.forall) && ++ ((globals.onroot && globals.fullscreen) || + globals.fillscreen) && !io->xzoom && + !io->yzoom && !io->center) { + double wr, hr; +@@ -370,7 +372,8 @@ + * else if this is the first image on root + * set its position and any border needed + */ +- if (first && globals.onroot && (winwidth || winheight || ++ if ( (first || globals.forall) && ++ globals.onroot && (winwidth || winheight || + io->center || io->ats || globals.fullscreen || + globals.fillscreen)) { + int atx = io->atx, aty = io->aty; +@@ -527,6 +530,16 @@ + io->rotate -= 360; + while (io->rotate < 0) + io->rotate += 360; ++ if ( globals.forall && ++ ((globals.onroot && globals.fullscreen) || ++ globals.fillscreen) && !io->center) { ++ double wr, hr,f; ++ wr = (double) globals.dinfo.width / inew->height; ++ hr = (double) globals.dinfo.height / inew->width; ++ f = (((wr < hr) ^ (globals.onroot && globals.fillscreen)) ? wr : hr) * 100; ++ io->xzoom *= f/100.0; ++ io->yzoom *= f/100.0; ++ } + if (globals.verbose) + printf("Image rotation is now %d\n", + io->rotate); +Index: xli-2006-11-10/xli.h +=================================================================== +--- xli-2006-11-10.orig/xli.h 1999-10-25 04:15:07.000000000 +0200 ++++ xli-2006-11-10/xli.h 2007-07-28 14:04:16.000000000 +0200 +@@ -82,6 +82,7 @@ + float display_gamma; + char *dname; + boolean do_fork; ++ boolean forall; + boolean fillscreen; + boolean fit; + boolean fullscreen; --- xli-1.17.0+20061110.orig/debian/patches/zoom_auto_440768.diff +++ xli-1.17.0+20061110/debian/patches/zoom_auto_440768.diff @@ -0,0 +1,144 @@ +Subject: Bug#440768: xli: -zoom auto +From: Alan Curry +Date: Tue, 4 Sep 2007 01:09:05 -0400 (EDT) + +This patch implements the "-zoom auto" feature suggested in xli's TODO file. +It doesn't implement the related TODO item of merging -zoom and -iscale. + +With -zoom auto, images smaller than 90% of the screen size are displayed +un-zoomed. Images larger than 90% of the screen size are reduced to fit. + +Subject: Bug#440768: (xli -zoom auto) patch improvement +From: Alan Curry +Date: Tue, 4 Sep 2007 18:53:56 -0400 (EDT) + +Update: the first version of the patch didn't allow the -zoom auto option to +persist across multiple images. This version fixes that. + +diff -ruNp a/TODO b/TODO +--- a/TODO 2000-02-09 04:23:32.000000000 -0500 ++++ b/TODO 2007-09-03 23:31:28.000000000 -0500 +@@ -22,7 +22,6 @@ add vicar reader, copyright Noel Gorelic + developed by NASA/JPL.' + + make fast image scaling a subfeature of -zoom, eliminate -iscale +-and add -zoom auto + + add a TIFF reader? + +diff -ruNp a/misc.c b/misc.c +--- a/misc.c 2000-02-09 04:23:33.000000000 -0500 ++++ b/misc.c 2007-09-03 22:40:36.000000000 -0500 +@@ -104,6 +104,8 @@ char *tail(char *path) + return (t); + } + ++#define MIN(a,b) ( (a)<(b) ? (a) : (b)) ++ + Image *processImage(DisplayInfo *dinfo, Image *iimage, ImageOptions *options) + { + Image *image = iimage, *tmpimage; +@@ -132,6 +134,19 @@ Image *processImage(DisplayInfo *dinfo, + image = tmpimage; + } + /* zoom image */ ++ if (options->zoom_auto) { ++ if (image->width > globals.dinfo.width * .9) ++ options->xzoom = globals.dinfo.width * 90 / image->width; ++ else ++ options->xzoom = 100; ++ if (image->height > globals.dinfo.height * .9) ++ options->yzoom = globals.dinfo.height * 90 / image->height; ++ else ++ options->yzoom = 100; ++ /* both dimensions should be shrunk by the same factor */ ++ options->xzoom = options->yzoom = ++ MIN(options->xzoom, options->yzoom); ++ } + if (options->xzoom || options->yzoom) { + /* if the image is to be blown up, compress before doing it */ + if (!options->colors && RGBP(image) && +diff -ruNp a/options.c b/options.c +--- a/options.c 1999-10-24 21:15:00.000000000 -0500 ++++ b/options.c 2007-09-04 16:15:42.000000000 -0500 +@@ -731,13 +731,20 @@ int doLocalOption(OptionId opid, char ** + + case ZOOM: + if (argv[++a]) { +- if (atoi(argv[a]) < 0) { +- printf("Zoom argument must be positive (ignored).\n"); +- break; ++ if (!strcmp(argv[a], "auto")) { ++ image_ops->zoom_auto = TRUE; ++ } else { ++ if (atoi(argv[a]) < 0) { ++ printf("Zoom argument must be positive (ignored).\n"); ++ break; ++ } ++ image_ops->xzoom = image_ops->yzoom = atoi(argv[a]); ++ image_ops->zoom_auto = FALSE; + } +- image_ops->xzoom = image_ops->yzoom = atoi(argv[a]); +- if (setpersist) ++ if (setpersist) { + persist_ops->xzoom = persist_ops->yzoom = image_ops->xzoom; ++ persist_ops->zoom_auto = image_ops->zoom_auto; ++ } + } + break; + +diff -ruNp a/xli.c b/xli.c +--- a/xli.c 2000-02-09 04:23:35.000000000 -0500 ++++ b/xli.c 2007-09-04 16:32:12.000000000 -0500 +@@ -90,6 +90,7 @@ int main(int argc, char *argv[]) + persist_ops.xpmkeyc = 0; /* none */ + persist_ops.xzoom = 0; + persist_ops.yzoom = 0; ++ persist_ops.zoom_auto = FALSE; + persist_ops.iscale = 0; + persist_ops.iscale_auto = FALSE; + +@@ -201,6 +202,7 @@ int main(int argc, char *argv[]) + images[nimages].xpmkeyc = persist_ops.xpmkeyc; + images[nimages].xzoom = persist_ops.xzoom; + images[nimages].yzoom = persist_ops.yzoom; ++ images[nimages].zoom_auto = persist_ops.zoom_auto; + images[nimages].iscale_auto = persist_ops.iscale_auto; + nimages++; + INIT_IMAGE_OPTS(images[nimages]); +@@ -541,6 +543,7 @@ int main(int argc, char *argv[]) + break; + } + io->xzoom = io->yzoom = 0; ++ io->zoom_auto = 0; + io->iscale_auto = 0; + + if (globals.verbose) { +diff -ruNp a/xli.h b/xli.h +--- a/xli.h 1999-10-24 21:15:07.000000000 -0500 ++++ b/xli.h 2007-09-03 22:40:36.000000000 -0500 +@@ -55,6 +55,7 @@ typedef struct { + char *title; /* Override title on image */ + unsigned int xzoom, yzoom; + /* zoom percentages */ ++ boolean zoom_auto; /* automatically zoom to fit on screen */ + char *fg, *bg; /* foreground/background colors if mono image */ + boolean done_to; /* TRUE if we have already looked for trailing + * options +diff -ruNp a/xli.man b/xli.man +--- a/xli.man 2007-09-03 22:40:08.000000000 -0500 ++++ b/xli.man 2007-09-04 00:02:38.000000000 -0500 +@@ -317,6 +317,9 @@ more information. Technically the perce + square of the number supplied since the zoom is to both axes, but I + opted for consistency instead of accuracy. + .TP ++\-zoom auto ++Zoom large images to fit the screen; don't zoom small images. ++.TP + \-newoptions + Reset options that propagate. The \fI\-bright, \-colors, \-colordither, \-delay, + \-dither, \-gamma, \-gray, \-normalize, \-smooth, \-xzoom, \-yzoom\fR, and + + + + --- xli-1.17.0+20061110.orig/debian/patches/multiple_images_merge.diff +++ xli-1.17.0+20061110/debian/patches/multiple_images_merge.diff @@ -0,0 +1,14 @@ +A bug with all merging, not only the merging +activated by -onroot; by Bernhard R. Link #289147 +Index: xli-2006-11-10/xli.c +=================================================================== +--- xli-2006-11-10.orig/xli.c 2007-07-28 14:07:16.000000000 +0200 ++++ xli-2006-11-10/xli.c 2007-07-28 14:08:09.000000000 +0200 +@@ -366,6 +366,7 @@ + idisp = itmp; + } + freeImage(inew); ++ inew = idisp; + } + + /* --- xli-1.17.0+20061110.orig/debian/patches/support_kfreebsd.diff +++ xli-1.17.0+20061110/debian/patches/support_kfreebsd.diff @@ -0,0 +1,22 @@ +Merging support for kfreebsd with an older patch; #396935, #81859 +Index: xli-1.17.0+20061110/ddxli.h +=================================================================== +--- xli-1.17.0+20061110.orig/ddxli.h 2007-07-29 16:12:52.000000000 +0200 ++++ xli-1.17.0+20061110/ddxli.h 2007-07-29 16:13:21.000000000 +0200 +@@ -36,12 +36,16 @@ + + /* equate bcopy with memcpy and bzero with memset where appropriate. */ + #ifdef HAS_MEMCPY ++#if defined(__linux__) || defined(__GLIBC__) ++#include ++#else + #ifndef bcopy + #define bcopy(S,D,N) memcpy((char *)(D),(char *)(S),(N)) + #endif + #ifndef bzero + #define bzero(P,N) memset((P),'\0',(N)) + #endif ++#endif /* !defined(__linux__) && !defined(__GLIBC__) */ + #ifndef bfill + #define bfill(P,N,C) memset((P),(C),(N)) + #endif --- xli-1.17.0+20061110.orig/debian/patches/manpage.diff +++ xli-1.17.0+20061110/debian/patches/manpage.diff @@ -0,0 +1,855 @@ +Misc typo fixes, removing references to links not shipped by xli due to +conflicts with xloadimage, display a line, hyphens; #300665, #310024, #326540 +Also escape some hashes and add description for -forall option +Index: xli-1.17.0+20061110/xli.man +=================================================================== +--- xli-1.17.0+20061110.orig/xli.man 2007-07-29 16:38:12.000000000 +0200 ++++ xli-1.17.0+20061110/xli.man 2007-07-29 16:38:26.000000000 +0200 +@@ -1,8 +1,10 @@ + .\" @(#)x11:contrib/clients/xloadimage/xli.man 1.13 94/07/29 Labtam + .\" +-.TH XLI 1 "27 Jul 1994" ++.\" comment out xsetbg and xview (not in Debian package) - jrv ++.TH XLI 1 "28 Oct 2002" + .SH NAME +-xli, xsetbg, xview \- load images into an X11 window or onto ++.\" xli, xsetbg, xview \- load images into an X11 window or onto ++xli \- load images into an X11 window or onto + the root window + .SH SYNOPSIS + \fIxli\fR [global_options] {[image_options] image ...} +@@ -19,18 +21,18 @@ + If the destination display cannot support the number of colors in the + image, the image will be dithered (monochrome destination) or have its + colormap reduced (color destination) as appropriate. This can also be +-done forcibly with the \fI-halftone\fR, \fI-dither\fR, and +-\fI-colors\fR options. ++done forcibly with the \fI\-halftone\fR, \fI\-dither\fR, and ++\fI\-colors\fR options. + .PP + A variety of image manipulations can be specified, including gamma +-correction, brightening, clipping, dithering, depth-reduction, ++correction, brightening, clipping, dithering, depth\-reduction, + rotation, and zooming. Most of these manipulations have simple + implementations; speed was opted for above accuracy. + .PP + If you are viewing a large image in a window, the initial window will + be at most 90% of the size of the display unless the window manager + does not correctly handle window size requests or if you've used the +-\fI-fullscreen\fR or \fI-fillscreen\fR options. ++\fI\-fullscreen\fR or \fI\-fillscreen\fR options. + You may move the image around in the window + by dragging with the first mouse button. The cursor will indicate + which directions you may drag, if any. +@@ -42,14 +44,14 @@ + Type space, 'n' or 'f' to move to the next image in the list. + Type 'b' or 'p' to move to the previous image in the list. + Type . to reload the image. +-Type l to rotate the image anti-clockwise. ++Type l to rotate the image anti\-clockwise. + Type r to rotate the image clockwise. + Type 0 to set the images assumed gamma to your display gamma + (usually darkens images) + Type 1 to set the images assumed gamma to 1.0 + (usually lightens images) +-Type 5-2 to lighten the image (5 in small steps, up to 2 in large steps) +-Type 6-9 to darken the image (6 in small steps, up to 9 in large steps) ++Type 5\-2 to lighten the image (5 in small steps, up to 2 in large steps) ++Type 6\-9 to darken the image (6 in small steps, up to 9 in large steps) + .ad + .fi + .PP +@@ -57,8 +59,8 @@ + matching the available options. See the section entitled \fIHINTS FOR + GOOD IMAGE DISPLAYS\fR for some ideas. + .PP +-\fIXsetbg\fR is equivalent to \fIxli -onroot -quiet\fR and +-\fIxview\fR is equivalent to \fIxli -view -verbose\fR. ++.\"\fIXsetbg\fR is equivalent to \fIxli \-onroot \-quiet\fR and ++.\"\fIxview\fR is equivalent to \fIxli \-view \-verbose\fR. + .SH RESOURCE CLASS + \fIxli\fR uses the resource class name \fI_XSETROOT_Id\FR for + window managers which need this resource set. +@@ -66,27 +68,27 @@ + The following options affect the global operation of \fIxli\fR. + They may be specified anywhere on the command line. + .TP +--default ++\-default + Set the root background to the default root weave. This is the same + as \fIxsetroot\fR with no arguments. + .TP +--debug ++\-debug + Talk to the X server in synchronous mode. This is useful for + debugging. If an X error is seen while in this mode, a core will be + dumped. + .TP +--dumpcore ++\-dumpcore + Signals will not be trapped, and instead a coredump will occur. + .TP +--display \fIdisplay_name\fR ++\-display \fIdisplay_name\fR + X11 display name to send the image(s) to. + .TP +--dispgamma \fIDisplay_gamma\fR ++\-dispgamma \fIDisplay_gamma\fR + Specify the gamma correction value appropriate for the display device. +-This overides the value read from the environment variable \fBDISPLAY_GAMMA\fR, ++This overrides the value read from the environment variable \fBDISPLAY_GAMMA\fR, + or the default value of 2.2, which is approximately correct for + many displays. A value of between 1.6 and 2.8 is reasonable. If individual +-images are too bright or dark, use the -gamma option. ++images are too bright or dark, use the \-gamma option. + .PP + There is an image provided with xli called 'chkgamma.jpg' that lets you + set the display gamma reasonably accurately. This file contains two +@@ -95,34 +97,38 @@ + When the display gamma is correct, then the two ramps should look symmetrical, + and the point at which they look equally bright should be almost exactly half + way from the top to the bottom. (To find this point it helps if you move away +-a little from the screen, and de-focus your eyes a bit.) ++a little from the screen, and de\-focus your eyes a bit.) + .PP + If the equal brightness point is above center increase the + gamma, and decrease it if it is below the center. The value + will usually be around 2.2 Once you've got it right, you can set + the DISPLAY_GAMMA environment variable in your .profile + .TP +--fillscreen ++\-fillscreen + Use the whole screen for displaying an image. The image will be zoomed +-so that it just fits the size of the screen. If -onroot is also specified, ++so that it just fits the size of the screen. If \-onroot is also specified, + it will be zoomed to completely fill the screen. + .TP +--fit ++\-fit + Force image to use the default visual and colormap. This is useful if + you do not want technicolor effects when the colormap focus is inside + the image window, but it may reduce the quality of the displayed +-image. This is on by default if -onroot or -windowid is specified. ++image. This is on by default if \-onroot or \-windowid is specified. + .TP +--fork ++\-forall ++Apply \-fillscreen and \-fullscreen options to all images and not just ++the first. ++.TP ++\-fork + Fork xli. This causes xli to disassociate itself from +-the shell. This option automatically turns on -quiet. ++the shell. This option automatically turns on \-quiet. + .TP +--fullscreen ++\-fullscreen + Use the whole screen for displaying an image. The image will be surrounded by +-a border if it is smaller than the screen. If -onroot is also specified, ++a border if it is smaller than the screen. If \-onroot is also specified, + the image will be zoomed so that it just fits the size of the screen. + .TP +--geometry \fIWxH[{+-X}{+-}Y]\fR ++\-geometry \fIWxH[{+\-X}{+\-}Y]\fR + This sets the size of the window onto which the images are loaded to a + different value than the size of the image. When viewing an image in + a window, this can be used to set the size and position of the +@@ -131,121 +137,122 @@ + then the size will be chosen to be small enough to able to fit + the window in the screen (as usual). + .TP +--goto image_name ++\-goto image_name + When the end of the list of images is reached, go to image + \fIimage_name\fR. This is useful for generating looped slideshows. + If more than one image of the same name as the target exists on the + argument list, the first in the argument list is used. + .TP +--help [option ...] ++\-help [option ...] + Give information on an option or list of options. If no option is + given, a simple interactive help facility is invoked. + .TP +--identify ++\-identify + Identify the supplied images rather than display them. + .TP +--install ++\-install + Forcibly install the images colormap when the window is focused. + This violates ICCCM standards and only exists to allow operation with + naive window managers. Use this option only if your window manager + does not install colormaps properly. + .TP +--list ++\-list + List the images which are along the image path. + .TP +--onroot ++\-onroot + Load image(s) onto the root window instead of viewing in a window. +-This option automatically sets the -fit option. +-This is the opposite of \fI-view\fR. \fIXSetbg\fR has this option set +-by default. If used in conjunction with -fullscreen, +-the image will be zoomed to just fit. If used with -fillscreen, the image will +-be zoomed to completely fill the screen. -border, -at, and -center also affect the ++This option automatically sets the \-fit option. ++This is the opposite of \fI\-view\fR. ++.\"\fIXSetbg\fR has this option set by default. ++If used in conjunction with \-fullscreen, ++the image will be zoomed to just fit. If used with \-fillscreen, the image will ++be zoomed to completely fill the screen. \-border, \-at, and \-center also affect the + results. + .TP +--path ++\-path + Displays the image path and image suffixes which will be used when + looking for images. These are loaded from ~/.xlirc and + optionally from a system wide file (normally /usr/lib/xlirc). + .TP +--pixmap +-Force the use of a pixmap as backing-store. This is provided for +-servers where backing-store is broken (such as some versions of the ++\-pixmap ++Force the use of a pixmap as backing\-store. This is provided for ++servers where backing\-store is broken (such as some versions of the + AIXWindows server). It may improve scrolling performance on servers +-which provide backing-store. ++which provide backing\-store. + .TP +--private ++\-private + Force the use of a private colormap. Normally colors are allocated + shared unless there are not enough colors available. + .TP +--quiet +-Forces \fIxli\fR and \fIxview\fR to be quiet. This is the +-default for \fIxsetbg\fR, but the others like to whistle. ++\-quiet ++Forces \fIxli\fR and \fIxview\fR to be quiet. ++.\"This is the default for \fIxsetbg\fR, but the others like to whistle. + .TP +--supported ++\-supported + List the supported image types. + .TP +--verbose ++\-verbose + Causes \fIxli\fR to be talkative, telling you what kind of + image it's playing with and any special processing that it has to do. + This is the default for \fIxview\fR and \fIxli\fR. + .TP +--version ++\-version + Print the version number and patchlevel of this version of + \fIxli\fR. + .TP +--view +-View image(s) in a window. This is the opposite of \fI-onroot\fR and ++\-view ++View image(s) in a window. This is the opposite of \fI\-onroot\fR and + the default for \fIxview\fR and \fIxli\fR. + .TP +--visual \fIvisual_name\fR ++\-visual \fIvisual_name\fR + Force the use of a specific visual type to display an image. Normally + \fIxli\fR tries to pick the best available image for a + particular image type. The available visual types are: DirectColor, + TrueColor, PseudoColor, StaticColor, GrayScale, and StaticGray. + Nonconflicting names may be abbreviated and case is ignored. + .TP +--windowid \fIhex_window_id\fR ++\-windowid \fIhex_window_id\fR + Sets the background pixmap of a particular window ID. The argument + must be in hexadecimal and must be preceded by "0x" (\fIeg\fR +--windowid 0x40000b. This is intended for setting the background ++\-windowid 0x40000b. This is intended for setting the background + pixmap of some servers which use untagged virtual roots +-(\fIeg\fR HP-VUE), but can have other interesting applications. ++(\fIeg\fR HP\-VUE), but can have other interesting applications. + .SH PERSISTENT IMAGE OPTIONS + The following options may precede each image. They take effect from + the next image, and continue until overridden or canceled with +-\fI-newoptions.\fR ++\fI\-newoptions.\fR + .TP +--border \fIcolor\fR ++\-border \fIcolor\fR + This sets the background portion of the window or clipped image which is + not covered by any images to be \fIcolor\fR. + .TP +--brighten \fIpercentage\fR ++\-brighten \fIpercentage\fR + Specify a percentage multiplier for a color images colormap. A value + of more than 100 will brighten an image, one of less than 100 will + darken it. + .TP +--colors \fIn\fR ++\-colors \fIn\fR + Specify the maximum number of colors to use in the image. This is a + way to forcibly reduce the depth of an image. + .TP +--cdither ++\-cdither + .TP +--colordither +-Dither the image with a Floyd-Steinberg dither if the number of colors is reduced. ++\-colordither ++Dither the image with a Floyd\-Steinberg dither if the number of colors is reduced. + This will be slow, but will give a better looking result with a restricted color +-set. \fI-cdither\fR and \fI-colordither\fR are equivalent. ++set. \fI\-cdither\fR and \fI\-colordither\fR are equivalent. + .TP +--delay \fIsecs\fR ++\-delay \fIsecs\fR + Sets xli to automatically advance to the following image, + \fIsecs\fR seconds after the next image file is displayed. + .TP +--dither +-Dither a color image to monochrome using a Floyd-Steinberg dithering ++\-dither ++Dither a color image to monochrome using a Floyd\-Steinberg dithering + algorithm. This happens by default when viewing color images on a +-monochrome display. This is slower than \fI-halftone\fR and affects ++monochrome display. This is slower than \fI\-halftone\fR and affects + the image accuracy but usually looks much better. + .TP +--gamma \fIImage_gamma\fR ++\-gamma \fIImage_gamma\fR + Specify the gamma of the display the image was intended to be displayed on. + Images seem to + come in two flavors: 1) linear color images, produced by ray tracers, +@@ -261,135 +268,135 @@ + as if it were a linear image, then it will look too light, and a gamma value of + (approximately) 2.2 should be specified for that image. + Some formats (RLE) allow the image gamma to be embedded as a comment in the +-file itself, and the -gamma option allows overriding of the file comment. ++file itself, and the \-gamma option allows overriding of the file comment. + In general, values smaller than 2.2 will lighten the image, and values + greater than 2.2 will darken the image. +-In general this will work better than the -brighten option. ++In general this will work better than the \-brighten option. + .TP +--gray ++\-gray + Convert an image to grayscale. This is very useful when displaying + colorful images on servers with limited color capability. The +-optional spelling \fI-grey\fR may also be used. ++optional spelling \fI\-grey\fR may also be used. + .TP +--idelay \fIsecs\fR ++\-idelay \fIsecs\fR + Set the delay to be used for this image to \fIsecs\fR seconds (see +-\fI-delay\fR). If \fI-delay\fR was specified, this overrides it. If ++\fI\-delay\fR). If \fI\-delay\fR was specified, this overrides it. If + it was not specified, this sets the automatic advance delay for this + image while others will wait for the user to advance them. + .TP +--smooth ++\-smooth + Smooth a color image. This reduces blockiness after zooming an image + up. If used on a monochrome image, nothing happens. This option can + take awhile to perform, especially on large images. You may specify +-more than one \fI-smooth\fR option per image, causing multiple ++more than one \fI\-smooth\fR option per image, causing multiple + iterations of the smoothing algorithm. + .TP +--title \fIwindow_title\fR ++\-title \fIwindow_title\fR + Set the titlebar of the window used to display the image. +-This will overide any title that is read from the image ++This will override any title that is read from the image + file. The title will also be used for the icon name. + .TP +--xpm \fIcolor_context_key\fR +-Select the prefered xpm colour map. XPM files may contain more than one ++\-xpm \fIcolor_context_key\fR ++Select the preferred xpm colour map. XPM files may contain more than one + color mapping, each mapping being appropriate for a particular visual. +-Normally xli will select an apropriate color mapping from that supported ++Normally xli will select an appropriate color mapping from that supported + by the XPM file by checking on the default X visual class and depth. +-This option allows the user to overide this choice. ++This option allows the user to override this choice. + Legal values of \fIcolor_context_key\fR are: m, g4, g and c. + m = mono, g4 = 4 level gray, g = gray, c = color ). + .TP +--xzoom \fIpercentage\fR ++\-xzoom \fIpercentage\fR + Zoom the X axis of an image by \fIpercentage\fR. A number greater + than 100 will expand the image, one smaller will compress it. A zero +-value will be ignored. This option, and the related \fI-yzoom\fR are ++value will be ignored. This option, and the related \fI\-yzoom\fR are + useful for correcting the aspect ratio of images to be displayed. + .TP +--yzoom \fIpercentage\fR +-Zoom the Y axis of an image by \fIpercentage\fR. See \fI-xzoom\fR for ++\-yzoom \fIpercentage\fR ++Zoom the Y axis of an image by \fIpercentage\fR. See \fI\-xzoom\fR for + more information. + .TP +--zoom \fIpercentage\fR +-Zoom both the X and Y axes by \fIpercentage\fR. See \fI-xzoom\fR for ++\-zoom \fIpercentage\fR ++Zoom both the X and Y axes by \fIpercentage\fR. See \fI\-xzoom\fR for + more information. Technically the percentage actually zoomed is the + square of the number supplied since the zoom is to both axes, but I + opted for consistency instead of accuracy. + .TP +--newoptions +-Reset options that propagate. The \fI-bright, -colors, -colordither, -delay, +--dither, -gamma, -gray, -normalize, -smooth, -xzoom, -yzoom\fR, and +-\fI-zoom\fR options normally propagate to all following images. ++\-newoptions ++Reset options that propagate. The \fI\-bright, \-colors, \-colordither, \-delay, ++\-dither, \-gamma, \-gray, \-normalize, \-smooth, \-xzoom, \-yzoom\fR, and ++\fI\-zoom\fR options normally propagate to all following images. + .SH LOCAL IMAGE OPTIONS + The following options may precede each image. These options are + local to the image they precede. + .TP +--at \fIX\fR,\fIY\fR ++\-at \fIX\fR,\fIY\fR + Indicates coordinates to load the image at \fIX\fR,\fIY\fR on the base image. +-If this is an option to the first image, and the \fI-onroot\fR option is ++If this is an option to the first image, and the \fI\-onroot\fR option is + specified, the image will be loaded at the given location on the + display background. + .TP +--background \fIcolor\fR ++\-background \fIcolor\fR + Use \fIcolor\fR as the background color instead of the default + (usually white but this depends on the image type) if you are + transferring a monochrome image to a color display. + .TP +--center ++\-center + Center the image on the base image loaded. If this is an option to +-the first image, and the \fI-onroot\fR option is specified, the image ++the first image, and the \fI\-onroot\fR option is specified, the image + will be centered on the display background. + .TP +--clip \fIX\fR,\fIY\fR,\fIW\fR,\fIH\fR ++\-clip \fIX\fR,\fIY\fR,\fIW\fR,\fIH\fR + Clip the image before loading it. \fIX\fR and \fIY\fR define the +-upper-left corner of the clip area, and \fIW\fR and \fIH\fR define the ++upper\-left corner of the clip area, and \fIW\fR and \fIH\fR define the + extents of the area. A zero value for \fIW\fR or \fIH\fR will be + interpreted as the remainder of the image. + Note that \fIX\fR and \fIY\fR may be negative, and that \fIW\fR and \fIH\fR + may be larger than the image. This causes a border to be placed around the +-image. The border color may be set with the \fI-border\fR option. ++image. The border color may be set with the \fI\-border\fR option. + .TP +--expand ++\-expand + Forces the image (after all other optional processing) to be expanded + into a True Color (24 bit) image. This is useful on systems which support + 24 bit color, but where xli might choose to load a bitmap or 8 bit image + into one of the other smaller depth visuals supported on your system. + .TP +--foreground \fIcolor\fR ++\-foreground \fIcolor\fR + Use \fIcolor\fR as the foreground color instead of black if you are + transferring a monochrome image to a color display. This can also be + used to invert the foreground and background colors of a monochrome + image. + .TP +--halftone ++\-halftone + Force halftone dithering of a color image when displaying on a + monochrome display. This option is ignored on monochrome images. + This dithering algorithm blows an image up by sixteen times; if you +-don't like this, the \fI-dither\fR option will not blow the image up ++don't like this, the \fI\-dither\fR option will not blow the image up + but will take longer to process and will be less accurate. + .TP +--invert +-Inverts a monochrome image. This is shorthand for \fI-foreground +-white -background black\fR. ++\-invert ++Inverts a monochrome image. This is shorthand for \fI\-foreground ++white \-background black\fR. + .TP +--merge ++\-merge + Merge this image onto the base image after local processing. The base + image is considered to be the first image specified or the last image +-that was not preceded by \fI-merge\fR. If used in conjunction with +-\fI-at\fR and \fI-clip\fR, very complex images can be built up. ++that was not preceded by \fI\-merge\fR. If used in conjunction with ++\fI\-at\fR and \fI\-clip\fR, very complex images can be built up. + Note that the final image will be the size of the first image, and that + subsequent merged images overlay previous images. The final image size +-can be altered by using the \fI-clip\fR option on the base image to ++can be altered by using the \fI\-clip\fR option on the base image to + make it bigger or smaller. +-This option is on by default for all images if the \fI-onroot\fR or +-\fI-windowid\fR options are specified. ++This option is on by default for all images if the \fI\-onroot\fR or ++\fI\-windowid\fR options are specified. + .TP +--name \fIimage_name\fR ++\-name \fIimage_name\fR + Force the next argument to be treated as an image name. This is +-useful if the name of the image is \fI-dither\fR, for instance. ++useful if the name of the image is \fI\-dither\fR, for instance. + .TP +--normalize ++\-normalize + Normalize a color image. + .TP +--rotate \fIdegrees\fR ++\-rotate \fIdegrees\fR + Rotate the image by \fIdegrees\fR clockwise. The number must be a + multiple of 90. + .SH EXAMPLES +@@ -397,69 +404,69 @@ + it to fill the entire background: + .sp + .ti +5 +-xli -onroot my.image ++xli \-onroot my.image + .PP + To load a monochrome image "my.image" onto the background, using red + as the foreground color, replicate the image, and overlay + "another.image" onto it at coordinate (10,10): + .sp + .ti +5 +-xli -foreground red my.image -at 10,10 another.image ++xli \-foreground red my.image \-at 10,10 another.image + .PP + To center the rectangular region from 10 to 110 along the X axis and + from 10 to the height of the image along the Y axis: + .sp + .ti +5 +-xli -center -clip 10,10,100,0 my.image ++xli \-center \-clip 10,10,100,0 my.image + .PP + To double the size of an image: + .sp + .ti +5 +-xli -zoom 200 my.image ++xli \-zoom 200 my.image + .PP + To halve the size of an image: + .sp + .ti +5 +-xli -zoom 50 my.image ++xli \-zoom 50 my.image + .PP + To brighten a dark image: + .sp + .ti +5 +-xli -brighten 150 my.image ++xli \-brighten 150 my.image + .PP + To darken a bright image: + .sp + .ti +5 +-xli -brighten 50 my.image ++xli \-brighten 50 my.image + .SH HINTS FOR GOOD IMAGE DISPLAYS + Since images are likely to come from a variety of sources, they may be + in a variety of aspect ratios which may not be supported by your +-display. The \fI-xzoom\fR and \fI-yzoom\fR options can be used to ++display. The \fI\-xzoom\fR and \fI\-yzoom\fR options can be used to + change the aspect ratio of an image before display. If you use these + options, it is recommended that you increase the size of one of the + dimensions instead of shrinking the other, since shrinking looses + detail. For instance, many GIF and G3 FAX images have an X:Y ratio of + about 2:1. You can correct this for viewing on a 1:1 display with +-either \fI-xzoom 50\fR or \fI-yzoom 200\fR (reduce X axis to 50% of ++either \fI\-xzoom 50\fR or \fI\-yzoom 200\fR (reduce X axis to 50% of + its size and expand Y axis to 200% of its size, respectively) but the + latter should be used so no detail is lost in the conversion. + .PP + When zooming color images up you can reduce blockiness with +-\fI-smooth\fR. For zooms of 300% or more, I recommend two smoothing ++\fI\-smooth\fR. For zooms of 300% or more, I recommend two smoothing + passes (although this can take awhile to do on slow machines). There + will be a noticeable improvement in the image. + .PP + You can perform image processing on a small portion of an image by +-loading the image more than once and using the \fI-merge\fR, \fI-at\fR +-and \fI-clip\fR options. Load the image, then merge it with a ++loading the image more than once and using the \fI\-merge\fR, \fI\-at\fR ++and \fI\-clip\fR options. Load the image, then merge it with a + clipped, processed version of itself. To brighten a 100x100 rectangular + portion of an image located at (50,50), for instance, you could type: + .sp + .ti +5 +-xli my.image -merge -at 50,50 -clip 50,50,100,100 -brighten 150 my.image ++xli my.image \-merge \-at 50,50 \-clip 50,50,100,100 \-brighten 150 my.image + .PP + If you're using a display with a small colormap to display colorful +-images, try using the \fI-gray\fR option to convert to grayscale. ++images, try using the \fI\-gray\fR option to convert to grayscale. + .SH XLITO + \fIxlito\fR (XLoadImageTrailingOptions) is a separate utility that provides + a file format independent way of marking image files with the appropriate +@@ -486,30 +493,30 @@ + Changed or added with: + .sp + .ti +5 +-xlito -c "string of options" image_file ++xlito \-c "string of options" image_file + .PP + And deleted with: + .sp + .ti +5 +-xlito -d image_file ... ++xlito \-d image_file ... + .PP + For example, if you have a gif file fred.gif which is too dark and is the + wrong aspect ratio, then it may need to be viewed with: + .sp + .ti +5 +-xli -yzoom 130 -gamma 1.0 fred.gif ++xli \-yzoom 130 \-gamma 1.0 fred.gif + .PP + to get it to look OK. These options can then be appended to the file by: + .sp + .ti +5 +-xlito -c "-yzoom 130 -gamma 1.0" fred.gif ++xlito \-c "\-yzoom 130 \-gamma 1.0" fred.gif + .PP + and from then on xli will get the appropriate options from the + image file itself. See the \fIxlito\fR manual entry for more details + about this utility. + + .SH PATHS AND EXTENSIONS +-The file ~/.xlirc (and optionally a system-wide file) defines ++The file ~/.xlirc (and optionally a system\-wide file) defines + the path and default extensions that \fIxli\fR will use when + looking for images. This file can have two statements: "path=" and + "extension=" (the equals signs must follow the word with no spaces +@@ -520,25 +527,25 @@ + appended to the supplied image name if the supplied name does not + specify an existing file. As with paths, these extensions will be + searched in the order they are given. Comments are any portion of a +-line following a hash-mark (#). ++line following a hash\-mark (\[sh]). + .PP + The following is a sample ~/.xlirc file: + .PP + .nf +- # paths to look for images in ++ \[sh] paths to look for images in + path= /usr/local/images + /home/usr1/guest/madd/images + /usr/include/X11/bitmaps + +- # default extensions for images; .Z is automatic; scanned in order ++ \[sh] default extensions for images; .Z is automatic; scanned in order + extension= .csun .msun .sun .face .xbm .bm + .fi + .PP + Versions of \fIxli\fR prior to version 01, patchlevel 03 would +-load the system-wide file (if any), followed by the user's file. This ++load the system\-wide file (if any), followed by the user's file. This + behavior made it difficult for the user to configure her environment + if she didn't want the default. Newer versions will ignore the +-system-wide file if a personal configuration file exists. ++system\-wide file if a personal configuration file exists. + .SH IMAGE TYPES + .PP + \fIxli\fR currently supports the following image types: +@@ -568,11 +575,11 @@ + .fi + .PP + Normal, compact, and raw PBM images are supported. Both standard and +-run-length encoded Sun rasterfiles are supported. Any image whose ++run\-length encoded Sun rasterfiles are supported. Any image whose + name ends in .Z is assumed to be a compressed image and will be + filtered through "uncompress". If HAVE_GUNZIP is defined in the + Makefile.std make file, then any image whose name ends in +-.gz or .Z will be filtered through gunzip. ++\&.gz or .Z will be filtered through gunzip. + .PP + Any file that looks like a uuencoded file will be decoded + automatically. +@@ -595,26 +602,26 @@ + smar@reptiles.org + .fi + .PP +-For a more-or-less complete list of other contributors (there are a ++For a more\-or\-less complete list of other contributors (there are a + \fIlot\fR of them), please see the README file enclosed with the + distribution. + .SH FILES + .nf + .in +5 +-xli - the image loader and viewer +-xsetbg - pseudonym which quietly sets the background +-xview - pseudonym which views in a window +-xlito - the trailing options utility +-/usr/lib/X11/Xli - default system-wide configuration file +-~/.xlirc - user's personal configuration file ++xli \- the image loader and viewer ++.\"xsetbg \- pseudonym which quietly sets the background ++.\"xview \- pseudonym which views in a window ++xlito \- the trailing options utility ++/usr/lib/X11/Xli \- default system\-wide configuration file ++~/.xlirc \- user's personal configuration file + .in -5 + .fi + .SH COPYRIGHT + Copyright (c) 1989, 1990, 1991, 1992, 1993 Jim Frost, Graeme Gill and others. + .PP +-\fIXli\fR is copywritten material with a very loose copyright ++\fIXli\fR is copyrighted material with a very loose license + allowing unlimited modification and distribution if the copyright +-notices are left intact. Various portions are copywritten by various ++notices are left intact. Various portions are copyrighted by various + people, but all use a modification of the MIT copyright notice. + Please check the source for complete copyright information. The + intent is to keep the source free, not to stifle its distribution, so +@@ -634,7 +641,7 @@ + file, but \fIxli\fR will only display the first. + .PP + One of the pseudonyms for \fIxli\fR, \fIxview\fR, is the same +-name as Sun uses for their SunView-under-X package. This will be ++name as Sun uses for their SunView\-under\-X package. This will be + confusing if you're one of those poor souls who has to use Sun's + XView. + .PP +@@ -646,9 +653,9 @@ + also ignore the MaxSize argument's real function, to limit the maximum + size of the window, and allow the window to be resized larger than the + image. If this happens, \fIxli\fR merely places the image in +-the upper-left corner of the window and uses the zero-value'ed pixel ++the upper\-left corner of the window and uses the zero\-value'ed pixel + for any space which is not covered by the image. This behavior is +-less-than-graceful but so are window managers which are cruel enough ++less\-than\-graceful but so are window managers which are cruel enough + to ignore such details. + .PP + The order in which operations are performed on an image is independent +@@ -659,5 +666,5 @@ + .PP + Display Gamma should setable in the ~/.xlirc file. + .PP +-Embedded trailing options overide the command line \fIImage Options.\fR Command +-line options should really overide trailing options. ++Embedded trailing options override the command line \fIImage Options.\fR Command ++line options should really override trailing options. +Index: xli-1.17.0+20061110/xlito.man +=================================================================== +--- xli-1.17.0+20061110.orig/xlito.man 2007-07-29 16:39:20.000000000 +0200 ++++ xli-1.17.0+20061110/xlito.man 2007-07-29 16:23:57.000000000 +0200 +@@ -26,7 +26,7 @@ + images. + .PP + Old versions of \fIxloadimage\fR (3.01 or less) can be made forward compatible +-by using the \fI-x\fR option to pull the trailing options out of the image files, ++by using the \fI\-x\fR option to pull the trailing options out of the image files, + and put them on the command line where \fIxloadimage\fR can see them. + .SH OPTIONS + The default behavior is to display the trailing option strings (if any) of +@@ -42,40 +42,40 @@ + .TP + -x \fIfile_name ...\fR + Process the files and create a command line string suitable for use by +-\fIxloadimage.\fR Arguments starting with \fI-\fR are echoed, arguments +-not starting with \fI-\fR are treated as files and any trailing options ++\fIxloadimage.\fR Arguments starting with \fI\-\fR are echoed, arguments ++not starting with \fI\-\fR are treated as files and any trailing options + strings are echoed followed by the file name. The \fIxloadimage\fR option +-\fI-name\fR is treated correctly. ++\fI\-name\fR is treated correctly. + .SH EXAMPLES + If fred.gif has the wrong aspect ratio, then it might need + viewing with the \fIxloadimage\fR options: + .sp + .ti +5 +-xloadimage -yzoom 130 fred.gif ++xloadimage \-yzoom 130 fred.gif + .PP + This option can then be appended to the file by: + .sp + .ti +5 +-xlito -c "-yzoom 130" fred.gif ++xlito \-c "\-yzoom 130" fred.gif + .PP + and from then on some new versions of xloadimage will get the appropriate options + from the image file itself. Old versions of \fIxloadimage\fR can be made to + work by using: + .sp + .ti +5 +-xloadimage \(gaxlito -x fred.gif\(ga ++xloadimage \(gaxlito \-x fred.gif\(ga + .PP + This can be made transparent by using a script containing something like: + .sp + .ti +5 +-xloadimage \(gaxlito -x $\(**\(ga ++xloadimage \(gaxlito \-x $\(**\(ga + .PP + The script could be called \fIxli\fR for instance. + .PP + The options can be deleted with: + .sp + .ti +5 +-xlito -d fred.gif ++xlito \-d fred.gif + .SH AUTHOR + .nf + Graeme Gill +@@ -89,7 +89,7 @@ + .SH COMPATIBILITY WITH IMAGE FILES + Some image files are actually ascii files that are used in other contexts. + X Bitmap files are an example. They are formatted as 'C' style +-#defines and an initialised array of characters, so that they can be included ++\[sh]defines and an initialised array of characters, so that they can be included + in 'C' source code. Adding trailing options would therefore render the file + unusable with a compiler, since it will get a syntax error on the railing option + string and the magic numbers. The solution to this is that xlito will ignore a +@@ -101,9 +101,9 @@ + .PP + eg: say the file starts as: + .br +-#define tt_width 4 ++\[sh]define tt_width 4 + .br +-#define tt_height 4 ++\[sh]define tt_height 4 + .br + static char tt_bits[] = { + .br +@@ -111,29 +111,29 @@ + .PP + and you add a trailing options: + .br +-#define tt_width 4 ++\[sh]define tt_width 4 + .br +-#define tt_height 4 ++\[sh]define tt_height 4 + .br + static char tt_bits[] = { + .br + 0x08, 0x02, 0x04, 0x01}; + .br +-01234567890123456789XXX xloadimage trailing options XXX0007"-smooth"0007XXX ++01234567890123456789XXX xloadimage trailing options XXX0007"\-smooth"0007XXX + .br + xloadimage trailing options XXX + .PP + Then the trailing options can be commented out: + .br +-#define tt_width 4 ++\[sh]define tt_width 4 + .br +-#define tt_height 4 ++\[sh]define tt_height 4 + .br + static char tt_bits[] = { + .br + 0x08, 0x02, 0x04, 0x01}; + .br +-/\(**234567890123456789XXX xloadimage trailing options XXX0007"-smooth"0007XXX ++/\(**234567890123456789XXX xloadimage trailing options XXX0007"\-smooth"0007XXX + .br + xloadimage trailing options XXX \(**/ + .SH BUGS --- xli-1.17.0+20061110.orig/debian/patches/Zandt_ChangeLog.diff +++ xli-1.17.0+20061110/debian/patches/Zandt_ChangeLog.diff @@ -0,0 +1,48 @@ +The ChangeLog as applied via the diff.gz, apparently dates back to James' time +--- xli-1.17.0.orig/ChangeLog ++++ xli-1.17.0/ChangeLog +@@ -0,0 +1,44 @@ ++1998-07-19 James R. Van Zandt ++ ++ * options.c: including for atof() and atoi(), no longer ++ declaring atof(). ++ ++1998-07-18 James R. Van Zandt ++ ++ * sunraster.c (sunRasterLoad): Using () around assignment ++ ++ * g3.c (g3_addtohash): ++ ++ * xlito.c (argv): main returns int ++ including for close(), fseek(), etc. ++ including for strncmp() ++ including for atoi() ++ ++ * bmp.c: using %ld for long int ++ ++ * zio.c: including for free() ++ ++ * xwd.c (xwdLoad): supplying visual class name for error message. ++ ++ * xli.c (main): main returns int ++ including for fork() ++ ++ * sunraster.c (babble): line 46: using %ld for long int ++ ++ * send.c (pixmapErrorTrap): line 32: using %ld for long int ++ ++ * jpeg.c (d_ui_method_selection): line 184: using %ld for long ints ++ ++ * path.c: including ++ ++ * mcidas.c (mcidasIdent): line 91: using %ld for long ints ++ (mcidasLoad): line 149: using %ld for long ints ++ ++ * mac.c (macLoad): line 187: eliminated second format in error ++ message (for which there was no variable). ++ ++ * g3.c (g3_ident): initialize col1, col2, and col3 ++ ++ * cmuwmrast.c (cmuwmLoad): using memToVal to extract header.depth ++ value, rather than depending on %d to fetch 16 bit value. ++ --- xli-1.17.0+20061110.orig/debian/patches/Debianify_Imakefile.diff +++ xli-1.17.0+20061110/debian/patches/Debianify_Imakefile.diff @@ -0,0 +1,34 @@ +Adjust the Imakefile for Debian needs: hppa fix, defines, install; #104720 +Index: xli-2006-11-10/Imakefile +=================================================================== +--- xli-2006-11-10.orig/Imakefile 2006-11-11 06:52:14.000000000 +0100 ++++ xli-2006-11-10/Imakefile 2007-07-28 12:14:23.000000000 +0200 +@@ -10,7 +10,7 @@ + # -DHAVE_BUNZIP2 if you have bzip2 and want to handle .bz2 files + + #ifdef HPArchitecture +- CCOPTIONS = -Aa -D_HPUX_SOURCE ++# CCOPTIONS = -Aa -D_HPUX_SOURCE + #endif + + JPEG_INCLUDES = +@@ -23,7 +23,7 @@ + DEPLIBS = $(DEPXLIB) + LOCAL_LIBRARIES = $(XLIB) $(JPEG_LDFLAGS) $(PNG_LDFLAGS) -ljpeg -lpng -lz + SYS_LIBRARIES = -lm +-DEFINES = -DHAS_MEMCPY ++DEFINES = -DHAS_MEMCPY -DHAVE_GUNZIP + EXTRA_INCLUDES = $(JPEG_INCLUDES) $(PNG_INCLUDES) + + SRCS1 = bright.c clip.c cmuwmrast.c compress.c dither.c faces.c fbm.c fill.c g3.c gif.c halftone.c imagetypes.c img.c mac.c mcidas.c mc_tables.c merge.c misc.c new.c options.c path.c pbm.c pcx.c reduce.c jpeg.c rle.c rlelib.c root.c rotate.c send.c smooth.c sunraster.c value.c window.c xbitmap.c xli.c xpixmap.c xwd.c zio.c zoom.c ddxli.c tga.c bmp.c pcd.c png.c +@@ -36,10 +36,6 @@ + ComplexProgramTarget_1(xli,$(DEFINES) $(LOCAL_LIBRARIES),) + ComplexProgramTarget_2(xlito,,) + +-install:: $(SYSPATHFILE) +- $(RM) $(BINDIR)/xview $(BINDIR)/xsetbg +- $(LN) $(BINDIR)/xli $(BINDIR)/xview +- $(LN) $(BINDIR)/xli $(BINDIR)/xsetbg + + $(SYSPATHFILE): + @echo "*** Creating default $(SYSPATHFILE) since you" --- xli-1.17.0+20061110.orig/debian/patches/documentzooming.diff +++ xli-1.17.0+20061110/debian/patches/documentzooming.diff @@ -0,0 +1,12 @@ +Index: xli-1.17.0+20061110/xli.man +=================================================================== +--- xli-1.17.0+20061110.orig/xli.man 2008-02-21 15:53:58.000000000 +0100 ++++ xli-1.17.0+20061110/xli.man 2008-02-21 15:55:12.000000000 +0100 +@@ -52,6 +52,7 @@ + (usually lightens images) + Type 5\-2 to lighten the image (5 in small steps, up to 2 in large steps) + Type 6\-9 to darken the image (6 in small steps, up to 9 in large steps) ++Type > resp. < to zoom in resp. out + .ad + .fi + .PP --- xli-1.17.0+20061110.orig/debian/patches/read_past_bufferend_343718.diff +++ xli-1.17.0+20061110/debian/patches/read_past_bufferend_343718.diff @@ -0,0 +1,21 @@ +#343718 ? +Index: xli-2006-11-10/zio.c +=================================================================== +--- xli-2006-11-10.orig/zio.c 2007-07-28 12:20:06.000000000 +0200 ++++ xli-2006-11-10/zio.c 2007-07-28 12:22:22.000000000 +0200 +@@ -436,13 +436,8 @@ + + /* File is now open, so see if it is a uuencoded file */ + while (uutry-- > 0) { +- if (fgets(uuibuf, UULEN, zf->stream) != NULL) { +- int blen; +- blen = buflen(uuibuf, UULEN); +- if (blen < 0) { /* doesn't look like reasonable junk */ +- _zaptocache(zf, uuibuf, -blen); +- break; +- } ++ int blen; ++ if ((blen = fread(uuibuf, 1, UULEN, zf->stream)) > 0) { + _zaptocache(zf, uuibuf, blen); /* keep zfile data cached */ + if (!strncmp(uuibuf, "begin ", 6) + && isdigit(uuibuf[6]) --- xli-1.17.0+20061110.orig/debian/patches/arrow_keys.diff +++ xli-1.17.0+20061110/debian/patches/arrow_keys.diff @@ -0,0 +1,42 @@ +Make xli handle the arrow keys to move the image +in the specified direction. by Bernhard R. Link in #179268 +Index: xli-2006-11-10/window.c +=================================================================== +--- xli-2006-11-10.orig/window.c 2006-11-11 06:52:14.000000000 +0100 ++++ xli-2006-11-10/window.c 2007-07-28 14:17:08.000000000 +0200 +@@ -800,8 +800,34 @@ + XComposeStatus status; + char ret; + Cursor cursor; ++ int num; + +- if (XLookupString(&event.key, buf, 128, &ks, &status) != 1) ++ num = XLookupString(&event.key, buf, 128, &ks, &status); ++ if( num != 1 && ((image->width > winwidth) || (image->height > winheight))) { ++ switch (ks) { ++ case XK_Left: ++ case XK_KP_Left: ++ pixx += winwidth/10+1; ++ placeImage(disp, image->width, image->height, winwidth, winheight, &pixx, &pixy); ++ break; ++ case XK_Right: ++ case XK_KP_Right: ++ pixx -= winwidth/10+1; ++ placeImage(disp, image->width, image->height, winwidth, winheight, &pixx, &pixy); ++ break; ++ case XK_Up: ++ case XK_KP_Up: ++ pixy += winheight/10+1; ++ placeImage(disp, image->width, image->height, winwidth, winheight, &pixx, &pixy); ++ break; ++ case XK_Down: ++ case XK_KP_Down: ++ pixy -= winheight/10+1; ++ placeImage(disp, image->width, image->height, winwidth, winheight, &pixx, &pixy); ++ break; ++ } ++ } ++ if (num != 1) + break; + ret = buf[0]; + if (isupper(ret)) --- xli-1.17.0+20061110.orig/debian/patches/xpm_background.patch +++ xli-1.17.0+20061110/debian/patches/xpm_background.patch @@ -0,0 +1,24 @@ +Adds support for the special "None" colour in XPMs by +replacing them with the -background color. by Bernhard R. Link in #220965 +Index: xli-2006-11-10/xpixmap.c +=================================================================== +--- xli-2006-11-10.orig/xpixmap.c 2006-11-11 06:52:14.000000000 +0100 ++++ xli-2006-11-10/xpixmap.c 2007-07-28 14:14:59.000000000 +0200 +@@ -463,7 +463,16 @@ + } else + p = buf; + +- if (!xliParseXColor(&globals.dinfo, p, &xcolor)) { ++ if( strcmp(p, "None") == 0 ) { ++ if( image_ops->bg ) { ++ if (!xliParseXColor(&globals.dinfo, image_ops->bg, &xcolor)) { ++ fprintf(stderr, "xpixmapLoad: Bad background color name '%s'\n", image_ops->bg); ++ xcolor.red = xcolor.green = xcolor.blue = 0; ++ } ++ } else { ++ xcolor.red = xcolor.green = xcolor.blue = 0; ++ } ++ } else if (!xliParseXColor(&globals.dinfo, p, &xcolor)) { + fprintf(stderr, "xpixmapLoad: %s - Bad color name '%s'\n", name, p); + xcolor.red = xcolor.green = xcolor.blue = 0; + } --- xli-1.17.0+20061110.orig/debian/patches/security_fixes.diff +++ xli-1.17.0+20061110/debian/patches/security_fixes.diff @@ -0,0 +1,142 @@ +CAN-2005-3178, CAN-2005-0639 ? +Index: xli-2006-11-10/zoom.c +=================================================================== +--- xli-2006-11-10.orig/zoom.c 2006-11-11 06:52:14.000000000 +0100 ++++ xli-2006-11-10/zoom.c 2007-07-28 12:22:57.000000000 +0200 +@@ -52,28 +52,29 @@ + if (verbose) + printf(" Zooming image Y axis by %d%%...", yzoom); + if (changetitle) +- sprintf(buf, "%s (Y zoom %d%%)", oimage->title, yzoom); ++ snprintf(buf, BUFSIZ, "%s (Y zoom %d%%)", oimage->title, yzoom); + } + else if (!yzoom) { + if (verbose) + printf(" Zooming image X axis by %d%%...", xzoom); + if (changetitle) +- sprintf(buf, "%s (X zoom %d%%)", oimage->title, xzoom); ++ snprintf(buf, BUFSIZ, "%s (X zoom %d%%)", oimage->title, xzoom); + } + else if (xzoom == yzoom) { + if (verbose) + printf(" Zooming image by %d%%...", xzoom); + if (changetitle) +- sprintf(buf, "%s (%d%% zoom)", oimage->title, xzoom); ++ snprintf(buf, BUFSIZ, "%s (%d%% zoom)", oimage->title, xzoom); + } + else { + if (verbose) + printf(" Zooming image X axis by %d%% and Y axis by %d%%...", + xzoom, yzoom); + if (changetitle) +- sprintf(buf, "%s (X zoom %d%% Y zoom %d%%)", oimage->title, ++ snprintf(buf, BUFSIZ, "%s (X zoom %d%% Y zoom %d%%)", oimage->title, + xzoom, yzoom); + } ++ buf[BUFSIZ-1] = '\0'; + if (!changetitle) + strcpy(buf,oimage->title); + +Index: xli-2006-11-10/reduce.c +=================================================================== +--- xli-2006-11-10.orig/reduce.c 1999-10-25 04:15:02.000000000 +0200 ++++ xli-2006-11-10/reduce.c 2007-07-28 12:22:57.000000000 +0200 +@@ -178,7 +178,8 @@ + /* get destination image */ + depth = colorsToDepth(OutColors); + new_image = newRGBImage(image->width, image->height, depth); +- sprintf(buf, "%s (%d colors)", image->title, OutColors); ++ snprintf(buf, BUFSIZ, "%s (%d colors)", image->title, OutColors); ++ buf[BUFSIZ-1] = '\0'; + new_image->title = dupString(buf); + new_image->gamma = image->gamma; + +Index: xli-2006-11-10/pbm.c +=================================================================== +--- xli-2006-11-10.orig/pbm.c 2006-11-11 06:52:14.000000000 +0100 ++++ xli-2006-11-10/pbm.c 2007-07-28 12:22:57.000000000 +0200 +@@ -108,8 +108,7 @@ + return src; + } + +-static int isPBM(ZFILE * zf, char *name, +- unsigned int *width, unsigned int *height, unsigned int *maxval, ++static int isPBM(ZFILE * zf, char *name, int *width, int *height, int *maxval, + unsigned int verbose) + { + byte buf[4]; +@@ -161,10 +160,10 @@ + + if (memToVal(buf, 2) == memToVal((byte *) "P2", 2)) { + if (((*width = pbmReadInt(zf)) < 0) +- || ((*height = pbmReadInt(zf)) < 0)) ++ || ((*height = pbmReadInt(zf)) < 0) ++ || ((*maxval = pbmReadInt(zf)) < 0)) + return (NOTPBM); + +- *maxval = pbmReadInt(zf); + if (verbose) { + printf("%s is a %dx%d PGM image with %d levels\n", + name, *width, *height, (*maxval + 1)); +@@ -174,10 +173,10 @@ + + if (memToVal(buf, 2) == memToVal((byte *) "P5", 2)) { + if (((*width = pbmReadInt(zf)) < 0) +- || ((*height = pbmReadInt(zf)) < 0)) ++ || ((*height = pbmReadInt(zf)) < 0) ++ || ((*maxval = pbmReadInt(zf)) < 0)) + return (NOTPBM); + +- *maxval = pbmReadInt(zf); + if (verbose) + printf("%s is a %dx%d Raw PGM image with %d levels\n", + name, *width, *height, (*maxval + 1)); +@@ -185,11 +184,11 @@ + } + + if (memToVal(buf, 2) == memToVal((byte *) "P3", 2)) { +- if (((*width = pbmReadInt(zf)) < 0) || +- ((*height = pbmReadInt(zf)) < 0)) ++ if (((*width = pbmReadInt(zf)) < 0) ++ || ((*height = pbmReadInt(zf)) < 0) ++ || ((*maxval = pbmReadInt(zf)) < 0)) + return (NOTPBM); + +- *maxval = pbmReadInt(zf); + if (verbose) { + printf("%s is a %dx%d PPM image with %d levels\n", + name, *width, *height, (*maxval + 1)); +@@ -198,11 +197,11 @@ + } + + if (memToVal(buf, 2) == memToVal((byte *) "P6", 2)) { +- if (((*width = pbmReadInt(zf)) < 0) || +- ((*height = pbmReadInt(zf)) < 0)) ++ if (((*width = pbmReadInt(zf)) < 0) ++ || ((*height = pbmReadInt(zf)) < 0) ++ || ((*maxval = pbmReadInt(zf)) < 0)) + return (NOTPBM); + +- *maxval = pbmReadInt(zf); + if (verbose) { + printf("%s is a %dx%d Raw PPM image with %d levels\n", + name, *width, *height, (*maxval + 1)); +@@ -215,7 +214,7 @@ + int pbmIdent(char *fullname, char *name) + { + ZFILE *zf; +- unsigned int width, height, maxval, ret; ++ int width, height, maxval, ret; + + if (!(zf = zopen(fullname))) + return (0); +@@ -234,7 +233,8 @@ + Image *image = 0; + int pbm_type; + unsigned int x, y; +- unsigned int width, height, maxval, fmaxval, depth, fdepth; ++ int width, height, maxval, fmaxval; ++ unsigned int depth, fdepth; + unsigned int linelen; + byte srcmask, destmask; + byte *destptr = 0, *destline; --- xli-1.17.0+20061110.orig/debian/patches/manpage_fixes.diff +++ xli-1.17.0+20061110/debian/patches/manpage_fixes.diff @@ -0,0 +1,33 @@ +Index: xli-1.17.0+20061110/xlito.man +=================================================================== +--- xli-1.17.0+20061110.orig/xlito.man 2008-02-21 16:11:09.000000000 +0100 ++++ xli-1.17.0+20061110/xlito.man 2008-02-21 16:16:34.000000000 +0100 +@@ -2,8 +2,8 @@ + .\" + .TH XLITO 1 "7 Jul 1993" + .SH NAME +-xlito (XLoadImageTrailingOptions) \- Append/Delete/Show a Trailing Option +-string in a file. ++xlito \- Append/Delete/Show a Trailing Option string in a file. ++(XLoadImageTrailingOptions) + .SH SYNOPSIS + \fIxlito\fR [option] [string] files ... + .SH DESCRIPTION +@@ -33,14 +33,14 @@ + the files on the argument line. The following options change the behavior of + \fIxlito:\fR + .TP 8 +--c \fIoption_string file_name ...\fR ++\-c \fIoption_string file_name ...\fR + This adds or changes the embedded string to \fIoption_string\fR. + The string will have to be quoted if it is composed of more than one word. + .TP +--d \fIfile_name ...\fR ++\-d \fIfile_name ...\fR + Delete any embedded trailing option strings in the given files. + .TP +--x \fIfile_name ...\fR ++\-x \fIfile_name ...\fR + Process the files and create a command line string suitable for use by + \fIxloadimage.\fR Arguments starting with \fI\-\fR are echoed, arguments + not starting with \fI\-\fR are treated as files and any trailing options --- xli-1.17.0+20061110.orig/debian/patches/8-bit_pallette_support.diff +++ xli-1.17.0+20061110/debian/patches/8-bit_pallette_support.diff @@ -0,0 +1,145 @@ +--- xli-1.17.0.orig/pcx.c ++++ xli-1.17.0/pcx.c +@@ -5,6 +5,8 @@ + ** Adapted from code by Jef Poskanzer (see Copyright below). + ** + ** Version 0.1 -- 4/25/91 -- Initial cut ++** Version 0.2 -- 2001-12-15 -- Support 8bit color images with palette. ++** (Alexandre Duret-Lutz ) + ** + ** Copyright (c) 1991 Tim Northrup + ** (see file "tgncpyrght.h" for complete copyright information) +@@ -33,7 +35,9 @@ + + #define PCX_MAGIC 0x0a /* first byte in a PCX image file */ + +-static boolean PCX_LoadImage(ZFILE *zf, int in_bpr, int img_bpr, Image *image, int rows); /* Routine to load a PCX file */ ++/* Routine to load a PCX file */ ++static boolean PCX_LoadImage(ZFILE *zf, int in_bpr, int img_bpr, ++ Image *image, int rows, boolean readpal); + + + /* +@@ -129,35 +133,42 @@ + xmax = xmax - xmin + 1; + ymax = ymax - ymin + 1; + in_bpr = pcxhd[66] + ( 256 * pcxhd[67] ); +- img_bpr = (xmax + 7)/8; /* assumes monochrome image */ ++ img_bpr = (xmax * pcxhd[3] + 7)/8; /* Recompute the number of bytes ++ per lines. */ + + /* double check image */ + if (xmax < 0 || ymax < 0 || in_bpr < img_bpr) { + zclose(zf); + return((Image *)NULL); +- } ++ } + + if (verbose) + printf("%s is a %dx%d PC Paintbrush image\n",name,xmax,ymax); + +- if (pcxhd[65] > 1) { +- fprintf(stderr,"pcxLoad: %s - Unable to handle Color PCX image\n",name); +- zclose(zf); +- return((Image *)NULL); +- } ++ /* Only monochorme or 8bits paletized images are supported. */ ++ if (pcxhd[65] > 1 || !(pcxhd[3] == 1 || pcxhd[3] == 8)) { ++ fprintf(stderr, ++ "pcxLoad: %s - Unsuported PCX type\n", ++ name); ++ zclose(zf); ++ return((Image *)NULL); ++ } + + znocache(zf); + +- /* Allocate pbm array. */ +- image = newBitImage(xmax,ymax); ++ /* Allocate image. */ ++ if (pcxhd[3] == 1) ++ image = newBitImage(xmax, ymax); ++ else ++ image = newRGBImage(xmax, ymax, pcxhd[3]); + image->title = dupString(name); + + /* Read compressed bitmap. */ +- if (!PCX_LoadImage( zf, in_bpr, img_bpr, image, ymax )) { ++ if (!PCX_LoadImage(zf, in_bpr, img_bpr, image, ymax, pcxhd[3] == 8)) { + fprintf(stderr,"pcxLoad: %s - Short read of PCX file\n",name); + zclose(zf); + return(image); +- } ++ } + + read_trail_opt(image_ops,zf,image,verbose); + zclose(zf); +@@ -173,7 +184,8 @@ + ** Returns FALSE if there was a short read. + */ + +-static boolean PCX_LoadImage (ZFILE *zf, int in_bpr, int img_bpr, Image *image, int rows) ++static boolean PCX_LoadImage (ZFILE *zf, int in_bpr, int img_bpr, ++ Image *image, int rows, boolean readpal) + { + /* Goes like this: Read a byte. If the two high bits are set, + ** then the low 6 bits contain a repeat count, and the byte to +@@ -185,10 +197,12 @@ + int row = 0; + int bytes_this_row = 0; + int b, i, cnt; ++ /* For binary image we need to reverse all bits. */ ++ int xor_mask = (image->type == IBITMAP) ? 0xff : 0; + + ptr = &(image->data[0]); + +- while ((b = zgetc(zf)) != EOF) { ++ while (row < rows && (b = zgetc(zf)) != EOF) { + + if ((b & 0xC0) == 0xC0) { + /* have a repetition count -- mask flag bits */ +@@ -201,12 +215,13 @@ + cnt = 1; /* no repeating this one */ + } + ++ b ^= xor_mask; ++ + for ( i = 0; i < cnt; i++ ) { +- if ( row >= rows ) { +- return TRUE; +- } ++ if ( row >= rows ) ++ break; + if (bytes_this_row < img_bpr) +- *ptr++ = (unsigned char) (255 - b); ++ *ptr++ = (unsigned char) b; + if (++bytes_this_row == in_bpr) { + /* start of a new line */ + row++; +@@ -214,6 +229,26 @@ + } + } + } ++ /* Read a palette if needed. */ ++ if (readpal) { ++ /* The palette is separated from the pixels data by dummy ++ byte equal to 12. */ ++ if ((b = zgetc(zf)) == EOF || b != 12) ++ return FALSE; ++ ++ for (cnt = 0; cnt < 256; ++cnt) { ++ int r, g, b; ++ if ((r = zgetc(zf)) == EOF ++ || (g = zgetc(zf)) == EOF ++ || (b = zgetc(zf)) == EOF) ++ return FALSE; ++ image->rgb.red[cnt] = r << 8; ++ image->rgb.green[cnt] = g << 8; ++ image->rgb.blue[cnt] = b << 8; ++ } ++ image->rgb.used = 256; ++ } ++ + + return TRUE; + } --- xli-1.17.0+20061110.orig/debian/patches/series +++ xli-1.17.0+20061110/debian/patches/series @@ -0,0 +1,15 @@ +Zandt_ChangeLog.diff +Debianify_Imakefile.diff +manpage.diff +8-bit_pallette_support.diff +read_past_bufferend_343718.diff +security_fixes.diff +support_kfreebsd.diff +fillscreen_forall.diff +multiple_images_merge.diff +xpm_background.patch +arrow_keys.diff +documentzooming.diff +zoom_auto_440768.diff +manpage_fixes.diff +fix-x-resource-leak --- xli-1.17.0+20061110.orig/debian/patches/fix-x-resource-leak +++ xli-1.17.0+20061110/debian/patches/fix-x-resource-leak @@ -0,0 +1,152 @@ +--- a/root.c ++++ b/root.c +@@ -16,17 +16,6 @@ + + #define RETAIN_PROP_NAME "_XSETROOT_ID" + +-static void updateProperty(Display * dpy, Window w, char *name, Atom type, int format, int data, int nelem) +-{ +- /* intern the property name */ +- Atom atom = XInternAtom(dpy, name, 0); +- +- /* create or replace the property */ +- XChangeProperty(dpy, w, atom, type, format, PropModeReplace, +- (unsigned char *) &data, nelem); +-} +- +- + /* Sets the close-down mode of the client to 'RetainPermanent' + * so all client resources will be preserved after the client + * exits. Puts a property on the default root window containing +@@ -37,9 +26,15 @@ + { + /* create dummy resource */ + Pixmap pm = XCreatePixmap(dpy, w, 1, 1, 1); ++ unsigned char *data = (unsigned char *) ± + +- /* create/replace the property */ +- updateProperty(dpy, w, RETAIN_PROP_NAME, XA_PIXMAP, 32, (int) pm, 1); ++ /* intern the property name */ ++ char *name = RETAIN_PROP_NAME; ++ Atom atom = XInternAtom(dpy, name, 0); ++ ++ /* create or replace the property */ ++ XChangeProperty(dpy, w, atom, XA_PIXMAP, 32, PropModeReplace, ++ data, sizeof(Pixmap)/4); + + /* retain all client resources until explicitly killed */ + XSetCloseDownMode(dpy, RetainPermanent); +@@ -53,31 +48,58 @@ + static void freePrevious(Display * dpy, Window w) + { + Pixmap *pm; +- Atom actual_type; /* NOTUSED */ ++ unsigned char *charpm; ++ Atom actual_type; + int format; +- int nitems; +- int bytes_after; ++ unsigned long nitems; ++ unsigned long bytes_after; ++ int returncode; + +- /* intern the property name */ ++ /* intern the property name */ + Atom atom = XInternAtom(dpy, RETAIN_PROP_NAME, 0); + + /* look for existing resource allocation */ +- if ((XGetWindowProperty(dpy, w, atom, 0, 1, 1 /*delete */ , +- AnyPropertyType, &actual_type, &format, +- (unsigned long *) &nitems, +- (unsigned long *) &bytes_after, +- (unsigned char **) &pm) == Success) && +- nitems == 1) { +- if ((actual_type == XA_PIXMAP) && (format == 32) && +- (nitems == 1) && (bytes_after == 0)) { +- /* blast it away */ +- XKillClient(dpy, (XID) * pm); +- XFree((caddr_t) pm); +- } else if (actual_type != None) { +- fprintf(stderr, "%s: warning: invalid format encountered for property %s\n", +- "xli", RETAIN_PROP_NAME); +- } +- } ++ nitems = sizeof(Pixmap)/4; ++ returncode = XGetWindowProperty(dpy, w, atom, ++ 0, nitems, 1/*delete*/, ++ XA_PIXMAP, &actual_type, ++ &format, &nitems, ++ &bytes_after, &charpm); ++ if (returncode != Success) { ++ if (globals.verbose) ++ fprintf(stderr, "failed to look for %s with return code %i.\n", ++ RETAIN_PROP_NAME, returncode); ++ return; ++ } ++ ++ /* Check if the property was found */ ++ if (actual_type == None) { ++ if (globals.verbose) ++ fprintf(stderr, "didn't find evidence of prior run.\n"); ++ return; ++ } ++ ++ /* Make sure the dummy value is still present */ ++ if (actual_type != XA_PIXMAP) { ++ if (globals.verbose) ++ fprintf(stderr, "found wrong data type - skipped.\n"); ++ return; ++ } ++ ++ /* Check size, in case we're a different architecture */ ++ if ((nitems != sizeof(Pixmap)/4) || ++ (format != 32) || ++ (bytes_after != 0)) { ++ if (globals.verbose) ++ fprintf(stderr, "saw wrong %li / word size %i / architecture %li.\n", ++ bytes_after, format, nitems); ++ return; ++ } ++ ++ /* blast it away */ ++ pm = (Pixmap*) charpm; ++ XKillClient(dpy, (XID) *pm); ++ XFree(charpm); + } + + /* this returns the root window for DECWindows servers. this is right +@@ -162,23 +184,22 @@ + for (i = 0; i < numChildren; i++) { + Atom actual_type; + int actual_format; +- long nitems, bytesafter; +- Window *newRoot = NULL; ++ unsigned long nitems, bytesafter; ++ unsigned char *newRoot = 0; + +- if (XGetWindowProperty(disp, children[i], __SWM_VROOT, +- 0, 1, FALSE, XA_WINDOW, &actual_type, +- &actual_format, +- (unsigned long *) &nitems, +- (unsigned long *) &bytesafter, +- (unsigned char **) &newRoot) +- == Success && newRoot) { +- root = *newRoot; +- break; ++ if ((XGetWindowProperty (disp, children[i], __SWM_VROOT,0,1, ++ False, XA_WINDOW, ++ &actual_type, &actual_format, ++ &nitems, &bytesafter, &newRoot) ++ == Success) && ++ newRoot) { ++ root = *((Window*) newRoot); ++ break; + } + } + XFree((caddr_t) children); + } +- freePrevious(disp, root); ++ freePrevious(disp, root); + + if (!(ximageinfo = imageToXImage(disp, scrn, + DefaultVisual(disp, scrn),