|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 03-May-2022 | - |
| COPYING | H A D | 02-Jul-2007 | 34.3 KiB | 675 | 553 |
| ChangeLog | H A D | 22-Sep-2014 | 14.2 KiB | 391 | 254 |
| INSTALL | H A D | 24-Apr-2005 | 7.5 KiB | 182 | 141 |
| Makefile.OS2 | H A D | 29-Jun-2007 | 2.3 KiB | 72 | 42 |
| Makefile.Win | H A D | 20-Oct-2017 | 3.7 KiB | 109 | 53 |
| Makefile.in | H A D | 03-May-2022 | 11.1 KiB | 336 | 227 |
| NEWS | H A D | 31-Oct-2017 | 11.8 KiB | 263 | 221 |
| README | H A D | 16-Oct-2017 | 7.7 KiB | 171 | 134 |
| README.OS2 | H A D | 24-Apr-2005 | 1,016 | 23 | 18 |
| UnitsMKS.texinfo | H A D | 01-Nov-2017 | 21 KiB | 625 | 488 |
| UnitsWin.texinfo | H A D | 01-Nov-2017 | 10.5 KiB | 324 | 253 |
| configure | H A D | 31-Oct-2017 | 147.3 KiB | 5,221 | 4,288 |
| configure.ac | H A D | 31-Oct-2017 | 5.1 KiB | 187 | 154 |
| currency.units | H A D | 01-Nov-2017 | 13.7 KiB | 367 | 358 |
| definitions.units | H A D | 31-Oct-2017 | 269.2 KiB | 6,578 | 5,843 |
| fdl-1.3.texi | H A D | 04-Aug-2012 | 22.9 KiB | 506 | 421 |
| getopt.c | H A D | 19-Feb-2014 | 21.6 KiB | 760 | 403 |
| getopt.h | H A D | 19-Oct-2012 | 4.4 KiB | 136 | 53 |
| getopt1.c | H A D | 19-Feb-2014 | 4.2 KiB | 181 | 118 |
| install-sh | H A D | 06-Apr-2014 | 13.7 KiB | 528 | 351 |
| makeobjs.cmd | H A D | 29-Jun-2007 | 1.7 KiB | 50 | 45 |
| parse.tab.c | H A D | 29-Sep-2017 | 63.8 KiB | 2,159 | 1,508 |
| parse.y | H A D | 29-Sep-2017 | 13.5 KiB | 517 | 390 |
| setvcvars.sh | H A D | 28-May-2016 | 3.2 KiB | 92 | 37 |
| strfunc.c | H A D | 29-Jun-2007 | 2.1 KiB | 110 | 65 |
| texi2man | H A D | 22-Jan-2014 | 13.2 KiB | 464 | 327 |
| units.c | H A D | 31-Oct-2017 | 160.7 KiB | 5,819 | 4,644 |
| units.h | H A D | 09-Feb-2017 | 4.5 KiB | 168 | 115 |
| units.info | H A D | 01-Nov-2017 | 157.4 KiB | 3,513 | 2,906 |
| units.man | H A D | 01-Nov-2017 | 106.5 KiB | 4,177 | 4,131 |
| units.rc | H A D | 18-Apr-2014 | 36 | 2 | 1 |
| units.texinfo | H A D | 01-Nov-2017 | 126.7 KiB | 3,736 | 3,240 |
| units_cur | H A D | 01-Nov-2017 | 11.5 KiB | 353 | 297 |
| winmkdirs.bat | H A D | 21-Mar-2014 | 3.4 KiB | 127 | 115 |
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.