delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/29/08:45:54

From: Cherniavsky Beni <cben AT crosswinds DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Uploaded (was Re: Announce: troff emulator in sed)
Date: Thu, 29 Jun 2000 15:26:33 +0200
Organization: Technion
Lines: 45
Message-ID: <395B4E89.E09B3D9C@crosswinds.net>
References: <200006271356 DOT IAA02651 AT darwin DOT sfbr DOT org>
NNTP-Posting-Host: 132.68.54.8
Mime-Version: 1.0
X-Mailer: Mozilla 4.06 [en] (WinNT; I)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Jeff Williams wrote:
> 
> -: Subject: Announce: troff emulator in sed (was ANNOUNCE: DJGPP port of Groff
> 1.16 uploaded)
> 
> Well, I'm interested.  I think it would be very handy for viewing the
> occasional unformatted man page, without requiring the full overhead of
> Groff.  If you prefer, you can email the scripts to me directly.

Hans-Bernhard Broeker mentioned `cawf' which is better for the
task, I believe.  But since it's an interesting proff-of-the-concept
(misspelled deliberately ;-), I have put it at:
	http://www.crosswinds.net/~cben/sedtroff.zip
If there are any download problems, please report.

I have said it uses `fold' to format paragraphs; that's `fmt' actually.
Note that the width is tripple; I don't remember why exactly 225.
Actually, I don't remember how it works and have no intention to find out,
so don't ask me :-).  It was a one-time write-only kluge, but I never downloaded
a real ?roff for DOS (besides, I have a linux on a neighbour
partition anyway).

I think it requires GNU sed; other sed's will probably have some arbitrary
limits, e.g. maximum 99 lines per script.  And I don't know whether all sed
commands mentioned in the GNU sed manual are standard.

The batch file is almost all one pipe.  Temporary files are useful to debug
or just watch the blinkenlights and grok its misworkings.  Anyway there is
that 126 chars limit.  You should add full pathes to the sed scripts if
you want to run it from another directory.

cat >> include/disclaimer/YMMV.h
	I can promise it will work acceptadly on your man pages.  For
	example, the RCS mans had two macros for quotes: one for nroff
	and one for troff (`` and '').  I got away with ignoring
	conditionals only thanks to the order they were written in!  Don't
	report bugs without including the phase of the moon in your locale.
	Better yet, don't report bugs at all.

PS: The jargon file defines SED as a Smoke-Emitting Diode.
    PPS: Where do I put PS's in mails/posts?  Here?  Below the signature?
-- 
Beni Cherniavsky <cben AT crosswinds DOT net>
                 (also scben AT t2 in technion)
God is a Real Programmer.  Read DNA for details.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019