xref: /plan9/sys/src/cmd/troff/FIXES (revision 219b2ee8daee37f4aad58d63f21287faa8e4ffdc)
1*219b2ee8SDavid du ColombierMarch 11, 1994
2*219b2ee8SDavid du Colombier
3*219b2ee8SDavid du Colombier	If we are just plain old nroff (and not doing UNICODE) we should
4*219b2ee8SDavid du Colombier	only Lookup characters, not Install when we don't know them.
5*219b2ee8SDavid du Colombier	If we are troff, we Install them anyway
6*219b2ee8SDavid du Colombier
7*219b2ee8SDavid du ColombierMarch 8, 1994
8*219b2ee8SDavid du Colombier
9*219b2ee8SDavid du Colombier	Nroff had problems with parsing quoted white space as options or
10*219b2ee8SDavid du Colombier	character code in some terminals tables. Changed by having scanf
11*219b2ee8SDavid du Colombier	include white space when necessary as suggested by Rich.
12*219b2ee8SDavid du Colombier
13*219b2ee8SDavid du ColombierMarch 1, 1994
14*219b2ee8SDavid du Colombier
15*219b2ee8SDavid du Colombier	Made sanity check for terminal type depending on the trace level;
16*219b2ee8SDavid du Colombier	trace level set with -tn flag at start up
17*219b2ee8SDavid du Colombier
18*219b2ee8SDavid du Colombier22 Feb, 1994
19*219b2ee8SDavid du Colombier
20*219b2ee8SDavid du Colombier	More pointer shuffling fixes.
21*219b2ee8SDavid du Colombier
22*219b2ee8SDavid du Colombier18 Feb, 1994
23*219b2ee8SDavid du Colombier
24*219b2ee8SDavid du Colombier	More disabling of multibyte stuff. Fixed bug in n5.c: casetm didn'
25*219b2ee8SDavid du Colombier	know about the new format in the fontables.
26*219b2ee8SDavid du Colombier
27*219b2ee8SDavid du ColombierFeb 17, 1994
28*219b2ee8SDavid du Colombier
29*219b2ee8SDavid du Colombier	Removed extra include <setlocale> from n1.c
30*219b2ee8SDavid du Colombier
31*219b2ee8SDavid du Colombier	Fixed dubious pointer shuffling in n7.c, t10.c & n8.c. Thanks Rich!
32*219b2ee8SDavid du Colombier
33*219b2ee8SDavid du ColombierFeb 10, 1994
34*219b2ee8SDavid du Colombier
35*219b2ee8SDavid du Colombier	Disabled the multybyte stuff; only plan 9 will get it.
36*219b2ee8SDavid du Colombier
37*219b2ee8SDavid du ColombierJan 24, 1994
38*219b2ee8SDavid du Colombier
39*219b2ee8SDavid du Colombier	Fixed nasty bug discovered by td, which caused core dumps on
40*219b2ee8SDavid du Colombier	\D'l-0.002775i 0i' and apparently all numbers closer to 0
41*219b2ee8SDavid du Colombier	than -.002775. Fixed in storeline() and storeword() (n7.c).
42*219b2ee8SDavid du Colombier
43*219b2ee8SDavid du ColombierDec 16, 1993
44*219b2ee8SDavid du Colombier
45*219b2ee8SDavid du Colombier	nroff & troff -N were looking for the TYPESETTER variable, causing
46*219b2ee8SDavid du Colombier
47*219b2ee8SDavid du Colombier	troff: cannot open /sys/lib/troff/term/tab.202; line 1, file stdin
48*219b2ee8SDavid du Colombier
49*219b2ee8SDavid du Colombier	fixed my moving getenv("TYPESETTER") to t10.c in t_ptinit(void).
50*219b2ee8SDavid du Colombier
51*219b2ee8SDavid du ColombierDec 3, 1993:
52*219b2ee8SDavid du Colombier
53*219b2ee8SDavid du Colombier	The sequence \s+2\H'+10' came sometimes out in the wrong order
54*219b2ee8SDavid du Colombier	(x H before s), so there wasn't a difference bewteen \s+2\H'+10'
55*219b2ee8SDavid du Colombier	and \H'+10'\s+2. Now the fonts bits of the CHARHT are used to
56*219b2ee8SDavid du Colombier	register the current pontsize, so we can issue a s10 in t10.c
57*219b2ee8SDavid du Colombier	if needed. A bit sneaky.
58*219b2ee8SDavid du Colombier
59*219b2ee8SDavid du Colombier	Try to prevent double slashes in path names. Especially under
60*219b2ee8SDavid du Colombier	plan9 things started to look ugly.
61*219b2ee8SDavid du Colombier
62*219b2ee8SDavid du Colombier	Exception word list now grows dynamic.
63*219b2ee8SDavid du Colombier
64*219b2ee8SDavid du ColombierNov 30, 1993:
65*219b2ee8SDavid du Colombier
66*219b2ee8SDavid du Colombier	Allow multiple calls to .pi, requested by Rob.
67*219b2ee8SDavid du Colombier		.pi cat
68*219b2ee8SDavid du Colombier		.pi dogs
69*219b2ee8SDavid du Colombier	is now equivalent with
70*219b2ee8SDavid du Colombier		.pi cat | dogs
71*219b2ee8SDavid du Colombier
72*219b2ee8SDavid du Colombier
73*219b2ee8SDavid du Colombier	.ab now takes also optional error code:
74*219b2ee8SDavid du Colombier		.ab [n] [string]
75*219b2ee8SDavid du Colombier	If n and string, n is exit code, string is message
76*219b2ee8SDavid du Colombier	If n, n is exit code, ``User Abort, exit code n" is message
77*219b2ee8SDavid du Colombier	If !n and string, standard exit code, string is message
78*219b2ee8SDavid du Colombier	If !n and ! string, standard exit code, "User Abort" is message
79*219b2ee8SDavid du Colombier
80*219b2ee8SDavid du ColombierNov 24, 1993:
81*219b2ee8SDavid du Colombier
82*219b2ee8SDavid du Colombier	Reordered code to keep the UNASNI scripts happy.
83*219b2ee8SDavid du Colombier
84*219b2ee8SDavid du Colombier	Nroff dumped core reading terminal tables: apparenty under plan 9,
85*219b2ee8SDavid du Colombier	scanf includes the '\n'; added test for '\0' in parse in n10.c.
86*219b2ee8SDavid du Colombier
87*219b2ee8SDavid du Colombier	Relative tab settings (.ta +1C +2C) didn't work; anding the
88*219b2ee8SDavid du Colombier	previous value with TABMASK fixes this (caseta).
89*219b2ee8SDavid du Colombier
90*219b2ee8SDavid du ColombierNov 23, 1993:
91*219b2ee8SDavid du Colombier
92*219b2ee8SDavid du Colombier	Included code, originally done by bwk for plan 9, to handle
93*219b2ee8SDavid du Colombier	multi-byte characters.
94*219b2ee8SDavid du Colombier
95*219b2ee8SDavid du ColombierNov 3, 1993:
96*219b2ee8SDavid du Colombier
97*219b2ee8SDavid du Colombier	``pair internal'' two char names by shifting 16 bits. Will allow
98*219b2ee8SDavid du Colombier	the use of 16 bit characters sets (Unicode in plan9 etc.) for
99*219b2ee8SDavid du Colombier	macro's etc.
100*219b2ee8SDavid du Colombier
101*219b2ee8SDavid du ColombierOct 20, 1993:
102*219b2ee8SDavid du Colombier
103*219b2ee8SDavid du Colombier	Word & line buffers are now dynamic: No more word or line overflow
104*219b2ee8SDavid du Colombier	unless when we run out of memory.
105*219b2ee8SDavid du Colombier
106*219b2ee8SDavid du ColombierOct 11, 1993:
107*219b2ee8SDavid du Colombier
108*219b2ee8SDavid du Colombier	lost diversion warning pops up regularly with man macro's. Due
109*219b2ee8SDavid du Colombier	to a possible macro coding problem. Triggered by something like
110*219b2ee8SDavid du Colombier	troff -man:
111*219b2ee8SDavid du Colombier		.TP
112*219b2ee8SDavid du Colombier		.TP
113*219b2ee8SDavid du Colombier		foo
114*219b2ee8SDavid du Colombier		.ex
115*219b2ee8SDavid du Colombier    	Minimal code:
116*219b2ee8SDavid du Colombier		.di aa
117*219b2ee8SDavid du Colombier		throw away this diversion (aa) while being defined.
118*219b2ee8SDavid du Colombier		.rm aa
119*219b2ee8SDavid du Colombier		.br
120*219b2ee8SDavid du Colombier		.di
121*219b2ee8SDavid du Colombier
122*219b2ee8SDavid du Colombier	Fixed by disallowing .rm to throw away current diversion. The
123*219b2ee8SDavid du Colombier	rn request will complain with:
124*219b2ee8SDavid du Colombier
125*219b2ee8SDavid du Colombier		cannot remove diversion aa during definition; etc.
126*219b2ee8SDavid du Colombier
127*219b2ee8SDavid du ColombierSep 29, 1993:
128*219b2ee8SDavid du Colombier
129*219b2ee8SDavid du Colombier	Some long standing fixes which never went back in the source.
130*219b2ee8SDavid du Colombier	Thanks to Janet & Rich.
131*219b2ee8SDavid du Colombier
132*219b2ee8SDavid du ColombierSep 28, 1993:
133*219b2ee8SDavid du Colombier
134*219b2ee8SDavid du Colombier	Changed getach() (n1.c), so it does't consider truncated
135*219b2ee8SDavid du Colombier	special characters as (8-bit) ascii.  STX ETX ENQ ACK and BELL
136*219b2ee8SDavid du Colombier	are still allowed for the ultimate backwards compatibility.
137*219b2ee8SDavid du Colombier
138*219b2ee8SDavid du Colombier	Some code changes, so real ANSI compilers like the SGI version
139*219b2ee8SDavid du Colombier	(acc from Sun is a poor excuse for an ANSI compiler) don't
140*219b2ee8SDavid du Colombier	barf.  Some compromises (static Tchar wbuf in n9.c) allowed so
141*219b2ee8SDavid du Colombier	the unansified stuff for non-ansi compilers (cc on Sun's) will
142*219b2ee8SDavid du Colombier	work as well.
143*219b2ee8SDavid du Colombier
144*219b2ee8SDavid du ColombierSep 9, 1993:
145*219b2ee8SDavid du Colombier
146*219b2ee8SDavid du Colombier	Be nice to Gerard. Now also word spaces in .tl and after
147*219b2ee8SDavid du Colombier	tabs/fleids etc.
148*219b2ee8SDavid du Colombier
149*219b2ee8SDavid du ColombierAug 12, 1993:
150*219b2ee8SDavid du Colombier
151*219b2ee8SDavid du Colombier	Tabs setting can now be humongous. We also allow 99 tabs to
152*219b2ee8SDavid du Colombier	accomodate tbl. As a side effect, NTM buffers are now 1K
153*219b2ee8SDavid du Colombier
154*219b2ee8SDavid du ColombierAug 11, 1993:
155*219b2ee8SDavid du Colombier
156*219b2ee8SDavid du Colombier	.R register, now contains maximum number of addessable
157*219b2ee8SDavid du Colombier	registers minus the number actually used.
158*219b2ee8SDavid du Colombier
159*219b2ee8SDavid du Colombier	Small esthetic changes in error messages; removed a statement
160*219b2ee8SDavid du Colombier	which wasn't reached anyway.
161*219b2ee8SDavid du Colombier
162*219b2ee8SDavid du ColombierAug 10, 1993:
163*219b2ee8SDavid du Colombier
164*219b2ee8SDavid du Colombier	Some more speed hacks: be smarter doing the linear table
165*219b2ee8SDavid du Colombier	lookups in alloc() and finds().
166*219b2ee8SDavid du Colombier
167*219b2ee8SDavid du Colombier	The real name of the det diversion size macro is now gd.
168*219b2ee8SDavid du Colombier
169*219b2ee8SDavid du ColombierAug 9, 1993:
170*219b2ee8SDavid du Colombier
171*219b2ee8SDavid du Colombier	A much faster way to find the end of a string/macro, by
172*219b2ee8SDavid du Colombier	remembering that when defined.
173*219b2ee8SDavid du Colombier
174*219b2ee8SDavid du ColombierAug 6, 1993:
175*219b2ee8SDavid du Colombier
176*219b2ee8SDavid du Colombier	 Slightly more eficient way of skipping to the end of a
177*219b2ee8SDavid du Colombier	 string/macro
178*219b2ee8SDavid du Colombier
179*219b2ee8SDavid du ColombierAug 5, 1993:
180*219b2ee8SDavid du Colombier
181*219b2ee8SDavid du Colombier	Prevent character sign extension for 8-bit charnames diversions
182*219b2ee8SDavid du Colombier	etc. by unpair
183*219b2ee8SDavid du Colombier
184*219b2ee8SDavid du ColombierAug 4, 1993:
185*219b2ee8SDavid du Colombier
186*219b2ee8SDavid du Colombier	Growing the dynamical macro/strings name space and registers
187*219b2ee8SDavid du Colombier	space (See the experiment of 21 July) now with bigger
188*219b2ee8SDavid du Colombier	increments. Casts added to satisfy non-ANSI compilers.
189*219b2ee8SDavid du Colombier
190*219b2ee8SDavid du ColombierAug 3, 1993:
191*219b2ee8SDavid du Colombier
192*219b2ee8SDavid du Colombier	Should check return value in alloc (n3.c), to prevent core dump
193*219b2ee8SDavid du Colombier	when memory gets tight.
194*219b2ee8SDavid du Colombier
195*219b2ee8SDavid du ColombierJuly 28, 1993:
196*219b2ee8SDavid du Colombier
197*219b2ee8SDavid du Colombier	New request: .sg <div> sets the dn and dl registers to the size
198*219b2ee8SDavid du Colombier	of the diversion named in the argument. Doesn't do anything
199*219b2ee8SDavid du Colombier	when the named diversion doesn't exist. The name sg is
200*219b2ee8SDavid du Colombier	temporary until we find a better one.
201*219b2ee8SDavid du Colombier
202*219b2ee8SDavid du ColombierJuly 21, 1993:
203*219b2ee8SDavid du Colombier
204*219b2ee8SDavid du Colombier	Experiment: Macro space  & registers name allocated
205*219b2ee8SDavid du Colombier	dynamically. Note that current reallocation occurs in
206*219b2ee8SDavid du Colombier	increments of 1, to force the code to be executed a lot; a kind
207*219b2ee8SDavid du Colombier	of stress testing. Also, eight bit characters allowed in
208*219b2ee8SDavid du Colombier	macro/string names.
209*219b2ee8SDavid du Colombier
210*219b2ee8SDavid du ColombierJuly 21, 1993:
211*219b2ee8SDavid du Colombier
212*219b2ee8SDavid du Colombier	Turn on the escape mode if the end macro is called.
213*219b2ee8SDavid du Colombier
214*219b2ee8SDavid du ColombierJuly 20, 1993:
215*219b2ee8SDavid du Colombier
216*219b2ee8SDavid du Colombier	Tracing mode now default off
217*219b2ee8SDavid du Colombier
218*219b2ee8SDavid du Colombier	Don't print s stackdump either when a file specfied on the
219*219b2ee8SDavid du Colombier	command line argument cannot be opened
220*219b2ee8SDavid du Colombier
221*219b2ee8SDavid du ColombierJuly 15, 1993:
222*219b2ee8SDavid du Colombier
223*219b2ee8SDavid du Colombier	Don't print useless line & current file informations when a
224*219b2ee8SDavid du Colombier	file specfied on the command line argument cannot be opened.
225*219b2ee8SDavid du Colombier
226*219b2ee8SDavid du Colombier	Sun ansi compiler doesn't default adhere to standards. Undid
227*219b2ee8SDavid du Colombier	the kludge in tdef.h
228*219b2ee8SDavid du Colombier
229*219b2ee8SDavid du ColombierJuly 14, 1993:
230*219b2ee8SDavid du Colombier
231*219b2ee8SDavid du Colombier	Coding error made the tab type R not function properly
232*219b2ee8SDavid du Colombier
233*219b2ee8SDavid du ColombierJuly 12, 1993:
234*219b2ee8SDavid du Colombier
235*219b2ee8SDavid du Colombier	Fixed a typo in the version stuff, noticed by Rich
236*219b2ee8SDavid du Colombier
237*219b2ee8SDavid du ColombierJuly 9, 1993:
238*219b2ee8SDavid du Colombier
239*219b2ee8SDavid du Colombier	Added the dwb home configuration stuff, thanks RIch. Also,
240*219b2ee8SDavid du Colombier	NCHARS is big enough. Added a fflush to casetm, so .fm <file>
241*219b2ee8SDavid du Colombier	will be up to date.
242*219b2ee8SDavid du Colombier
243*219b2ee8SDavid du ColombierJune 25, 1993 (Rich):
244*219b2ee8SDavid du Colombier
245*219b2ee8SDavid du Colombier    -t option
246*219b2ee8SDavid du Colombier
247*219b2ee8SDavid du Colombier	reinstated for the sake of compatibility. Some old
248*219b2ee8SDavid du Colombier	shells scripts and man(1) from SunOs want this, sigh
249*219b2ee8SDavid du Colombier
250*219b2ee8SDavid du Colombier    Compiler and system dependencies
251*219b2ee8SDavid du Colombier
252*219b2ee8SDavid du Colombier	Some systems pull in sys/types.h via #include <time.h> and then
253*219b2ee8SDavid du Colombier	the compiler complains about two ushort typedefs. Therefore,
254*219b2ee8SDavid du Colombier	ushort is now Ushort (and uchar Uchar).
255*219b2ee8SDavid du Colombier
256*219b2ee8SDavid du Colombier	The SVID specifies a strdup, POSIX doesn't, anyway, troff
257*219b2ee8SDavid du Colombier	provides its own version, slightly different then the standard
258*219b2ee8SDavid du Colombier	one. A To prevent name clashes with that definion, renamed to
259*219b2ee8SDavid du Colombier	strdupl.
260*219b2ee8SDavid du Colombier
261*219b2ee8SDavid du ColombierJune 24, 1993 (Rich):
262*219b2ee8SDavid du Colombier
263*219b2ee8SDavid du Colombier	-V option added for DWB3.4 (rich)
264*219b2ee8SDavid du Colombier
265*219b2ee8SDavid du ColombierMay 18, 1993:
266*219b2ee8SDavid du Colombier
267*219b2ee8SDavid du Colombier    Trivial fix (.cf) request for troff -a
268*219b2ee8SDavid du Colombier
269*219b2ee8SDavid du Colombier	issuing
270*219b2ee8SDavid du Colombier
271*219b2ee8SDavid du Colombier		.cf /dev/null
272*219b2ee8SDavid du Colombier
273*219b2ee8SDavid du Colombier	with troff -a gives some spurious output:
274*219b2ee8SDavid du Colombier
275*219b2ee8SDavid du Colombier		H720
276*219b2ee8SDavid du Colombier		H720
277*219b2ee8SDavid du Colombier		s10
278*219b2ee8SDavid du Colombier		f1
279*219b2ee8SDavid du Colombier
280*219b2ee8SDavid du Colombier	fixed  by checking for ascii mode it ptesc(), ptps() and
281*219b2ee8SDavid du Colombier	ptfont() in t10.c
282*219b2ee8SDavid du Colombier
283*219b2ee8SDavid du Colombier
284*219b2ee8SDavid du Colombier    Enhancement
285*219b2ee8SDavid du Colombier
286*219b2ee8SDavid du Colombier	Added a .tm request to roff. Works just like .tm, but now
287*219b2ee8SDavid du Colombier	it will do it to file. The name is coined by Carmela. Great
288*219b2ee8SDavid du Colombier	for creating indeces & toc's (we hope).
289*219b2ee8SDavid du Colombier
290*219b2ee8SDavid du ColombierMay 18 1993:
291*219b2ee8SDavid du Colombier
292*219b2ee8SDavid du Colombier    Compatibilty change
293*219b2ee8SDavid du Colombier
294*219b2ee8SDavid du Colombier	Somebody complained that his favorite macro didn't work:
295*219b2ee8SDavid du Colombier	it had a BELL (^G) in the name.  This was a non-documented
296*219b2ee8SDavid du Colombier	feature of earlier versions of troff (although the
297*219b2ee8SDavid du Colombier	documentation actually doesn't say that you can. (They can
298*219b2ee8SDavid du Colombier	only be used for delimiters or with the tr request), so it
299*219b2ee8SDavid du Colombier	isn't that important).
300*219b2ee8SDavid du Colombier
301*219b2ee8SDavid du Colombier	But the sake of eternal backward compatibilaty I allowed
302*219b2ee8SDavid du Colombier	some control characters like, STX, ACK,  etc. also be part
303*219b2ee8SDavid du Colombier	of a macro/string name.
304*219b2ee8SDavid du Colombier
305*219b2ee8SDavid du Colombier	While at it, I made it also possible to have eight bit
306*219b2ee8SDavid du Colombier	characters be part of the name. It might be that this screws
307*219b2ee8SDavid du Colombier	up the way users think about these things. For UNICODE
308*219b2ee8SDavid du Colombier	versions, they probably want to do that as well, and that
309*219b2ee8SDavid du Colombier	won't work as easy, (because these characters are 16-bits
310*219b2ee8SDavid du Colombier	wide), so it is dubious whether we actually want this.
311*219b2ee8SDavid du Colombier
312*219b2ee8SDavid du Colombier	BTW. Now
313*219b2ee8SDavid du Colombier
314*219b2ee8SDavid du Colombier		.de \(ts\ts
315*219b2ee8SDavid du Colombier		.tm terminal sigma macro
316*219b2ee8SDavid du Colombier		..
317*219b2ee8SDavid du Colombier		.\(ts\(ts
318*219b2ee8SDavid du Colombier
319*219b2ee8SDavid du Colombier	also works, as long the internal cookie for ts isn't more then
320*219b2ee8SDavid du Colombier	eight bits.
321*219b2ee8SDavid du Colombier
322*219b2ee8SDavid du ColombierMay 12, 1993:
323*219b2ee8SDavid du Colombier
324*219b2ee8SDavid du Colombier    Syntax change
325*219b2ee8SDavid du Colombier
326*219b2ee8SDavid du Colombier	Some requests accept tabs as a separator, some don't and
327*219b2ee8SDavid du Colombier	this can be a nuisance.  Now a tab is also recognized as
328*219b2ee8SDavid du Colombier	an argument separator for requests, this makes
329*219b2ee8SDavid du Colombier
330*219b2ee8SDavid du Colombier		.so	/dev/null
331*219b2ee8SDavid du Colombier
332*219b2ee8SDavid du Colombier	works.
333*219b2ee8SDavid du Colombier
334*219b2ee8SDavid du Colombier	To be more precise, any motion character is allowed, so
335*219b2ee8SDavid du Colombier
336*219b2ee8SDavid du Colombier		.so\h'5i'/dev/null
337*219b2ee8SDavid du Colombier
338*219b2ee8SDavid du Colombier	will work as well, if one really wants that.
339*219b2ee8SDavid du Colombier
340*219b2ee8SDavid du Colombier	It will be a problem for users who really relied on this as in
341*219b2ee8SDavid du Colombier
342*219b2ee8SDavid du Colombier		.ds x	string
343*219b2ee8SDavid du Colombier
344*219b2ee8SDavid du Colombier	and expect the tab to become part of the string a, but I haven't
345*219b2ee8SDavid du Colombier	seen any use of that (obscure trick).
346*219b2ee8SDavid du Colombier
347*219b2ee8SDavid du ColombierMay 6, 1993:
348*219b2ee8SDavid du Colombier
349*219b2ee8SDavid du Colombier    Eileen count fixed
350*219b2ee8SDavid du Colombier
351*219b2ee8SDavid du Colombier	Troff sometimes went in a loop, and exited with: ``job
352*219b2ee8SDavid du Colombier	looping; check abuse of macros'' (also known as the Eileen's
353*219b2ee8SDavid du Colombier	loop). It can be forced with the next trivial programme:
354*219b2ee8SDavid du Colombier
355*219b2ee8SDavid du Colombier		.de ff
356*219b2ee8SDavid du Colombier		.di xx
357*219b2ee8SDavid du Colombier		..
358*219b2ee8SDavid du Colombier		.wh -1 ff
359*219b2ee8SDavid du Colombier		.bp
360*219b2ee8SDavid du Colombier
361*219b2ee8SDavid du Colombier	Basically what happens is that a page transition now will
362*219b2ee8SDavid du Colombier	happen in a diversion, which doesn't make sense. Wat really
363*219b2ee8SDavid du Colombier	happens is that eject() (in n7.c) doesn't eject the frame
364*219b2ee8SDavid du Colombier	because we are in a diversion.  This cause the loop in n1.c
365*219b2ee8SDavid du Colombier	(because now always stack->pname <= ejl). Adding check on
366*219b2ee8SDavid du Colombier	whether we are not in a diversion takes care of the problem.
367*219b2ee8SDavid du Colombier
368*219b2ee8SDavid du ColombierMarch 30, 1993:
369*219b2ee8SDavid du Colombier
370*219b2ee8SDavid du Colombier    Need request, .ne
371*219b2ee8SDavid du Colombier
372*219b2ee8SDavid du Colombier	When there is a begin of page trap set, and the first thing
373*219b2ee8SDavid du Colombier	in the file is a .ne request, the trap gets fired, but,
374*219b2ee8SDavid du Colombier	the x font R etc. cookies doen't come out, because the
375*219b2ee8SDavid du Colombier	troff thinks that the first page pseudo transition already
376*219b2ee8SDavid du Colombier	took place.  Fixed by forcing the start of the first page
377*219b2ee8SDavid du Colombier	in the casene request with the same code as in casetl (which
378*219b2ee8SDavid du Colombier	caused a similar problem quite some time ago).
379*219b2ee8SDavid du Colombier
380*219b2ee8SDavid du Colombier    Change to .cf request ``Here document''
381*219b2ee8SDavid du Colombier
382*219b2ee8SDavid du Colombier	If the argument of .cf starts with a <<, the rest of it is taken
383*219b2ee8SDavid du Colombier	as an EOF token. It will reat the rest of the input until it hits
384*219b2ee8SDavid du Colombier	the EOF token and copies it to the output. This is similar as
385*219b2ee8SDavid du Colombier	the shell's ``here document'' mechanisme and put in place to
386*219b2ee8SDavid du Colombier	improve the kludgy way picasso, picpack etc. now include
387*219b2ee8SDavid du Colombier	postscript.
388*219b2ee8SDavid du Colombier
389*219b2ee8SDavid du Colombier    Using troff -TLatin1 (DWB version) and \N'...' caused core dump
390*219b2ee8SDavid du Colombier
391*219b2ee8SDavid du Colombier	In t11, in chadd, it should test on NCHARS - ALPHABET to see
392*219b2ee8SDavid du Colombier	whether we run out of table space (and we probably should beaf
393*219b2ee8SDavid du Colombier	up NCHARS for the DWB version).
394*219b2ee8SDavid du Colombier
395*219b2ee8SDavid du ColombierMarch 16, 1993:
396*219b2ee8SDavid du Colombier
397*219b2ee8SDavid du Colombier    Diversion rename bug fix
398*219b2ee8SDavid du Colombier
399*219b2ee8SDavid du Colombier	It is possible to get troff in an infinite loop by renaming a
400*219b2ee8SDavid du Colombier	diversion in progress, and calling it later with the
401*219b2ee8SDavid du Colombier	new name (as in .di xx, .rn xx yy, .yy). The effect depends on
402*219b2ee8SDavid du Colombier	whether troff already put stuff in the diversion or not.
403*219b2ee8SDavid du Colombier
404*219b2ee8SDavid du Colombier	Fix by having .rn also rename the current diversion (if
405*219b2ee8SDavid du Colombier	there is any and when appropriate).  If the diversion calls
406*219b2ee8SDavid du Colombier	itself by the new name and given the fix made on 11 nov
407*219b2ee8SDavid du Colombier	1992, this will now result in an error.  (BTW, the fix from
408*219b2ee8SDavid du Colombier	11 nov is improved: diversions nest, so we have to account
409*219b2ee8SDavid du Colombier	for that).
410*219b2ee8SDavid du Colombier
411*219b2ee8SDavid du ColombierDecember 18, 1992:
412*219b2ee8SDavid du Colombier	Some people have complete novels as comments, so we need
413*219b2ee8SDavid du Colombier	to skip comments while checking the legality of font files.
414*219b2ee8SDavid du Colombier	thaks Rixh
415*219b2ee8SDavid du Colombier
416*219b2ee8SDavid du ColombierDecember 16, 1992
417*219b2ee8SDavid du Colombier
418*219b2ee8SDavid du Colombier	Some people rely on the order that -r arguments are given,
419*219b2ee8SDavid du Colombier	so that troff -rC1 -rC3 ends up setting register C to 3.
420*219b2ee8SDavid du Colombier	Because cpushback() pushes things in a LIFO order back, we
421*219b2ee8SDavid du Colombier	have to do the same to get -r args in a FIFO order.
422*219b2ee8SDavid du Colombier
423*219b2ee8SDavid du ColombierNov 17, 1992:
424*219b2ee8SDavid du Colombier
425*219b2ee8SDavid du Colombier	Giving a -rL8 option cuased the string .nr L 8 to be printed
426*219b2ee8SDavid du Colombier	on the output, using the wonderful 3b2. Some garbage was
427*219b2ee8SDavid du Colombier	left in buf[100] in main(). Fixed by setting buf[0] explicitly
428*219b2ee8SDavid du Colombier	to 0 (because some C-compilers complain about ``no automatic
429*219b2ee8SDavid du Colombier	aggregate initialization'').
430*219b2ee8SDavid du Colombier
431*219b2ee8SDavid du ColombierNov 11, 1992:
432*219b2ee8SDavid du Colombier
433*219b2ee8SDavid du Colombier    Diversion bug fix
434*219b2ee8SDavid du Colombier
435*219b2ee8SDavid du Colombier	If a diversion was being read and the input is faulty so
436*219b2ee8SDavid du Colombier	the diversion was reading in itself, it caused troff to
437*219b2ee8SDavid du Colombier	loop undefinitely. This was easily fixed by a test in
438*219b2ee8SDavid du Colombier	control(a,b) in n1.c.
439*219b2ee8SDavid du Colombier
440*219b2ee8SDavid du Colombier	Something similar things might happen with macros causing
441*219b2ee8SDavid du Colombier	the ``eileenct problem'', but I didn't look for that. We
442*219b2ee8SDavid du Colombier	have to wait until it happens.
443*219b2ee8SDavid du Colombier
444*219b2ee8SDavid du ColombierOct 26, 1992:
445*219b2ee8SDavid du Colombier
446*219b2ee8SDavid du Colombier    Numeric arguments:
447*219b2ee8SDavid du Colombier
448*219b2ee8SDavid du Colombier	Illegal argments are treated as missing arguments. This
449*219b2ee8SDavid du Colombier	changed the semantics of .ll, .ls, .in, .lg,  .ul, .cu .lt
450*219b2ee8SDavid du Colombier	(which acted as if the argument was 0) and .ps which was
451*219b2ee8SDavid du Colombier	simply ignored with an illegal argument.
452*219b2ee8SDavid du Colombier
453*219b2ee8SDavid du Colombier	Tidied up number parsing in atoi1(). This prevents arguments
454*219b2ee8SDavid du Colombier	like .x or 1.2.3.4 being interpret as a legal number (nonumb = 0)
455*219b2ee8SDavid du Colombier
456*219b2ee8SDavid du Colombier    Numeric arguments error reporting:
457*219b2ee8SDavid du Colombier
458*219b2ee8SDavid du Colombier	Controlled by .pt, illegal numbers are now reported (default
459*219b2ee8SDavid du Colombier	trace mode is 1).  This is also true for the escapes:
460*219b2ee8SDavid du Colombier	\h'..', \v'..' \H'..', \S'..', \N'..', \D'..', \l'.., \L'..
461*219b2ee8SDavid du Colombier	and \x'..'.
462*219b2ee8SDavid du Colombier
463*219b2ee8SDavid du Colombier	\D'c' is the only drawing request which doesn't take a pair
464*219b2ee8SDavid du Colombier	of numbers as arguments, so a special case is put here in
465*219b2ee8SDavid du Colombier	setdraw() (This code actually could use an overhaul to get
466*219b2ee8SDavid du Colombier	better parsing. As long as the \D'..' cookies are machine
467*219b2ee8SDavid du Colombier	generated it is low on the priority list).
468*219b2ee8SDavid du Colombier
469*219b2ee8SDavid du Colombier	Don't generate an error if the illegal argument to a request
470*219b2ee8SDavid du Colombier	is a \}. It is too painful to do right (although it can be
471*219b2ee8SDavid du Colombier	done, but it would clutter getch() and getcho() even more).
472*219b2ee8SDavid du Colombier
473*219b2ee8SDavid du Colombier    Input line numbers (.c register) bug fixes:
474*219b2ee8SDavid du Colombier
475*219b2ee8SDavid du Colombier	In not taken branches of .if or .ie, the input line #
476*219b2ee8SDavid du Colombier	(numtab[CD].val) should be raised when necessary (in eatblk()).
477*219b2ee8SDavid du Colombier
478*219b2ee8SDavid du Colombier	For concealed newlines, we still should count the line for input.
479*219b2ee8SDavid du Colombier
480*219b2ee8SDavid du Colombier	Setfield (n9.c) sometimes pushes the rest of the line back to
481*219b2ee8SDavid du Colombier	the input (including \n), without adjusting numtab[CD].val
482*219b2ee8SDavid du Colombier
483*219b2ee8SDavid du Colombier	Because .c (and so numtab[CD].val) is the number of lines read
484*219b2ee8SDavid du Colombier	and the error might actually happen in the current line
485*219b2ee8SDavid du Colombier	(before seeing the '\n), we need to apply correction in
486*219b2ee8SDavid du Colombier	errprint when nlflg set. (This correction needs to be undone
487*219b2ee8SDavid du Colombier	when inside a macro because the nlflg is set by reading the
488*219b2ee8SDavid du Colombier	args to the macro).
489*219b2ee8SDavid du Colombier
490*219b2ee8SDavid du Colombier    Line number setting (.lf) request bug fixes:
491*219b2ee8SDavid du Colombier
492*219b2ee8SDavid du Colombier	I interpret that the .c register will contain the number of
493*219b2ee8SDavid du Colombier	read lines, not including the current one.
494*219b2ee8SDavid du Colombier
495*219b2ee8SDavid du Colombier	Also, don't change the input line number when the first
496*219b2ee8SDavid du Colombier	argument of .lf is not a number.
497*219b2ee8SDavid du Colombier
498*219b2ee8SDavid du Colombier	As a net effect, the next input
499*219b2ee8SDavid du Colombier
500*219b2ee8SDavid du Colombier		.EQ
501*219b2ee8SDavid du Colombier		.EN
502*219b2ee8SDavid du Colombier		.ab
503*219b2ee8SDavid du Colombier
504*219b2ee8SDavid du Colombier	will generate the same output whether eqn has been used or not.
505*219b2ee8SDavid du Colombier
506*219b2ee8SDavid du Colombier    If request bug fix:
507*219b2ee8SDavid du Colombier
508*219b2ee8SDavid du Colombier	A ``.if page .tm foo'' caused the next line being ignored;
509*219b2ee8SDavid du Colombier	This bcause when the 2nd delimiter of a string couldn't be
510*219b2ee8SDavid du Colombier	found in cmpstr, the next line was always eaten. Solution:
511*219b2ee8SDavid du Colombier	in caseif1, if the condition is false, we should check
512*219b2ee8SDavid du Colombier	nlflg before eating a block.  (Note: We might have eaten
513*219b2ee8SDavid du Colombier	\{\ as well.  We could disallow the \{\ in a string to be
514*219b2ee8SDavid du Colombier	compared to prevent that but that might break other things).
515*219b2ee8SDavid du Colombier
516*219b2ee8SDavid du Colombier    Enhancement to .pt:
517*219b2ee8SDavid du Colombier
518*219b2ee8SDavid du Colombier	The .pt now pops the previous values when no argument is
519*219b2ee8SDavid du Colombier	specified. Turned out to be handy when chasing for problems.
520*219b2ee8SDavid du Colombier	Just ``bracked'' the code with .pt 7 and .pt and you get
521*219b2ee8SDavid du Colombier	a trace of only that block. The meaning of the arguments
522*219b2ee8SDavid du Colombier	is now:
523*219b2ee8SDavid du Colombier		01      trace numeric arguments (default on)
524*219b2ee8SDavid du Colombier		02	trace requests
525*219b2ee8SDavid du Colombier		04	trace macros
526*219b2ee8SDavid du Colombier
527*219b2ee8SDavid du Colombier    Abort request (.ab) beautification:
528*219b2ee8SDavid du Colombier
529*219b2ee8SDavid du Colombier	Don't print the extra carriage return when .ab is called
530*219b2ee8SDavid du Colombier	without an argument.
531*219b2ee8SDavid du Colombier
532*219b2ee8SDavid du ColombierOct 12, 1992:
533*219b2ee8SDavid du Colombier
534*219b2ee8SDavid du Colombier	(Comments & spelling errors from this day on by jaap)
535*219b2ee8SDavid du Colombier
536*219b2ee8SDavid du Colombier	replaced 32767 by INT_MAX in several places to allow for very
537*219b2ee8SDavid du Colombier	long pages (on 32-but machines).
538*219b2ee8SDavid du Colombier
539*219b2ee8SDavid du Colombier	The ``.fp 1 R   \"COMMENT'' complains about ``./troff: Can't
540*219b2ee8SDavid du Colombier	open font file /usr/lib/font/devpost/h'' on some systems. It
541*219b2ee8SDavid du Colombier	sees the tab as part of the optional font file.  Apparently it
542*219b2ee8SDavid du Colombier	is system dependent whether isgraph() includes the tab
543*219b2ee8SDavid du Colombier	character.  Fixed by using getach() in getname() in n1.c
544*219b2ee8SDavid du Colombier	instead.
545*219b2ee8SDavid du Colombier
546*219b2ee8SDavid du ColombierAug 28, 1992:
547*219b2ee8SDavid du Colombier	removed call to popi from rdtty();  it was eating up the
548*219b2ee8SDavid du Colombier	rest of the macro if it was used from within one.  (thanks, jaap)
549*219b2ee8SDavid du Colombier
550*219b2ee8SDavid du Colombier
551*219b2ee8SDavid du ColombierJul 21, 1992:
552*219b2ee8SDavid du Colombier	added extra test in nextfile() to pop current input file
553*219b2ee8SDavid du Colombier	only if not in .nx command.  thanks to jaap.
554*219b2ee8SDavid du Colombier
555*219b2ee8SDavid du Colombier	added test in getword() to avoid hyphenating after \z character,
556*219b2ee8SDavid du Colombier	which prevents any hyphenation inside \X'...'.  thanks to jaap.
557*219b2ee8SDavid du Colombier
558*219b2ee8SDavid du Colombier	added, then removed, code in getword() to prevent hyphenating
559*219b2ee8SDavid du Colombier	anything shorter than 6 characters.  looks like it changed a
560*219b2ee8SDavid du Colombier	lot more than i thought.
561*219b2ee8SDavid du Colombier
562*219b2ee8SDavid du ColombierJul 12, 1992:
563*219b2ee8SDavid du Colombier	added .pt request to trace macros and requests (from jaap).
564*219b2ee8SDavid du Colombier	.pt N Print trace of macros (N=1), requests (N=2) or both (N=3)
565*219b2ee8SDavid du Colombier
566*219b2ee8SDavid du ColombierJun 5, 1992:
567*219b2ee8SDavid du Colombier	added tests to t.twrest and t.twinit to avoid 0 deref in
568*219b2ee8SDavid du Colombier	n2 and n10, for nroff -t xxxxx.  thanks to Rich Drechsler.
569*219b2ee8SDavid du Colombier
570*219b2ee8SDavid du ColombierMay 22, 1992:
571*219b2ee8SDavid du Colombier	added extern decls to e.g., void Tchar (*hmot)(void) in tdef.h
572*219b2ee8SDavid du Colombier	and added definition to ni.c, so pointers are defined explicitly.
573*219b2ee8SDavid du Colombier	makes it work on turbo c++ and probably others.
574*219b2ee8SDavid du Colombier
575*219b2ee8SDavid du Colombier	changed a couple of isdigit's and isgraph(getch()) to avoid
576*219b2ee8SDavid du Colombier	multiple evaluation (even though it shouldn't happen).
577*219b2ee8SDavid du Colombier
578*219b2ee8SDavid du Colombier	Made /usr/bin/nroff a shell script.
579*219b2ee8SDavid du Colombier
580*219b2ee8SDavid du ColombierMay 12, 1992:
581*219b2ee8SDavid du Colombier	n1.c: need p++ after strrchr to skip / in program name.
582*219b2ee8SDavid du Colombier	thanks to Rich Drechsler.
583*219b2ee8SDavid du Colombier
584*219b2ee8SDavid du ColombierApr 17, 1992:
585*219b2ee8SDavid du Colombier	casefi(), n5.c: .u register should be 0 or 1, not incremented
586*219b2ee8SDavid du Colombier	with each .fi.
587*219b2ee8SDavid du Colombier
588*219b2ee8SDavid du ColombierApr 5, 1992:
589*219b2ee8SDavid du Colombier	fiddled n7.c and added _nmwid to the environment, to add a
590*219b2ee8SDavid du Colombier	5th argument to .nm:  the maximum number of digits in any
591*219b2ee8SDavid du Colombier	line number.  default is 3, which was previously hardwired in.
592*219b2ee8SDavid du Colombier
593*219b2ee8SDavid du Colombier	added jaap's code for yet another register which actually delivers
594*219b2ee8SDavid du Colombier	a string, called .S (so it can easily go in the switch in setn()
595*219b2ee8SDavid du Colombier	in n4.c); it delivers the current tabstop and alignment modes in
596*219b2ee8SDavid du Colombier	a format suitable for a subsequent .ta \n(.S command:
597*219b2ee8SDavid du Colombier		.ds T \n(.S
598*219b2ee8SDavid du Colombier		...
599*219b2ee8SDavid du Colombier		.ta \*T
600*219b2ee8SDavid du Colombier
601*219b2ee8SDavid du ColombierMar 30, 1992:
602*219b2ee8SDavid du Colombier	added test in getword to avoid hyphenating things with motions
603*219b2ee8SDavid du Colombier	(and avoid a core dump sometimes too).
604*219b2ee8SDavid du Colombier
605*219b2ee8SDavid du ColombierMar 13, 1992:
606*219b2ee8SDavid du Colombier	\n(sb initialized wrong in setwd().
607*219b2ee8SDavid du Colombier
608*219b2ee8SDavid du Colombier	TYPESETTER=foo troff -Tpost used foo instead of post.
609*219b2ee8SDavid du Colombier
610*219b2ee8SDavid du ColombierMar 12, 1992:
611*219b2ee8SDavid du Colombier	rearranged tests in popf so that .so is closed properly before
612*219b2ee8SDavid du Colombier	moving on to the next macro package.
613*219b2ee8SDavid du Colombier
614*219b2ee8SDavid du ColombierMar 1, 1992:
615*219b2ee8SDavid du Colombier	input mechanism rearranged to use getc() instead of stack of
616*219b2ee8SDavid du Colombier	explicit input buffers.  5-10% slowdown.
617*219b2ee8SDavid du Colombier
618*219b2ee8SDavid du ColombierJan 28, 1992:
619*219b2ee8SDavid du Colombier	fixed .tm \(mi to print something sensible.  thanks to jaap.
620*219b2ee8SDavid du Colombier
621*219b2ee8SDavid du ColombierJan 2, 1992:
622*219b2ee8SDavid du Colombier	fiddle setfp so doesn't put out font stuff if -a turned on.
623*219b2ee8SDavid du Colombier
624*219b2ee8SDavid du ColombierDec 17, 1991:
625*219b2ee8SDavid du Colombier	copy 3rd argument in .fp commands to x font ... lines when it contains
626*219b2ee8SDavid du Colombier	a /, for testing fonts locally.
627*219b2ee8SDavid du Colombier
628*219b2ee8SDavid du ColombierDec 13, 1991:
629*219b2ee8SDavid du Colombier	parameterize the font directories, etc., so can be set in makefiles.
630*219b2ee8SDavid du Colombier	added -N argument to run as nroff.
631*219b2ee8SDavid du Colombier
632*219b2ee8SDavid du ColombierNov 8, 1991:
633*219b2ee8SDavid du Colombier	add a maplow(towlower...) in n8.c to handle brain-damaged libraries.
634*219b2ee8SDavid du Colombier
635*219b2ee8SDavid du ColombierNov 2, 1991:
636*219b2ee8SDavid du Colombier	merged nroff into troff, based on Ken's plan 9 version.
637*219b2ee8SDavid du Colombier	merged nii.c into ni.c, removed tw.h, etc.  more work needed
638*219b2ee8SDavid du Colombier	to make this stuff cleaner.
639*219b2ee8SDavid du Colombier
640*219b2ee8SDavid du ColombierJuly 27, 1991:
641*219b2ee8SDavid du Colombier	added test in setn in n4 to fix bug that permitted things like
642*219b2ee8SDavid du Colombier	\n (ab to work "properly".  thanks to jaap for finding and fixing.
643*219b2ee8SDavid du Colombier
644*219b2ee8SDavid du Colombier	added paranoid testing in t11 to make sure font files look ok.
645*219b2ee8SDavid du Colombier
646*219b2ee8SDavid du ColombierMay 13, 1991:
647*219b2ee8SDavid du Colombier	moved evaluation of \(xx from copy mode to non-copy mode, so that
648*219b2ee8SDavid du Colombier	weird character names wouldn't get reevaluated in argument parsing.
649*219b2ee8SDavid du Colombier	installed july 27.
650*219b2ee8SDavid du Colombier
651*219b2ee8SDavid du ColombierMay 6, 1991:
652*219b2ee8SDavid du Colombier	increased size of hyphenation exception buffer to 512 from 128
653*219b2ee8SDavid du Colombier
654*219b2ee8SDavid du ColombierApr 14, 1991:
655*219b2ee8SDavid du Colombier	added an extra redundant call of ptfont in setfp, since it appears
656*219b2ee8SDavid du Colombier	that some versions of adobe transcript assume that an "x font" command
657*219b2ee8SDavid du Colombier	means to change the actual font as well.  the fix preserves the current font.
658*219b2ee8SDavid du Colombier	thanks to david brailsford and friends for spotting the problem.
659*219b2ee8SDavid du Colombier
660*219b2ee8SDavid du Colombier	fixed up tests in alpha() in n8 to defend isalpha() against too-big inputs.
661*219b2ee8SDavid du Colombier	punct() argument had wrong type too.  thanks to rich drexler and peter nelson.
662*219b2ee8SDavid du Colombier
663*219b2ee8SDavid du ColombierMar 19, 1991:
664*219b2ee8SDavid du Colombier	fixed bug that prevented .rd from working with new corebuf organization.
665*219b2ee8SDavid du Colombier
666*219b2ee8SDavid du Colombier	fixed bug that caused .ig inside diversions to give bad storage
667*219b2ee8SDavid du Colombier	allocation.  thanks to arthur david olson, whose fix was on netnews
668*219b2ee8SDavid du Colombier	3 years earlier.
669*219b2ee8SDavid du Colombier
670*219b2ee8SDavid du ColombierMar 5, 1991:
671*219b2ee8SDavid du Colombier	huge table sizes for kanji.
672*219b2ee8SDavid du Colombier
673*219b2ee8SDavid du ColombierFeb ??, 1991:
674*219b2ee8SDavid du Colombier	working on dealing with large alphabets, notably kanji.
675*219b2ee8SDavid du Colombier	added "defaultwidth" to font descriptions, for characters
676*219b2ee8SDavid du Colombier	not given an explicit width.
677*219b2ee8SDavid du Colombier
678*219b2ee8SDavid du ColombierJan, 1991:
679*219b2ee8SDavid du Colombier	added tex hyphenation, using standard tex data files, but not the
680*219b2ee8SDavid du Colombier	elaborate compressed trie, which is a lot of trouble to save maybe
681*219b2ee8SDavid du Colombier	40k bytes.  this appears to run at exactly the same speed as before.
682*219b2ee8SDavid du Colombier
683*219b2ee8SDavid du Colombier	so far this stuff reads into a fixed size array; that should change.
684*219b2ee8SDavid du Colombier	it should also be possible to deal with multiple languages.
685*219b2ee8SDavid du Colombier
686*219b2ee8SDavid du Colombier	the command .ha sets the algorithm.  .ha 1 => tex, with troff rules
687*219b2ee8SDavid du Colombier	if tex doesn't hyphenate;  .ha 0 gives troff rules, and .ha resets
688*219b2ee8SDavid du Colombier	to the default, which is tex.  the hyphenation algorithm is part of
689*219b2ee8SDavid du Colombier	the environment, a nod to a future in which i handle more than one
690*219b2ee8SDavid du Colombier	language.
691*219b2ee8SDavid du Colombier
692*219b2ee8SDavid du Colombier	replaced the fixed size corebuf array for string/macro storage by
693*219b2ee8SDavid du Colombier	a dynamic structure that can grow.
694*219b2ee8SDavid du Colombier
695*219b2ee8SDavid du Colombier	this appears to slow things down by maybe 3%.  the code is about
696*219b2ee8SDavid du Colombier	the same complexity.
697*219b2ee8SDavid du Colombier
698*219b2ee8SDavid du ColombierDec 27, 1990:
699*219b2ee8SDavid du Colombier	converted to ansi c, based on some work by ken thompson, but not
700*219b2ee8SDavid du Colombier	as thoroughly as he did.  there is a shell script unansi and an awk
701*219b2ee8SDavid du Colombier	program cvt that will help you step back in time if you do not have
702*219b2ee8SDavid du Colombier	an ansi c compiler.
703*219b2ee8SDavid du Colombier
704*219b2ee8SDavid du Colombier	moved the special-name characters up to 256 instead of 128, although
705*219b2ee8SDavid du Colombier	done in terms of ALPHABET, so one can pass 8 bit characters through.
706*219b2ee8SDavid du Colombier	removed lots of 0177's and similar numbers.  input is now not filtered,
707*219b2ee8SDavid du Colombier	and if a character with the 8th bit on comes in, it will go out again.
708*219b2ee8SDavid du Colombier
709*219b2ee8SDavid du Colombier	fixed t11.c to read character names in hex or octal as well as
710*219b2ee8SDavid du Colombier	single-character ascii.
711*219b2ee8SDavid du Colombier
712*219b2ee8SDavid du Colombier	unknown characters are now carried through with width = spacewidth.
713*219b2ee8SDavid du Colombier	needs a way to set widths.
714*219b2ee8SDavid du Colombier
715*219b2ee8SDavid du Colombier	removed all signal handling from troff.  you signal, you die.
716*219b2ee8SDavid du Colombier
717*219b2ee8SDavid du Colombier	added -d option to print version number.
718*219b2ee8SDavid du Colombier
719*219b2ee8SDavid du ColombierDec 7, 1990:
720*219b2ee8SDavid du Colombier	.fp 3 V VERYLONGNAME used to truncate the name to 10 chars; fixed.
721*219b2ee8SDavid du Colombier
722*219b2ee8SDavid du Colombier	increased the limit on FBUFSZ for tables with very long fields.
723*219b2ee8SDavid du Colombier
724*219b2ee8SDavid du Colombier	changed atoi1() to use double to avoid intermediate overflow.
725*219b2ee8SDavid du Colombier
726*219b2ee8SDavid du Colombier	moved filenames like /usr/lib/font into tdef.h for easy change.
727*219b2ee8SDavid du Colombier	removed some dreggish definitions.
728*219b2ee8SDavid du Colombier
729*219b2ee8SDavid du Colombier	cleaned up non-portable error printing stuff;  fixed up some messages.
730*219b2ee8SDavid du Colombier
731*219b2ee8SDavid du ColombierDec 12, 1989:
732*219b2ee8SDavid du Colombier	Removed the .! command, an undocumented synonym for .sy.
733*219b2ee8SDavid du Colombier
734*219b2ee8SDavid du ColombierDec 4, 1989:
735*219b2ee8SDavid du Colombier	Another wart to the \X code, to try to preserve blanks in all situations.
736*219b2ee8SDavid du Colombier
737*219b2ee8SDavid du ColombierNov 17, 1989:
738*219b2ee8SDavid du Colombier	A number of small changes preparatory to getting rid of nroff.
739*219b2ee8SDavid du Colombier	The argument -Tnroff or -Tnroff-12 changes some internal values
740*219b2ee8SDavid du Colombier	so that the predicate .if n is true and certain arithmetic operations
741*219b2ee8SDavid du Colombier	are done as if nroff.  This design is not yet final.
742*219b2ee8SDavid du Colombier
743*219b2ee8SDavid du ColombierNov 7, 1989:
744*219b2ee8SDavid du Colombier	Fixed hyphenation for nov-ice, ad-vice, de-vice, ser-vice, *-vice.
745*219b2ee8SDavid du Colombier
746*219b2ee8SDavid du ColombierOct 11, 1989:
747*219b2ee8SDavid du Colombier	It is now permitted to do an explicit change to font S.
748*219b2ee8SDavid du Colombier	It is not clear what will break (though nothing seems to have).
749*219b2ee8SDavid du Colombier
750*219b2ee8SDavid du ColombierOct 10, 1989:
751*219b2ee8SDavid du Colombier	Modified flush code to always put out \nH instead of sometimes h.
752*219b2ee8SDavid du Colombier	This makes it easier to parse the output for positioning.
753*219b2ee8SDavid du Colombier
754*219b2ee8SDavid du ColombierSep 9, 1989:
755*219b2ee8SDavid du Colombier	Fixed internal representation of \D'~...' so that it
756*219b2ee8SDavid du Colombier	is immune to .tr ~ and variations.  No external change.
757*219b2ee8SDavid du Colombier
758*219b2ee8SDavid du ColombierAug 9, 1989:
759*219b2ee8SDavid du Colombier	Changed .tm so it outputs \e, \%, \-, \&, \(blank).
760*219b2ee8SDavid du Colombier	This might break indexing code.
761*219b2ee8SDavid du Colombier	Only in the new version, as are all subsequent fixes.
762*219b2ee8SDavid du Colombier
763*219b2ee8SDavid du ColombierJuly, 1989:
764*219b2ee8SDavid du Colombier	A major internal change:  font information is read in ascii
765*219b2ee8SDavid du Colombier	instead of the weird binary format of makedev (which is now dead).
766*219b2ee8SDavid du Colombier	character names need not all appear in DESC;  new names that
767*219b2ee8SDavid du Colombier	appear when a font is used become part of the set of known names.
768*219b2ee8SDavid du Colombier
769*219b2ee8SDavid du Colombier	There are some flaky bits here (it's conceivable that some \N
770*219b2ee8SDavid du Colombier	number will collide with a real name), and it's probably 10-15%
771*219b2ee8SDavid du Colombier	slower.  Tant pis.
772*219b2ee8SDavid du Colombier
773*219b2ee8SDavid du Colombier	As a by-product, nroff no longer compiles.  I'll probably get
774*219b2ee8SDavid du Colombier	back to this, but an alternative is to bag it once and for all.
775*219b2ee8SDavid du Colombier
776*219b2ee8SDavid du ColombierMay 25, 1989:
777*219b2ee8SDavid du Colombier	Another bug in \l, this time when width is 0.  Not installed,
778*219b2ee8SDavid du Colombier	since it's in the new font version.
779*219b2ee8SDavid du Colombier
780*219b2ee8SDavid du ColombierApr 23, 1989:
781*219b2ee8SDavid du Colombier	Fixed bug in n9 that caused core dump with unterminated
782*219b2ee8SDavid du Colombier	\l command, like \l'1.5i
783*219b2ee8SDavid du Colombier
784*219b2ee8SDavid du Colombier	ptflush no longer called when -a is on.
785*219b2ee8SDavid du Colombier
786*219b2ee8SDavid du ColombierApr 12, 1989:
787*219b2ee8SDavid du Colombier	fixed bug in n2 that failed to suppress printing of \!
788*219b2ee8SDavid du Colombier	output when a -o was in effect.
789*219b2ee8SDavid du Colombier
790*219b2ee8SDavid du ColombierApr 5, 1989:
791*219b2ee8SDavid du Colombier	.fl and \X now cause output of size, font, hpos and vpos.
792*219b2ee8SDavid du Colombier	this is necesary for postprocessors that intend to insert
793*219b2ee8SDavid du Colombier	independent material, such as postscript.
794*219b2ee8SDavid du Colombier
795*219b2ee8SDavid du ColombierFeb 1, 1989:
796*219b2ee8SDavid du Colombier	wait for .pi pipe to empty before exiting
797*219b2ee8SDavid du Colombier
798*219b2ee8SDavid du ColombierOct 2, 1988:
799*219b2ee8SDavid du Colombier	default is now -Tpost
800*219b2ee8SDavid du Colombier
801*219b2ee8SDavid du ColombierSep 19, 1988:
802*219b2ee8SDavid du Colombier	added abortive code to handle built-up characters by
803*219b2ee8SDavid du Colombier	passing something through as \D'b...'.  never used.
804*219b2ee8SDavid du Colombier
805*219b2ee8SDavid du ColombierJul 4, 1988:
806*219b2ee8SDavid du Colombier	replaced the sbrk nonsense in n3.c by calls to malloc.
807*219b2ee8SDavid du Colombier
808*219b2ee8SDavid du Colombier	\N now tests against proper font size.
809*219b2ee8SDavid du Colombier
810*219b2ee8SDavid du Colombier	installed Jaap Akkerhuis's code (mutatis mutandis) for
811*219b2ee8SDavid du Colombier	permitting up to 99 fonts, swapping them into font pos 0
812*219b2ee8SDavid du Colombier	as needed.  fixes the long-standing problem of having
813*219b2ee8SDavid du Colombier	multiple font changes on a single output line.
814*219b2ee8SDavid du Colombier
815*219b2ee8SDavid du ColombierJul 2, 1988:
816*219b2ee8SDavid du Colombier	\X now preserves spaces even when contents are diverted.
817*219b2ee8SDavid du Colombier
818*219b2ee8SDavid du Colombier	\N code safer -- NTRTAB and NWIDCACHE enlarged.
819*219b2ee8SDavid du Colombier
820*219b2ee8SDavid du ColombierJul 14, 1987:
821*219b2ee8SDavid du Colombier	Fixed obscure bug causing incorrect indentation of .mc output.
822