ref: 6929781254e5c9ba711aec98bec81ebba947eabf
parent: 1355f149c3f7c6abe120d3394ac5dc48632f8945
author: Jacob Moody <moody@posixcafe.org>
date: Thu Jan 16 13:02:24 EST 2025
units: accept negative numbers
--- a/sys/src/cmd/units.y
+++ b/sys/src/cmd/units.y
@@ -225,7 +225,7 @@
peekrune = ' ';
loop:
- if((c >= '0' && c <= '9') || c == '.')
+ if((c >= '0' && c <= '9') || c == '.' || c == '-' || c == '+')
goto numb;
if(ralpha(c))
goto alpha;
--
⑨