• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

COPYINGH A D02-Jul-200734.3 KiB675553

ChangeLogH A D22-Sep-201414.2 KiB391254

INSTALLH A D24-Apr-20057.5 KiB182141

Makefile.OS2H A D29-Jun-20072.3 KiB7242

Makefile.WinH A D20-Oct-20173.7 KiB10953

Makefile.inH A D03-May-202211.1 KiB336227

NEWSH A D31-Oct-201711.8 KiB263221

READMEH A D16-Oct-20177.7 KiB171134

README.OS2H A D24-Apr-20051,016 2318

UnitsMKS.texinfoH A D01-Nov-201721 KiB625488

UnitsWin.texinfoH A D01-Nov-201710.5 KiB324253

configureH A D31-Oct-2017147.3 KiB5,2214,288

configure.acH A D31-Oct-20175.1 KiB187154

currency.unitsH A D01-Nov-201713.7 KiB367358

definitions.unitsH A D31-Oct-2017269.2 KiB6,5785,843

fdl-1.3.texiH A D04-Aug-201222.9 KiB506421

getopt.cH A D19-Feb-201421.6 KiB760403

getopt.hH A D19-Oct-20124.4 KiB13653

getopt1.cH A D19-Feb-20144.2 KiB181118

install-shH A D06-Apr-201413.7 KiB528351

makeobjs.cmdH A D29-Jun-20071.7 KiB5045

parse.tab.cH A D29-Sep-201763.8 KiB2,1591,508

parse.yH A D29-Sep-201713.5 KiB517390

setvcvars.shH A D28-May-20163.2 KiB9237

strfunc.cH A D29-Jun-20072.1 KiB11065

texi2manH A D22-Jan-201413.2 KiB464327

units.cH A D31-Oct-2017160.7 KiB5,8194,644

units.hH A D09-Feb-20174.5 KiB168115

units.infoH A D01-Nov-2017157.4 KiB3,5132,906

units.manH A D01-Nov-2017106.5 KiB4,1774,131

units.rcH A D18-Apr-201436 21

units.texinfoH A D01-Nov-2017126.7 KiB3,7363,240

units_curH A D01-Nov-201711.5 KiB353297

winmkdirs.batH A D21-Mar-20143.4 KiB127115

README

1GNU 'units' converts between different systems of units.  It can
2handle multiplicative scale changes.  It can also handle nonlinear
3conversions such as Celsius to Fahrenheit (which may appear to be
4linear but is actually affine).
5
6------------------------------------------------------------------
7
8Installation
9
10General installation instructions appear in the file 'INSTALL'.  You
11should be able to run './configure' followed by 'make'.  If you give
12no options to configure, it will compile units to look for the units
13data file in a standard location (probably /usr/local/share).  If you
14try to use the program without installing you will need to use the
15'-f' option.  If you don't want to commit to an installation location,
16you can invoke configure by typing './configure --enable-path-search'.
17Then no path name will be compiled into 'units' and it will search the
18current directory and the directories listed in your PATH environment
19variable to find the units data file.
20
21If you are building on Windows with the MKS Toolkit, see the file
22'UnitsMKS.pdf'.
23
24If you are building with Microsoft Visual Studio from the Windows
25command prompt, see the file 'UnitsWin'.
26
27For full functionality you should have the GNU readline library
28installed to provide history and editing of data entry.  You can
29update currency conversions using the units_cur script which requires
30Python and the unidecode module.
31
32The documentation is available in texinfo, roff, and text format.  The
33man page is generated automatically from the texinfo documentation.
34This man page produces readable results when run through nroff, but it
35should probably not be printed with troff or groff--no effort has
36been made to ensure that it prints out reasonably.  To generate a
37printed manual, use 'units.dvi' instead.
38
39The distribution includes three icons that may be useful for
40installation in a GUI.  Use the icotool command to extract the png files
41from the .ico files.  The icon_ms.png file is suitable for use as a
42small button.
43
44This program has the following incompatibilties with unix 'units':
45  * The '-' character is a subtraction operator rather than a multiply
46      operator by default.
47  * Exponentiation in numbers requires an 'e', so you must write 2.5e-2
48      instead of 2.5-2.
49  * Prefixes are listed in the units file.
50  * GNU 'units' tries the -s, -es, and -ies plural forms.
51  * The default output format is slightly different.
52  * The units database is much larger and more informative, but with some
53      differences. (e.g. 'g' is for gravity in unix 'units' and grams in
54      GNU 'units'.)  The comment character has been changed to '#'.
55
56GNU 'units' includes the following extensions:
57  * Multiplication can be written with a '*' if desired.
58  * Exponents can be written with '^' or '**' in units.
59  * Exponents can be larger than 9 if written with '^' or '**'.
60  * Sums of units can be converted.
61  * The units data file is extensively commented.
62  * Units which measure reciprocal dimensions can be converted.
63  * Parentheses for grouping are supported.
64  * Funtions such as sin, cos, and log are supported.
65  * Roots of units and rational exponents can be computed.
66  * Nonlinear units conversions are supported.
67  * Conversion to lists of units (e.g. feet and inches) is supported
68
69----------------------------------------------------------------------
70
71When updating from 1.x to 2.x:
72
73The name of the personal units file has changed from $HOME/units.dat
74to $HOME/.units ($HOME/unitdef.units under Windows).
75
76The format for nonlinear unit definitions has changed.  Run 'units -c'
77and add the "units=" keyword in front of any bracketed unit
78specifications.
79
80------------------------------------------------------------------
81
82Ports
83
84Windows: Building with Microsoft Visual Studio
85
86units can be built from the Windows command prompt using Visual Studio;
87see UnitsWin for details.
88
89units can also be built from the the MKS Korn shell using Visual Studio;
90see UnitsMKS for details.
91
92Windows: Binary Distribution
93
94A binary distribution for Windows is available at
95http://ftp.gnu.org/gnu/units/windows/. The executable was built with
96Microsoft Visual Studio using Makefile.Win and the same source
97files included in the source distribution.  There is currently no
98support for UTF-8 or readline; however, command history and intraline
99editing are available via the standard Windows console facilities
100described in the documentation for doskey.
101
102A port of units 1.87 to Windows is available from the
103http://gnuwin32.sourceforge.net/packages/units.htm
104This port includes readline support.
105
106A Java version of units by Roman Redziejowski <roman.redz@swipnet.se>
107is available on SourceForge at http://units-in-java.sourceforge.net/
108
109Two versions are available for Android.  Steve Pomeroy has a version
110based on the the above Java version that you can obtain at
111http://staticfree.info/projects/units/ and Keith Flowers has compiled
112the C code for Android: http://apps.keithflower.org/?page_id=6
113
114A Perl version was written by Bob Walton <bob@bwalton.com> and can be
115accessed either as a units converting web form or as perl source code
116from:  http://bwalton.com/cgi-bin/myunitscgi.pl
117
118A project called Frink uses a (modified) version of the units
119database to supply a units-aware programming language.
120https://futureboy.us/frinkdocs/
121
122Jillian England has created a units definition file that changes
123energy to mass and seconds to meters:
124https://github.com/NinerXrayBravoTwoTwo/MassEnergyUnits
125
126-----------------------------------------------------------------------------
127
128Ideas the future (may or may not happen):
129
130  * Bundle up the units conversion stuff into a library.
131  * Inflation adjusted currency?
132  * Allow multiple definitions of the same unit and resolve the
133      correct definition by a conformability check.  (This has
134      exponential growth behavior in the number of units typed in!)
135  * When a nonconformable units error is given list units the user
136      might have meant (e.g. britainpound for pound) by a
137      conformability check and string pattern match of some sort.
138      "spelling advice"
139  * Allow some way of having units like '$' that don't require a trailing
140      space so you can write '$5'.  This could be handled by having a
141      command in the units database that specifies units which automatically
142      get a space inserted  after their name.
143  * Have a metacommand in the units datafile that specifies how plurals should
144      be tried for this file.  This would allow expansion into other
145      languages.  (Of course, the real work of expanding into other languages
146      is writing a units file that is appropriate for the language in question
147      and includes local units.  It's not just a translation task.)
148      Another thing that could be accomplished here would be translation of
149      English words like "cubic" and "per" into their symbolic meanings.
150      A command in the units file could indicate that "per" should be
151      substituted into a '/' and "cubic" means the cube the next unit.
152      As it stands, "per" is hard coded into the parser.
153  * Represent uncertainties in values in the database.
154
155-----------------------------------------------------------------------------
156
157Acknowledgements
158
159    This program owes a lot to Jeff Conrad who made many helpful suggestions,
160    found numerous bugs, and helped me to find the definitions of obscure
161    units.  Chris Madsen also made some valuable contributions.
162
163    The documentation has greatly benefited from the suggestions made by
164    Robert Chassell who kindly read several drafts.
165
166    The following people have been particularly helpful in fixing portability
167    problems: Kaveh Ghazi, Eric Backus, and Marcus Daniels.
168
169Bug reports and suggestions for improvements should be sent to the author:
170Adrian Mariano (adrianm@gnu.org).
171

README.OS2

1     =======================
2     | units 1.81 for OS/2 |
3     =======================
4
5I have just compiled the source from the Unix version by adding a small
6Makefile.OS2. To compile yourself you will need some GNU utilities (like
7rm, cp), gcc-3.0.x from Netlabs, GNU make, perl and GNU groff.
8Then you should be able to do "make -f Makefile.OS2 dist" to have
9everything sitting in the dist directory.
10
11I have substituted the 'col' command using 'sed', so there is now nice
12OS/2 readable documentation in units.doc. If you have 'less' installed,
13you can view the file units.less as well which then shows colored and
14highlighted text.
15
16To run you will need the EMX.DLL which you can find on the OS/2 ftp sites
17like http://hobbes.nmsu.edu or ftp://ftp.leo.org/pub/comp/os/os2.
18Unzip everything into the same directory and run makeobjs.cmd to make two
19program objects on your desktop.
20
21Please send any comments about the OS/2 version to me.
22
23Peter Weilbacher (os2@Weilbacher.org), 25Jan2003.