NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
PR/50768 CVS commit: [netbsd-7] src/usr.bin/units
The following reply was made to PR bin/50768; it has been noted by GNATS.
From: "Martin Husemann" <martin%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc:
Subject: PR/50768 CVS commit: [netbsd-7] src/usr.bin/units
Date: Sun, 15 Jul 2018 10:47:54 +0000
Module Name: src
Committed By: martin
Date: Sun Jul 15 10:47:54 UTC 2018
Modified Files:
src/usr.bin/units [netbsd-7]: units.c
Log Message:
Pull up following revision(s) (requested by dholland in ticket #1620):
usr.bin/units/units.c: revision 1.26,1.27
Improve the parser. Now we understand negative exponents; fixes PR 50768.
Also handle negative numbers better in general (don't randomly drop
the sign in a number of cases) and don't choke on exponents > 9.
This commit alters the meaning of a few previously valid but marginal
inputs (e.g. "3 foot-5 pound" is now treated as "3*-5 foot-pound"
rather than "3*5 foot-pound"; if you want the latter insert another
space) but corrects obviously wrong handling of many more.
-
Improve previous slightly; while we accept e.g. "meter2" to mean "meter^2",
don't allow "meter-2" to be interpreted as "meter^-2" as that's very
confusing.
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.25.4.1 src/usr.bin/units/units.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index