summaryrefslogtreecommitdiffstats
path: root/usr.bin/units/units.c
Commit message (Collapse)AuthorAgeFilesLines
* Add missing static keywords to units(1)ed2011-11-061-6/+6
|
* Add limited support for units that are related by affine ratherdwmalone2008-08-161-17/+58
| | | | | | | | | | | | | than linear relations. We can now convert degC to degF. 586 units, 56 prefixes You have: 24 degC You want: degF 75.2 You have: degC You want: K (-> x*1 +273.15) (<- y*1 -273.15)
* Add enough consts to keep everyone happy.dwmalone2002-07-281-1/+1
|
* Add prototypes and turn on WARNS=?2.dwmalone2001-06-241-0/+18
|
* Give units a bit of a cleanup:dwmalone2001-02-281-32/+26
| | | | | | | | | | | | | | 1) Fix a bug where the recursion on prefixes where if recusrion failed then the next attempt started too far along the string. 2) Up some internal limits that we were about to hit off. 3) Change the constness and signedness of some things and complete missing prototypes. 4) Remove the readerror function 'cos it could print out the wrong wrong file name. Replace it with more useful error messages. 5) Use sizeof when passing buffers to fgets. 6) Warn about empty prefix definitions. Reviewed by: iedowse
* Don't segv when trying to add a 0-length unit name.kris2000-07-311-21/+20
| | | | | | Some string-related cleanups inspired by OpenBSD. Reviewed by: asmodai
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Use err(3). Cosmetic in usage(). Rewrote man page in mdoc format.charnier1997-08-211-35/+24
|
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Fix exit code when used in non-interactive mode.alex1996-06-081-3/+5
| | | | Remove ';' typo attached to if statement.
* Units conversion utility courtesy of NetBSD.alex1996-06-081-0/+706
Submitted by: Jeremy Prior Obtained from: NetBSD
OpenPOWER on IntegriCloud