CVSROOT: /cvs Module name: src Changes by: schwa...@cvs.openbsd.org 2025/01/06 11:48:13
Modified files: usr.bin/mandoc : roff.c regress/usr.bin/mandoc/roff/nr: scale.in scale.out_ascii Log message: Even though roff(7) numerical expressions use integer arithmetic throughout and all numbers are rounded down before any arithmetic operation is attempted, let the number parser support decimal fractions in front of scaling units, which is useful for all scaling units except basic units ('u'). For example, this allows 0.25i = 2.5n = 60u. On the other hand, even though 3p = 10u, we get 1p+1p+1p = 1p*3 = 9u because arithmetic operations do not support floating point, so the intermediate result gets rounded down as 1p = 3.33u = 3u.