aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/troff/n4.c
Commit message (Collapse)AuthorAgeFilesLines
* troff: fix SIGFPE when using modulus operatorG. Branden Robinson2025-11-091-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I uncovered this problem while writing unit tests for GNU troff's delimited expression handling. Plan 9 troff's numeric expression evaluator handles division by zero but not modulus by zero. Fixes: $ echo '.if %0%0% .tm true' | 9 troff Floating point exception (core dumped) $ echo '.if 1%0 .tm true' | 9 troff Floating point exception (core dumped) After this patch: $ echo '.if %0%0% .tm true' | 9 troff x T utf x res 720 1 1 x init troff: modulus by zero.; stdin:1 troff: modulus by zero.; stdin:1 x trailer V0 x stop $ echo '.if 1%0 .tm true' | 9 troff x T utf x res 720 1 1 x init troff: modulus by zero.; stdin:1 x trailer V0 x stop
* Trivial changes: whitespace and modes.Dan Cross2020-01-101-2/+2
| | | | | | | | | Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross <cross@gajendra.net>
* troff: silence gcc printf warningRuss Cox2008-11-171-1/+1
|
* Checkpoint -- still merging with Taj's version of the world.wkj2004-05-161-1/+1
|
* Let's try this. It's BUGGERED.rsc2004-05-151-0/+828