Article View: comp.text
Article #2570Re: Wanted: Tower of Hanoi Solution
From: Jeff Copeland
Date: Fri, 01 Mar 1991 15:21
Date: Fri, 01 Mar 1991 15:21
53 lines
2071 bytes
2071 bytes
Followup-To: comp.text
Distribution:
Organization: Interactive Systems Corp., Santa Monica, CA
Keywords:
In article <279@serval.ukc.ac.uk> iau@ukc.ac.uk (I.A.Utting) writes:
>Wonderful stuff.
>
>In a similar vein, did anyone keep the troff fragment which split mm/dd/yy
>into mm, dd and yy in separate number (string?) registers? Having enjoyed it
>then thrown it away, I've now got a real need for it! I know I could do it
>with .pi, but that's got no style.
>
>Ian.
I don't know if this is the same one or not, but this is one of the
variations I use when for documentation with RCS headers.
.de DT\" get the date out of the RCS Header line
.if !"\\$7"Locked" \{\
.tr /
.de NR
.br
.nr yr \\\\$1
.nr mo \\\\$2
\\..
.di X
\\!.NR \\$4
.di
.X
.rm X NR
.tr //
.\}
..
.\" setup the date
.DT $Header: rr,v 1.4 90/03/23 16:43:47 jeff Exp $
.ie \n(mo-11 \*TDecember, 19\n(yr
.el .ie \n(mo-10 \*TNovember, 19\n(yr
.el .ie \n(mo-9 \*TOctober, 19\n(yr
.el .ie \n(mo-8 \*TSeptember, 19\n(yr
.el .ie \n(mo-7 \*TAugust, 19\n(yr
.el .ie \n(mo-6 \*TJuly, 19\n(yr
.el .ie \n(mo-5 \*TJune, 19\n(yr
.el .ie \n(mo-4 \*TMay, 19\n(yr
.el .ie \n(mo-3 \*TApril, 19\n(yr
.el .ie \n(mo-2 \*TMarch, 19\n(yr
.el .ie \n(mo-1 \*TFebruary, 19\n(yr
.el \*TJanuary, 19\n(yr
So, if the file is locked, the DT macro does nothing, else it sets
the mo and yr number registers, which are later used to print the date.
If the file *is* locked, mo and yr have the values set on startup, which
are the current month and year.
Technical Details
Message-ID:
<1991Mar01.152126.2069@ism.isc.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!sdd.hp.com!uakari.primate.wisc.edu!dali.cs.montana.edu!rpi!ispd-newsserver!ism.isc.com!jeffReferences:
<8564@exodus.Eng.Sun.COM> <279@serval.ukc.ac.uk>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!sdd.hp.com!uakari.primate.wisc.edu!dali.cs.montana.edu!rpi!ispd-newsserver!ism.isc.com!jeff From: jeff@itx.isc.com (Jeff Copeland) Newsgroups: comp.text Subject: Re: Wanted: Tower of Hanoi Solution Message-ID: <1991Mar01.152126.2069@ism.isc.com> Date: 1 Mar 91 15:21:26 GMT References: <8564@exodus.Eng.Sun.COM> <279@serval.ukc.ac.uk> Sender: usenet@ism.isc.com (Ism Usenet News) Organization: Interactive Systems Corp. Lines: 53