ref: 877989481513a00a80f3d58aed2de68744b7b51f
parent: 67309398ad3e80740593a5c9d5a46b9267191341
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;
--
⑨