diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2013-10-05 22:25:12 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2013-10-05 22:25:12 +0000 |
commit | 7d8c02235ea3f2578abde25a58940051c970d356 (patch) | |
tree | 13080c3b86b0a3516d7f2745217bac850f47886f /regress/roff/if/real0.in | |
parent | 56a8d8ab1ecea16997824df6caf762fbe34da607 (diff) | |
download | mandoc-7d8c02235ea3f2578abde25a58940051c970d356.tar.gz mandoc-7d8c02235ea3f2578abde25a58940051c970d356.tar.zst mandoc-7d8c02235ea3f2578abde25a58940051c970d356.zip |
Support simple numerical conditions.
Original code from Christos Zoulas, NetBSD rev. 1.11-1.13, April 3, 2013.
I tweaked the code as follows:
* In roff_getnum(), don't skip a minus that isn't followed by a digit.
* In roff_getop(), do not handle "!=", groff doesn't support it either.
* In roff_evalcond(), treat negative numbers as false, like groff.
Besides, make the interfaces of roff_getnum() and roff_getop() more
similar to each other and simplify parts of the code a bit.
Diffstat (limited to 'regress/roff/if/real0.in')
0 files changed, 0 insertions, 0 deletions