History log of /src/usr.bin/units/units.c |
Revision | | Date | Author | Comments |
1.27 |
| 05-Feb-2016 |
dholland | 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.
|
1.26 |
| 05-Feb-2016 |
dholland | 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.
|
1.25 |
| 07-Jan-2014 |
joerg | branches: 1.25.4; Annotate functions using format strings.
|
1.24 |
| 06-Jan-2013 |
wiz | Sort options in man page SYNOPSIS and sync usage with it. Bump date.
|
1.23 |
| 02-Jan-2013 |
apb | Really expand the name, not the definition, as the comment says.
|
1.22 |
| 01-Jan-2013 |
apb | fix incomplete comment
|
1.21 |
| 01-Jan-2013 |
apb | Add -l and -L options to units(1). "-l" simply lists all unit definitions, while "-L" alsoreduces them to depend only on a few primitive units (such as m, kg, sec).
|
1.20 |
| 01-Jan-2013 |
apb | Correctly ignore duplicate definitions. "continue" applies only to the innermost loop.
|
1.19 |
| 28-Dec-2012 |
apb | Allow a number and a unit to be juxtaposed without an intervening space. Now "litres/100km" works as desired, instead of silently being treated as "litres/100".
|
1.18 |
| 20-Mar-2012 |
matt | branches: 1.18.2; Use C89 function definitions
|
1.17 |
| 06-Sep-2011 |
joerg | branches: 1.17.2; ANSIfy, static + __dead
|
1.16 |
| 14-Apr-2009 |
lukem | Appease -Wcast-qual with a liberal sprinkling of const.
|
1.15 |
| 01-May-2006 |
christos | branches: 1.15.30; Coverity CID 814: Add extraneous checks to shut up Coverity.
|
1.14 |
| 04-Nov-2004 |
dsl | Add (unsigned char) cast to ctype functions
|
1.13 |
| 05-Dec-2003 |
mycroft | Recognize reciprocal conversions and generate output like GNU units(1).
|
1.12 |
| 17-May-2003 |
itojun | use strl*
|
1.11 |
| 31-Aug-2002 |
kristerw | Remove bogus output of '\n' when using -q.
|
1.10 |
| 02-Apr-2002 |
atatat | Fix a spelling error in the usage, and while I'm here, make it a little more intelligent about the arguments. A count of the "from-unit" can now be passed more easily on the command line.
|
1.9 |
| 14-Apr-2000 |
simonb | Don't declare 'extern opt*' getopt variables.
|
1.8 |
| 03-Feb-1998 |
perry | change includes to fix compiler warning
|
1.7 |
| 20-Oct-1997 |
lukem | WARNSify, fix .Nm usage, deprecate register, use <err.h>
|
1.6 |
| 06-Apr-1996 |
thorpej | RCS Id police.
|
1.5 |
| 01-Apr-1996 |
mark | Use an integer instead of a char to store the getopt() return value in order to match the function prototype and to work with compilers that default to unsigned chars. Compare the getopt() return value with -1 instead of EOF.
|
1.4 |
| 21-Mar-1996 |
jtc | Be pedantic, main() returns int in C.
|
1.3 |
| 21-Dec-1994 |
jtc | misc cleanup by jimj.
|
1.2 |
| 29-Jan-1994 |
jtc | Fix spelling error in Copyright notice
|
1.1 |
| 27-Oct-1993 |
cgd | add units command, written by Adrian Mariano (adrian@cam.cornell.edu or mariano@geom.umn.edu), cleaned up, KNF'd, etc., by cgd
|
1.15.30.1 |
| 13-May-2009 |
jym | Sync with HEAD.
Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
|
1.17.2.3 |
| 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
1.17.2.2 |
| 23-Jan-2013 |
yamt | sync with head
|
1.17.2.1 |
| 17-Apr-2012 |
yamt | sync with head
|
1.18.2.2 |
| 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.18.2.1 |
| 25-Feb-2013 |
tls | resync with head
|
1.25.4.1 |
| 15-Jul-2018 |
martin | 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.
|