CVSROOT:        /cvs
Module name:    src
Changes by:     schwa...@cvs.openbsd.org        2013/10/03 20:01:59

Modified files:
        usr.bin/mandoc : roff.c 

Log message:
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.

Reply via email to