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