--- troffcvt-1.04.orig/debian/README.source +++ troffcvt-1.04/debian/README.source @@ -0,0 +1,41 @@ +troffcvt source package handling +================================ + +troffcvt is shipped by upstream as several tarballs, resulting in a rather +arcane source package. + +This is rather a mess, and should be redone with a packaged system instead +of rolling our own. + +Generating fully-patched source +------------------------------- + + debian/rules patch + +This produces the source code, in the form that will be built, under a +collection of SUBPACKAGE or SUBPACKAGE-VERSION directories. + +Making source modifications +--------------------------- + +To make modifications to the source code, first take a copy of the +subpackage (e.g. 'cp -a troffcvt-1.04 troffcvt-1.04.orig'), edit the files +in the unpacked subpackage directory, and then run 'diff -Nurp +troffcvt-1.04.orig troffcvt-1.04 > patches/NAME.diff' (or similar) to save +the patch for later application. NAME *must* be identical to the name of the +subpackage directory (e.g. emt or troffcvt-1.04). + +Remove the .orig directory when you're finished. + +Removing source modifications +----------------------------- + +Simply remove the file under patches/, or move it to a different location. + +Upgrading to a new upstream version +----------------------------------- + +Replace the tarballs in tarballs/, adjust patches/* as necessary, construct +a new .orig.tar.gz consisting of just the tarballs/ directory (compare the +construction of the current .orig.tar.gz) and bump the upstream part of the +version number in debian/changelog. --- troffcvt-1.04.orig/debian/changelog +++ troffcvt-1.04/debian/changelog @@ -0,0 +1,224 @@ +troffcvt (1.04-26) unstable; urgency=medium + + [ Logan Rosen ] + * patches/WRPRC-2.11.diff: Change ar command to use cq instead of clq to + fix compatibility with binutils 2.36 (closes: #983264). + + -- Colin Watson Tue, 24 May 2022 23:01:30 +0100 + +troffcvt (1.04-25) unstable; urgency=medium + + [ Ondřej Nový ] + * d/changelog: Remove trailing whitespaces + * d/rules: Remove trailing whitespaces + + [ Debian Janitor ] + * Drop no longer supported add-log-mailing-address setting from + debian/changelog. + * Bump debhelper from deprecated 7 to 12. + * Set debhelper-compat version in Build-Depends. + + -- Colin Watson Mon, 08 Feb 2021 21:45:52 +0000 + +troffcvt (1.04-24) unstable; urgency=medium + + * Switch to git; adjust Vcs-* fields. + * Expand out the canned "build-easy-library" recipe in debian/rules; the + use of a nested canned recipe doesn't seem to work with recent versions + of GNU make (closes: #894563). + * Change priority to optional, since "Priority: extra" is now deprecated. + + -- Colin Watson Sun, 01 Apr 2018 23:43:17 +0100 + +troffcvt (1.04-23) unstable; urgency=medium + + * Depend on perl, not perl5 (thanks, Dominic Hargreaves; closes: #808324). + + -- Colin Watson Fri, 18 Dec 2015 16:57:36 +0000 + +troffcvt (1.04-22) unstable; urgency=low + + * Add a Homepage field. + * Simplify debian/rules using /usr/share/dpkg/buildflags.mk. + * Use "find -perm /111" rather than "find -perm +111" (closes: #803018). + + -- Colin Watson Tue, 27 Oct 2015 11:45:05 +0000 + +troffcvt (1.04-21) unstable; urgency=low + + * Use dpkg-buildflags to enable hardening options. + * Build-depend on groff for the -ms macros. + + -- Colin Watson Fri, 22 Jun 2012 14:34:34 +0100 + +troffcvt (1.04-20) unstable; urgency=low + + * Update Vcs-Bzr field for Alioth changes. + * Add build-arch and build-indep targets. + * Add ${misc:Depends}. + + -- Colin Watson Sat, 12 Nov 2011 12:51:38 +0000 + +troffcvt (1.04-19) unstable; urgency=low + + * Quote ConfigRootDir in WRPRC-2.11/config/site.def so that words in the + directory name that happen to correspond to imake definitions aren't + expanded. Should fix current build failures on kfreebsd-i386 and sparc. + + -- Colin Watson Sat, 20 Feb 2010 23:40:54 +0000 + +troffcvt (1.04-18) unstable; urgency=low + + * Upgrade to debhelper v7. + + -- Colin Watson Mon, 07 Sep 2009 02:09:51 +0100 + +troffcvt (1.04-17) unstable; urgency=low + + * Add a debian/rules patch target. + * Add debian/README.source explaining our (messy) source package handling. + * Imported into a branch on bzr.debian.org; add Vcs-Bzr control field. + * Build-depend on xutils-dev (for makedepend and imake) rather than the + obsolete xutils (closes: #485223). + + -- Colin Watson Fri, 05 Sep 2008 17:40:11 +0100 + +troffcvt (1.04-16) unstable; urgency=low + + * patches/WRPRC-2.11.diff: + - Don't strip binaries on 'make install'; let dh_strip do that according + to DEB_BUILD_OPTIONS (closes: #438221). + * Use debhelper v4. + * patches/troffcvt-1.04.diff: + - Always include (I don't know how to fix the Imake + configuration to detect it properly ...). + - Remove contents of troffcvt-1.04/config/linux-pmac.p-cf, which serve + only to interfere with our attempts to set groff's macro path + correctly on powerpc. + - Fix handling of tbl separator characters that also happen to be Perl + regex metacharacters (thanks, Lars Helgeland; closes: #255132). + * Correct tc2text(1) to talk about unroff rather than troff2text, though + also create troff2text as a convenience symlink (closes: #397079). + + -- Colin Watson Sun, 19 Aug 2007 11:28:12 +0100 + +troffcvt (1.04-15) unstable; urgency=low + + * Tweak short description for lintian's benefit. + * Build msub with debugging symbols. + * patches/msub-1.13.diff: Include , , and + in msub.c rather than the incomplete list of manual prototypes. This + seems to get rid of valgrind's complaints, so I think should fix the + reported segfault; if it doesn't, please reopen (closes: #173010). + * Policy version 3.5.6. Still need to sort out how to compile everything + with debugging symbols in order to comply with later versions. + + -- Colin Watson Sat, 14 Dec 2002 17:12:03 +0000 + +troffcvt (1.04-14) unstable; urgency=low + + * patches/troffcvt-1.04.diff: OK, so I should have better thought out how + to handle groff's versioned library directory. Use 1.17.1-1's new + 'current' symlink. + * debian/control: Bump groff dependency to >= 1.17.1-1. + + -- Colin Watson Sat, 23 Jun 2001 01:47:19 +0100 + +troffcvt (1.04-13) unstable; urgency=low + + * New maintainer (closes: #100267). + * Modernize packaging somewhat. Moved debian/mk-binary into debian/rules. + * Compress all upstream changelogs and link the latest to changelog.gz. + * 'set -e' all over the place so that I know when things fail. + * patches/troffcvt-1.04.diff: + - Change to so that it builds (closes: #100643). + - Cope with groff 1.17's macro file name changes (versioned macro + directory, tmac.* -> *.tmac). Depend on groff (>= 1.17) as a result. + + -- Colin Watson Wed, 13 Jun 2001 01:49:16 +0100 + +troffcvt (1.04-12) unstable; urgency=low + + * Added xutils to Build-Depends; closes: #93111 + + -- Dr. Guenter Bechly Mon, 16 Apr 2001 09:41:35 +0200 + +troffcvt (1.04-11) unstable; urgency=low + + * Fixed error in post-installation script; closes: #92170 + + -- Dr. Guenter Bechly Fri, 30 Mar 2001 10:33:35 +0200 + +troffcvt (1.04-10) unstable; urgency=low + + * Added Build-Depends in control. + + -- Dr. Guenter Bechly Thu, 29 Mar 2001 15:30:37 +0200 + +troffcvt (1.04-9) unstable; urgency=low + + * Package adopted from new maintainer after negotiation with the previous + maintainer. There was no ITA since the package was already removed from + unstable. + * Slight changes to the mk-binary file to fix some lintian warnings. + + -- Dr. Guenter Bechly Thu, 18 Jan 2001 16:17:23 +0100 + +troffcvt (1.04-8) unstable; urgency=low + + * Migrate to FHS. + + -- Ben Pfaff Sat, 13 Nov 1999 12:53:42 -0500 + +troffcvt (1.04-7) unstable; urgency=low + + * Depend on perl | perl5. + + -- Ben Pfaff Sat, 10 Jul 1999 18:59:41 -0400 + +troffcvt (1.04-6) frozen unstable; urgency=low + + * troff2html: Create temp files securely with tempfile(1). Fixes bug + #29281 reported by Richard Kettlewell . + + * Therefore, depend on debianutils >= 1.6 + + -- Ben Pfaff Fri, 13 Nov 1998 22:27:11 -0500 + +troffcvt (1.04-5) unstable; urgency=low + + * Fix permissions, for real this time. + + -- Ben Pfaff Sun, 22 Feb 1998 14:04:31 -0500 + +troffcvt (1.04-4) unstable; urgency=low + + * Fix permissions. + + -- Ben Pfaff Sun, 15 Feb 1998 15:27:00 -0500 + +troffcvt (1.04-3) unstable; urgency=low + + * Fix standards-version. + + * Add extended description. + + * Compress manpages. + + * Fix manpage permissions. + + -- Ben Pfaff Wed, 11 Feb 1998 18:55:09 -0500 + +troffcvt (1.04-2) unstable; urgency=low + + * chmod debian/mk-binary as executable. (Bug #15682) + + * Fix hardcoded i386 in Makefile. (Bug #15682) + + -- Ben Pfaff Tue, 27 Jan 1998 18:32:09 -0500 + +troffcvt (1.04-1) unstable; urgency=low + + * Initial release. + + -- Ben Pfaff Mon, 10 Nov 1997 19:19:31 -0500 --- troffcvt-1.04.orig/debian/clean +++ troffcvt-1.04/debian/clean @@ -0,0 +1,2 @@ +build-arch +debian/docs --- troffcvt-1.04.orig/debian/control +++ troffcvt-1.04/debian/control @@ -0,0 +1,17 @@ +Source: troffcvt +Section: text +Priority: optional +Maintainer: Colin Watson +Build-Depends: dpkg-dev (>= 1.16.1~), debhelper-compat (= 12), groff, xutils-dev +Standards-Version: 3.5.6 +Homepage: http://www.snake.net/software/troffcvt/ +Vcs-Git: https://salsa.debian.org/debian/troffcvt.git +Vcs-Browser: https://salsa.debian.org/debian/troffcvt + +Package: troffcvt +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, perl, groff (>= 1.17.1-1), debianutils (>= 1.6) +Description: Converts troff source to HTML, RTF, and plain text + Use this package to convert manuals and manpages and other documents + written using troff to more manageable formats, such as HTML, RTF, + or plain text. --- troffcvt-1.04.orig/debian/copyright +++ troffcvt-1.04/debian/copyright @@ -0,0 +1,16 @@ +This is the Debian GNU/Linux prepackaged version of troffcvt, +put together by Dr. Guenter Bechly . + +The sources were obtained at: + ftp://primate.wisc.edu/pub/imake-stuff/WRPRC-2.11.tar.gz + ftp://primate.wisc.edu/pub/ETM/ETM-1.09.tar.gz + ftp://primate.wisc.edu/pub/MemMgr/MemMgr-1.04.tar.gz + ftp://primate.wisc.edu/pub/portlib/portlib-1.01.tar.gz + ftp://primate.wisc.edu/pub/troffcvt/troffcvt-1.04.tar.gz + ftp://primate.wisc.edu/pub/imake-stuff/imboot-1.03.tar.gz + ftp://primate.wisc.edu/pub/imake-stuff/msub-1.13.tar.gz + ftp://primate.wisc.edu/pub/TS/TS-1.08.tar.gz + +Troffcvt is written by Paul Dubois . + +Troffcvt and all associated libraries are in the public domain. --- troffcvt-1.04.orig/debian/dirs +++ troffcvt-1.04/debian/dirs @@ -0,0 +1 @@ +usr/share/doc/troffcvt --- troffcvt-1.04.orig/debian/docs.in +++ troffcvt-1.04/debian/docs.in @@ -0,0 +1,2 @@ +@troffcvt@/README +@troffcvt@/Changes* --- troffcvt-1.04.orig/debian/links +++ troffcvt-1.04/debian/links @@ -0,0 +1,3 @@ +usr/bin/unroff usr/bin/troff2text +usr/share/man/man1/unroff.1 usr/share/man/man1/troff2text.1 +usr/share/doc/troffcvt/Changes-1.04 usr/share/doc/troffcvt/changelog --- troffcvt-1.04.orig/debian/manpages +++ troffcvt-1.04/debian/manpages @@ -0,0 +1 @@ +man/*.1 --- troffcvt-1.04.orig/debian/rules +++ troffcvt-1.04/debian/rules @@ -0,0 +1,273 @@ +#! /usr/bin/make -f +# +# debian/rules file - for troffcvt. +# +# Copyright 1996, 1997 by Ben Pfaff. +# Copyright 2001 by Colin Watson. +# Original Makefile by Ian Jackson. +# +# This Makefile is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# This Makefile is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. +# +# The author may be contacted at on the +# Internet, or as Ben Pfaff, 12167 Airport Rd, DeWitt MI 48820, USA +# through more mundane means. + +export package=troffcvt + +# It's really not a good idea to hard-code this, but we're guaranteed +# a FSSTND filesystem under Debian GNU/Linux so we might as well take +# advantage of it. NOTE: Our utilities must come before /usr/bin, +# otherwise if the package is already installed there may be +# interference. +export PATH=$(CURDIR)/lib:/bin:/usr/bin:/usr/bin/X11 + +export TROFFCVT_LIB_DIR=$(CURDIR)/debian/troffcvt/usr/share/troffcvt + +docdir=usr/share/doc/$(package) + +# troffcvt version. +troffcvt_version = 1.04 + +# Checker with version. +export troffcvt = troffcvt-$(troffcvt_version) + +packages = $(wrprc) $(etm) $(imboot) $(memmgr) $(msub) $(portlib) \ + $(tokenscan) $(troffcvt) + +# Most packages depend on these tools. +tools = lib/_x_ $(imboot)/_b_ $(msub)/_b_ $(wrprc)/_b_ + +# Dependent library versions +wrprc_version = 2.11 +etm_version = 1.09 +imboot_version = 1.03 +memmgr_version = 1.04 +msub_version = 1.13 +portlib_version = 1.01 +tokenscan_version = 1.08 + +# Package directory names +wrprc = WRPRC-$(wrprc_version) +etm = etm +imboot = imboot-$(imboot_version) +memmgr = memmgr-$(memmgr_version) +msub = msub-$(msub_version) +portlib = portlib-$(portlib_version) +tokenscan = tokenscan + +include /usr/share/dpkg/buildflags.mk + +# +# Main targets +# + +build-indep: + +build-arch: + dh_testdir + $(MAKE) -f debian/rules $(troffcvt)/_b_ + touch $@ + +build: build-indep build-arch + +wrprc: $(wrprc)/_b_ +etm: $(etm)/_b_ +imboot: $(imboot)/_b_ +memmgr: $(memmgr)/_b_ +msub: $(msub)/_b_ +portlib: $(portlib)/_b_ +tokenscan: $(tokenscan)/_b_ + +unpack: lib/_x_ config/_x_ $(wrprc)/_x_ $(imboot)/_x_ $(msub)/_x_ \ + $(portlib)/_x_ $(troffcvt)/_x_ memmgr-$(memmgr_version)/_x_ \ + etm/_x_ tokenscan/_x_ + +patch: unpack + +clean: + dh_testdir + dh_clean + -rm -rf $(packages) + -rm -rf config lib + +install: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs + + # Install into debian/troffcvt. + make install install.man -C $(troffcvt) \ + LIBDIR=$(CURDIR)/debian/troffcvt/usr/share/troffcvt \ + USRLIBDIR=$(CURDIR)/debian/troffcvt/usr/share/troffcvt \ + LOCALROOTDIR=$(CURDIR)/debian/troffcvt/usr \ + MANROOT=$(CURDIR)/debian/troffcvt/usr/share/man \ + + # Convert documentation to HTML. + (cd $(troffcvt)/doc; \ + for d in *.ms; do \ + soelim $$d | tblcvt | troff2html -ms tmac.wrprc -a tc.wrprc-html - \ + > ../../debian/troffcvt/usr/share/doc/$(package)/`echo $$d | sed -e 's/\.ms/\.html/'`; \ + done) + +debian/docs: debian/docs.in + sed -e 's,@troffcvt@,$(troffcvt),g' $< > $@ + +binary-indep: build +# There are no architecture-independent files. + +binary-arch: build install debian/docs + dh_testdir + dh_testroot + dh_installdocs + dh_installman + dh_installchangelogs + dh_link + dh_strip + dh_compress $(docdir)/Changes-1.01 $(docdir)/Changes-1.02 \ + $(docdir)/Changes-1.03 $(docdir)/Changes-1.04 + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +# +# Miscellaneous +# + +binary: binary-indep binary-arch + + +.PHONY: binary binary-arch binary-indep install clean + +# +# Build targets. +# +define build-link-farm +set -e; \ +file_list=`find subdir -name \*.[ah] -o -perm /111 -a -type f`; \ +cd lib; \ +for d in $$file_list; do \ + ln -sf ../$$d .; \ +done +endef + +$(imboot)/_b_: lib/_x_ $(imboot)/_x_ + sed $(imboot)/imboot.pl > lib/imboot \ + -e "s#\$$(PERLPATH)#`which perl`#" \ + -e "s#\$$(CONFIGROOTDIR)#`pwd`/config#" + chmod a+x lib/imboot + touch $(imboot)/_b_ + +$(msub)/_b_: lib/_x_ $(imboot)/_b_ $(msub)/_x_ + gcc $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(msub)/msub.c -o lib/msub + touch $(msub)/_b_ + +$(wrprc)/_b_: lib/_x_ config/_x_ $(msub)/_b_ $(wrprc)/_x_ + sed $(wrprc)/config/site.def > $(wrprc)/config/site.def.temp \ + -e "s%^#define ConfigRootDir .*\$$%#define ConfigRootDir \"`pwd`/config\"%" + mv $(wrprc)/config/site.def.temp $(wrprc)/config/site.def + (set -e; cd $(wrprc); make World; make install) + touch $(wrprc)/_b_ + +$(portlib)/_b_: $(tools) $(portlib)/_x_ + make -C $(portlib) World \ + INCLUDES="-I $(CURDIR)/lib" \ + CCOPTIONS="$(CPPFLAGS) $(CFLAGS)" \ + LDFLAGS="$(LDFLAGS) -L $(CURDIR)/lib" + $(build-link-farm:subdir=$(portlib)) + touch $@ + +$(etm)/_b_: $(tools) $(etm)/_x_ + make -C $(etm) World \ + INCLUDES="-I $(CURDIR)/lib" \ + CCOPTIONS="$(CPPFLAGS) $(CFLAGS)" \ + LDFLAGS="$(LDFLAGS) -L $(CURDIR)/lib" + $(build-link-farm:subdir=$(etm)) + touch $@ + +$(tokenscan)/_b_: $(tools) $(tokenscan)/_x_ + make -C $(tokenscan) World \ + INCLUDES="-I $(CURDIR)/lib" \ + CCOPTIONS="$(CPPFLAGS) $(CFLAGS)" \ + LDFLAGS="$(LDFLAGS) -L $(CURDIR)/lib" + $(build-link-farm:subdir=$(tokenscan)) + touch $@ + +$(memmgr)/_b_: $(tools) $(memmgr)/_x_ + make -C $(memmgr) World \ + INCLUDES="-I $(CURDIR)/lib" \ + CCOPTIONS="$(CPPFLAGS) $(CFLAGS)" \ + LDFLAGS="$(LDFLAGS) -L $(CURDIR)/lib" + $(build-link-farm:subdir=$(memmgr)) + touch $@ + +$(troffcvt)/_b_: $(portlib)/_b_ $(etm)/_b_ $(tokenscan)/_b_ $(memmgr)/_b_ $(troffcvt)/_x_ + make -C $(troffcvt) World \ + INCLUDES="-I $(CURDIR)/lib" \ + CCOPTIONS="$(CPPFLAGS) $(CFLAGS)" \ + LDFLAGS="$(LDFLAGS) -L $(CURDIR)/lib" + $(build-link-farm:subdir=$(troffcvt)) + touch $@ + +# +# Extract (_x_) targets +# +# The troffcvt libraries have the nasty property of changing form +# after being compiled. Instead of dealing with this +# + +lib/_x_: + rm -rf lib + mkdir lib + touch lib/_x_ + +config/_x_: + rm -rf config + mkdir config + touch config/_x_ + +$(wrprc)/_x_ $(imboot)/_x_ $(msub)/_x_ \ + $(portlib)/_x_ $(troffcvt)/_x_: \ + %/_x_: tarballs/%.tar + ! test -e $(@:%/_x_=%) || rm -rf $(@:%/_x_=%) + tar xf tarballs/$(@:%/_x_=%).tar + test -f patches/$(@:%/_x_=%).diff \ + && (set -e; cd $(@:%/_x_=%); \ + patch -s -p1 < ../patches/$(@:%/_x_=%).diff) \ + || true + touch $@ + +memmgr-$(memmgr_version)/_x_: tarballs/MemMgr-$(memmgr_version).tar + ! test -e $(@:%/_x_=%) || rm -rf $(@:%/_x_=%) + tar xf tarballs/MemMgr-$(memmgr_version).tar + touch $@ + +etm/_x_: tarballs/ETM-$(etm_version).tar + ! test -e $(@:%/_x_=%) || rm -rf $(@:%/_x_=%) + tar xf tarballs/ETM-$(etm_version).tar + touch $@ + +tokenscan/_x_: tarballs/TS-$(tokenscan_version).tar + ! test -e $(@:%/_x_=%) || rm -rf $(@:%/_x_=%) + tar xf tarballs/TS-$(tokenscan_version).tar + touch $@ + +# Local Variables: +# mode:makefile +# End: --- troffcvt-1.04.orig/man/tc2null.1 +++ troffcvt-1.04/man/tc2null.1 @@ -0,0 +1,62 @@ +.TH TC2NULL 1 +.SH NAME +tc2null \- diagnostic tool for \fItroffcvt\fR output +.SH SYNTAX +.B tc2null +[ +.I options +] +.I file +\&... +] +.SH DESCRIPTION +.I tc2null +is a postprocessor for +.I troffcvt +which tests the correctness of +.I troffcvt +output. +.I tc2null +also serves as a basis on which other +.I troffcvt +postprocessors can be built. +It's usually invoked by running the +.I troffcvt +front end +.I troff2null . +.PP +.I tc2null +understands the following options: +.TP +.B \-D +Enable debugging output. +.TP +.B \-E +Cause +.I tc2null +to echo token information to +.I stderr +as tokens are read from +.IR troffcvt . +.TP +.BI \-T \0title +Specify a title for the document. +This can be used for documents that do not contain any recognizable +title. +If the document does contain a title, it is overridden. +.SH "SEE ALSO" +troffcvt(1), troff2null(1) +.SH "WHO-TO-BLAME" +Paul DuBois, +.H*ahref mailto:dubois@primate.wisc.edu +.IR dubois@primate.wisc.edu\c +.H*aend +\&. +.SH BUGS +.I tc2null +uses a set of special macros that tell +.I troffcvt +how to generate +.IR tc2null -specific +output that indicates null structural elements. +These macros do not work in compatibility mode. --- troffcvt-1.04.orig/man/tc2rtf.1 +++ troffcvt-1.04/man/tc2rtf.1 @@ -0,0 +1,58 @@ +.TH TC2RTF 1 +.SH NAME +tc2rtf \- convert \fItroffcvt\fR output to Rich Text Format +.SH SYNTAX +.B tc2rtf +[ +.I options +] +.I file +\&... +] +.SH DESCRIPTION +.I tc2rtf +is a postprocessor for +.I troffcvt +and converts +.I troffcvt +output to to Rich Text Format (RTF). +It's usually invoked by running the +.I troffcvt +front end +.I troff2rtf . +.PP +.I tc2rtf +understands the following options: +.TP +.B \-D +Enable debugging output. +.TP +.B \-E +Cause +.I tc2rtf +to echo token information to +.I stderr +as tokens are read from +.IR troffcvt . +.TP +.BI \-T \0title +Specify a title for the document. +This can be used for documents that do not contain any recognizable +title. +If the document does contain a title, it is overridden. +.SH "SEE ALSO" +troffcvt(1), troff2rtf(1) +.SH "WHO-TO-BLAME" +Paul DuBois, +.H*ahref mailto:dubois@primate.wisc.edu +.IR dubois@primate.wisc.edu\c +.H*aend +\&. +.SH BUGS +.I tc2rtf +uses a set of special macros that tell +.I troffcvt +how to generate +.IR tc2rtf -specific +output that indicates RTF structural elements. +These macros do not work in compatibility mode. --- troffcvt-1.04.orig/man/tc2text.1 +++ troffcvt-1.04/man/tc2text.1 @@ -0,0 +1,58 @@ +.TH TC2TEXT 1 +.SH NAME +tc2text \- convert \fItroffcvt\fR output to ASCII text +.SH SYNTAX +.B tc2text +[ +.I options +] +.I file +\&... +] +.SH DESCRIPTION +.I tc2text +is a postprocessor for +.I troffcvt +and converts +.I troffcvt +output to to ASCII text. +It's usually invoked by running the +.I troffcvt +front end +.I unroff . +.PP +.I tc2text +understands the following options: +.TP +.B \-D +Enable debugging output. +.TP +.B \-E +Cause +.I tc2text +to echo token information to +.I stderr +as tokens are read from +.IR troffcvt . +.TP +.BI \-T \0title +Specify a title for the document. +This can be used for documents that do not contain any recognizable +title. +If the document does contain a title, it is overridden. +.SH "SEE ALSO" +troffcvt(1), unroff(1) +.SH "WHO-TO-BLAME" +Paul DuBois, +.H*ahref mailto:dubois@primate.wisc.edu +.IR dubois@primate.wisc.edu\c +.H*aend +\&. +.SH BUGS +.I tc2text +uses a set of special macros that tell +.I troffcvt +how to generate +.IR tc2text -specific +output that indicates text structural elements. +These macros do not work in compatibility mode. --- troffcvt-1.04.orig/man/troff2null.1 +++ troffcvt-1.04/man/troff2null.1 @@ -0,0 +1,72 @@ +.TH TROFF2NULL 1 +.SH NAME +troff2null \- convert \fItroff\fR documents to \fItroffcvt\fR internal format +.SH SYNTAX +.B troff2null +[ +.I options +] +.I file +\&... +] +.SH DESCRIPTION +.I troff2null +converts files written in the +.I troff +input language +and converts them to the \fItroffcvt\fR internal representation. +It works by running the input files through +.I troffcvt +and then through +.I tc2null . +.PP +.I troff2null +understands the usual +.I troffcvt +options. +It also understands the additional options listed below: +.TP +.B \-D +Enable debugging output. +.TP +.B \-E +Cause +.I tc2null +to echo token information to +.I stderr +as tokens are read from +.IR troffcvt . +.TP +.B \-n +No execution. +Just show the commands that +.I troff2null +would execute to process the document. +.TP +.B \-p +Don't run the postprocessor +.RI ( tc2null ). +.TP +.BI \-T \0title +Specify a title for the document. +This can be used for documents that do not contain any recognizable +title. +If the document does contain a title, it is overridden. +.SH "SEE ALSO" +troffcvt(1), tc2null(1) +.SH "WHO-TO-BLAME" +Paul DuBois, +.H*ahref mailto:dubois@primate.wisc.edu +.IR dubois@primate.wisc.edu\c +.H*aend +\&. +.SH BUGS +.I troff2null +uses a set of special macros that tell +.I troffcvt +how to generate +.IR tc2null -specific +output that +.I tc2null +uses to recognize NULL structural elements. +These macros do not work in compatibility mode. --- troffcvt-1.04.orig/patches/WRPRC-2.11.diff +++ troffcvt-1.04/patches/WRPRC-2.11.diff @@ -0,0 +1,174 @@ +diff -Nurp tmp/WRPRC-2.11/config/Imake.params WRPRC-2.11/config/Imake.params +--- tmp/WRPRC-2.11/config/Imake.params 1997-05-23 22:19:11.000000000 +0100 ++++ WRPRC-2.11/config/Imake.params 2022-05-24 22:46:10.535609874 +0100 +@@ -329,11 +329,7 @@ + /* Project development commands */ + + #ifndef ArCmd +-#if SystemV4 + #define ArCmd ar cq +-#else +-#define ArCmd ar clq +-#endif + #endif + #ifndef CcCmd + #if HasGcc2 +@@ -583,16 +579,16 @@ + */ + + #ifndef InstProgFlags +-#define InstProgFlags $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTPROGMODE) $(INSTSTRIP) ++#define InstProgFlags $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTPROGMODE) + #endif + #ifndef InstUidProgFlags +-#define InstUidProgFlags $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTUIDPROGMODE) $(INSTSTRIP) ++#define InstUidProgFlags $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTUIDPROGMODE) + #endif + #ifndef InstGidProgFlags +-#define InstGidProgFlags $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTGIDPROGMODE) $(INSTSTRIP) ++#define InstGidProgFlags $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTGIDPROGMODE) + #endif + #ifndef InstUGidProgFlags +-#define InstUGidProgFlags $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTUGIDPROGMODE) $(INSTSTRIP) ++#define InstUGidProgFlags $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTUGIDPROGMODE) + #endif + #ifndef InstScriptFlags + #define InstScriptFlags $(INSTCOPY) $(INSTOWNER) $(INSTGROUP) $(INSTSCRIPTMODE) +diff -Nurp tmp/WRPRC-2.11/config/linux.cf WRPRC-2.11/config/linux.cf +--- tmp/WRPRC-2.11/config/linux.cf Wed Dec 31 19:00:00 1969 ++++ WRPRC-2.11/config/linux.cf Mon Nov 10 22:25:15 1997 +@@ -0,0 +1,94 @@ ++/* ++ * Based upon WRPRC linux-pmac.cf. ++ * ++ * The values below are current for Linux server 2.0.28. If you're running ++ * a different server, set the OS{Major,Minor,Teeny}Version numbers to ++ * something more appropriate. ++ */ ++ ++XCOMM platform: linux.cf ++ ++#ifndef OSName ++#define OSName Linux ++#endif ++#ifndef OSMajorVersion ++#define OSMajorVersion 2 ++#endif ++#ifndef OSMinorVersion ++#define OSMinorVersion 0 ++#endif ++#ifndef OSTeenyVersion ++#define OSTeenyVersion 31 ++#endif ++ ++#ifndef HasGcc ++#define HasGcc YES ++#endif ++#ifndef HasGcc2 ++#define HasGcc2 YES ++#endif ++ ++#ifndef HasVoidSignalReturn ++#define HasVoidSignalReturn YES ++#endif ++ ++/* stdarg.h and varargs.h are under /usr/lib/gcc-lib/ppc-linux/... */ ++#ifndef HasStdarg ++#define HasStdarg YES ++#endif ++#ifndef HasVarargs ++#define HasVarargs YES ++#endif ++ ++#ifndef HasUnistdH ++#define HasUnistdH YES ++#endif ++ ++/* hmm... */ ++#define AvoidNullMakeCommand YES ++ ++#ifndef InstStrip ++#define InstStrip -s ++#endif ++#ifndef InstUidProgMode ++#define InstUidProgMode -m 4711 ++#endif ++#ifndef InstGidProgMode ++#define InstGidProgMode -m 2711 ++#endif ++#ifndef InstUGidProgMode ++#define InstUGidProgMode -m 6711 ++#endif ++ ++#ifndef CcCmd ++#define CcCmd gcc ++#endif ++#ifndef MkdirHierCmd ++#define MkdirHierCmd mkdir -p ++#endif ++#ifndef StandardDefines ++#define StandardDefines -Dlinux -D_POSIX_SOURCE \ ++ -D_BSD_SOURCE -D_GNU_SOURCE -DX_LOCALE ++#endif ++#ifndef StandardCppDefines ++#define StandardCppDefines -traditional StandardDefines ++#endif ++ ++/* hmm... */ ++#define PostIncDir `CcCmd --print-libgcc-file-name | sed 's/libgcc.a/include/'` ++ ++/* perl and perl5 are the same... */ ++#ifndef Perl5Cmd ++#define Perl5Cmd perl ++#endif ++#ifndef Perl5Path ++#define Perl5Path /usr/bin/perl ++#endif ++ ++#ifndef SendmailPath ++#define SendmailPath /usr/sbin/sendmail ++#endif ++ ++#ifndef SpoolRootDir ++#define SpoolRootDir /var/spool ++#endif +diff -Nurp tmp/WRPRC-2.11/config/site.def WRPRC-2.11/config/site.def +--- tmp/WRPRC-2.11/config/site.def Fri May 23 17:19:11 1997 ++++ WRPRC-2.11/config/site.def Mon Nov 10 23:13:08 1997 +@@ -55,26 +55,24 @@ XCOMM site: Primate Center 89/12/22 + */ + + #ifndef ConfigRootDir +-#define ConfigRootDir /usr/local/lib/config ++#define ConfigRootDir /raid/home/blp/troffcvt-1.04/config + #endif + +-/* + #ifndef BinDir +-#define BinDir /usr/local/bin ++#define BinDir /usr/bin + #endif +-*/ + #ifndef ManRoot +-#define ManRoot /usr/local/man ++#define ManRoot /usr/share/man + #endif + #ifndef ManSuffix /* set this to where man pages are "usually" installed */ + #define ManSuffix $(MAN1SUFFIX) /* use just one tab or cpp will die */ + #endif + + #ifndef PerlPath /* for use in #! lines */ +-#define PerlPath $(LOCALBINDIR)/perl ++#define PerlPath /usr/bin/perl + #endif + #ifndef Perl5Path /* for use in #! lines */ +-#define Perl5Path $(LOCALBINDIR)/perl5 ++#define Perl5Path /usr/bin/perl + #endif + + /* document preparation preferences */ +diff -Nurp tmp/WRPRC-2.11/config/linux.p-cf WRPRC-2.11/config/linux.p-cf +--- tmp/WRPRC-2.11/config/linux.p-cf Wed Dec 31 19:00:00 1969 ++++ WRPRC-2.11/config/linux.p-cf Mon Nov 10 22:25:15 1997 +@@ -0,0 +1,1 @@ ++ --- troffcvt-1.04.orig/patches/msub-1.13.diff +++ troffcvt-1.04/patches/msub-1.13.diff @@ -0,0 +1,26 @@ +--- msub-1.13/msub.c.orig 1997-04-02 23:35:23.000000000 +0100 ++++ msub-1.13/msub.c 2002-12-14 16:56:53.000000000 +0000 +@@ -38,6 +38,9 @@ + # include + # include + # include ++# include ++# include ++# include + + #define Malloc(n) _Malloc((int) n) + +@@ -46,13 +49,6 @@ + # define FromMakefile(vp) (vp->source == precMakefile) + + +-extern char *malloc (); +-extern char *strcpy (); +-extern char *strncpy (); +-extern char *strcat (); +-extern char *getenv (); +- +- + typedef struct Var Var; + + struct Var --- troffcvt-1.04.orig/patches/portlib-1.01.diff +++ troffcvt-1.04/patches/portlib-1.01.diff @@ -0,0 +1,26 @@ +--- /dev/null Tue May 27 20:49:58 1997 ++++ portlib-1.01/config/linux.p-cf Tue Nov 11 00:04:43 1997 +@@ -0,0 +1,23 @@ ++#ifndef HAS_FCNTL /* fcntl() system call present? */ ++#define HAS_FCNTL YES ++#endif ++ ++#ifndef HAS_DIRENT_H /* dirent.h include file present? */ ++#define HAS_DIRENT_H YES ++#endif ++ ++#ifndef HAS_SYSCONF /* is sysconf(_SC_OPEN_MAX) available? */ ++#define HAS_SYSCONF YES ++#endif ++ ++/* ++ * sys/dir.h is present, but scandir() doesn't work with pre-2.x servers. ++ * Since we can't tell in this file what server version we're using (that ++ * isn't set until linux-pmac.cf is processed), and since the ++ * opendir()/readdir() stuff always works, just set this to NO to disable ++ * use of scandir(). ++ */ ++ ++#ifndef HAS_SYS_DIR_H /* sys/dir.h include file present? */ ++#define HAS_SYS_DIR_H YES ++#endif --- troffcvt-1.04.orig/patches/troffcvt-1.04.diff +++ troffcvt-1.04/patches/troffcvt-1.04.diff @@ -0,0 +1,118 @@ +--- troffcvt-1.04/config/Imake.p-params~ Fri Apr 18 17:06:38 1997 ++++ troffcvt-1.04/config/Imake.p-params Wed Jun 13 01:18:53 2001 +@@ -16,11 +16,7 @@ + */ + + #ifndef StringH +-#if defined(SYSV) || defined(SVR4) + #define StringH +-#else +-#define StringH +-#endif + #endif + + #ifndef StringHDefines +@@ -40,7 +36,7 @@ + #endif + + #ifndef ProjLibDir +-#define ProjLibDir $(LIBDIR) ++#define ProjLibDir /usr/share/troffcvt + #endif + + /* +@@ -48,7 +44,7 @@ + */ + + #ifndef MacroLibDir +-#define MacroLibDir $(USRLIBDIR)/tmac ++#define MacroLibDir /usr/share/groff/current/tmac + #endif + + /* +@@ -58,9 +54,18 @@ + */ + + #ifndef MacroFilePrefix +-#define MacroFilePrefix tmac. ++#define MacroFilePrefix + #endif + ++/* ++ * Suffix for constructing a system macro filename. Some systems (e.g. ++ * groff >= 1.17) use names like e.tmac or s.tmac. ++ */ ++ ++#ifndef MacroFileSuffix ++#define MacroFileSuffix .tmac ++#endif ++ + #ifndef TcGenLib + #define TcGenLib $(LOADERLIBPREFIX)$(LIBSRC)/libtcgen.a + #endif +@@ -86,6 +91,7 @@ + PROJLIBDIR = ProjLibDir + MACROLIBDIR = MacroLibDir + MACROFILEPREFIX = MacroFilePrefix ++ MACROFILESUFFIX = MacroFileSuffix + + STRING_H = StringH + STRING_H_DEFINES = StringHDefines +--- troffcvt-1.04/config/linux-pmac.p-cf~ 1997-01-14 06:55:05.000000000 +0000 ++++ troffcvt-1.04/config/linux-pmac.p-cf 2007-08-19 08:38:24.000000000 +0100 +@@ -1,3 +0,0 @@ +-#ifndef MacroLibDir +-#define MacroLibDir /usr/lib/groff/tmac +-#endif +--- troffcvt-1.04/tblcvt/tblcvt.pl~ 1997-05-21 02:10:25.000000000 +0100 ++++ troffcvt-1.04/tblcvt/tblcvt.pl 2007-08-19 10:54:58.000000000 +0100 +@@ -782,7 +782,7 @@ + # Split up data line, then keep reading input lines as long + # as the current data ends with "T{". + +- @d = split ($tab, $_); ++ @d = split (/\Q$tab\E/, $_); + + # Prepend \& to any fields that begin with . followed by a number, + # to prevent a field like ".13" from being interpreted as a troff +@@ -818,7 +818,7 @@ + $data =~ s/^(\.\d)/\\\&\1/; + $data =~ s/^(\s)/\\\&\1/; + push (@d, $data); +- @d2 = split ($tab, $_); ++ @d2 = split (/\Q$tab\E/, $_); + shift (@d2); # shift off the "T}" + # escape any fields after the T{...T} field that + # begin with dot or whitespace +--- troffcvt-1.04/troffcvt/Imakefile~ Wed Jun 13 01:37:42 2001 ++++ troffcvt-1.04/troffcvt/Imakefile Wed Jun 13 01:37:59 2001 +@@ -4,7 +4,8 @@ + DEFINES = \ + -D'PROJLIBDIR="$(PROJLIBDIR)"' \ + -D'MACROLIBDIR="$(MACROLIBDIR)"' \ +- -D'MACROFILEPREFIX="$(MACROFILEPREFIX)"' ++ -D'MACROFILEPREFIX="$(MACROFILEPREFIX)"' \ ++ -D'MACROFILESUFFIX="$(MACROFILESUFFIX)"' + + XCOMM any special -I's for compiling + INCLUDES = +--- troffcvt-1.04/troffcvt/main.c~ Wed Jun 13 00:40:53 2001 ++++ troffcvt-1.04/troffcvt/main.c Wed Jun 13 00:40:59 2001 +@@ -45,7 +45,7 @@ + #include + #include + #include /* for size_t */ +-#include ++#include + #ifndef STRING_H + #define STRING_H + #endif +@@ -623,7 +623,7 @@ + } + else /* macro file */ + { +- sprintf (buf, "%s%s", MACROFILEPREFIX, name); ++ sprintf (buf, "%s%s%s", MACROFILEPREFIX, name, MACROFILESUFFIX); + if (!ReadMacroFile (buf)) + ETMPanic ("cannot read macro file for -m%s", + name);