--- tmview-01.03.orig/.pc/.version +++ tmview-01.03/.pc/.version @@ -0,0 +1 @@ +2 --- tmview-01.03.orig/.pc/.quilt_series +++ tmview-01.03/.pc/.quilt_series @@ -0,0 +1 @@ +series --- tmview-01.03.orig/.pc/.quilt_patches +++ tmview-01.03/.pc/.quilt_patches @@ -0,0 +1 @@ +debian/patches --- tmview-01.03.orig/debian/dvifb.menu +++ tmview-01.03/debian/dvifb.menu @@ -0,0 +1,2 @@ +?package(dvifb):command="/usr/bin/dvifb" needs="vc" \ + section="Applications/Viewers" title="dvifb" --- tmview-01.03.orig/debian/copyright +++ tmview-01.03/debian/copyright @@ -0,0 +1,24 @@ +This package was originally debianized by Gergely Madarasz +. Current maintainer is Adrian Bunk . + +It was downloaded from ftp://ftp.dante.de/tex-archive/dviware/tmview/ + +Upstream Author: Thomas Moor + +Copyright as stated by the author: + +---------------------------------------------------------------------------- +The code of tmview uses some rather basic ideas stolen from xdvi. This +includes some few lines of code just copied. The author of xdvi is Eric +Cooper. In a similar kind, tmview's code depends on some lines of dvidjc, +written by Wolfgang R. Müller. The hyper-TeX related parts are taken from +xhdvi, written by Arthur Smith. The sources of the above can be found on the +CTAN. So by having mentioned the authors here, and giving a reference how to +get the original sources, this should not be a violation of their +copyrights. + +As far as I am concerned, tmview may be modified or distributed without any +restrictions. tmview is distributed in the hope that it will be useful, but +without any warranty. +---------------------------------------------------------------------------- + --- tmview-01.03.orig/debian/dvifb.postrm +++ tmview-01.03/debian/dvifb.postrm @@ -0,0 +1,18 @@ +#! /bin/sh + +case "$1" in + purge|remove) + if dpkg-statoverride --list /usr/bin/dvifb >/dev/null; then + dpkg-statoverride --remove /usr/bin/dvifb + fi + ;; + upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + --- tmview-01.03.orig/debian/changelog +++ tmview-01.03/debian/changelog @@ -0,0 +1,249 @@ +tmview (1:01.03-14.2) unstable; urgency=low + + * Non-maintainer upload. + * Drop the dvisvga package, svgalib is scheduled for removal from + the archive + + -- Moritz Muehlenhoff Sat, 08 Jun 2013 18:49:12 +0200 + +tmview (1:01.03-14.1) unstable; urgency=low + + [Jari Aalto] + * Non-maintainer upload. + * debian/control + - (dvisvga::Build-Depends): update obsolete tetex-bin to texlive + - (dvilx::Build-Depends): update obsolete tetex-bin to texlive + - (dvifb::Build-Depends): update obsolete tetex-bin to texlive + * debian/patches + - (Number 400): Add patch to fix Gcc 4.4 error: error: expected '=', + ',', ';', 'asm' or '__attribute__' before '.' token (RC bug FTBFS + serious; Closes: #562343). Patcha thanks to Ubuntu Ilya Barygin + . + + -- Jari Aalto Sun, 14 Feb 2010 18:28:59 +0200 + +tmview (1:01.03-14) unstable; urgency=low + + * Use quilt for patch management. + + * debian/control: + + Set standards version to 3.7.2. + + Set dvifb’s architecture to linux-any. + * debian/compat: + + Set debhelper level to 5. + * debian/rules: + + Only build dvifb on the Linux platform so that it doesn’t FTBFS on + kFreeBSD (Closes: #414197). Thanks to Cyril Brulebois. + + -- Sam Hocevar (Debian packages) Sat, 13 Oct 2007 20:43:55 -0400 + +tmview (1:01.03-13) unstable; urgency=high + + * fb/writefb.c: + + Fix character reading on big-endian machines that made dvifb unusable + on PowerPC (Closes: #362588). + * doc/tmview.1: + + Fix formatting errors in the manpage, thanks to Nicolas François + (Closes: #349889). + + -- Sam Hocevar (Debian packages) Thu, 22 Feb 2007 20:09:00 +0100 + +tmview (1:01.03-12) unstable; urgency=low + + * debian/control: + + Set policy to 3.6.2.1. + + Build-depend on libsvga1-dev instead of svgalibg1-dev. + * src/readdvi.c lX/writelx.c svga/writevga.c: + + Fixed gcc-4.0 FTBFS (Closes: #294375). + * debian/dvifb.menu debian/dvilx.menu debian/dvisvga.menu: + + Put full path to the executable in menu entry. + + -- Sam Hocevar (Debian packages) Wed, 24 Aug 2005 14:30:53 +0200 + +tmview (1:01.03-11) unstable; urgency=low + + * debian/rules: + + Use debian/compat instead of DH_COMPAT. + * debian/control: + + Removed leading "a"s from short descriptions. + + Set policy to 3.6.1.1. + + Build-depend on libx11-dev instead of xlibs-dev. + * fb/writefb.c: + + Applied devfs patch from Martin Pitt (Closes: #245987). + + -- Sam Hocevar (Debian packages) Fri, 30 Apr 2004 11:42:19 +0200 + +tmview (1:01.03-10) unstable; urgency=low + + * Fixed numerous multi-line strings that caused FTBFS errors. + * Set policy to 3.5.10. + + -- Sam Hocevar (Debian packages) Fri, 30 May 2003 18:07:00 +0200 + +tmview (1:01.03-9) unstable; urgency=low + + * Forced statoverride updates to remove the setuid bit on dvifb when + upgrading from an old version. + + -- Samuel Hocevar Thu, 1 May 2003 01:42:11 +0200 + +tmview (1:01.03-8) unstable; urgency=low + + * Fixed a broken loop in bookmks.c:rolldownfilemk() that caused tmview to + open a bookmarked file instead of the requested one (Closes: #168480). + + -- Samuel Hocevar Thu, 24 Apr 2003 18:42:11 +0200 + +tmview (1:01.03-7) unstable; urgency=low + + * Activated kpathsea running in dvisvga (Closes: #147689, #150367, #150370). + * Removed debug files from the diff.gz. + + -- Samuel Hocevar Sun, 20 Apr 2003 22:50:51 +0200 + +tmview (1:01.03-6) unstable; urgency=low + + * New maintainer (Closes: #130841). + * Updated standards-version to 3.5.9.0. + * Fixed spelling in debian/control (Closes: #139481). + * Installed dvilx in /usr/bin rather than /usr/X11R6/bin. + * The dpkg-statoverride calls had mysteriously disappeared, they're + back and the lintian overrides were busted. + * dvifb is no longer setuid root but merely setgid video. + * Added devfs support to dvifb. + * Added 15/16/24/32bpp support to dvifb. + + -- Samuel Hocevar Fri, 18 Apr 2003 13:49:59 +0200 + +tmview (1:01.03-5.1) unstable; urgency=low + + * Problem in including both and . + Patched as suggested. + (closes: #130155) + * Emacs items cut in this changelog to avoid lintian complaining. + + -- Debian QA Group Tue, 29 Jan 2002 17:30:32 +0100 + +tmview (1:01.03-5) unstable; urgency=low + + * Orphaned this package. + + -- Adrian Bunk Fri, 25 Jan 2002 13:50:35 +0100 + +tmview (1:01.03-4) unstable; urgency=high + + * Fixed some typos in the package descriptions of dvilx and + dvisvga. (closes: #124585, #124586) + + -- Adrian Bunk Sat, 12 Jan 2002 16:38:57 +0100 + +tmview (1:01.03-3) unstable; urgency=low + + * Added a README.Debian to dvifb to explain why it doesn't work + on the Amiga AGA framebuffer. (closes: #96511) + + -- Adrian Bunk Sun, 15 Jul 2001 15:29:41 +0200 + +tmview (1:01.03-2) unstable; urgency=low + + * Stop building dvisvga on alpha since there's no longer a + svgalib on alpha. + * Got the programs running on 64 bit architectures. + (closes: #48321) + + -- Adrian Bunk Sun, 25 Mar 2001 21:31:57 +0200 + +tmview (1:01.03-1) unstable; urgency=low + + * New upstream release. + * A bug in the command line parsing is fixed in this release. + (closes: #65233) + * Install tm.ps in the binary packages. (closes: #88992) + * Set "GSGREY" to 2 instead of 4 in dvisvga and dvifb. + + -- Adrian Bunk Sun, 11 Mar 2001 13:14:17 +0100 + +tmview (1:00.05-3) unstable; urgency=low + + * Ups... I do now understand how dpkg-statoverride works... + (closes: #84824) + * Added a lintian override for the setuid binaries. + + -- Adrian Bunk Sat, 17 Feb 2001 01:56:21 +0100 + +tmview (1:00.05-2) unstable; urgency=low + + * Corrected an error in the build dependencies. (closes: #83854) + * Added a dvifb package. + + -- Adrian Bunk Tue, 30 Jan 2001 19:09:48 +0100 + +tmview (1:00.05-1) unstable; urgency=medium + + * New maintainer. + * New upstream release. + * Recompiled on a recent woody. (closes: #79537, #80540) + * Let dvisvga provide tmview. (closes: #33189) + * Use dpkg-statoverride instead of dh_suidregister. + * Added Build-Depends. + * Standards-Version: 3.1.1 + * Don't install tmview.tex since the .dvi is also installed. + + -- Adrian Bunk Wed, 24 Jan 2001 09:31:26 +0100 + +tmview (99.06-4) unstable; urgency=low + + * Put dh_suidregister in front of dh_fixperms (Closes: #48026) + + -- Gergely Madarasz Thu, 13 Jan 2000 14:32:41 +0100 + +tmview (99.06-3) unstable; urgency=low + + * Change maintainer address + * FHS compliance + * Standards: 3.0.1 + * Can't run in the background, our svgalib does not support it :/ + + -- Gergely Madarasz Mon, 18 Oct 1999 20:47:44 +0200 + +tmview (99.06-2) unstable; urgency=low + + * Fix for ports with no svgalib, patch from Roman Hodek (#40508) + + -- Gergely Madarasz Thu, 1 Jul 1999 21:31:29 +0200 + +tmview (99.06-1) unstable; urgency=low + + * New upstream version + + -- Gergely Madarasz Mon, 28 Jun 1999 19:02:59 +0200 + +tmview (98.06-1) unstable; urgency=low + + * Add menu files + * Split binary packages: dvisvga and dvilx + * New upstream version + + -- Gergely Madarasz Wed, 7 Oct 1998 14:06:49 +0200 + +tmview (96.05-3) unstable; urgency=low + + * added symlinks /usr/bin/tmview and /usr/man/man1/tmview.1.gz + * Switched to debhelper + * Updated Standards to make lintian happy + + -- Gergely Madarasz Tue, 10 Mar 1998 19:57:23 +0100 + +tmview (96.05-2) unstable; urgency=low + + * Compiled with libc6 + + -- Gergely Madarasz Fri, 26 Sep 1997 22:40:20 +0200 + +tmview (96.05-1) unstable; urgency=low + + * Initial Release. + * Defined kpathsea support + + -- Gergely Madarasz Sat, 15 Mar 1997 12:25:38 +0100 + --- tmview-01.03.orig/debian/compat +++ tmview-01.03/debian/compat @@ -0,0 +1 @@ +5 --- tmview-01.03.orig/debian/dvilx.dirs +++ tmview-01.03/debian/dvilx.dirs @@ -0,0 +1,2 @@ +usr/bin +usr/share/man/man1 --- tmview-01.03.orig/debian/dvilx.menu +++ tmview-01.03/debian/dvilx.menu @@ -0,0 +1,2 @@ +?package(dvilx):command="/usr/bin/dvilx" needs="X11" \ + section="Applications/Viewers" title="dvilx" --- tmview-01.03.orig/debian/dvifb.README.Debian +++ tmview-01.03/debian/dvifb.README.Debian @@ -0,0 +1,7 @@ +tmview for Debian +----------------- + +dvifb does not work on the Amiga AGA framebuffer (which is planar, +while dvifb expects chunky or "packed pixels"). + + -- Adrian Bunk , Sun, 15 Jul 2001 15:27:55 +0200 --- tmview-01.03.orig/debian/dvifb.postinst +++ tmview-01.03/debian/dvifb.postinst @@ -0,0 +1,19 @@ +#! /bin/sh + +case "$1" in + configure) + if dpkg-statoverride --list /usr/bin/dvifb >/dev/null; then + dpkg-statoverride --remove /usr/bin/dvifb + fi + dpkg-statoverride --update --add root video 2755 /usr/bin/dvifb + ;; + abort-upgrade|abort-remove|abort-deconfigure) + ;; + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + --- tmview-01.03.orig/debian/rules +++ tmview-01.03/debian/rules @@ -0,0 +1,79 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +ARCH_OS=$(shell dpkg-architecture -qDEB_HOST_ARCH_OS) +ifeq ($(ARCH_OS),linux) +DO_FB = 1 +endif + +build: build-stamp +build-stamp: + dh_testdir + QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2 + make -f MakeLX +ifdef DO_FB + make -f MakeFb +endif + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + make -f MakeLX clean + make -f MakeFb clean + QUILT_PATCHES=debian/patches quilt pop -a -R || test $$? = 2 + rm -f dvilx.linux dvifb.linux + dh_clean + +# Build architecture-independent files here. +binary-indep: build +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + dh_installdocs -pdvilx README doc/tmview.dvi doc/tm.ps + dh_installdocs -pdvifb README doc/tmview.dvi doc/tm.ps + install doc/tmview.1 debian/dvilx/usr/share/man/man1/dvilx.1 +ifdef DO_FB + install doc/tmview.1 debian/dvifb/usr/share/man/man1/dvifb.1 +endif + ln -s dvilx.1.gz debian/dvilx/usr/share/man/man1/tmview.1.gz + + dh_installchangelogs CHANGES + dh_installmenu + dh_strip + dh_compress + dh_fixperms + install -s -m 0755 dvilx.linux debian/dvilx/usr/bin/dvilx +ifdef DO_FB + install -s -m 0755 dvifb.linux debian/dvifb/usr/bin/dvifb +endif + ln -s dvilx debian/dvilx/usr/bin/tmview + dh_installdeb + dh_shlibdeps + dh_gencontrol -pdvilx +ifdef DO_FB + dh_gencontrol -pdvifb +endif + dh_md5sums + dh_builddeb -pdvilx +ifdef DO_FB + dh_builddeb -pdvifb +endif + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary + + --- tmview-01.03.orig/debian/control +++ tmview-01.03/debian/control @@ -0,0 +1,26 @@ +Source: tmview +Section: tex +Priority: optional +Maintainer: Sam Hocevar (Debian packages) +Build-Depends: debhelper (>= 5.0), quilt, libkpathsea-dev, libx11-dev +Standards-Version: 3.7.2 + +Package: dvilx +Architecture: any +Depends: ${shlibs:Depends}, texlive +Description: dvi viewer for X + dvilx is a screen-previewer for .dvi-files compiled by TeX. It lets you + see what your printed output will look like. You can choose between a + black-and-white representation and greyscaling. You can choose an arbitrary + zoom factor (at some cost of performance). You can set marks to measure + distances. You can search for text strings. You may visit lots of DVI files, + set bookmarks and get them saved to a startup-file. dvilx does not + support pxl-files. dvilx ignores all 'special'-commands and has no + font-replacing mechanism. + +Package: dvifb +Architecture: linux-any +Depends: ${shlibs:Depends}, gpm, texlive +Description: dvi viewer for framebuffer devices + dvifb is a previewer for .dvi-files compiled by TeX. It lets you see what + your printed output will look like. --- tmview-01.03.orig/debian/dvifb.dirs +++ tmview-01.03/debian/dvifb.dirs @@ -0,0 +1,2 @@ +usr/bin +usr/share/man/man1 --- tmview-01.03.orig/debian/patches/series +++ tmview-01.03/debian/patches/series @@ -0,0 +1,9 @@ +100_use_kpathsea.diff +200_backslashes.diff +201_missing_breaks.diff +202_invalid_casts.diff +203_64bit_support.diff +204_framebuffer_updates.diff +205_misc_bugs.diff +300_documentation.diff +400_reorder_headers.diff --- tmview-01.03.orig/debian/patches/202_invalid_casts.diff +++ tmview-01.03/debian/patches/202_invalid_casts.diff @@ -0,0 +1,47 @@ +--- tmview-01.03.orig/lX/writelx.c ++++ tmview-01.03/lX/writelx.c +@@ -908,7 +908,7 @@ + } + srow+=sbmu_wide; + sbmu=srow; +- ((char*)ydest)+=ibytes_per_line; ++ ydest=((char*)ydest)+ibytes_per_line; + } + if(directscreen) { + XPutImage(dpy,dviwin,imagecopygc,offimage,tx,ty,tx,ty,w,h); +@@ -996,7 +996,7 @@ + } + srow+=sbmu_wide; + sbmu=srow; +- ((char*)ydest)+=ibytes_per_line; ++ ydest=((char*)ydest)+ibytes_per_line; + } + if(directscreen) { + XPutImage(dpy,dviwin,imagecopygc,offimage,tx,ty,tx,ty,w,h); +@@ -1034,7 +1034,7 @@ + ISET_PIXEL(xdest,cpix); + xdest++; + } +- ((char*)ydest)+=ibytes_per_line; ++ ydest=((char*)ydest)+ibytes_per_line; + } + if(directscreen) { + XSetForeground(dpy,winfillgc,cpix); +@@ -1084,7 +1084,7 @@ + #endif + xdest++; + } +- ((char*)ydest)+=ibytes_per_line; ++ ydest=((char*)ydest)+ibytes_per_line; + } + if(directscreen) { + XPutImage(dpy,dviwin,imagecopygc,offimage,tx,ty,tx,ty,w,h); +@@ -1126,7 +1126,7 @@ + } + xdest++; + } +- ((char*)ydest)+=ibytes_per_line; ++ ydest=((char*)ydest)+ibytes_per_line; + } + if(directscreen) { + XPutImage(dpy,dviwin,imagecopygc,offimage,tx,ty,tx,ty,w,h); --- tmview-01.03.orig/debian/patches/201_missing_breaks.diff +++ tmview-01.03/debian/patches/201_missing_breaks.diff @@ -0,0 +1,267 @@ +--- tmview-01.03.orig/svga/writevga.c ++++ tmview-01.03/svga/writevga.c +@@ -447,7 +447,7 @@ + } + break; + case 0: case 27: com= KEYESC; break; /* allow wild escape abuse */ +- default: ++ default: break; + } + break; + } +--- tmview-01.03.orig/src/tmview.c ++++ tmview-01.03/src/tmview.c +@@ -115,6 +115,7 @@ + } + return(1); + default: ++ break; + } + pfprot("(numberargadd: parsing error)"); + return(1); +@@ -194,6 +195,7 @@ + numberargread(); + return(0); + default: ++ break; + } + } while(1); + } +@@ -613,6 +615,7 @@ + break; + default: + o=KEYNOP; ++ break; + } + } while(o==KEYNOP); + } while(o!=KEYESC && o!=KEYRET); +@@ -955,6 +958,7 @@ + comfile(COMDO); + break; + default: ++ break; + } + } + +@@ -1114,6 +1118,7 @@ + else drawstatusline(); + break; + default: ++ break; + } + } + +@@ -1187,6 +1192,7 @@ + else drawstatusline(); + break; + default: ++ break; + } + } + +@@ -1245,6 +1251,7 @@ + break; + default: + o=KEYNOP; ++ break; + } + } while(o==KEYNOP); + if(newunit < 0) newunit=NUMBEROFUNITS-1; +@@ -1308,6 +1315,7 @@ + drawstatusline(); + break; + default: ++ break; + } + } + +@@ -1331,6 +1339,7 @@ + drawstatusline(); + break; + default: ++ break; + } + } + +@@ -1532,6 +1541,7 @@ + drawstatusline(); + break; + default: ++ break; + } + } + +@@ -1555,6 +1565,7 @@ + drawstatusline(); + break; + default: ++ break; + } + } + +@@ -1588,6 +1599,7 @@ + drawstatusline(); + break; + default: ++ break; + } + } + +@@ -1621,6 +1633,7 @@ + drawstatusline(); + break; + default: ++ break; + } + } + +@@ -1667,6 +1680,7 @@ + if(d>0) comdomovedown(d,0); else comdomoveup(-d,0); + break; + default: ++ break; + } + centhis++; + if(centhis==2) centhis=1; +@@ -1682,6 +1696,7 @@ + drawstatusline(); + break; + default: ++ break; + } + } + +@@ -1701,6 +1716,7 @@ + drawstatusline(); + break; + default: ++ break; + } + } + +@@ -1759,6 +1775,7 @@ + else drawstatusline(); + break; + default: ++ break; + } + } + +@@ -1802,6 +1819,7 @@ + else drawstatusline(); + break; + default: ++ break; + } + } + +@@ -1860,6 +1878,7 @@ + drawstatusline(); + break; + default: ++ break; + } + } + +@@ -1931,6 +1950,7 @@ + drawstatusline(); + break; + default: ++ break; + } + } + +@@ -1997,6 +2017,7 @@ + drawstatusline(); + break; + default: ++ break; + } + } + +@@ -2045,6 +2066,7 @@ + drawstatusline(); + break; + default: ++ break; + } + } + +@@ -2068,6 +2090,7 @@ + drawstatusline(); + break; + default: ++ break; + } + } + +@@ -2096,6 +2119,7 @@ + drawstatusline(); + break; + default: ++ break; + } + } + +@@ -2193,6 +2217,7 @@ + drawstatusline(); + break; + default: ++ break; + } + } + +@@ -2248,6 +2273,7 @@ + comdisp(COMDO); + break; + default: ++ break; + } + } + +@@ -2318,6 +2344,7 @@ + comsearch(COMDO); + break; + default: ++ break; + } + } + +@@ -2698,6 +2716,7 @@ + if(comode==COMDEF && o!= KEYNOP) + ignorethis("THE PREVIOUS PRESSED KEY PERFORMS ALMOST NO OPERATION"); + o=KEYNOP; ++ break; + } /* end switch o */ + #ifdef HASMOUSE /* now mouse actions ... */ + if(!dvierrorflag){ /* if not in error */ +--- tmview-01.03.orig/src/readdvi.c ++++ tmview-01.03/src/readdvi.c +@@ -983,7 +983,7 @@ + case 250: case 251: case 252: + case 253: case 254: case 255: + pfprot("(skipping unknown opc > 249 within macro)");break; +- default: ++ default: break; + } /* end switch o */ + } + +@@ -1091,7 +1091,7 @@ + case 250: case 251: case 252: + case 253: case 254: case 255: + pfprot("skipping unknown opc > 249 ");break; +- default: ++ default: break; + } /* end switch o */ + o = dvibyte(); + } +--- tmview-01.03.orig/fb/writefb.c ++++ tmview-01.03/fb/writefb.c +@@ -565,6 +636,7 @@ + break; + case 0: case 27: com= KEYESC; break; /* allow wild escape abuse */ + default: ++ break; + } + break; + } --- tmview-01.03.orig/debian/patches/203_64bit_support.diff +++ tmview-01.03/debian/patches/203_64bit_support.diff @@ -0,0 +1,163 @@ +--- tmview-01.03.orig/svga/defssvga.h ++++ tmview-01.03/svga/defssvga.h +@@ -176,8 +178,6 @@ + */ + + /* be careful with storge types !!! */ +-#define BMLONG32 /* for architectures where "long int" has 32bits, e.g. i386 */ +-/* #define BMLONG64 *//* for architectures where "long int" has 64bits, e.g. alpha */ + /* #define GREYINBMU *//* waste memory. may be a bit faster */ + + /* if DOSFILES is defined, a dosfilesystem is expected, */ +--- tmview-01.03.orig/src/tmview.c ++++ tmview-01.03/src/tmview.c +@@ -2335,14 +2362,6 @@ + pfprot("This is some kind of a DVIewer, %s\n",MYVERSION); + pfprot("(C)opyright 1995 Thomas Moor\n\n"); + +- /* check some arcitecture dependant stuff ... better be configured */ +- if(BYTES_PER_BMUNIT !=sizeof(BMUNIT)){ +- pfprot("This message addresses the administrator rather than the user:\n"); +- pfprot("the compiletime option BMLONG64/BMLONG32 seems not to meet your\n"); +- pfprot("machines architecture. Please check the non-i386 section in the\n"); +- pfprot("README and re-compile. Sorry.\n\n"); +- exit(1); +- } + if(sizeof(void*)0) { +- maxloop--; +- bbu=filemks[0]; +- for(i=0;ilastpos.dvifilename)) +- break; /* loop nominal ends here */ +- /* freefilemknumber(0); ... no, we dont delete these things! */ +- }; +- freemem(&bustr); ++ bbu=filemks[0]; ++ for(i=0;ibookmks); + } +--- tmview-01.03.orig/src/readpk.c ++++ tmview-01.03/src/readpk.c +@@ -16,7 +16,7 @@ + + + void pkopen(char* fname) { +- if((pkfile = fopen(fname, "rb"))==0) { ++ if((pkfile = fopen(fname, "rb"))==NULL) { + pfprot("\n fatal error: pk-file disapeard. \n"); + exit(1); + } +--- tmview-01.03.orig/src/defsgen.h ++++ tmview-01.03/src/defsgen.h +@@ -189,18 +189,18 @@ + */ + + +-#ifdef BMLONG64 ++#if __WORDSIZE == 64 + #define BMUNIT unsigned long + #define BITS_PER_BMUNIT 64 + #define BITS_LOG2 6 + #define BYTES_PER_BMUNIT 8 +-#endif +-#ifdef BMLONG32 ++#else + #define BMUNIT unsigned long + #define BITS_PER_BMUNIT 32 + #define BITS_LOG2 5 + #define BYTES_PER_BMUNIT 4 + #endif ++ + #ifdef BMCHAR + #define BMUNIT unsigned char + #define BITS_PER_BMUNIT 8 +--- tmview-01.03.orig/README ++++ tmview-01.03/README +@@ -14,7 +14,6 @@ + - EXTRA NOTES kpathsea + - EXTRA NOTES mouse + - EXTRA NOTES X-Window System +- - EXTRA NOTES non-i386 architectures e.g. Alpha. + 5. Get the newest version, send me your comments + + +@@ -361,17 +360,6 @@ + colors, asking for fonts and so, set DEBUGX in writelx.c . This helps + if no tmview window shows up at all. + +-EXTRA NOTES non-i386 architectures: Of course I realize that there are several +-non-i386 architectures. The clean way of dealing with machine dependand stuff +-is to make use of and such. Unfortunately I didn't. In a future +-version I shall carefully review the code from this perspective. In the +-meanwhile there is on crucial compiletime option to set up how many bits +-actually make a "long int". On i386 these are 32. Thus, enable "#define BMLONG32" +-in the platformm dependant "defs*.h", e.g. "./tmview/lX/defslx.h". On Alpha +-systems a "long int" is made up from 64 bits. Here, "#define BMLONG64" needs +-to be enabled. tmview will issue a runtime warning message if it figures out +-that ends don't meet here. +- + + ***************************************************************************** + ***************************************************************************** +--- tmview-01.03.orig/fb/writefb.c ++++ tmview-01.03/fb/writefb.c +@@ -7,6 +7,7 @@ + + #include + #include ++#include + + #include + #include +@@ -518,7 +589,7 @@ + } + + uchar getonechar(void){ +- int res; ++ char res; + if(1==read(STDIN_FILENO, &res, 1)) + return(res); + return(0); +--- tmview-01.03.orig/fb/defsfb.h ++++ tmview-01.03/fb/defsfb.h +@@ -144,8 +147,6 @@ + */ + + /* be careful with storge types !!! */ +-#define BMLONG32 /* for architectures where "long int" has 32bits, e.g. i386 */ +-/* #define BMLONG64 *//* for architectures where "long int" has 64bits, e.g. alpha */ + /* #define GREYINBMU *//* waste memory. may be a bit faster */ + + /* if DOSFILES is defined, a dosfilesystem is expected, */ +--- tmview-01.03.orig/lX/defslx.h ++++ tmview-01.03/lX/defslx.h +@@ -142,8 +143,6 @@ + + + /* be careful with storge types !!! */ +-#define BMLONG32 /* when "long int" has 32bits, e.g. i386 architecture */ +-/*#define BMLONG64 *//* when "long int" has 64bits, e.g. alpha architecture*/ + /*#define GREYINBMU*//* waste memory. may be a bit faster */ + #define COLORS_PER_GREY 16 /* 2^BITS_PER_GREY, no MECK-like things in lX */ + --- tmview-01.03.orig/debian/patches/100_use_kpathsea.diff +++ tmview-01.03/debian/patches/100_use_kpathsea.diff @@ -0,0 +1,78 @@ +--- tmview-01.03.orig/MakeLX ++++ tmview-01.03/MakeLX +@@ -7,9 +7,9 @@ + OBJ=./src/lX. + + #1. when kpathsea is to be used +-#LIBS= -L /usr/X11R6/lib -L /usr/X11/lib -lkpathsea -lX11 -lm ++LIBS= -L /usr/X11R6/lib -L /usr/X11/lib -lkpathsea -lX11 -lm + #2. when kpathsea is not used +-LIBS= -L /usr/X11R6/lib -L /usr/X11/lib -lX11 -lm ++#LIBS= -L /usr/X11R6/lib -L /usr/X11/lib -lX11 -lm + + LL=gcc + CC=gcc -c -O2 -g -Wall -I$(SRC) -I$(SSRC) +--- tmview-01.03.orig/svga/defssvga.h ++++ tmview-01.03/svga/defssvga.h +@@ -116,10 +117,11 @@ + /* Thus, running once in a while "./missfont.log" manualy seems more */ + /* "comfortable" to me. For svgalib>=1.3.0 and kernel=>2.0 there */ + /* might be a solution on this topic. See below LETSTRYBG. */ +-/* #define KPATHSEA */ ++#define KPATHSEA + #ifdef KPATHSEA + #define KPATHMODE NULL /* put f.e. "cx" here, to consist on cx fonts */ +-#define KPATHMAKE 0 /* put 1 here, to make kpathsea run MakeTeXPK,*/ ++/* haha, the Debian maintainer ain't afraid of running kpathsea! */ ++#define KPATHMAKE 1 /* put 1 here, to make kpathsea run MakeTeXPK,*/ + #define KPATHDEFF "cmr10" /* fallback font */ + #define KPATHSEANEWSTYLE /* new=fine for teTeX from debian(see above)*/ + /*#define KPATHSEAOLDSTYLE*//* old=fine for NTeX from Slakware */ +--- tmview-01.03.orig/MakeSVGA ++++ tmview-01.03/MakeSVGA +@@ -8,8 +8,8 @@ + OBJ=./src/svga. + + +-LIBS= -lvgagl -lvga -lm +-#LIBS= -lkpathsea -lvgagl -lvga -lm # when kpathsea is to be used ++#LIBS= -lvgagl -lvga -lm ++LIBS= -lkpathsea -lvgagl -lvga -lm # when kpathsea is to be used + + + LL=gcc -L /usr/lib +--- tmview-01.03.orig/MakeFb ++++ tmview-01.03/MakeFb +@@ -5,8 +5,8 @@ + SSRC=./fb/ + OBJ=./src/fb. + +-LIBS= -lm +-#LIBS= -lkpathsea -lm # when kpathsea is to be used ++#LIBS= -lm ++LIBS= -lkpathsea -lm # when kpathsea is to be used + + LL=gcc -L /usr/lib + CC=gcc -c -O2 -g -Wall -I$(SRC) -I$(SSRC) +--- tmview-01.03.orig/fb/defsfb.h ++++ tmview-01.03/fb/defsfb.h +@@ -80,7 +83,7 @@ + /* its KPATHSEANEWSTYLE. */ + /* */ + /* Running MakeTeXPK by kpathsea within dvifb may be disabled below. */ +-/* #define KPATHSEA */ ++#define KPATHSEA + #ifdef KPATHSEA + #define KPATHMODE NULL /* put f.e. "cx" here, to consist on cx fonts */ + #define KPATHMAKE 1 /* put 0 here, to disable MakeTeXPK */ +--- tmview-01.03.orig/lX/defslx.h ++++ tmview-01.03/lX/defslx.h +@@ -82,7 +83,7 @@ + /* However, if kpse_init_prog is defined to have 4 arguments ("P4H"),*/ + /* its KPATHSEANEWSTYLE. */ + /* */ +-/* #define KPATHSEA */ ++#define KPATHSEA + #ifdef KPATHSEA + #define KPATHMODE NULL /* put f.e. "cx" here, to consist on cx fonts */ + #define KPATHMAKE 1 /* put 0 here, to disable running MakeTeXPK */ --- tmview-01.03.orig/debian/patches/400_reorder_headers.diff +++ tmview-01.03/debian/patches/400_reorder_headers.diff @@ -0,0 +1,23 @@ +Description: reorder headers in writefb.c to fix build failure +Author: Ilya Barygin +Bug-Debian: http://bugs.debian.org/562343 +--- a/fb/writefb.c ++++ b/fb/writefb.c +@@ -3,8 +3,6 @@ + /* This program may be used without any warranty. It may be modified and */ + /* distributed without any restrictions. */ + +-#include "../src/defs.h" +- + #include + #include + #include +@@ -17,6 +15,8 @@ + #include + #include + ++#include "../src/defs.h" ++ + /* framebuffer globals */ + static uchar *thefb=NULL; + static struct fb_var_screeninfo thefbvarinfo; --- tmview-01.03.orig/debian/patches/204_framebuffer_updates.diff +++ tmview-01.03/debian/patches/204_framebuffer_updates.diff @@ -0,0 +1,329 @@ +--- tmview-01.03.orig/fb/writefb.c ++++ tmview-01.03/fb/writefb.c +@@ -18,16 +19,19 @@ + + /* framebuffer globals */ + static uchar *thefb=NULL; ++static struct fb_var_screeninfo thefbvarinfo; + static long thefblen; ++static int thefbdepth; + static int thefbxdim; + static int thefbydim; +-static int thefbbyteswidth; ++static int thefbstride; + static int thefbfd=-1; + static struct fb_cmap origpalette={0,0,NULL,NULL,NULL,NULL}; + static unsigned short origreds[256]; + static unsigned short origgreens[256]; + static unsigned short origblues[256]; + static unsigned short origtrans[256]; ++static unsigned int newpalette[256]; + + /* terminal related stuff */ + static struct termios origtermattr; +@@ -84,7 +88,7 @@ + close(zwfd); + } + if(thefbfd!=-1) { +- if(origpalette.len!=0) { ++ if(thefbdepth==1 && origpalette.len!=0) { + pfprot("c"); + ioctl(thefbfd,FBIOPUTCMAP, &origpalette); + origpalette.len=0; +@@ -177,6 +181,7 @@ + static volatile int pendingswitch=0; + + void setpalette(void); /* foreward */ ++void updateline(uchar *, uchar *, int); + + static void vtrelease(int n){ /* switch away */ + #ifdef DEBUGFB +@@ -190,19 +195,51 @@ + } + + static void vtaquire(int n) { /* come back */ ++ int h; ++ uchar *src, *dst; + #ifdef DEBUGFB + pfprot("(vtaquire)"); + #endif + ioctl(thevtfd, VT_RELDISP, VT_ACKACQ); + if(offscreen!=NULL && thefb!=NULL) { +- memcpy(thefb,offscreen,thefblen); +- setpalette(); ++ for( ++ h=vgaydim, ++ src=offscreen, ++ dst=thefb; ++ h>0; ++ h--, ++ src+=vgaxdim, ++ dst+=thefbstride) ++ updateline(dst,src,vgaxdim); ++ setpalette(); + } + pendingswitch=0; /* discard a pending request ... */ + donotupdate=0; /* drawwings welcome again */ + } + + ++void updateline(uchar *dst, uchar *src, int len) { ++ switch(thefbdepth) { ++ case 1: ++ memcpy(dst,src,len); ++ break; ++ case 2: { ++ int i; ++ uint16_t*target=(uint16_t*)dst; ++ for(i=len;i--;) ++ *target++=newpalette[*src++]; ++ } ++ break; ++ case 4: { ++ int i; ++ uint32_t*target=(uint32_t*)dst; ++ for(i=len;i--;) ++ *target++=newpalette[*src++]; ++ } ++ break; ++ } ++} ++ + void myupdate(int x1, int y1, int x2, int y2) { + int h,w; + uchar *src, *dst; +@@ -221,13 +258,13 @@ + for( + w=x2-x1+1, + h=y2-y1+1, +- src=offscreen+thefbbyteswidth*y1+x1, +- dst=thefb+thefbbyteswidth*y1+x1; ++ src=offscreen+vgaxdim*y1+x1, ++ dst=thefb+thefbstride*y1+thefbdepth*x1; + h>0; + h--, +- src+=thefbbyteswidth, +- dst+=thefbbyteswidth) +- memcpy(dst,src,w); ++ src+=vgaxdim, ++ dst+=thefbstride) ++ updateline(dst,src,w); + + updateinprogress=0; /* all drawings done so far */ + if(pendingswitch){ /* aha: console switch requested while we were busy */ +@@ -250,8 +287,18 @@ + fbc.green=&g; + fbc.blue=&b; + fbc.transp=NULL; +- if(0!=ioctl(thefbfd,FBIOPUTCMAP, &fbc)) +- vgaerror("\nerror: writefb: setpalette\n"); ++ switch(thefbdepth) { ++ case 1: ++ if(0!=ioctl(thefbfd,FBIOPUTCMAP, &fbc)) { ++ /*vgaerror("\nerror: writefb: setpalette\n")*/; ++ } ++ break; ++ default: ++ newpalette[num] = (((int)r>>(16-thefbvarinfo.red.length))<>(16-thefbvarinfo.green.length))<>(16-thefbvarinfo.blue.length))<fixinfo.smem_len) + pfprot("warning: writefb: mapping more than there is?\n"); + pfprot("m"); +@@ -333,9 +386,9 @@ + thefb=NULL; + vgaerror("memory mapping of framebuffer failed"); + } +- seteuid(getuid()); /* give back root permissions */ ++ setegid(getgid()); /* give back video group permissions */ + #ifdef DEBUGFB +- pfprot("(set euid %d uid %d)",geteuid(),getuid()); ++ pfprot("(set egid %d gid %d)",getegid(),getgid()); + #endif + + /* .. some basic tests, copied from below: under certain */ +@@ -358,13 +411,13 @@ + origpalette.green=origgreens; + origpalette.blue=origblues; + origpalette.transp=origtrans; +- if(0!=ioctl(thefbfd,FBIOGETCMAP, &origpalette)){ ++ if(thefbdepth==1 && 0!=ioctl(thefbfd,FBIOGETCMAP, &origpalette)){ + origpalette.len=0; +- vgaerror("\nerror: writefb: readpalette\n"); ++ /*vgaerror("\nerror: writefb: readpalette\n");*/ + } + + /* accocaletmviews offscreenbuffer */ +- allocmem(&offscreen,thefblen); ++ allocmem(&offscreen,((long)thefbxdim * (long)thefbydim + 0x0fffL) & ~0x0fffL); + + /* open mouse deveice */ + #ifdef HASMOUSE +@@ -390,6 +443,13 @@ + vtno=ttystat.v_active; + sprintf(vtdevice,"/dev/tty%d",vtno); + thevtfd=open(vtdevice, O_RDWR | O_NDELAY); ++ if(thevtfd<0) { ++ /* try the devfs name */ ++ sprintf(vtdevice,"/dev/vc/%d",vtno); ++ thevtfd=open(vtdevice, O_RDWR | O_NDELAY); ++ if(thevtfd<0) ++ vgaerror("cannot open vt"); ++ } + if(thevtfd<0) + vgaerror("cannot open vt"); + if(ioctl(thevtfd, VT_GETMODE, &vtmode)!=0) +@@ -403,6 +463,17 @@ + vgaerror("cannot install vtswitch handles"); + ioctl(thevtfd, KDSETMODE, KD_GRAPHICS); + ++ /* now that we switched to graphics mode, pan the display */ ++ thefbvarinfo.xoffset=0; ++ thefbvarinfo.yoffset=0; ++ ioctl(thefbfd,FBIOPUT_VSCREENINFO, &thefbvarinfo); ++ /* don't check the return value; some buggy framebuffer */ ++ /* drivers will return an error while correctly panning */ ++ /* the display, we have no real choice. */ ++ thefbvarinfo.xoffset=0; ++ thefbvarinfo.yoffset=0; ++ ioctl(thefbfd,FBIOPAN_DISPLAY, &thefbvarinfo); ++ + /* set the terminal to noblocking/noecho */ + pfprot("a"); + if(!isatty(STDIN_FILENO)) +@@ -425,7 +496,7 @@ + vgaydim=truevgaydim=thefbydim; + ptorigin=offscreen; + #define PTDELTAH (1) +- #define PTDELTAV (thefbbyteswidth) ++ #define PTDELTAV (vgaxdim) + ofscx1=0; ofscy1=0; ofscx2=vgaxdim-1; ofscy2=vgaydim-1; + setpalette(); + preparefont(); +@@ -452,17 +523,17 @@ + dst=offscreen; + i>0; + i--, +- src+=thefbbyteswidth, +- dst+=thefbbyteswidth) ++ src+=vgaxdim, ++ dst+=vgaxdim) + memmove(dst,src,vgaxdim-dx); +- else ++ else /* dx>=0 */ + for(i=vgaydim, + src=offscreen, + dst=offscreen+dx; + i>0; + i--, +- src+=thefbbyteswidth, +- dst+=thefbbyteswidth) ++ src+=vgaxdim, ++ dst+=vgaxdim) + memmove(dst,src,vgaxdim-dx); + } + +@@ -473,22 +544,22 @@ + if(dy<0) + for( + i=vgaydim+dy, +- src=offscreen+thefbbyteswidth*(-dy), ++ src=offscreen+vgaxdim*(-dy), + dst=offscreen; + i>0; + i--, +- src+=thefbbyteswidth, +- dst+=thefbbyteswidth) ++ src+=vgaxdim, ++ dst+=vgaxdim) + memcpy(dst,src,vgaxdim); +- else /* dy>0 */ ++ else /* dy>=0 */ + for( + i=vgaydim-dy, +- src=offscreen+thefbbyteswidth*(vgaydim-dy-1), +- dst=offscreen+thefbbyteswidth*(vgaydim-1); ++ src=offscreen+vgaxdim*(vgaydim-dy-1), ++ dst=offscreen+vgaxdim*(vgaydim-1); + i>0; + i--, +- src-=thefbbyteswidth, +- dst-=thefbbyteswidth) ++ src-=vgaxdim, ++ dst-=vgaxdim) + memcpy(dst,src,vgaxdim); + } + +--- tmview-01.03.orig/fb/defsfb.h ++++ tmview-01.03/fb/defsfb.h +@@ -31,8 +32,10 @@ + #include + + +-/* the framebuffer devive to use */ ++/* the framebuffer device to use */ + #define THEFBDEV "/dev/fb0" ++/* for devfs */ ++#define THEOTHERFBDEV "/dev/fb/0" + + + /* --- tmview-01.03.orig/debian/patches/300_documentation.diff +++ tmview-01.03/debian/patches/300_documentation.diff @@ -0,0 +1,14 @@ +--- tmview-01.03.orig/doc/tmview.1 ++++ tmview-01.03/doc/tmview.1 +@@ -132,9 +132,9 @@ + 640x480 at 256 colors, then to 640x480 at 16 colors. + The framebuffer version \fBdvifb\fP ignores this option. Use the + program \fBfbset\fP to set up the framebuffer device before starting tmview. +-Using the X Window System (\fBdvisvga\fP) \verb+-d+ will suggest the size of ++Using the X Window System (\fBdvisvga\fP) \\verb+-d+ will suggest the size of + the tmview window. However, you may alternatively use the resource +-\verb+DviLX.geometry+ or the standard geometry option \verb*-geometry widthxheigth+x+y*. ++\\verb+DviLX.geometry+ or the standard geometry option \\verb*-geometry widthxheigth+x+y*. + Defaults: (dvisvga) "640x480" + .TP + \fB-m\fP (\fBmagnification\fP) --- tmview-01.03.orig/debian/patches/200_backslashes.diff +++ tmview-01.03/debian/patches/200_backslashes.diff @@ -0,0 +1,1326 @@ +--- tmview-01.03.orig/svga/writevga.c ++++ tmview-01.03/svga/writevga.c +@@ -64,10 +64,10 @@ + if(!MECK) gl_freecontext(&physicalscreen); /* does not hurt if not allocated ? */ + #ifndef VGAHASWAITIO + #ifdef LETSTRYGS +- pfprot("\n\ +-warning: display: use polling when rendering eps-figures due to +- a compiletime-option. If your svgalib is above version 1.2.10, +- recompiling with \"VGAHASWAITIO\" defined may speed up rendering.\n\n"); ++ pfprot("\n" ++ "warning: display: use polling when rendering eps-figures due to\n" ++ "a compiletime-option. If your svgalib is above version 1.2.10,\n" ++ "recompiling with \"VGAHASWAITIO\" defined may speed up rendering.\n\n"); + #endif + #endif + } +@@ -203,9 +203,9 @@ + if (n==0 || !vga_hasmode(n)) { + n=vga_getdefaultmode(); + if((n!=5 && n!=10 && n!=11 && n!=12) || !vga_hasmode(n)) { +- pfprot("\n\ +-warning: display: mode not supported on this machine. Now try -d640x480. +- Check your svgalib configuration.\n"); ++ pfprot("\n" ++ "warning: display: mode not supported on this machine. Now try -d640x480.\n" ++ "Check your svgalib configuration.\n"); + n=10; + } + } +@@ -213,14 +213,14 @@ + MECK=0; + } else { + MECK=1; +- pfprot("\n\ +-warning: display: mode -d640x480 not supported at 256 colors. Now try at +- 16 colors. This will reduce display quality and speed. Check your +- svgalib configuration.\n\n"); ++ pfprot("\n" ++ "warning: display: mode -d640x480 not supported at 256 colors. Now try at\n" ++ "16 colors. This will reduce display quality and speed. Check your\n" ++ "svgalib configuration.\n\n"); + n=4; + if(!vga_hasmode(n)) { +- pfprot("\n\ +-warning: display: mode -d640x480 not even supported at 16 colors.\n"); ++ pfprot("\n" ++ "warning: display: mode -d640x480 not even supported at 16 colors.\n"); + vgaerror("Sorry."); + } + } +--- tmview-01.03.orig/src/help.h ++++ tmview-01.03/src/help.h +@@ -1,598 +1,598 @@ + #define HELPWIDTH 60 +-#define HELPSTR "\ +-LIST OF COMMANDS WITH TYPICAL ARGUMENTS ************ V 01.03 +- +- / goto previous/next page +-(NUM) goto page NUM w.r.t. TeX-counters +- /// scroll the visible area +- / make scrolling finer/coarser +- center visible area +- <+>/<-> zoom in/out +-(NUM) set zoom-factor to NUM +- +- set a bookmark +- move to a bookmark +- <^> move back +- +- display options +- toggle statusline-information +- set unit of measurement +- +- show/hide screenmark and pagemark +- set pagemark at screenmark position +- show/hide marked rectangle +-

show/hide printable area +- set page-offset and -size +- +- show/hide half-hyper-tex-mark +- move to next href +- follow current href +- +- search for text +- <*> re-read DVIfile, fonts, eps-figures +- load/kill DVIfile +- quit tmview +- +- +-GENERAL USAGE ******************************************* +- +-When everything is setup right, visiting a DVIfile with +-tmview just means to navigate the visible area along that +-file, using the cursor-keys. Some of the following +-commands obviously require an argument, f.e. . +-Arguments are to be entered BEFORE executing a command. +-When executed by hitting the corresponding uppercase key, +-you will be asked for the argument. While the +-user-interface of tmview is meant to save keystrokes, it +-is not too intuitive. You may either read the following +-instructions, or just do . +- +-The cursor-keys and are taken as +-resp. . The keys and select the first +-resp. the last page. The cursor-keys +-and do resp. . All in all this +-means, that the cursor-keys do what they are meant to. +- +-When a mouse is connected, it moves any visible mark. When +-the right or left mousebutton is no good for anything +-else, moving the mouse while holding that button acts on +-the visible area instead. (That sounds bad, but works out +-fine) When the screenmark is shown (see ), the left +-mouse-button sets the pagemark (see ) and the right +-button marks a rectangle (see ). When the +-half-hyper-mark is shown, the left mouse-button follows +-the current href, if any. +- +-********************************************************* +-NON-INTUITIVE USER-INTERFACE **************************** +-********************************************************* +- +-To explain the way tmview expects to receive commands, a +-short nomenclature used in the sequel is given: +- +-Any text within `<' and `>' represents a single keystroke, +-while `(' and `)' mark the beginning resp. the end of a +-string to enter. So is about to hit the key named `h' +-and (25.4) could stand for <2><5> <.><4>. The carriage- +-return-key is referred by , the backspace-key or +-delete-key by and the escape-key by . Almost +-whenever a string is expected by tmview, you may use +-to remove the last character you typed. So even +-<2><5><6><.><4> results in (25.4). Note that a string +-does not need to be terminated by . To simplify a +-reference to a string, in this text any uppercase letters +-within `(' and `)' are not meant as a string, but as the +-name of some string. So we may read something like +-`(PP) scrolls PP percent to the left' as `typing in any +-number just before results in scrolling left according +-to that number'. +- +- +-COMMANDS AND ARGUMENTS*********************************** +- +-A command is executed by typing its name, which consists +-of a single character. Some of the above listed commands +-take numerical arguments. Arguments are always +-optional. They may be entered before executing the +-command. Multiple arguments are separated by <,> or +-<;>. If no argument is passed, a default is used. If an +-argument is passed, it serves as the default for following +-commands. Commands doing similar things share the same +-default arguments. +- +-Example: +-Typing (10) results in scrolling 10% to the left and +-sets the default for any scrolling commands to 10%. Thus +-typing afterwards results in scrolling 10% to the +-right. +- +- +-MAGIC ARGUMENT******************************************* +- +-As a special argument some commands accept the magic +-argument <*>. It is used either to vary the command in +-some way or to get the arguments from another place. <#> +-is equivalent to <*> and saves you from holding down the +-shift-key on some keyboards. +- +- for example centers the visible area. It excepts as +-argument the point which will be taken as origin. Since +-this will become the default for a future , you may +-measure out the origin only once. Even quicker it is to +-position the visible area by scrolling and then to do a +-<*>. This results in taking the current position as +-centered and so as default for a coming . +- +-As another example look at the command , which moves +-pages forward, according to a given argument resp. a +-default. By moving on the next page there are two modi +-available: 1. keep the visible area; 2. do center like +-. <*> toggles between these two modi. So in this +-case <*> acts as a kind of flag argument. +- +- +- +-SELECTING THE PAGE**************************************** +- +-/ Select a page relative to the current page. +- +- moves towards the beginning of the DVIfile, while +- moves towards the end. A single argument (N) may +- specify the amount of movement in pages. However, (N) +- will NOT become the default value. The argument is (*), +- the page-moving-mode is toggled. See above. +- +- Example: +- (1) selects the previous page selects the next +- page +- +- Select a page with respect to TeX counters. +- +- A list of ten arguments (COUNT0; COUNT1; ... COUNT9) +- specifies the page to be selected. <*> may be used as +- wildcard. If there are more than one but less than ten +- arguments given, the others will be taken as <*>. +- +- Example: +- (26) selects the first page after the current page +- with a value of 26 in \\count0. +- +- +- +-MOVING AROUND ON CURRENT PAGE ****************************** +- +-/// Scrolling the visible area +- +- A single argument (PP) may be used to specify the +- amount of scrolling in percent of the +- screen-width. / resp. /down> both accept +- the argument (*) to toggle between: 1. stay on the +- current page; 2. scroll over pages. When scrolling +- over pages, you may view the whole document while +- using only the single key . +- +- Example: +- (20) scrolls 1/5 to the left. +- +-/ Make scrolling finer/coarser +- +- These commands change the default argument for the +- above scrolling- commands. So and don't move +- the visible area at all, but they change the way the +- scrolling-commands act. +- +- Center the visible area +- +- Without any argument centers horizontally only, +- while centers in both directions. +- When two arguments (X,Y) are given, they describe +- the point on the page, which will become the middle +- of the visible area. When the argument (*) is given, +- the current position is taken as centered. When the +- screenmark is shown (see below ), and the +- argument (*) is given, the position of the +- screenmark becomes the center. This does move the +- visible area, but it does not move the screenmark. +- +- +-ZOOMING **************************************************** +- +- Set the zoom-factor +- +- This command requires one argument (F) which must be +- between 0.05 and 2. F will become the zoom-factor +- and the visible-area will be redrawn. Use (*) to +- adjust the zoom-factor such that the page horizontaly +- fits the visible-area. +- +- If the zoom-factor is 1, the pixels found in pk-files +- are just copied one by one to the screen. Since the +- resolution of our days screens seems to be less than +- that of our days printers, and since you may still +- want to use the same pk-files for printing and +- viewing, F=1 usually results in a magnification. So +- when you're just reading some text in some DVIfile +- you will set F to something like 0.3, depending on +- the involved resolutions. When the screenmark is +- visible (see ) the position of the screenmark is +- taken as the origin of zooming, i.e. it is fixed. +- When the screenmark is not visible, the middle of the +- screen is fixed. The current zoom-factor is displayed +- in the optional statusline, see . +- +- There are two zooming modi. The integer modus +- requieres 1/f to be an integer. This modus is quite +- fast, so good values are F=0.5, 0.333, 0.25, 0.2, +- 0.167 etc. The good thing about the slow modus is, +- that it allows you to choose the zoom-factor +- arbitrary (between 0.05 and 2). So poor students with +- small screens might find some optimum to make the +- text fit and still be readable. The bad thing about +- the slow modus is that it is slow. But since once +- zoomed glyphs are kept in memory, this slowness only +- hurts the first few pages after changing the +- zoom-factor. Modus selection is done by the display +- options . +- +-<+>/<-> Zoom in/out +- +- Increase/decrease the zoom-factor. When in the fast +- modus, step through the fast values only (see +- above). When an argument (PP) is given, it is taken +- as the amount of increasing/decreasing in percent of +- the current zoom-factor. This is likely to result in +- the slow modus. +- +- +-BOOKMARKS ************************************************** +- +-A bookmark remembers what is seen on the screen. That is +-the DVIfile, the page within that file, the position of the +-visable area and the zoom-factor. There are three kind of +-bookmarks ... +- +-file-bookmarks: +-Each file visited has a file-bookmark, containing the above +-information about what was seen on the screen when visited +-the last time, plus some information on the file, that is +-the paper-offset and -position, the location of the +-printable-area. file-bookmarks are generated automaticly. +-This results in easy re-visiting a DVIfile: you'll find it +-as left. A file-bookmark is removed by killing the DVIfile +-with , see below. +- +-back-bookmarks: +-When searching a text-string, following a href or moving to +-a bookmark, the position within the DVIfile might be +-changed to somewhere far far away. To simplify recovering +-fromsuch excursions, a back-bookmark will be generated +-automaticly. To prevent getting fed up with thousands of +-back-bookmarks, the total number of theese is limited. See +-<^> below. +- +-manual-bookmarks: +-After all you may install your own bookmarks, marking often +-visited places, say in some manuals. manual-bookmarks are +-named by a number. This number has to be unique whithin +-the DVIfile they belong to. To define a manual-bookmark +-use . Since manual-bookmarks belong to the DVIfile they +-are defined on, they get lost, when that DVIfile is killed +-by . +- +-All kind of bookmarks are kept in a ring-buffer. There is a +-so called current bookmark of each type. Visiting the +-bookmarks along the ring-buffer is done by for file- +-and manual-bookmarks, while <^> acts on back-bookmarks. +- +- Define/undefine manual-bookmark. +- +- When the current position is not already defined as +- a manual-bookmark, defines one. When an single +- numeric argument (NUM) is given, NUM will be the +- name of the newly defined bookmark. With no +- argument, a name will be generated automaticly. See +- below, for how to visit manual-bookmarks. When +- the current position is already defined as a +- manual-bookmark, undefines that manual-bookmark. +- +- Move to bookmark. +- +- When a single numeric argument (NUM) is given, +- moves to the manual-bookmark named NUM, if +- any. Since manual bookmarks are bound to DVIfiles, +- the current DVIfile will never change in that +- case. If no argument is given, goes moves the +- postion either thrue the ring-buffer of +- file-bookmarks or thrue the one of +- manual-bookmarks. To toggle between theese two modi, +- use the magic argument <*>. +- +-<^> Move back +- +- Move to the latest back-bookmark, if any. When a +- single numeric argument (TOTAL) is given, keep the +- TOTAL latest back-bookmarks and discard all the +- others. +- +- +-CHOOSING WHAT'S ON THE DISPLAY ***************************** +- +- Display options +- +- This command collects a number of general options +- on how the things get on the screen. Use the cursor +- keys (or ///) to navigate. +- +- > Greyscales. When the zoom-factor is less than 1, +- the glyphs may be displayed using grey-levels, making +- them more smooth. This takes some memory, so you are +- allowed to switch it off. On high-res displays there +- is no need for greyscaling anyway. +- +- > Eps-rendering. There is limited support for +- rendering eps-files by running ghostscript. However, +- this sometimes is quite slow and memory intensive, so +- you may turn it off. If rendering is enabled the +- results are buffered. Hence, if the eps-files are +- updated by some graphics program, you need to do a +- <*> to force rerendering. To disable certain +- eps-files individually, abort the rendering process +- by . +- +- > Double-page. There is also limited support for +- viewing two pages beside each other. Again their +- is some memory required to keep it all buffered. +- You may disable double paged viewing entirely. You +- may let tmview deceide on basis of the zoom-factor. +- Or you may permanently enable this feature. +- +- > Zooming. There is a fast zooming mode allowing +- only zomming by 1/f where f is required to be an +- integer. And there is an arbitrary mode to be +- selected. +- +- Toggle statusline-information +- +- While the standard statusline shows you the +- page-number of the current page and the arguments +- you are about to enter, you may select optional +- information for measuring out distances and so. See +- below. +- +- Set unit of measurement +- +- Whenever you specify arguments which are to describe +- a point on the page, this is done w.r.t. a unit of +- measurement, i.e. cm, mm, a.s.o.. This unit is also +- used, when the position of a mark is displayed in +- the statusline. +- +- +-MEASURING ************************************************** +- +-To allow you to measure distances on the page, there are +-two marks, the screenmark, which is fixed on the physical +-screen you're looking at, and the pagemark, which is fixed +-on the DVIfiles page. When you move the visible-area, the +-screenmark acts as drawn with edding on your monitor. The +-pagemark acts as drawn on the page. The optional statusline +-tells the position of the pagemark relative to the corner +-of the sheet of paper you're viewing. It also tells the +-position of the screenmark relative to the pagemark. To +-measure distances you first may switch this marks on, using +-. When the marks are shown, the scrolling commands don't +-act on the visible area anymore, but move the screenmark. +-For that case only moving the screenmark at the boarder of +-the screen results in scrolling. To move the pagemark just +-move the screenmark at the desired position and use to +-make the pagemark follow. +- +- Show/hide screenmark and pagemark +- +- This commands takes the two arguments +- (PM_X;PM_Y). The pagemark is put at position PM_X +- PM_Y w.r.t. the upper left corner of the page. The +- Screenmark may be moved with the scrolling-commands. +- +- Set pagemark at the position of the screenmark +- +-Beside of these marks there are three rectangles for +-measurement. First there is the boarder of the paper setup +-by the command-line options -h,-v and -p. Then there is +-the printable area, setup with the -k command-line option. +-Third the so called marked rectangle used. +- +- Show/hide marked rectangle +- +- The four arguments (LEFT,TOP,WIDTH,HIGHT) specify +- the position on page an the size of the marked +- rectangle. When pagemark and screenmark are shown, +- their positions are used as default. When they are +- hidden, the last position of the marked rectangle is +- used as default. +- +-

Show/hide printable area +- +- The four arguments (LEFT,RIGHT,TOP,BOTTOM) specify +- the margins of the printable area, w.r.t. the +- boarder of the page. When pagemark and screenmark +- are shown, the argument (*) sets the printable area +- to the rectangle described by screenmark and +- pagemark. When they are hidden, (*) takes the +- command-line-options resp. defaults -k of the +- printable area. +- +- Set paper-offset and -size +- +- The four arguments (HOFF;VOFF;WIDTH;HEIGHT) specify +- the boarder of the page. Have the top-left corner of +- a sheet of paper in mind. Then (HOFF,VOFF) is the +- offset of the DVIfile's origin to the left boarder +- of the paper. Standard values are +- HOFF=VOFF=2.54cm. WIDTH and HEIGHT are the width and +- the height of the sheet of paper. The sheet of paper +- is represented only by a frame on the screen. It +- does not affect the drawing of the DVIfile. +- +- When pagemark and screenmark are shown, the argument +- (*) sets the boarder of the page to the rectangle +- described by screenmark and pagemark. When they are +- hidden, (*) takes the command-line-options +- resp. defaults -h,-v and -p. +- +- +-HALF-HYPER ************************************************* +- +-tmview does some of the fancy hyper-tex things. I talk +-about HALF-hyper-tex, because tmview follows only links +-which point to somewhere within the currently visited +-dvi-file. So there is no connection to the net or so. But +-you might find it usefull (when editing a major project) to +-view an equation number this-and-that by clicking on +-this-and-that whereever the text refers to that equation. +-For information about hyper-tex, related macropackages and +-fully compatible viewer scan the net ... +- +- Show/hide half-hyper-mark +- Goto next href +- Follow current href, if any +- +- +-MISC ******************************************************* +- +- Search for text +- +- You will be asked for the text-string to be searched. +- You may enter a regular expression describing that +- string, that includes especially just to enter the +- string as it is. +- +- tmview will take the entire DVIfile as one huge +- text-string and then search for the next substring, +- fitting the regular expression you've enterd. Thereby +- \"next\" is ment with respect to the current page. +- +- So far this sounds quite easy, but there are some ugly +- details, based on the fact, that a DVIfile contains +- information on how to draw a bitmap representing your +- text. It does not contain information about from what +- characters in which order your text is made up. Even +- the PKfiles used to draw your text consist only of +- lots of glyphs but no character-codes, like ASCII or +- so. Building a huge text-string from a DVIfile is some +- kind of guessing. +- +- Fisrt: What kind of huge-string is build from the DVIfile? +- +- This string will consists of the letters ... , +- ... , the accent <\"> and the digits <0> +- ... <9>. It does NOT contain anything else, like +- , or <->: +- Whenbeingprinteditwouldlooklikethisnotreadableatall. +- Taking the DVIfile as huge string allows you to find +- all locations of a sub-string, say +- \"commandlineoptions\", even those that are seperarted +- by linebreaks (and hyphens) or pagebreaks. In turn, +- there is no chance to find all those locations, where +- \"commandlineoptions\" is seperated by a hypenation. To +- keep tmview from being confused by headings, there is +- another rule for building up the huge text-string: any +- glyph outside the printable area (see

) is +- ignored. So you may setup the printable area to ignore +- headings when searching. +- +- Second: How is the huge-string build up? +- +- To translate the list of glyphs found in the DVIfile +- to a text-string, the tfm-files are asked for the +- encoding-scheme. This does work with dc-fonts and +- cm-fonts, since the following encoding-scheme names +- are accepted: \"ASCII\", \"TeX text\", \"TeX math italic\", +- \"TeX math symbols\", \"TeX typewriter text\", \"Extended +- TeX Font Encoding - Latin\", \"Adobe StandardEncoding\". +- The alphanumerics ..., ..., <0> ... <9> +- are copied one by one to the huge text-string. Glyphs +- that \"look like\" a simple alphanumeric will be taken +- as that one it looks like. So the Tex input '\\c o', +- producing an 'o'-with-an-cedilla-accent, will be +- represented as a simple (o) in the text-string. This +- rule also works for all kind of ligatures. The TeX +- input 'ffl\\AE' will be represented by (fflAE). Any +- accent ON TOP of a glyph will be translated to a (\"), +- preceding whatever the glyph without that accent would +- be translated to. The TeX input '\\\"a' producing the +- german umlaut 'a'-with-two-dots-on-top, will be found +- as (\"a) in the generated text-string. The TeX input +- '\\aa' producing the scandinavian +- 'a'-with-circle-on-top will be found as (\"a) too. Any +- other glyphs are ignored. +- +- Third: In what does the above result? +- +- Visiting english documents, say manuals to some +- computer related stuff like elisp.dvi, searching for +- keywords works fine. Searching in documents in which +- extensive use of accents and funny characters is made +- works too, but requires some luck or/and experiance in +- how TeX acts on such things. +- +- +- Example: +- +- Take the file story.tex from the TeXbook, chapter 6, +- page 24. It contains the line +- galaxy called \\\"O\\\"o\\c c, +- The text-string build from the corresponding story.dvi +- will therfore contain +- galaxycalled\"O\"oc +- You may search for ... getting as result ... +- galaxy found +- galaxycalled found +- galaxy called not found +- d\" found +- galaxy.*\"O\"oc found +- Ooc not found +- +- +- Re-read current DVIfile and re-draw screen. +- +- Note: will not re-initialize the fontdatabase, +- nor the buffer for rendered eps-figures. To force +- everything beeing re-read, use (*). +- +- +- Load/kill DVIfile +- +- After typing you may select between to load a +- DVIfile and to kill a DVIfile. +- +- Loading a DVIFile: +- +- tmview will look for a file-bookmark belonging to that +- file. If there is one, it becomes the current +- file-bookmark. The DVIfile will be shown as left, and +- any defined manual-bookmarks are accessable by +- . When loading a DVIfile for the first time, a new +- file-bookmark will be generated. This will be setup +- with default values from the command-line options and +- won't contain any manual-bookmarks. +- +- Killing a DVIfile: +- To kill a DVIfile means to kill its file-bookmark and +- any related manual-bookmark. Killing a DVIfile won't +- hurt the file itself. You don't have to kill a +- DVIfile just to load another one. +- +- Quit tmview +- +- When quitting, a startup-file will be written. When +- running tmview next time, you will find almost +- everything as you left it. +- +- +-********************************************************** +-End of help*********************************************** +-\n\n\n" ++#define HELPSTR "\n" \ ++"LIST OF COMMANDS WITH TYPICAL ARGUMENTS ************ V 01.03\n" \ ++"\n" \ ++" / goto previous/next page \n" \ ++"(NUM) goto page NUM w.r.t. TeX-counters\n" \ ++" /// scroll the visible area\n" \ ++" / make scrolling finer/coarser\n" \ ++" center visible area\n" \ ++" <+>/<-> zoom in/out\n" \ ++"(NUM) set zoom-factor to NUM\n" \ ++"\n" \ ++" set a bookmark\n" \ ++" move to a bookmark\n" \ ++" <^> move back\n" \ ++"\n" \ ++" display options \n" \ ++" toggle statusline-information\n" \ ++" set unit of measurement\n" \ ++"\n" \ ++" show/hide screenmark and pagemark\n" \ ++" set pagemark at screenmark position\n" \ ++" show/hide marked rectangle\n" \ ++"

show/hide printable area\n" \ ++" set page-offset and -size\n" \ ++"\n" \ ++" show/hide half-hyper-tex-mark\n" \ ++" move to next href\n" \ ++" follow current href\n" \ ++"\n" \ ++" search for text\n" \ ++" <*> re-read DVIfile, fonts, eps-figures\n" \ ++" load/kill DVIfile\n" \ ++" quit tmview\n" \ ++"\n" \ ++"\n" \ ++"GENERAL USAGE *******************************************\n" \ ++"\n" \ ++"When everything is setup right, visiting a DVIfile with\n" \ ++"tmview just means to navigate the visible area along that\n" \ ++"file, using the cursor-keys. Some of the following\n" \ ++"commands obviously require an argument, f.e. .\n" \ ++"Arguments are to be entered BEFORE executing a command.\n" \ ++"When executed by hitting the corresponding uppercase key,\n" \ ++"you will be asked for the argument. While the\n" \ ++"user-interface of tmview is meant to save keystrokes, it\n" \ ++"is not too intuitive. You may either read the following\n" \ ++"instructions, or just do .\n" \ ++"\n" \ ++"The cursor-keys and are taken as \n" \ ++"resp. . The keys and select the first\n" \ ++"resp. the last page. The cursor-keys \n" \ ++"and do resp. . All in all this\n" \ ++"means, that the cursor-keys do what they are meant to.\n" \ ++"\n" \ ++"When a mouse is connected, it moves any visible mark. When\n" \ ++"the right or left mousebutton is no good for anything\n" \ ++"else, moving the mouse while holding that button acts on\n" \ ++"the visible area instead. (That sounds bad, but works out\n" \ ++"fine) When the screenmark is shown (see ), the left\n" \ ++"mouse-button sets the pagemark (see ) and the right\n" \ ++"button marks a rectangle (see ). When the\n" \ ++"half-hyper-mark is shown, the left mouse-button follows\n" \ ++"the current href, if any.\n" \ ++"\n" \ ++"*********************************************************\n" \ ++"NON-INTUITIVE USER-INTERFACE ****************************\n" \ ++"*********************************************************\n" \ ++"\n" \ ++"To explain the way tmview expects to receive commands, a\n" \ ++"short nomenclature used in the sequel is given:\n" \ ++" \n" \ ++"Any text within `<' and `>' represents a single keystroke,\n" \ ++"while `(' and `)' mark the beginning resp. the end of a\n" \ ++"string to enter. So is about to hit the key named `h'\n" \ ++"and (25.4) could stand for <2><5> <.><4>. The carriage-\n" \ ++"return-key is referred by , the backspace-key or \n" \ ++"delete-key by and the escape-key by . Almost \n" \ ++"whenever a string is expected by tmview, you may use \n" \ ++"to remove the last character you typed. So even\n" \ ++"<2><5><6><.><4> results in (25.4). Note that a string\n" \ ++"does not need to be terminated by . To simplify a\n" \ ++"reference to a string, in this text any uppercase letters\n" \ ++"within `(' and `)' are not meant as a string, but as the\n" \ ++"name of some string. So we may read something like\n" \ ++"`(PP) scrolls PP percent to the left' as `typing in any\n" \ ++"number just before results in scrolling left according\n" \ ++"to that number'.\n" \ ++"\n" \ ++"\n" \ ++"COMMANDS AND ARGUMENTS***********************************\n" \ ++"\n" \ ++"A command is executed by typing its name, which consists\n" \ ++"of a single character. Some of the above listed commands\n" \ ++"take numerical arguments. Arguments are always\n" \ ++"optional. They may be entered before executing the\n" \ ++"command. Multiple arguments are separated by <,> or\n" \ ++"<;>. If no argument is passed, a default is used. If an\n" \ ++"argument is passed, it serves as the default for following\n" \ ++"commands. Commands doing similar things share the same\n" \ ++"default arguments.\n" \ ++"\n" \ ++"Example: \n" \ ++"Typing (10) results in scrolling 10% to the left and\n" \ ++"sets the default for any scrolling commands to 10%. Thus\n" \ ++"typing afterwards results in scrolling 10% to the\n" \ ++"right.\n" \ ++"\n" \ ++"\n" \ ++"MAGIC ARGUMENT*******************************************\n" \ ++"\n" \ ++"As a special argument some commands accept the magic\n" \ ++"argument <*>. It is used either to vary the command in\n" \ ++"some way or to get the arguments from another place. <#>\n" \ ++"is equivalent to <*> and saves you from holding down the\n" \ ++"shift-key on some keyboards.\n" \ ++"\n" \ ++" for example centers the visible area. It excepts as\n" \ ++"argument the point which will be taken as origin. Since\n" \ ++"this will become the default for a future , you may\n" \ ++"measure out the origin only once. Even quicker it is to\n" \ ++"position the visible area by scrolling and then to do a\n" \ ++"<*>. This results in taking the current position as\n" \ ++"centered and so as default for a coming .\n" \ ++"\n" \ ++"As another example look at the command , which moves\n" \ ++"pages forward, according to a given argument resp. a\n" \ ++"default. By moving on the next page there are two modi\n" \ ++"available: 1. keep the visible area; 2. do center like\n" \ ++". <*> toggles between these two modi. So in this\n" \ ++"case <*> acts as a kind of flag argument.\n" \ ++"\n" \ ++"\n" \ ++"\n" \ ++"SELECTING THE PAGE****************************************\n" \ ++"\n" \ ++"/ Select a page relative to the current page. \n" \ ++"\n" \ ++" moves towards the beginning of the DVIfile, while\n" \ ++" moves towards the end. A single argument (N) may\n" \ ++" specify the amount of movement in pages. However, (N)\n" \ ++" will NOT become the default value. The argument is (*), \n" \ ++" the page-moving-mode is toggled. See above. \n" \ ++"\n" \ ++" Example: \n" \ ++" (1) selects the previous page selects the next\n" \ ++" page\n" \ ++"\n" \ ++" Select a page with respect to TeX counters. \n" \ ++"\n" \ ++" A list of ten arguments (COUNT0; COUNT1; ... COUNT9)\n" \ ++" specifies the page to be selected. <*> may be used as\n" \ ++" wildcard. If there are more than one but less than ten\n" \ ++" arguments given, the others will be taken as <*>.\n" \ ++"\n" \ ++" Example: \n" \ ++" (26) selects the first page after the current page\n" \ ++" with a value of 26 in \\count0.\n" \ ++"\n" \ ++"\n" \ ++"\n" \ ++"MOVING AROUND ON CURRENT PAGE ******************************\n" \ ++"\n" \ ++"/// Scrolling the visible area\n" \ ++"\n" \ ++" A single argument (PP) may be used to specify the\n" \ ++" amount of scrolling in percent of the\n" \ ++" screen-width. / resp. /down> both accept\n" \ ++" the argument (*) to toggle between: 1. stay on the\n" \ ++" current page; 2. scroll over pages. When scrolling\n" \ ++" over pages, you may view the whole document while\n" \ ++" using only the single key .\n" \ ++"\n" \ ++" Example:\n" \ ++" (20) scrolls 1/5 to the left. \n" \ ++"\n" \ ++"/ Make scrolling finer/coarser\n" \ ++"\n" \ ++" These commands change the default argument for the\n" \ ++" above scrolling- commands. So and don't move\n" \ ++" the visible area at all, but they change the way the\n" \ ++" scrolling-commands act.\n" \ ++"\n" \ ++" Center the visible area\n" \ ++"\n" \ ++" Without any argument centers horizontally only,\n" \ ++" while centers in both directions.\n" \ ++" When two arguments (X,Y) are given, they describe\n" \ ++" the point on the page, which will become the middle\n" \ ++" of the visible area. When the argument (*) is given,\n" \ ++" the current position is taken as centered. When the\n" \ ++" screenmark is shown (see below ), and the\n" \ ++" argument (*) is given, the position of the\n" \ ++" screenmark becomes the center. This does move the\n" \ ++" visible area, but it does not move the screenmark.\n" \ ++"\n" \ ++"\n" \ ++"ZOOMING ****************************************************\n" \ ++"\n" \ ++" Set the zoom-factor\n" \ ++" \n" \ ++" This command requires one argument (F) which must be\n" \ ++" between 0.05 and 2. F will become the zoom-factor\n" \ ++" and the visible-area will be redrawn. Use (*) to \n" \ ++" adjust the zoom-factor such that the page horizontaly \n" \ ++" fits the visible-area.\n" \ ++"\n" \ ++" If the zoom-factor is 1, the pixels found in pk-files \n" \ ++" are just copied one by one to the screen. Since the\n" \ ++" resolution of our days screens seems to be less than\n" \ ++" that of our days printers, and since you may still\n" \ ++" want to use the same pk-files for printing and\n" \ ++" viewing, F=1 usually results in a magnification. So\n" \ ++" when you're just reading some text in some DVIfile\n" \ ++" you will set F to something like 0.3, depending on\n" \ ++" the involved resolutions. When the screenmark is\n" \ ++" visible (see ) the position of the screenmark is\n" \ ++" taken as the origin of zooming, i.e. it is fixed. \n" \ ++" When the screenmark is not visible, the middle of the \n" \ ++" screen is fixed. The current zoom-factor is displayed \n" \ ++" in the optional statusline, see .\n" \ ++"\n" \ ++" There are two zooming modi. The integer modus \n" \ ++" requieres 1/f to be an integer. This modus is quite \n" \ ++" fast, so good values are F=0.5, 0.333, 0.25, 0.2, \n" \ ++" 0.167 etc. The good thing about the slow modus is, \n" \ ++" that it allows you to choose the zoom-factor \n" \ ++" arbitrary (between 0.05 and 2). So poor students with \n" \ ++" small screens might find some optimum to make the \n" \ ++" text fit and still be readable. The bad thing about \n" \ ++" the slow modus is that it is slow. But since once \n" \ ++" zoomed glyphs are kept in memory, this slowness only \n" \ ++" hurts the first few pages after changing the\n" \ ++" zoom-factor. Modus selection is done by the display \n" \ ++" options . \n" \ ++"\n" \ ++"<+>/<-> Zoom in/out\n" \ ++"\n" \ ++" Increase/decrease the zoom-factor. When in the fast\n" \ ++" modus, step through the fast values only (see\n" \ ++" above). When an argument (PP) is given, it is taken\n" \ ++" as the amount of increasing/decreasing in percent of\n" \ ++" the current zoom-factor. This is likely to result in\n" \ ++" the slow modus.\n" \ ++"\n" \ ++"\n" \ ++"BOOKMARKS **************************************************\n" \ ++"\n" \ ++"A bookmark remembers what is seen on the screen. That is\n" \ ++"the DVIfile, the page within that file, the position of the\n" \ ++"visable area and the zoom-factor. There are three kind of\n" \ ++"bookmarks ...\n" \ ++"\n" \ ++"file-bookmarks:\n" \ ++"Each file visited has a file-bookmark, containing the above\n" \ ++"information about what was seen on the screen when visited\n" \ ++"the last time, plus some information on the file, that is\n" \ ++"the paper-offset and -position, the location of the\n" \ ++"printable-area. file-bookmarks are generated automaticly.\n" \ ++"This results in easy re-visiting a DVIfile: you'll find it\n" \ ++"as left. A file-bookmark is removed by killing the DVIfile\n" \ ++"with , see below.\n" \ ++"\n" \ ++"back-bookmarks:\n" \ ++"When searching a text-string, following a href or moving to\n" \ ++"a bookmark, the position within the DVIfile might be\n" \ ++"changed to somewhere far far away. To simplify recovering\n" \ ++"fromsuch excursions, a back-bookmark will be generated\n" \ ++"automaticly. To prevent getting fed up with thousands of\n" \ ++"back-bookmarks, the total number of theese is limited. See\n" \ ++"<^> below.\n" \ ++"\n" \ ++"manual-bookmarks:\n" \ ++"After all you may install your own bookmarks, marking often\n" \ ++"visited places, say in some manuals. manual-bookmarks are\n" \ ++"named by a number. This number has to be unique whithin\n" \ ++"the DVIfile they belong to. To define a manual-bookmark\n" \ ++"use . Since manual-bookmarks belong to the DVIfile they\n" \ ++"are defined on, they get lost, when that DVIfile is killed\n" \ ++"by .\n" \ ++"\n" \ ++"All kind of bookmarks are kept in a ring-buffer. There is a\n" \ ++"so called current bookmark of each type. Visiting the\n" \ ++"bookmarks along the ring-buffer is done by for file-\n" \ ++"and manual-bookmarks, while <^> acts on back-bookmarks.\n" \ ++"\n" \ ++" Define/undefine manual-bookmark. \n" \ ++"\n" \ ++" When the current position is not already defined as\n" \ ++" a manual-bookmark, defines one. When an single\n" \ ++" numeric argument (NUM) is given, NUM will be the\n" \ ++" name of the newly defined bookmark. With no\n" \ ++" argument, a name will be generated automaticly. See\n" \ ++" below, for how to visit manual-bookmarks. When\n" \ ++" the current position is already defined as a\n" \ ++" manual-bookmark, undefines that manual-bookmark.\n" \ ++"\n" \ ++" Move to bookmark.\n" \ ++"\n" \ ++" When a single numeric argument (NUM) is given, \n" \ ++" moves to the manual-bookmark named NUM, if\n" \ ++" any. Since manual bookmarks are bound to DVIfiles,\n" \ ++" the current DVIfile will never change in that\n" \ ++" case. If no argument is given, goes moves the\n" \ ++" postion either thrue the ring-buffer of\n" \ ++" file-bookmarks or thrue the one of\n" \ ++" manual-bookmarks. To toggle between theese two modi,\n" \ ++" use the magic argument <*>.\n" \ ++"\n" \ ++"<^> Move back\n" \ ++" \n" \ ++" Move to the latest back-bookmark, if any. When a\n" \ ++" single numeric argument (TOTAL) is given, keep the\n" \ ++" TOTAL latest back-bookmarks and discard all the\n" \ ++" others.\n" \ ++"\n" \ ++"\n" \ ++"CHOOSING WHAT'S ON THE DISPLAY *****************************\n" \ ++"\n" \ ++" Display options\n" \ ++"\n" \ ++" This command collects a number of general options \n" \ ++" on how the things get on the screen. Use the cursor\n" \ ++" keys (or ///) to navigate.\n" \ ++"\n" \ ++" > Greyscales. When the zoom-factor is less than 1, \n" \ ++" the glyphs may be displayed using grey-levels, making \n" \ ++" them more smooth. This takes some memory, so you are \n" \ ++" allowed to switch it off. On high-res displays there \n" \ ++" is no need for greyscaling anyway.\n" \ ++"\n" \ ++" > Eps-rendering. There is limited support for \n" \ ++" rendering eps-files by running ghostscript. However, \n" \ ++" this sometimes is quite slow and memory intensive, so \n" \ ++" you may turn it off. If rendering is enabled the \n" \ ++" results are buffered. Hence, if the eps-files are \n" \ ++" updated by some graphics program, you need to do a \n" \ ++" <*> to force rerendering. To disable certain \n" \ ++" eps-files individually, abort the rendering process \n" \ ++" by .\n" \ ++"\n" \ ++" > Double-page. There is also limited support for \n" \ ++" viewing two pages beside each other. Again their\n" \ ++" is some memory required to keep it all buffered.\n" \ ++" You may disable double paged viewing entirely. You\n" \ ++" may let tmview deceide on basis of the zoom-factor.\n" \ ++" Or you may permanently enable this feature.\n" \ ++"\n" \ ++" > Zooming. There is a fast zooming mode allowing\n" \ ++" only zomming by 1/f where f is required to be an\n" \ ++" integer. And there is an arbitrary mode to be\n" \ ++" selected.\n" \ ++"\n" \ ++" Toggle statusline-information\n" \ ++"\n" \ ++" While the standard statusline shows you the\n" \ ++" page-number of the current page and the arguments\n" \ ++" you are about to enter, you may select optional\n" \ ++" information for measuring out distances and so. See\n" \ ++" below.\n" \ ++"\n" \ ++" Set unit of measurement\n" \ ++"\n" \ ++" Whenever you specify arguments which are to describe\n" \ ++" a point on the page, this is done w.r.t. a unit of\n" \ ++" measurement, i.e. cm, mm, a.s.o.. This unit is also\n" \ ++" used, when the position of a mark is displayed in\n" \ ++" the statusline.\n" \ ++"\n" \ ++"\n" \ ++"MEASURING **************************************************\n" \ ++"\n" \ ++"To allow you to measure distances on the page, there are\n" \ ++"two marks, the screenmark, which is fixed on the physical\n" \ ++"screen you're looking at, and the pagemark, which is fixed\n" \ ++"on the DVIfiles page. When you move the visible-area, the\n" \ ++"screenmark acts as drawn with edding on your monitor. The\n" \ ++"pagemark acts as drawn on the page. The optional statusline\n" \ ++"tells the position of the pagemark relative to the corner\n" \ ++"of the sheet of paper you're viewing. It also tells the\n" \ ++"position of the screenmark relative to the pagemark. To\n" \ ++"measure distances you first may switch this marks on, using\n" \ ++". When the marks are shown, the scrolling commands don't\n" \ ++"act on the visible area anymore, but move the screenmark. \n" \ ++"For that case only moving the screenmark at the boarder of\n" \ ++"the screen results in scrolling. To move the pagemark just\n" \ ++"move the screenmark at the desired position and use to\n" \ ++"make the pagemark follow.\n" \ ++" \n" \ ++" Show/hide screenmark and pagemark\n" \ ++"\n" \ ++" This commands takes the two arguments\n" \ ++" (PM_X;PM_Y). The pagemark is put at position PM_X\n" \ ++" PM_Y w.r.t. the upper left corner of the page. The\n" \ ++" Screenmark may be moved with the scrolling-commands.\n" \ ++"\n" \ ++" Set pagemark at the position of the screenmark\n" \ ++" \n" \ ++"Beside of these marks there are three rectangles for\n" \ ++"measurement. First there is the boarder of the paper setup\n" \ ++"by the command-line options -h,-v and -p. Then there is\n" \ ++"the printable area, setup with the -k command-line option.\n" \ ++"Third the so called marked rectangle used.\n" \ ++"\n" \ ++" Show/hide marked rectangle\n" \ ++"\n" \ ++" The four arguments (LEFT,TOP,WIDTH,HIGHT) specify\n" \ ++" the position on page an the size of the marked\n" \ ++" rectangle. When pagemark and screenmark are shown,\n" \ ++" their positions are used as default. When they are\n" \ ++" hidden, the last position of the marked rectangle is\n" \ ++" used as default.\n" \ ++"\n" \ ++"

Show/hide printable area \n" \ ++" \n" \ ++" The four arguments (LEFT,RIGHT,TOP,BOTTOM) specify\n" \ ++" the margins of the printable area, w.r.t. the\n" \ ++" boarder of the page. When pagemark and screenmark\n" \ ++" are shown, the argument (*) sets the printable area\n" \ ++" to the rectangle described by screenmark and\n" \ ++" pagemark. When they are hidden, (*) takes the\n" \ ++" command-line-options resp. defaults -k of the\n" \ ++" printable area.\n" \ ++"\n" \ ++" Set paper-offset and -size \n" \ ++"\n" \ ++" The four arguments (HOFF;VOFF;WIDTH;HEIGHT) specify\n" \ ++" the boarder of the page. Have the top-left corner of\n" \ ++" a sheet of paper in mind. Then (HOFF,VOFF) is the\n" \ ++" offset of the DVIfile's origin to the left boarder\n" \ ++" of the paper. Standard values are\n" \ ++" HOFF=VOFF=2.54cm. WIDTH and HEIGHT are the width and\n" \ ++" the height of the sheet of paper. The sheet of paper\n" \ ++" is represented only by a frame on the screen. It\n" \ ++" does not affect the drawing of the DVIfile.\n" \ ++"\n" \ ++" When pagemark and screenmark are shown, the argument\n" \ ++" (*) sets the boarder of the page to the rectangle\n" \ ++" described by screenmark and pagemark. When they are\n" \ ++" hidden, (*) takes the command-line-options\n" \ ++" resp. defaults -h,-v and -p.\n" \ ++"\n" \ ++"\n" \ ++"HALF-HYPER *************************************************\n" \ ++"\n" \ ++"tmview does some of the fancy hyper-tex things. I talk\n" \ ++"about HALF-hyper-tex, because tmview follows only links\n" \ ++"which point to somewhere within the currently visited\n" \ ++"dvi-file. So there is no connection to the net or so. But\n" \ ++"you might find it usefull (when editing a major project) to\n" \ ++"view an equation number this-and-that by clicking on\n" \ ++"this-and-that whereever the text refers to that equation.\n" \ ++"For information about hyper-tex, related macropackages and\n" \ ++"fully compatible viewer scan the net ...\n" \ ++"\n" \ ++" Show/hide half-hyper-mark\n" \ ++" Goto next href\n" \ ++" Follow current href, if any \n" \ ++"\n" \ ++"\n" \ ++"MISC *******************************************************\n" \ ++"\n" \ ++" Search for text\n" \ ++"\n" \ ++" You will be asked for the text-string to be searched.\n" \ ++" You may enter a regular expression describing that\n" \ ++" string, that includes especially just to enter the\n" \ ++" string as it is.\n" \ ++"\n" \ ++" tmview will take the entire DVIfile as one huge\n" \ ++" text-string and then search for the next substring,\n" \ ++" fitting the regular expression you've enterd. Thereby\n" \ ++" \"next\" is ment with respect to the current page.\n" \ ++"\n" \ ++" So far this sounds quite easy, but there are some ugly\n" \ ++" details, based on the fact, that a DVIfile contains\n" \ ++" information on how to draw a bitmap representing your\n" \ ++" text. It does not contain information about from what\n" \ ++" characters in which order your text is made up. Even\n" \ ++" the PKfiles used to draw your text consist only of\n" \ ++" lots of glyphs but no character-codes, like ASCII or\n" \ ++" so. Building a huge text-string from a DVIfile is some\n" \ ++" kind of guessing.\n" \ ++"\n" \ ++" Fisrt: What kind of huge-string is build from the DVIfile?\n" \ ++"\n" \ ++" This string will consists of the letters ... ,\n" \ ++" ... , the accent <\"> and the digits <0>\n" \ ++" ... <9>. It does NOT contain anything else, like\n" \ ++" , or <->:\n" \ ++" Whenbeingprinteditwouldlooklikethisnotreadableatall. \n" \ ++" Taking the DVIfile as huge string allows you to find\n" \ ++" all locations of a sub-string, say\n" \ ++" \"commandlineoptions\", even those that are seperarted\n" \ ++" by linebreaks (and hyphens) or pagebreaks. In turn,\n" \ ++" there is no chance to find all those locations, where\n" \ ++" \"commandlineoptions\" is seperated by a hypenation. To\n" \ ++" keep tmview from being confused by headings, there is\n" \ ++" another rule for building up the huge text-string: any\n" \ ++" glyph outside the printable area (see

) is\n" \ ++" ignored. So you may setup the printable area to ignore\n" \ ++" headings when searching.\n" \ ++"\n" \ ++" Second: How is the huge-string build up?\n" \ ++"\n" \ ++" To translate the list of glyphs found in the DVIfile\n" \ ++" to a text-string, the tfm-files are asked for the\n" \ ++" encoding-scheme. This does work with dc-fonts and\n" \ ++" cm-fonts, since the following encoding-scheme names\n" \ ++" are accepted: \"ASCII\", \"TeX text\", \"TeX math italic\",\n" \ ++" \"TeX math symbols\", \"TeX typewriter text\", \"Extended\n" \ ++" TeX Font Encoding - Latin\", \"Adobe StandardEncoding\".\n" \ ++" The alphanumerics ..., ..., <0> ... <9>\n" \ ++" are copied one by one to the huge text-string. Glyphs\n" \ ++" that \"look like\" a simple alphanumeric will be taken\n" \ ++" as that one it looks like. So the Tex input '\\c o',\n" \ ++" producing an 'o'-with-an-cedilla-accent, will be\n" \ ++" represented as a simple (o) in the text-string. This\n" \ ++" rule also works for all kind of ligatures. The TeX\n" \ ++" input 'ffl\\AE' will be represented by (fflAE). Any\n" \ ++" accent ON TOP of a glyph will be translated to a (\"),\n" \ ++" preceding whatever the glyph without that accent would\n" \ ++" be translated to. The TeX input '\\\"a' producing the\n" \ ++" german umlaut 'a'-with-two-dots-on-top, will be found\n" \ ++" as (\"a) in the generated text-string. The TeX input\n" \ ++" '\\aa' producing the scandinavian\n" \ ++" 'a'-with-circle-on-top will be found as (\"a) too. Any\n" \ ++" other glyphs are ignored.\n" \ ++"\n" \ ++" Third: In what does the above result?\n" \ ++"\n" \ ++" Visiting english documents, say manuals to some\n" \ ++" computer related stuff like elisp.dvi, searching for\n" \ ++" keywords works fine. Searching in documents in which\n" \ ++" extensive use of accents and funny characters is made\n" \ ++" works too, but requires some luck or/and experiance in\n" \ ++" how TeX acts on such things.\n" \ ++"\n" \ ++"\n" \ ++" Example: \n" \ ++"\n" \ ++" Take the file story.tex from the TeXbook, chapter 6, \n" \ ++" page 24. It contains the line\n" \ ++" galaxy called \\\"O\\\"o\\c c,\n" \ ++" The text-string build from the corresponding story.dvi\n" \ ++" will therfore contain\n" \ ++" galaxycalled\"O\"oc\n" \ ++" You may search for ... getting as result ...\n" \ ++" galaxy found\n" \ ++" galaxycalled found\n" \ ++" galaxy called not found\n" \ ++" d\" found\n" \ ++" galaxy.*\"O\"oc found\n" \ ++" Ooc not found\n" \ ++" \n" \ ++" \n" \ ++" Re-read current DVIfile and re-draw screen.\n" \ ++"\n" \ ++" Note: will not re-initialize the fontdatabase,\n" \ ++" nor the buffer for rendered eps-figures. To force\n" \ ++" everything beeing re-read, use (*).\n" \ ++"\n" \ ++"\n" \ ++" Load/kill DVIfile\n" \ ++"\n" \ ++" After typing you may select between to load a \n" \ ++" DVIfile and to kill a DVIfile. \n" \ ++" \n" \ ++" Loading a DVIFile: \n" \ ++"\n" \ ++" tmview will look for a file-bookmark belonging to that\n" \ ++" file. If there is one, it becomes the current\n" \ ++" file-bookmark. The DVIfile will be shown as left, and\n" \ ++" any defined manual-bookmarks are accessable by\n" \ ++" . When loading a DVIfile for the first time, a new\n" \ ++" file-bookmark will be generated. This will be setup\n" \ ++" with default values from the command-line options and\n" \ ++" won't contain any manual-bookmarks.\n" \ ++"\n" \ ++" Killing a DVIfile:\n" \ ++" To kill a DVIfile means to kill its file-bookmark and\n" \ ++" any related manual-bookmark. Killing a DVIfile won't\n" \ ++" hurt the file itself. You don't have to kill a\n" \ ++" DVIfile just to load another one.\n" \ ++"\n" \ ++" Quit tmview \n" \ ++" \n" \ ++" When quitting, a startup-file will be written. When\n" \ ++" running tmview next time, you will find almost\n" \ ++" everything as you left it.\n" \ ++"\n" \ ++"\n" \ ++"**********************************************************\n" \ ++"End of help***********************************************\n" \ ++"\n\n\n" + + char helpstr[]=HELPSTR; + +--- tmview-01.03.orig/src/readpk.c ++++ tmview-01.03/src/readpk.c +@@ -752,10 +752,10 @@ + theChar->bmp2.h = CEIL(theChar->bmp.h / fshrink) +2; + + if(firstrows<=0 || firstcols<=0) +- pfprot("IMPORTANT DEBUGINFORMATION +-break with fro %d fco %d +-fshr %f hof %d vof %d hof2 %d vof2 %d\n",firstrows,firstcols, +- fshrink,theChar->hof,theChar->vof,theChar->hof2,theChar->vof2); ++ pfprot("IMPORTANT DEBUG INFORMATION\n" ++ "break with fro %d fco %d\n" ++ "fshr %f hof %d vof %d hof2 %d vof2 %d\n",firstrows,firstcols, ++ fshrink,theChar->hof,theChar->vof,theChar->hof2,theChar->vof2); + + + theChar->bmp2.type=GREYSCALE; +@@ -877,8 +877,8 @@ + exit(1); + } + +-/*pfprot("DEBUG +-fshr %f hof %d vof %d hof2 %d vof2 %d\n", ++/*pfprot("DEBUG\n" ++ "fshr %f hof %d vof %d hof2 %d vof2 %d\n", + fshrink, theChar->hof,theChar->vof,theChar->hof2,theChar->vof2); + pfprot("srcw %d srch %d destw %d desth %d \n", + theChar->bmp.w,theChar->bmp.h,theChar->bmp2.w,theChar->bmp2.h); */ +@@ -902,8 +902,8 @@ + topweight=1-(CEIL(fi)-fi); + botweight=1-((fi-frows)-FLOOR(fi-frows)); + +- /* pfprot("\nrow info at fi %f +-fr %f tw %f bw %f oy %d oh %d iy %d ih %d\n", ++ /* pfprot("\nrow info at fi %f\n" ++ "fr %f tw %f bw %f oy %d oh %d iy %d ih %d\n", + fi,frows,topweight,botweight,oy,oh,iy,ih); */ + + m= BITS_PER_BMUNIT -GREYSCALE; +@@ -919,8 +919,8 @@ + ix=MIN(CEIL(fj)+theChar->hof,theChar->bmp.w); + iw=MAX(0,MIN(FLOOR(fj+fcols)-CEIL(fj),theChar->bmp.w-ix)); + +- /*pfprot(" col info at fj %f +- fc %f ox %d ow %d ix %d iw %d\n",fj,fcols,ox,ow,ix,iw);*/ ++ /*pfprot(" col info at fj %f\n" ++ "fc %f ox %d ow %d ix %d iw %d\n",fj,fcols,ox,ow,ix,iw);*/ + + leftweight=1-(fj-FLOOR(fj)); + rightweight=1-(CEIL(fj+fcols)-fj-fcols); +@@ -1039,10 +1039,10 @@ + theChar->bmp2.h = CEIL(theChar->bmp.h / fshrink) +2; + + if(firstrows<=0 || firstcols<=0) +- pfprot("IMPORTANT DEBUGINFORMATION +-break with fro %d fco %d +-fshr %f hof %d vof %d hof2 %d vof2 %d\n",firstrows,firstcols, +- fshrink, theChar->hof,theChar->vof,theChar->hof2,theChar->vof2); ++ pfprot("IMPORTANT DEBUG INFORMATION\n" ++ "break with fro %d fco %d\n" ++ "fshr %f hof %d vof %d hof2 %d vof2 %d\n",firstrows,firstcols, ++ fshrink, theChar->hof,theChar->vof,theChar->hof2,theChar->vof2); + + + theChar->bmp2.w = CEIL(theChar->bmp.w / fshrink) +2; +--- tmview-01.03.orig/lX/writelx.c ++++ tmview-01.03/lX/writelx.c +@@ -129,9 +129,9 @@ + if(ibytes_per_pixel == 3) ibytes_per_pixel =4; + + if(ibytes_per_pixel != IBYTES_PER_PIXEL) { +- pfprot("\n +-warning: display: found %d-bit depth while optimized for %d-bit. +- Recompile for better performance.\n", offimage->depth, IBYTES_PER_PIXEL*8); ++ pfprot("\n" ++ "warning: display: found %d-bit depth while optimized for %d-bit.\n" ++ "Recompile for better performance.\n", offimage->depth, IBYTES_PER_PIXEL*8); + setvar(); + } else { + pfverb("writelx: using built in %d-bit pixmap functions on a %d-bit display\n", --- tmview-01.03.orig/debian/patches/205_misc_bugs.diff +++ tmview-01.03/debian/patches/205_misc_bugs.diff @@ -0,0 +1,52 @@ +--- tmview-01.03.orig/svga/defssvga.h ++++ tmview-01.03/svga/defssvga.h +@@ -14,6 +14,7 @@ + */ + + #define _GNU_SOURCE ++#define HAVE_PROTOTYPES + + #include + #include +--- tmview-01.03.orig/src/tmview.c ++++ tmview-01.03/src/tmview.c +@@ -70,7 +70,7 @@ + numberargmode=NAFRAC; + if(ch=='*' || ch=='#') + numberargmode=NAONLYE; +- if(ch >=0 && ch <= '9') ++ if(ch >='0' && ch <= '9') + numberargmode=NAINTE; + if(ch=='+' || ch=='-') + numberargmode=NAINT; +--- tmview-01.03.orig/fb/defsfb.h ++++ tmview-01.03/fb/defsfb.h +@@ -14,6 +14,7 @@ + */ + + #define _GNU_SOURCE ++#define HAVE_PROTOTYPES + + #include + #include +--- tmview-01.03.orig/lX/writelx.c ++++ tmview-01.03/lX/writelx.c +@@ -1381,7 +1381,7 @@ + pfprot("(configure notify for %ld flag %d: geometry: %dx%d+%d+%d)\n", + conev->window,conev->send_event,geow,geoh,geox+geodx,geoy+geody); + #endif +- pfprot("(oldsize %d %d)",vgaxdim,truevgaydim); ++ /* pfprot("(oldsize %d %d)",vgaxdim,truevgaydim); */ + newxdim = MAX(VGAXDIMMIN,conev->width); + newydim = MAX(VGAYDIMMIN,conev->height); + if(newxdim==vgaxdim && newydim==truevgaydim) break; +--- tmview-01.03.orig/lX/defslx.h ++++ tmview-01.03/lX/defslx.h +@@ -14,6 +14,7 @@ + */ + + #define _GNU_SOURCE ++#define HAVE_PROTOTYPES + + #include + #include