units-2.02/0000777000175000017500000000000012167664614012076 5ustar adrianadrianunits-2.02/Makefile.in0000664000175000017500000001705112167664474014151 0ustar adrianadrian# Makefile for units, a program for units conversion # # Copyright (C) 1996, 1997, 1999, 2005, 2006, 2012 # Free Software Foundation, Inc # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # # This program was written by Adrian Mariano (adrian@cam.cornell.edu) # SHELL = /bin/sh prefix = @prefix@ exec_prefix = @exec_prefix@ srcdir = @srcdir@ CC = @CC@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ MAKEINFO = makeinfo TEXI2DVI = texi2dvi TEXI2PDF = texi2pdf LDFLAGS = @LDFLAGS@ LIBS= @LIBS@ VPATH = @srcdir@ datarootdir = @datarootdir@ datadir = @datadir@ bindir = @bindir@ infodir = @infodir@ mandir = @mandir@ transform=@program_transform_name@ DEFS=-DUNITSFILE=\"@UDAT@definitions.units\" -DLOCALEMAP=\"@UDAT@locale.map\" \ @DEFIS@ @DEFS@ CFLAGS = @CFLAGS@ OBJECTS = units.@OBJEXT@ parse.tab.@OBJEXT@ getopt.@OBJEXT@ getopt1.@OBJEXT@ @STRFUNC@ .SUFFIXES: .SUFFIXES: .c .@OBJEXT@ .c.@OBJEXT@: $(CC) $(DEFS) $(CFLAGS) -I$(srcdir) -c $< # %.@OBJEXT@: %.c # $(CC) $(DEFS) $(CFLAGS) -I$(srcdir) -c %.c DISTFILES = README ChangeLog units.info units.txt getopt1.c units.dvi \ Makefile.in units.c getopt.c getopt.h definitions.units units.texinfo \ configure.ac configure strfunc.c COPYING Makefile.dos install-sh units.man \ mkinstalldirs NEWS texi2man INSTALL units.pdf units_cur currency.units \ parse.tab.c parse.y units.h Makefile.OS2 makeobjs.cmd README.OS2 \ README.MKS locale.map fdl-1.3.texi all: units@EXEEXT@ units.1 units.info units_cur_inst units.@OBJEXT@: units.c parse.tab.c: parse.y bison parse.y parse.tab.@OBJEXT@: parse.tab.c units@EXEEXT@: $(OBJECTS) $(CC) $(CFLAGS) $(LDFLAGS) -o units@EXEEXT@ $(OBJECTS) $(LIBS) units_cur_inst: units_cur sed -e "s:outfile = 'currency.units':outfile='@UDAT@currency.units':" units_cur > units_cur_inst install-support: definitions.units currency.units units_cur_inst $(srcdir)/mkinstalldirs $(DESTDIR)@UDAT@ $(DESTDIR)$(bindir) $(INSTALL_DATA) $(srcdir)/definitions.units $(DESTDIR)@UDAT@definitions.units $(INSTALL_DATA) $(srcdir)/currency.units $(DESTDIR)@UDAT@currency.units $(INSTALL_DATA) $(srcdir)/locale.map $(DESTDIR)@UDAT@locale.map $(INSTALL_PROGRAM) units_cur_inst $(DESTDIR)$(bindir)/`echo units_cur|sed '$(transform)'` install: units@EXEEXT@ install-doc install-support $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) $(INSTALL_PROGRAM) units@EXEEXT@ $(DESTDIR)$(bindir)/`echo units@EXEEXT@|sed '$(transform)'` install-strip: units@EXEEXT@ install-doc install-support $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) $(INSTALL_PROGRAM) -s units@EXEEXT@ $(DESTDIR)$(bindir)/`echo units@EXEEXT@|sed '$(transform)'` install-doc: install-man install-info install-man: units.1 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man1 $(INSTALL_DATA) units.1 $(DESTDIR)$(mandir)/man1/`echo units|sed '$(transform)'`.1 units.man: units.texinfo texi2man ./texi2man units.texinfo > units.man units.1: units.man sed s!@DATAFILE@!@UDAT@definitions.units! $(srcdir)/units.man > units.1 install-info: $(DESTDIR)$(infodir)/units.info $(DESTDIR)$(infodir)/units.info: units.info $(POST_INSTALL) $(srcdir)/mkinstalldirs $(DESTDIR)$(infodir) # There may be a newer info file in . than in srcdir. -if test -f units.info; then d=.; \ else d=$(srcdir); fi; \ $(INSTALL_DATA) $$d/units.info $@; \ # Run install-info only if it exists. # Use `if' instead of just prepending `-' to the # line so we notice real errors from install-info. # We use `$(SHELL) -c' because some shells do not # fail gracefully when there is an unknown command. if test -f $(DESTDIR)$(infodir)/dir; then \ if $(SHELL) -c 'install-info --version' \ >/dev/null 2>&1; then \ install-info --dir-file=$(DESTDIR)$(infodir)/dir \ $(DESTDIR)$(infodir)/units.info; \ else true; fi \ else true; fi Makefile: Makefile.in config.status ./config.status uninstall: -rm -f $(DESTDIR)$(bindir)/`echo units@EXEEXT@|sed '$(transform)'` \ $(DESTDIR)$(mandir)/man1/`echo units|sed '$(transform)'`.1 \ $(DESTDIR)$(infodir)/units.info \ $(DESTDIR)@UDAT@definitions.units \ $(DESTDIR)@UDAT@currency.units \ @if test -f $(DESTDIR)$(infodir)/dir; then \ echo You may need to remove units.info from $(DESTDIR)$(infodir)/dir; \ else true; fi clean mostlyclean: -rm -f *.@OBJEXT@ units@EXEEXT@ units.fn units.ky units.pg units.tp \ units.vr units.log units.dvi units.1 units.cp distname .chk \ units.toc units.aux units.cps units.op units_cur_inst distclean: clean -rm -f config.* Makefile TAGS maintainer-clean: clean -rm -f units.txt units.info units.pdf units.dvi \ units-*.tar.gz parse.tab.c currency.units currency.units: ./units_cur sig: echo units-`sed -n -e '/#.*VERSION/s/.*"\(.*\)"/\1/gp' \ $(srcdir)/units.c`.tar.gz > distname echo 'version: 1.1' > `cat distname`.directive echo 'directory: units' >> `cat distname`.directive echo 'filename: '`cat distname` >> `cat distname`.directive gpg --clearsign `cat distname`.directive gpg -b `cat distname` -rm -f `cat distname`.directive distname dist: $(DISTFILES) ./units_cur echo units-`sed -n -e '/#.*VERSION/s/.*"\(.*\)"/\1/gp' \ $(srcdir)/units.c` > distname -rm -r `cat distname` `cat distname`.tar `cat distname`.tar.gz mkdir `cat distname` dst=`cat distname`; for f in $(DISTFILES); do \ ln $(srcdir)/$$f $$dst/$$f || { echo copying $$f; \ cp -p $(srcdir)/$$f $$dst/$$f ; } \ done chmod 777 `cat distname` tar cf `cat distname`.tar `cat distname` gzip `cat distname`.tar -rm -rf `cat distname` distname dvi: units.dvi pdf: units.pdf units.dvi: units.texinfo $(TEXI2DVI) $(srcdir)/units.texinfo units.pdf: units.texinfo $(TEXI2PDF) $(srcdir)/units.texinfo info: units.info units.info: units.texinfo $(MAKEINFO) $(srcdir)/units.texinfo units.txt: units.1 nroff -man $(srcdir)/units.1 | col -b > units.txt doc: units.dvi units.info units.txt units.pdf check: all @echo Checking units @./units -f $(srcdir)/definitions.units \ '(((square(kiloinch)+2.84m2) /0.5) meters^2)^(1|4)' m \ | sed -n -e 's/ \* //p' > .chk @if [ "`cat .chk`" = 6 ]; then echo Units seems to work; \ else echo Something is wrong: units failed the check: ;cat .chk; fi @rm -f .chk configure: configure.ac autoconf TAGS: units.c etags $(srcdir)/units.c $(srcdir)/parse.y smalldist: units.c units.h parse.y parse.tab.c echo units-`sed -n -e '/#.*VERSION/s/.*"\(.*\)"/\1/gp' \ $(srcdir)/units.c` > distname -rm -r `cat distname` `cat distname`.tar `cat distname`.tar.gz tar cf `cat distname`.tar units.c units.h parse.y parse.tab.c\ getopt1.c getopt.c getopt.h gzip `cat distname`.tar # # Not very portable code to compile into library (written for Linux) # libunits.a: $(OBJECTS) ar -r libunits.a $^ libunits.so: $(OBJECTS) $(CC) $(LDFLAGS) -shared -o $@ $^ # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: units-2.02/COPYING0000664000175000017500000010451310642156735013127 0ustar adrianadrian GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . units-2.02/strfunc.c0000664000175000017500000000423110641165333013711 0ustar adrianadrian/* * Copyright (C) 1996 Free Software Foundation, Inc * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * */ #define NULL 0 #define size_t int #ifdef NO_STRTOK /* Find the first ocurrence in S of any character in ACCEPT. */ char * strpbrk(char *s, char *accept) { while (*s != '\0') if (strchr(accept, *s) == NULL) ++s; else return (char *) s; return NULL; } static char *olds = NULL; char * strtok(char *s, char *delim) { char *token; if (s == NULL) { if (olds == NULL) { /*errno = EINVAL; Wonder where errno is defined....*/ return NULL; } else s = olds; } /* Scan leading delimiters. */ s += strspn(s, delim); if (*s == '\0') { olds = NULL; return NULL; } /* Find the end of the token. */ token = s; s = strpbrk(token, delim); if (s == NULL) /* This token finishes the string. */ olds = NULL; else { /* Terminate the token and make OLDS point past it. */ *s = '\0'; olds = s + 1; } return token; } #endif /* NO_STRTOK */ #ifdef NO_STRSPN /* Return the length of the maximum initial segment of S which contains only characters in ACCEPT. */ size_t strspn(char *s, char *accept) { register char *p; register char *a; register size_t count = 0; for (p = s; *p != '\0'; ++p) { for (a = accept; *a != '\0'; ++a) if (*p == *a) break; if (*a == '\0') return count; else ++count; } return count; } #endif NO_STRSPN units-2.02/README.MKS0000600000175000017500000000266412041216471013364 0ustar adrianadrianThis comments in this file are based on MKS Toolkit for developers, version 9.4, running on Windows XP Professional, SP3. The configure script was generated by GNU Autoconf 2.68. The most recent build of units with the Toolkit (using Microsoft Visual C/C++ 6.0) was for version 2.00b on 21 October 2012. Configure --------- Configure will fail unless invoked as PATH_SEPARATOR=';' configure Compilation ----------- The MKS version of make ignores suffix rules in Makefile unless the line .POSIX appears in Makefile before any suffix rules. This can also be accomplished by setting and exporting TK_USE_SFX_RULE=1 but this will cause any existing Makefile that depends on the default behavior of MKS make to fail. Behavior of PAGER ----------------- The MKS versions of more and less do not recognize '+n' as an option to display a file beginning at line n, so help from within units will fail. To avoid this problem, add -D_MKS_TOOLKIT to the DEFS in Makefile. Install Program --------------- If the PATH at shell invocation uses the backslash as the path separator, and you have a BSD-compatible install program, the Makefile may have the incorrect entry INSTALL = c:usrlocalbin/install.exe -c Add the slashes to get INSTALL = c:/usr/local/bin/install.exe -c Giving a PATH with forward slashes in a file given by ENV will have no effect because configure unsets that variable, and the file will not be read. units-2.02/units.info0000664000175000017500000042047012166761265014121 0ustar adrianadrianThis is units.info, produced by makeinfo version 4.13 from ./units.texinfo. This manual is for GNU Units (version 2.02), which performs units conversions and units calculations. Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2004, 2005, 2007, 2011, 2012, 2013 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". INFO-DIR-SECTION Science START-INFO-DIR-ENTRY * Units: (units). Units conversion and scientific calculation. END-INFO-DIR-ENTRY  File: units.info, Node: Top, Next: Overview, Up: (dir) Units Conversion **************** This manual describes the `units' command for units conversion and how you can use it as a powerful scientific calculator that keeps track of units. This is Edition 2.02 of `The Units Conversion Manual' for `units' Version 2.02. * Menu: * Overview:: What does `units' do? * Interactive Use:: How to use `units'. * Command Line Use:: How to use `units' noninteractively. * Unit Definitions:: What units are defined? * Unit Expressions:: Forming compound units. * Nonlinear Conversions:: Nonlinear unit conversions (e.g., temperature) * Unit Lists:: Conversion to sums of units (e.g., feet and inches) * Invoking Units:: Command line options. * Defining Your Own Units:: Adding your own unit definitions * Numeric Output Format:: How to change the output format * Localization:: How to define and use regional unit names. * Environment Vars:: Environment variables used by `units'. * Unicode Support:: Support for Unicode (UTF-8). * Readline Support:: Unit name completion and editing. * Currency:: Updating currency exchange rates. * Database Syntax:: Summary of database command syntax. * GNU Free Documentation License:: License. * Index:: General index.  File: units.info, Node: Overview, Next: Interactive Use, Prev: Top, Up: Top 1 Overview of `units' ********************* The `units' program converts quantities expressed in various systems of measurement to their equivalents in other systems of measurement. Like many similar programs, it can handle multiplicative scale changes. It can also handle nonlinear conversions such as Fahrenheit to Celsius.(1) *Note Temperature Conversions::. The program can also perform conversions from and to sums of units, such as converting between meters and feet plus inches. Beyond simple unit conversions, `units' can be used as a general-purpose scientific calculator that keeps track of units in its calculations. You can form arbitrary complex mathematical expressions of dimensions including sums, products, quotients, powers, and even roots of dimensions. Thus you can ensure accuracy and dimensional consistency when working with long expressions that involve many different units that may combine in complex ways. The units are defined in an external data file. You can use the extensive data file that comes with this program, or you can provide your own data file to suit your needs. You can also use your own data file to supplement the standard data file. Basic operation is simple: you enter the units that you want to convert _from_ and the units that you want to convert _to_. You can use the program interactively with prompts, or you can use it from the command line. You can change the default behavior of `units' with various options given on the command line. *Note Invoking Units::, for a description of the available options. ---------- Footnotes ---------- (1) But Fahrenheit to Celsius is linear, you insist. Not so. A transformation T is linear if T(x+y)=T(x)+T(y) and this fails for T(x)=ax+b. This transformation is affine, but not linear.  File: units.info, Node: Interactive Use, Next: Command Line Use, Prev: Overview, Up: Top 2 Interacting with `units' ************************** To invoke units for interactive use, type `units' at your shell prompt. The program will print something like this: Currency exchange rates from 04/23/12 2516 units, 85 prefixes, 65 nonlinear units You have: At the `You have:' prompt, type the quantity and units that you are converting _from_. For example, if you want to convert ten meters to feet, type `10 meters'. Next, `units' will print `You want:'. You should type the units you want to convert _to_. To convert to feet, you would type `feet'. If the `readline' library was compiled in then the tab key can be used to complete unit names. *Note Readline Support::, for more information about `readline'. To quit the program press Ctrl-C or Ctrl-D under Unix. Under Windows press Ctrl-Z. The answer will be displayed in two ways. The first line of output, which is marked with a `*' to indicate multiplication, gives the result of the conversion you have asked for. The second line of output, which is marked with a `/' to indicate division, gives the inverse of the conversion factor. If you convert 10 meters to feet, `units' will print * 32.808399 / 0.03048 which tells you that 10 meters equals about 32.8 feet. The second number gives the conversion in the opposite direction. In this case, it tells you that 1 foot is equal to about 0.03 dekameters since the dekameter is 10 meters. It also tells you that 1/32.8 is about 0.03. The `units' program prints the inverse because sometimes it is a more convenient number. In the example above, for example, the inverse value is an exact conversion: a foot is exactly 0.03048 dekameters. But the number given the other direction is inexact. If you convert grains to pounds, you will see the following: You have: grains You want: pounds * 0.00014285714 / 7000 From the second line of the output you can immediately see that a grain is equal to a seven thousandth of a pound. This is not so obvious from the first line of the output. If you find the output format confusing, try using the `--verbose' option: You have: grain You want: aeginamina grain = 0.00010416667 aeginamina grain = (1 / 9600) aeginamina If you request a conversion between units that measure reciprocal dimensions, then `units' will display the conversion results with an extra note indicating that reciprocal conversion has been done: You have: 6 ohms You want: siemens reciprocal conversion * 0.16666667 / 6 Reciprocal conversion can be suppressed by using the `--strict' option. As usual, use the `--verbose' option to get more comprehensible output: You have: tex You want: typp reciprocal conversion 1 / tex = 496.05465 typp 1 / tex = (1 / 0.0020159069) typp You have: 20 mph You want: sec/mile reciprocal conversion 1 / 20 mph = 180 sec/mile 1 / 20 mph = (1 / 0.0055555556) sec/mile If you enter incompatible unit types, the `units' program will print a message indicating that the units are not conformable and it will display the reduced form for each unit: You have: ergs/hour You want: fathoms kg^2 / day conformability error 2.7777778e-11 kg m^2 / sec^3 2.1166667e-05 kg^2 m / sec If you only want to find the reduced form or definition of a unit, simply press at the `You want:' prompt. Here is an example: You have: jansky You want: Definition: fluxunit = 1e-26 W/m^2 Hz = 1e-26 kg / s^2 The output from `units' indicates that the jansky is defined to be equal to a fluxunit which in turn is defined to be a certain combination of watts, meters, and hertz. The fully reduced (and in this case somewhat more cryptic) form appears on the far right. Some named units are treated as dimensionless in some situations. These units include the radian and steradian. These units will be treated as equal to 1 in units conversions. Power is equal to torque times angular velocity. This conversion can only be performed if the radian is dimensionless. You have: (14 ft lbf) (12 radians/sec) You want: watts * 227.77742 / 0.0043902509 Named dimensionless units are not treated as dimensionless in other contexts. They cannot be used as exponents so for example, `meter^radian' is not allowed. If you want a list of options you can type `?' at the `You want:' prompt. The program will display a list of named units that are conformable with the unit that you entered at the `You have:' prompt above. Conformable unit _combinations_ will not appear on this list. Typing `help' at either prompt displays a short help message. You can also type `help' followed by a unit name. This will invoke a pager on the units data base at the point where that unit is defined. You can read the definition and comments that may give more details or historical information about the unit. (You can generally quit out of the page by pressing `q'.) Typing `search' TEXT will display a list of all of the units whose names contain TEXT as a substring along with their definitions. This may help in the case where you aren't sure of the right unit name.  File: units.info, Node: Command Line Use, Next: Unit Definitions, Prev: Interactive Use, Up: Top 3 Using `units' Non-Interactively ********************************* The `units' program can perform units conversions non-interactively from the command line. To do this, type the command, type the original unit expression, and type the new units you want. If a units expression contains non-alphanumeric characters, you may need to protect it from interpretation by the shell using single or double quote characters. If you type units "2 liters" quarts then `units' will print * 2.1133764 / 0.47317647 and then exit. The output tells you that 2 liters is about 2.1 quarts, or alternatively that a quart is about 0.47 times 2 liters. If the conversion is successful, then `units' will return success (zero) to the calling environment. If you enter non-conformable units then `units' will print a message giving the reduced form of each unit and it will return failure (nonzero) to the calling environment. When you invoke `units' with only one argument, it will print out the definition of the specified unit. It will return failure if the unit is not defined and success if the unit is defined.  File: units.info, Node: Unit Definitions, Next: Unit Expressions, Prev: Command Line Use, Up: Top 4 Unit Definitions ****************** The conversion information is read from a units data file that is called `definitions.units' and is usually located in the `/usr/share/units' directory. If you invoke `units' with the `-V' option, it will print the location of this file. The default file includes definitions for all familiar units, abbreviations and metric prefixes. It also includes many obscure or archaic units. Many constants of nature are defined, including these: pi ratio of circumference to diameter c speed of light e charge on an electron force acceleration of gravity mole Avogadro's number water pressure per unit height of water Hg pressure per unit height of mercury au astronomical unit k Boltzman's constant mu0 permeability of vacuum epsilon0 permittivity of vacuum G Gravitational constant mach speed of sound The standard data file includes atomic masses for all of the elements and numerous other constants. Also included are the densities of various ingredients used in baking so that `2 cups flour_sifted' can be converted to `grams'. This is not an exhaustive list. Consult the units data file to see the complete list, or to see the definitions that are used. The `pound' is a unit of mass. To get force, multiply by the force conversion unit `force' or use the shorthand `lbf'. (Note that `g' is already taken as the standard abbreviation for the gram.) The unit `ounce' is also a unit of mass. The fluid ounce is `fluidounce' or `floz'. British capacity units that differ from their US counterparts, such as the British Imperial gallon, are prefixed with `br'. Currency is prefixed with its country name: `belgiumfranc', `britainpound'. When searching for a unit, if the specified string does not appear exactly as a unit name, then the `units' program will try to remove a trailing `s', `es'. Next units will replace a trailing `ies' with `y'. If that fails, `units' will check for a prefix. The database includes all of the standard metric prefixes. Only one prefix is permitted per unit, so `micromicrofarad' will fail. However, prefixes can appear alone with no unit following them, so `micro*microfarad' will work, as will `micro microfarad'. To find out which units and prefixes are available, read the standard units data file, which is extensively annotated. 4.1 English Customary Units =========================== English customary units differ in various ways in different regions. In Britain a complex system of volume measurements featured different gallons for different materials such as a wine gallon and ale gallon that different by twenty percent. This complexity was swept away in 1824 by a reform that created an entirely new gallon, the British Imperial gallon defined as the volume occupied by ten pounds of water. Meanwhile in the USA the gallon is derived from the 1707 Winchester wine gallon, which is 231 cubic inches. These gallons differ by about twenty percent. By default if `units' runs in the `en_GB' locale you will get the British volume measures. If it runs in the `en_US' locale you will get the US volume measures. In other locales the default values are the US definitions. If you wish to force different definitions then set the environment variable `UNITS_ENGLISH' to either `US' or `GB' to set the desired definitions independent of the locale. Before 1959, the value of a yard (and other units of measure defined in terms of it) differed slightly among English-speaking countries. In 1959, Australia, Canada, New Zealand, the United Kingdom, the United States, and South Africa adopted the Canadian value of 1 yard = 0.9144 m (exactly), which was approximately halfway between the values used by the UK and the US; it had the additional advantage of making 1 inch = 2.54 cm (exactly). This new standard was termed the "International Yard". Australia, Canada, and the UK then defined all customary lengths in terms of the International Yard (Australia did not define the furlong or rod); because many US land surveys were in terms of the pre-1959 units, the US continued to define customary surveyors' units (furlong, chain, rod, and link) in terms of the previous value for the foot, which was termed the "US survey foot". The US defined a "US survey mile" as 5280 US survey feet, and defined a "statute mile" as a US survey mile. The US values for these units differ from the international values by about 2 ppm. The `units' program uses the international values for these units; the US values can be obtained by using either the `US' or the `survey' prefix. In either case, the simple familiar relationships among the units are maintained, e.g., 1 `furlong' = 660 `ft', and 1 `USfurlong' = 660 `USft', though the metric equivalents differ slightly between the two cases. The `US' prefix or the `survey' prefix can also be used to obtain the US survey mile and the value of the US yard prior to 1959, e.g., `USmile' or `surveymile' (but _not_ `USsurveymile'). To get the US value of the statute mile, use either `USstatutemile' or `USmile'. Except for distances that extend over hundreds of miles (such as in the US State Plane Coordinate System), the differences in the miles are usually insignificant: You have: 100 surveymile - 100 mile You want: inch * 12.672025 / 0.078913984 The pre-1959 UK values for these units can be obtained with the prefix `UK'. In the US, the acre is officially defined in terms of the US survey foot, but `units' uses a definition based on the international foot. If you want the official US acre use `USacre' and similarly use `USacrefoot' for the official US version of that unit. The difference between these units is about 4 parts per million.  File: units.info, Node: Unit Expressions, Next: Nonlinear Conversions, Prev: Unit Definitions, Up: Top 5 Unit Expressions ****************** * Menu: * Operators:: The usual arithmetic operators, with a few extras * Sums and Differences of Units:: Adding and subtracting units * Numbers as Units:: A number is a dimensionless unit * Built-in Functions:: Trigonometric functions, logarithms, roots * Complicated Unit Expressions:: A complicated example * Backwards Compatibility:: Alternate behavior for `*' and `-'  File: units.info, Node: Operators, Next: Sums and Differences of Units, Up: Unit Expressions 5.1 Operators ============= You can enter more complicated units by combining units with operations such as powers, multiplication, division, addition, subtraction, and parentheses for grouping. You can use the customary symbols for these operators when `units' is invoked with its default options. Additionally, `units' supports some extensions, including high priority multiplication using a space, and a high priority numerical division operator (`|') that can simplify some expressions. Powers of units can be specified using the `^' character as shown in the following example, or by simple concatenation of a unit and its exponent: `cm3' is equivalent to `cm^3'; if the exponent is more than one digit, the `^' is required. An exponent like `2^3^2' is evaluated right to left as usual. The `^' operator has the second highest precedence. You can also use `**' as an exponent operator. You have: cm^3 You want: gallons * 0.00026417205 / 3785.4118 You have: arabicfoot * arabictradepound * force You want: ft lbf * 0.7296 / 1.370614 You multiply units using a space or an asterisk (`*'). The example above shows both forms. You can divide units using the slash (`/') or with `per'. You have: furlongs per fortnight You want: m/s * 0.00016630986 / 6012.8727 When a unit includes a prefix, exponent operators apply to the combination, so `centimeter^3' gives cubic centimeters. If you separate the prefix from the unit with any multiplication operator, such as `centi meter^3', then the prefix is treated as a separate unit, so the exponent does not apply. The second example would be a hundredth of a cubic meter, not a centimeter. Multiplication using a space has a higher precedence than division using a slash and is evaluated left to right; in effect, the first `/' character marks the beginning of the denominator of a unit expression. This makes it simple to enter a quotient with several terms in the denominator: `W / m^2 Hz'. If you multiply with `*' then you must group the terms in the denominator with parentheses: `W / (m^2 * Hz)'. The higher precedence of the space operator may not always be advantageous. For example, `m/s s/day' is equivalent to `m / s s day' and has dimensions of length per time cubed. Similarly, `1/2 meter' refers to a unit of reciprocal length equivalent to 0.5/meter, perhaps not what you would intend if you entered that expression. The `*' operator is convenient for multiplying a sequence of quotients. With the `*' operator, the example above becomes `m/s * s/day', which is equivalent to `m/day'. Similarly, you could write `1/2 * meter' to get half a meter. Alternatively, parentheses can be used for grouping: you could write `(1/2) meter' to get half a meter. *Note Complicated Unit Expressions::, for an illustration of the various options. The `units' program supports another option for numerical fractions. You can indicate division of _numbers_ with the vertical bar (`|'), so if you wanted half a meter you could write `1|2 meter'. This operator has the highest precedence, so you can write the square root of two thirds `2|3^1|2'. You cannot use the vertical bar to indicate division of non-numerical units (e.g., `m|s' results in an error message). You have: 1|2 inch You want: cm * 1.27 / 0.78740157 You can use parentheses for grouping: You have: (1/2) kg / (kg/meter) You want: league * 0.00010356166 / 9656.0833  File: units.info, Node: Sums and Differences of Units, Next: Numbers as Units, Prev: Operators, Up: Unit Expressions 5.2 Sums and Differences of Units ================================= You may sometimes want to add values of different units that are outside the SI. You may also wish to use `units' as a calculator that keeps track of units. Sums of conformable units are written with the `+' character, and differences with the `-' character. You have: 2 hours + 23 minutes + 32 seconds You want: seconds * 8612 / 0.00011611705 You have: 12 ft + 3 in You want: cm * 373.38 / 0.0026782366 You have: 2 btu + 450 ft lbf You want: btu * 2.5782804 / 0.38785542 The expressions that are added or subtracted must reduce to identical expressions in primitive units, or an error message will be displayed: You have: 12 printerspoint - 4 heredium ^ Illegal sum of non-conformable units As usual, the precedence for `+' and `-' is lower than that of the other operators. A fractional quantity such as 2 1/2 cups can be given as `(2+1|2) cups'; the parentheses are necessary because multiplication has higher precedence than addition. If you omit the parentheses, `units' attempts to add `2' and `1|2 cups', and you get an error message: You have: 2+1|2 cups ^ Illegal sum or difference of non-conformable units The expression could also be correctly written as `(2+1/2) cups'. If you write `2 1|2 cups' the space is interpreted as _multiplication_ so the result is the same as `1 cup'. The `+' and `-' characters sometimes appears in exponents like `3.43e+8'. This leads to an ambiguity in an expression like `3e+2 yC'. The unit `e' is a small unit of charge, so this can be regarded as equivalent to `(3e+2) yC' or `(3 e)+(2 yC)'. This ambiguity is resolved by always interpreting `+' and `-' as part of an exponent if possible.  File: units.info, Node: Numbers as Units, Next: Built-in Functions, Prev: Sums and Differences of Units, Up: Unit Expressions 5.3 Numbers as Units ==================== For `units', numbers are just another kind of unit. They can appear as many times as you like and in any order in a unit expression. For example, to find the volume of a box that is 2 ft by 3 ft by 12 ft in steres, you could do the following: You have: 2 ft 3 ft 12 ft You want: stere * 2.038813 / 0.49048148 You have: $ 5 / yard You want: cents / inch * 13.888889 / 0.072 And the second example shows how the dollar sign in the units conversion can precede the five. Be careful: `units' will interpret `$5' with no space as equivalent to `dollar^5'.  File: units.info, Node: Built-in Functions, Next: Complicated Unit Expressions, Prev: Numbers as Units, Up: Unit Expressions 5.4 Built-in Functions ====================== Several built-in functions are provided: `sin', `cos', `tan', `ln', `log', `log2', `exp', `acos', `atan' and `asin'. The `sin', `cos', and `tan' functions require either a dimensionless argument or an argument with dimensions of angle. You have: sin(30 degrees) You want: Definition: 0.5 You have: sin(pi/2) You want: Definition: 1 You have: sin(3 kg) ^ Unit not dimensionless The other functions on the list require dimensionless arguments. The inverse trigonometric functions return arguments with dimensions of angle. If you wish to take roots of units, you may use the `sqrt' or `cuberoot' functions. These functions require that the argument have the appropriate root. You can obtain higher roots by using fractional exponents: You have: sqrt(acre) You want: feet * 208.71074 / 0.0047913202 You have: (400 W/m^2 / stefanboltzmann)^(1/4) You have: Definition: 289.80882 K You have: cuberoot(hectare) ^ Unit not a root  File: units.info, Node: Complicated Unit Expressions, Next: Backwards Compatibility, Prev: Built-in Functions, Up: Unit Expressions 5.5 Complicated Unit Expressions ================================ The `units' program is especially helpful in ensuring accuracy and dimensional consistency when converting lengthy unit expressions. For example, one form of the Darcy-Weisbach fluid-flow equation is Delta P = (8/pi^2) rho f L (Q^2 / d^5) where \Delta P is the pressure drop, \rho is the mass density, f is the (dimensionless) friction factor, L is the length of the pipe, Q is the volumetric flow rate, and d is the pipe diameter. It might be desired to have the equation in the form Delta P = A1 rho f L (Q^2 / d^5) that accepted the user's normal units; for typical units used in the US, the required conversion could be something like You have: (8/pi^2)(lbm/ft^3)ft(ft^3/s)^2(1/in^5) You want: psi * 43.533969 / 0.022970568 The parentheses allow individual terms in the expression to be entered naturally, as they might be read from the formula. Alternatively, the multiplication could be done with the `*' rather than a space; then parentheses are needed only around `ft^3/s' because of its exponent: You have: 8/pi^2 * lbm/ft^3 * ft * (ft^3/s)^2 /in^5 You want: psi * 43.533969 / 0.022970568 Without parentheses, and using spaces for multiplication, the previous conversion would need to be entered as You have: 8 lb ft ft^3 ft^3 / pi^2 ft^3 s^2 in^5 You want: psi * 43.533969 / 0.022970568  File: units.info, Node: Backwards Compatibility, Prev: Complicated Unit Expressions, Up: Unit Expressions 5.6 Backwards Compatibility: `*' and `-' ======================================== The original `units' assigned multiplication a higher precedence than division using the slash. This differs from the usual precedence rules, which give multiplication and division equal precedence, and can be confusing for people who think of units as a calculator. The star operator (`*') included in this `units' program has, by default, the same precedence as division, and hence follows the usual precedence rules. For backwards compatibility you can invoke `units' with the `--oldstar' option. Then `*' has a higher precedence than division, and the same precedence as multiplication using the space. Historically, the hyphen (`-') has been used in technical publications to indicate products of units, and the original `units' program treated it as a multiplication operator. Because `units' provides several other ways to obtain unit products, and because `-' is a subtraction operator in general algebraic expressions, `units' treats the binary `-' as a subtraction operator by default. For backwards compatibility use the `--product' option, which causes `units' to treat the binary `-' operator as a product operator. When `-' is a multiplication operator it has the same precedence as multiplication with a space, giving it a higher precedence than division. When `-' is used as a unary operator it negates its operand. Regardless of the `units' options, if `-' appears after `(' or after `+' then it will act as a negation operator. So you can always compute 20 degrees minus 12 minutes by entering `20 degrees + -12 arcmin'. You must use this construction when you define new units because you cannot know what options will be in force when your definition is processed.  File: units.info, Node: Nonlinear Conversions, Next: Unit Lists, Prev: Unit Expressions, Up: Top 6 Nonlinear Unit Conversions **************************** Nonlinear units are represented using functional notation. They make possible nonlinear unit conversions such as temperature. * Menu: * Temperature Conversions:: Conversion between temperature scales * Other Nonlinear Units:: Ring size, wire gauge, abrasive grit size  File: units.info, Node: Temperature Conversions, Next: Other Nonlinear Units, Up: Nonlinear Conversions 6.1 Temperature Conversions =========================== Conversions between temperatures are different from linear conversions between temperature _increments_--see the example below. The absolute temperature conversions are handled by units starting with `temp', and you must use functional notation. The temperature-increment conversions are done using units starting with `deg' and they do not require functional notation. You have: tempF(45) You want: tempC 7.2222222 You have: 45 degF You want: degC * 25 / 0.04 Think of `tempF(X)' not as a function but as a notation that indicates that X should have units of `tempF' attached to it. *Note Defining Nonlinear Units::. The first conversion shows that if it's 45 degrees Fahrenheit outside, it's 7.2 degrees Celsius. The second conversion indicates that a change of 45 degrees Fahrenheit corresponds to a change of 25 degrees Celsius. The conversion from `tempF(X)' is to absolute temperature, so that You have: tempF(45) You want: degR * 504.67 / 0.0019814929 gives the same result as You have: tempF(45) You want: tempR * 504.67 / 0.0019814929 But if you convert `tempF(X)' to `degC', the output is probably not what you expect: You have: tempF(45) You want: degC * 280.37222 / 0.0035666871 The result is the temperature in K, because `degC' is defined as `K', the Kelvin. For consistent results, use the `tempX' units when converting to a temperature rather than converting a temperature increment.  File: units.info, Node: Other Nonlinear Units, Prev: Temperature Conversions, Up: Nonlinear Conversions 6.2 Other Nonlinear Units ========================= Some other examples of nonlinear units are numerous different ring sizes and wire gauges, the grit sizes used for abrasives, the decibel scale, shoe size, scales for the density of sugar (e.g. baume). The standard data file also supplies units for computing the area of a circle and the volume of a sphere. See the standard units data file for more details. Wire gauges with multiple zeroes are signified using negative numbers where two zeroes is `-1'. Alternatively, you can use the synonyms `g00', `g000', and so on that are defined in the standard units data file. You have: wiregauge(11) You want: inches * 0.090742002 / 11.020255 You have: brwiregauge(g00) You want: inches * 0.348 / 2.8735632 You have: 1 mm You want: wiregauge 18.201919 You have: grit_P(600) You want: grit_ansicoated 342.76923 The last example shows the conversion from P graded sand paper, which is the European standard and may be marked "P600" on the back, to the USA standard. You can compute the area of a circle using the nonlinear unit, `circlearea'. You can also do this using the circularinch or circleinch. The next example shows two ways to compute the area of a circle with a five inch radius and one way to compute the volume of a sphere with a radius of one meter. You have: circlearea(5 in) You want: in2 * 78.539816 / 0.012732395 You have: 10^2 circleinch You want: in2 * 78.539816 / 0.012732395 You have: spherevol(meter) You want: ft3 * 147.92573 / 0.0067601492  File: units.info, Node: Unit Lists, Next: Invoking Units, Prev: Nonlinear Conversions, Up: Top 7 Unit Lists: Conversion to Sums of Units ***************************************** Outside of the SI, it is sometimes desirable to convert a single unit to a sum of units--for example, feet to feet plus inches. The conversion _from_ sums of units was described in *note Sums and Differences of Units::, and is a simple matter of adding the units with the `+' sign: You have: 12 ft + 3 in + 3|8 in You want: ft * 12.28125 / 0.081424936 Although you can similarly write a sum of units to convert _to_, the result will not be the conversion to the units in the sum, but rather the conversion to the particular sum that you have entered: You have: 12.28125 ft You want: ft + in + 1|8 in * 11.228571 / 0.089058524 The unit expression given at the `You want:' prompt is equivalent to asking for conversion to multiples of `1 ft + 1 in + 1|8 in', which is 1.09375 ft, so the conversion in the previous example is equivalent to You have: 12.28125 ft You want: 1.09375 ft * 11.228571 / 0.089058524 In converting to a sum of units like miles, feet and inches, you typically want the largest integral value for the first unit, followed by the largest integral value for the next, and the remainder converted to the last unit. You can do this conversion easily with `units' using a special syntax for lists of units. You must list the desired units in order from largest to smallest, separated by the semicolon (`;') character: You have: 12.28125 ft You want: ft;in;1|8 in 12 ft + 3 in + 3|8 in The conversion always gives integer coefficients on the units in the list, except possibly the last unit when the conversion is not exact: You have: 12.28126 ft You want: ft;in;1|8 in 12 ft + 3 in + 3.00096 * 1|8 in The order in which you list the units is important: You have: 3 kg You want: oz;lb 105 oz + 0.051367866 lb You have: 3 kg You want: lb;oz 6 lb + 9.8218858 oz Listing ounces before pounds produces a technically correct result, but not a very useful one. You must list the units in descending order of size in order to get the most useful result. Ending a unit list with the separator `;' has the same effect as repeating the last unit on the list, so `ft;in;1|8 in;' is equivalent to `ft;in;1|8 in;1|8 in'. With the example above, this gives You have: 12.28126 ft You want: ft;in;1|8 in; 12 ft + 3 in + 3|8 in + 0.00096 * 1|8 in in effect separating the integer and fractional parts of the coefficient for the last unit. If you instead prefer to round the last coefficient to an integer you can do this with the `--round' (`-r') option. With the previous example, the result is You have: 12.28126 ft You want: ft;in;1|8 in 12 ft + 3 in + 3|8 in (rounded down to nearest 1|8 in) When you use the `-r' option, repeating the last unit on the list has no effect (e.g., `ft;in;1|8 in;1|8 in' is equivalent to `ft;in;1|8 in'), and hence neither does ending a list with a `;'. With a single unit and the `-r' option, a terminal `;' _does_ have an effect: it causes `units' to treat the single unit as a list and produce a rounded value for the single unit. Without the extra `;', the `-r' option has no effect on single unit conversions. This example shows the output using the `-r' option: You have: 12.28126 ft You want: in * 147.37512 / 0.0067854058 You have: 12.28126 ft You want: in; 147 in (rounded down to nearest in) Each unit that appears in the list must be conformable with the first unit on the list, and of course the listed units must also be conformable with the _You have_ unit that you enter. You have: meter You want: ft;kg ^ conformability error ft = 0.3048 m kg = 1 kg You have: meter You want: lb;oz conformability error 1 m 0.45359237 kg In the first case, `units' reports the disagreement between units appearing on the list. In the second case, `units' reports disagreement between the unit you entered and the desired conversion. This conformability error is based on the first unit on the unit list. Other common candidates for conversion to sums of units are angles and time: You have: 23.437754 deg You want; deg;arcmin;arcsec 23 deg + 26 arcmin + 15.9144 arcsec You have: 7.2319 hr You want: hr;min;sec 7 hr + 13 min + 54.84 sec In North America, recipes for cooking typically measure ingredients by volume, and use units that are not always convenient multiples of each other. Suppose that you have a recipe for 6 and you wish to make a portion for 1. If the recipe calls for 2 1/2 cups of an ingredient, you might wish to know the measurements in terms of measuring devices you have available, you could use `units' and enter You have: (2+1|2) cup / 6 You want: cup;1|2 cup;1|3 cup;1|4 cup;tbsp;tsp;1|2 tsp;1|4 tsp 1|3 cup + 1 tbsp + 1 tsp By default, if a unit in a list begins with fraction of the form 1|X and its multiplier is an integer, the fraction is given as the product of the multiplier and the numerator; for example, You have: 12.28125 ft You want: ft;in;1|8 in; 12 ft + 3 in + 3|8 in In many cases, such as the example above, this is what is wanted, but sometimes it is not. For example, a cooking recipe for 6 might call for 5 1/4 cup of an ingredient, but you want a portion for 2, and your 1-cup measure is not available; you might try You have: (5+1|4) cup / 3 You want: 1|2 cup;1|3 cup;1|4 cup 3|2 cup + 1|4 cup This result might be fine for a baker who has a 1 1/2-cup measure (and recognizes the equivalence), but it may not be as useful to someone with more limited set of measures, who does want to do additional calculations, and only wants to know "How many 1/2-cup measures to I need to add?" After all, that's what was actually asked. With the `--show-factor' option, the factor will not be combined with a unity numerator, so that you get You have: (5+1|4) cup / 3 You want: 1|2 cup;1|3 cup;1|4 cup 3 * 1|2 cup + 1|4 cup A user-specified fractional unit with a numerator other than 1 is never overridden, however--if a unit list specifies `3|4 cup;1|2 cup', a result equivalent to 1 1/2 cups will always be shown as `2 * 3|4 cup' whether or not the `--show-factor' option is given. Some applications for unit lists may be less obvious. Suppose that you have a postal scale and wish to ensure that it's accurate at 1 oz, but have only metric calibration weights. You might try You have: 1 oz You want: 100 g;50 g; 20 g;10 g;5 g;2 g;1 g; 20 g + 5 g + 2 g + 1 g + 0.34952312 * 1 g You might then place one each of the 20 g, 5 g, 2 g, and 1 g weights on the scale and hope that it indicates close to You have: 20 g + 5 g + 2 g + 1 g You want: oz; 0.98767093 oz Appending `;' to `oz' forces a one-line display that includes the unit; here the integer part of the result is zero, so it is not displayed. A unit list such as cup;1|2 cup;1|3 cup;1|4 cup;tbsp;tsp;1|2 tsp;1|4 tsp can be tedious to enter. The `units' program provides shorthand names for some common combinations: hms hours, minutes, seconds dms angle: degrees, minutes, seconds time years, days, hours, minutes and seconds usvol US cooking volume: cups and smaller Using these shorthands, or "unit list aliases", you can do the following conversions: You have: anomalisticyear You want: time 1 year + 25 min + 3.4653216 sec You have: 1|6 cup You want: usvol 2 tbsp + 2 tsp You cannot combine a unit list alias with other units: it must appear alone at the `You want:' prompt. You can display the definition of a unit list alias by entering it at the `You have:' prompt: You have: dms Definition: unit list, deg;arcmin;arcsec When you specify compact output with `--compact', `--terse' or `-t' and perform conversion to a unit list, `units' lists the conversion factors for each unit in the list, separated by semicolons. You have: year You want: day;min;sec 365;348;45.974678 Unlike the case of regular output, zeros _are_ included in this output list: You have: liter You want: cup;1|2 cup;1|4 cup;tbsp 4;0;0;3.6280454  File: units.info, Node: Invoking Units, Next: Defining Your Own Units, Prev: Unit Lists, Up: Top 8 Invoking `units' ****************** You invoke `units' like this: units [OPTIONS] [FROM-UNIT [TO-UNIT]] If the FROM-UNIT and TO-UNIT are omitted, the program will use interactive prompts to determine which conversions to perform. *Note Interactive Use::. If both FROM-UNIT and TO-UNIT are given, `units' will print the result of that single conversion and then exit. If only FROM-UNIT appears on the command line, `units' will display the definition of that unit and exit. Units specified on the command line may need to be quoted to protect them from shell interpretation and to group them into two arguments. *Note Command Line Use::. The default behavior of `units' can be changed by various options given on the command line. In most cases, the options may be given in either short form (a single `-' followed by a single character) or long form (`--' followed by a word or hyphen-separated words). Short-form options are cryptic but require less typing; long-form options require more typing but are more explanatory and may be more mnemonic. With long-form options you need only enter sufficient characters to uniquely identify the option to the program. For example, `--out %f' works, but `--o %f' fails because `units' has other long options beginning with `o'. However, `--q' works because `--quiet' is the only long option beginning with `q'. Some options require arguments to specify a value (e.g., `-d 12' or `--digits 12'). Short-form options that do not take arguments may be concatenated (e.g., `-erS' is equivalent to `-e -r -S'); the last option in such a list may be one that takes an argument (e.g., `-ed 12'). With short-form options, the space between an option and its argument is optional (e.g., `-d12' is equivalent to `-d 12'). Long-form options may not be concatenated, and the space between a long-form option and its argument is required. Short-form and long-form options may be intermixed on the command line. Options may be given in any order, but when incompatible options (e.g., `--output-format' and `--exponential') are given in combination, behavior is controlled by the last option given. For example, `-o%.12f -e' gives exponential format with the default eight significant digits). The following options are available: `-c' `--check' Check that all units and prefixes defined in the units data file reduce to primitive units. Print a list of all units that cannot be reduced. Also display some other diagnostics about suspicious definitions in the units data file. Only definitions active in the current locale are checked. You should always run `units' with this option after modifying a units data file. `--check-verbose' `--verbose-check' Like the `--check' option, this option prints a list of units that cannot be reduced. But to help find unit definitions that cause endless loops, it lists the units as they are checked. If `units' hangs, then the last unit to be printed has a bad definition. Only definitions active in the current locale are checked. `-d NDIGITS' `--digits NDIGITS' Set the number of significant digits in the output to the value specified (which must be greater than zero). For example, `-d 12' sets the number of significant digits to 12. With exponential output `units' displays one digit to the left of the decimal point(1) and eleven digits to the right of the decimal point. On most systems, the maximum number of internally meaningful digits is 15; if you specify a greater number than your system's maximum, `units' will print a warning and set the number to the largest meaningful value. To directly set the maximum value, give an argument of `max' (e.g., `-d max'). Be aware, of course, that "significant" here refers only to the _display_ of numbers; if results depend on physical constants not known to this precision, the physically meaningful precision may be less than that shown. The `--digits' option conflicts with the `--output-format' option. `-e' `--exponential' Set the numeric output format to exponential (i.e., scientific notation), like that used in the Unix `units' program. The default precision is eight significant digits (seven digits to the right of the decimal point); this can be changed with the `--digits' option. The `--exponential' option conflicts with the `--output-format' option. `-o FORMAT' `--output-format FORMAT' This option affords complete control over the numeric output format using the specified FORMAT. The format is a single floating point numeric format for the `printf()' function in the C programming language. All compilers support the format types `g' and `G' to specify significant digits, `e' and `E' for scientific notation, and `f' for fixed-point decimal. The ISO C99 standard introduced the `F' type for fixed-point decimal and the `a' and `A' types for hexadecimal floating point; these types are allowed with compilers that support them. The default format is `%.8g'; for greater precision, you could specify `-o %.15g'. *Note Numeric Output Format::, and the documentation for `printf()' for more detailed descriptions of the format specification. The `--output-format' option affords the greatest control of the output appearance, but requires at least rudimentary knowledge of the `printf()' format syntax. If you don't want to bother with the `printf()' syntax, you can specify greater precision more simply with the `--digits' option or select exponential format with `--exponential'. The `--output-format' option is incompatible with the `--exponential' and `--digits' options. `-f FILENAME' `--file FILENAME' Instruct `units' to load the units file `filename'. You can specify up to 25 units files on the command line. When you use this option, `units' will load _only_ the files you list on the command line; it will not load the standard file or your personal units file unless you explicitly list them. If FILENAME is the empty string (`-f ""'), the default units file (or that specified by `UNITSFILE') will be loaded in addition to any others specified with `-f'. `-h' `--help' Print out a summary of the options for `units'. `-m' `--minus' Causes `-' to be interpreted as a subtraction operator. This is the default behavior. `-p' `--product' Causes `-' to be interpreted as a multiplication operator when it has two operands. It will act as a negation operator when it has only one operand: `(-3)'. By default `-' is treated as a subtraction operator. `--oldstar' Causes `*' to have the old-style precedence, higher than the precedence of division so that `1/2*3' will equal `1/6'. `--newstar' Forces `*' to have the new (default) precedence that follows the usual rules of algebra: the precedence of `*' is the same as the precedence of `/', so that `1/2*3' will equal `3/2'. `--compact' Give compact output featuring only the conversion factor. This turns off the `--verbose' option. `-q' `--quiet' `--silent' Suppress prompting of the user for units and the display of statistics about the number of units loaded. `-n' `--nolists' Disable conversion to unit lists. `-r' `--round' When converting to a combination of units given by a unit list, round the value of the last unit in the list to the nearest integer. `-S' `--show-factor' When converting to a combination of units specified in a list, always show a non-unity factor before a unit that begins with a fraction with a unity denominator. By default, if the unit in a list begins with fraction of the form 1|X and its multiplier is an integer other than 1, the fraction is given as the product of the multiplier and the numerator (e.g., `3|8 in' rather than `3 * 1|8 in'). In some cases, this is not what is wanted; for example, the results for a cooking recipe might show `3 * 1|2 cup' as `3|2 cup'. With the `--show-factor' option, a result equivalent to 1.5 cups will display as `3 * 1|2 cup' rather than `3|2 cup'. A user-specified fractional unit with a numerator other than 1 is never overridden, however--if a unit list specifies `3|4 cup;1|2 cup', a result equivalent to 1 1/2 cups will always be shown as `2 * 3|4 cup' whether or not the `--show-factor' option is given. `-s' `--strict' Suppress conversion of units to their reciprocal units. For example, `units' will normally convert hertz to seconds because these units are reciprocals of each other. The strict option requires that units be strictly conformable to perform a conversion, and will give an error if you attempt to convert hertz to seconds. `-1' `--one-line' Give only one line of output (the forward conversion). Do not print the reverse conversion. If a reciprocal conversion is performed then `units' will still print the "reciprocal conversion" line. `-t' `--terse' Give terse output when converting units. This option can be used when calling `units' from another program so that the output is easy to parse. This option has the combined effect of these options: `--strict' `--quiet' `--one-line' `--compact'. `-v' `--verbose' Give slightly more verbose output when converting units. When combined with the `-c' option this gives the same effect as `--check-verbose'. `-V' `--version' Print program version number, tell whether the `readline' library has been included, and give the location of the default units data file. `-l LOCALE' `--locale LOCALE' Force a specified locale such as `en_GB' to get British definitions by default. This overrides the locale determined from system settings or environment variables. *Note Locale::, for a description of locale format. ---------- Footnotes ---------- (1) This document refers to "decimal point," but strictly, the "radix" separates the integer and fractional parts of a floating-point number; in English-speaking countries, the radix is a point (`.'), but in most other countries it is a comma (`,').  File: units.info, Node: Defining Your Own Units, Next: Numeric Output Format, Prev: Invoking Units, Up: Top 9 Adding Your Own Definitions ***************************** * Menu: * Units Data Files:: Where are units defined? * Defining New Units:: Writing your own unit and prefix definitions * Defining Nonlinear Units:: Writing your own nonlinear unit definitions * Defining Unit List Aliases:: Writing your own unit list aliases  File: units.info, Node: Units Data Files, Next: Defining New Units, Up: Defining Your Own Units 9.1 Units Data Files ==================== The units and prefixes that `units' can convert are defined in the units data file, typically `/usr/share/units/definitions.units'. Although you can extend or modify this data file if you have appropriate user privileges, it's usually better to put extensions in separate files so that the definitions will be preserved when you update `units'. You can include additional data files in the units database using the `!include' command in the standard units data file. For example !include /usr/local/share/units/local.units might be appropriate for a site-wide supplemental data file. The location of the `!include' statement in the standard units data file is important; later definitions replace earlier ones, so any definitions in an included file will override definitions before the `!include' statement in the standard units data file. With normal invocation, no warning is given about redefinitions; to ensure that you don't have an unintended redefinition, run `units -c' after making changes to any units data file. If you want to add your own units in addition to or in place of standard or site-wide supplemental units data files, you can include them in the `.units' file in your home directory. If this file exists it is read after the standard units data file, so that any definitions in this file will replace definitions of the same units in the standard data file or in files included from the standard data file. This file will not be read if any units files are specified on the command line. (Under Windows the personal units file is named `unitdef.units'.) The `units' program first tries to determine your home directory from the `HOME' environment variable. On systems running Microsoft Windows, if `HOME' does not exist, `units' attempts to find your home directory from `HOMEDRIVE' and `HOMEPATH'. Running `units -V' will display the location and name of your personal units file. You can specify an arbitrary file as your personal units data file with the `MYUNITSFILE' environment variable; if this variable exists, its value is used without searching your home directory.  File: units.info, Node: Defining New Units, Next: Defining Nonlinear Units, Prev: Units Data Files, Up: Defining Your Own Units 9.2 Defining New Units and Prefixes =================================== A unit is specified on a single line by giving its name and an equivalence. Comments start with a `#' character, which can appear anywhere in a line. The backslash character (`\') acts as a continuation character if it appears as the last character on a line, making it possible to spread definitions out over several lines if desired. A file can be included by giving the command `!include' followed by the file's name. The `!' must be the first character on the line. The file will be sought in the same directory as the parent file unless you give a full path. The name of the file to be included cannot contain the comment character `#'. Unit names must not contain any of the operator characters `+', `-', `*', `/', `|', `^', `;', `~', the comment character `#', or parentheses. They cannot begin or end with an underscore (`_'), a comma (`,') or a decimal point (`.'). The figure dash (U+2012), typographical minus (`-'; U+2212), and en dash (`-'; U+2013) are converted to the operator `-', so none of these characters can appear in unit names. Names cannot begin with a digit, and if a name ends in a digit other than zero, the digit must be preceded by a string beginning with an underscore, and afterwards consisting only of digits, decimal points, or commas. For example, `foo_2', `foo_2,1', or `foo_3.14' would be valid names but `foo2' or `foo_a2' would be invalid. You could define nitrous oxide as N2O nitrogen 2 + oxygen but would need to define nitrogen dioxide as NO_2 nitrogen + oxygen 2 Be careful to define new units in terms of old ones so that a reduction leads to the primitive units, which are marked with `!' characters. Dimensionless units are indicated by using the string `!dimensionless' for the unit definition. When adding new units, be sure to use the `-c' option to check that the new units reduce properly. If you create a loop in the units definitions, then `units' will hang when invoked with the `-c' option. You will need to use the `--check-verbose' option, which prints out each unit as it is checked. The program will still hang, but the last unit printed will be the unit that caused the infinite loop. If you define any units that contain `+' characters, carefully check them because the `-c' option will not catch non-conformable sums. Be careful with the `-' operator as well. When used as a binary operator, the `-' character can perform addition or multiplication depending on the options used to invoke `units'. To ensure consistent behavior use `-' only as a unary negation operator when writing units definitions. To multiply two units leave a space or use the `*' operator with care, recalling that it has two possible precedence values and may require parentheses to ensure consistent behavior. To compute the difference of `foo' and `bar' write `foo+(-bar)' or even `foo+-bar'. Here is an example of a short data file that defines some basic units: m ! # The meter is a primitive unit sec ! # The second is a primitive unit rad !dimensionless # A dimensionless primitive unit micro- 1e-6 # Define a prefix minute 60 sec # A minute is 60 seconds hour 60 min # An hour is 60 minutes inch 0.0254 m # Inch defined in terms of meters ft 12 inches # The foot defined in terms of inches mile 5280 ft # And the mile A unit that ends with a `-' character is a prefix. If a prefix definition contains any `/' characters, be sure they are protected by parentheses. If you define `half- 1/2' then `halfmeter' would be equivalent to `1 / (2 meter)'.  File: units.info, Node: Defining Nonlinear Units, Next: Defining Unit List Aliases, Prev: Defining New Units, Up: Defining Your Own Units 9.3 Defining Nonlinear Units ============================ Some unit conversions of interest are nonlinear; for example, temperature conversions between the Fahrenheit and Celsius scales cannot be done by simply multiplying by conversion factors. When you give a linear unit definition such as `inch 2.54 cm' you are providing information that `units' uses to convert values in inches into primitive units of meters. For nonlinear units, you give a functional definition that provides the same information. Nonlinear units are represented using a functional notation. It is best to regard this notation not as a function call but as a way of adding units to a number, much the same way that writing a linear unit name after a number adds units to that number. Internally, nonlinear units are defined by a pair of functions that convert to and from linear units in the data file, so that an eventual conversion to primitive units is possible. Here is an example nonlinear unit definition: tempF(x) units=[1;K] (x+(-32)) degF + stdtemp ; \ (tempF+(-stdtemp))/degF + 32 A nonlinear unit definition comprises a unit name, a dummy parameter name, two functions, and two corresponding units. The functions tell `units' how to convert to and from the new unit. In order to produce valid results, the arguments of these functions need to have the correct dimensions. To facilitate error checking, you may optionally indicate units for these arguments. The definition begins with the unit name followed immediately (with no spaces) by a `(' character. In parentheses is the name of the parameter. Next is an optional specification of the units required by the functions in this definition. In the example above, the `tempF' function requires an input argument conformable with `1'. For normal nonlinear units definitions the forward function will always take a dimensionless argument. The inverse function requires an input argument conformable with `K'. In general the inverse function will need units that match the quantity measured by your nonlinear unit. The purpose of the expression in brackets to enable `units' to perform error checking on function arguments, and also to assign units to range and domain specifications, which are described later. Next the function definitions appear. In the example above, the `tempF' function is defined by tempF(x) = (x+(-32)) degF + stdtemp This gives a rule for converting `x' in the units `tempF' to linear units of absolute temperature, which makes it possible to convert from tempF to other units. In order to make conversions to Fahrenheit possible, you must give a rule for the inverse conversions. The inverse will be `x(tempF)' and its definition appears after a `;' character. In our example, the inverse is x(tempF) = (tempF+(-stdtemp))/degF + 32 This inverse definition takes an absolute temperature as its argument and converts it to the Fahrenheit temperature. The inverse can be omitted by leaving out the `;' character, but then conversions to the unit will be impossible. If the inverse is omitted then the `--check' option will display a warning. It is up to you to calculate and enter the correct inverse function to obtain proper conversions. The `--check' option tests the inverse at one point and prints an error if it is not valid there, but this is not a guarantee that your inverse is correct. If you wish to make synonyms for nonlinear units, you still need to define both the forward and inverse functions. Inverse functions can be obtained using the `~' operator. So to create a synonym for `tempF' you could write fahrenheit(x) units=[1;K] tempF(x); ~tempF(fahrenheit) You may define a function whose range and domain do not cover all of the real numbers. In this case `units' can handle errors better if you specify an appropriate range and domain. You specify the range and domain as shown below. baume(d) units=[1;g/cm^3] domain=[0,130.5] range=[1,10] \ (145/(145-d)) g/cm^3 ; (baume+-g/cm^3) 145 / baume In this example the domain is specified after the `domain=' with the endpoints given in brackets. One of the end points can be omitted to get an interval that goes to infinity. So the range could be specified as nonnegative by writing `range=[0,]'. Both the range and domain are optional and can appear independently and in any order along with the `units' specification. The values in the range and domain are attached to the units given in the `units' specification. If you don't specify the units then the parameter inputs are reduced to primitive units for the numeric comparison to the values you give in the range or domain. In this case you should only use `range' or `domain' if the endpoints are zero and infinity. Specifying the range and domain allows `units' to perform better error checking and give more helpful error messages when you invoke nonlinear units conversions outside of their bounds. It also enables the `-c' option to find a point in the domain to use for its point check of your inverse definition. You may occasionally wish to define a function that operates on units. This can be done using a nonlinear unit definition. For example, the definition below provides conversion between radius and the area of a circle. This definition requires a length as input and produces an area as output, as indicated by the `units=' specification. Specifying the range as the nonnegative numbers can prevent cryptic error messages. circlearea(r) units=[m;m^2] range=[0,] pi r^2 ; sqrt(circlearea/pi) Sometimes you may be interested in a piecewise linear unit such as many wire gauges. Piecewise linear units can be defined by specifying conversions to linear units on a list of points. Conversion at other points will be done by linear interpolation. A partial definition of zinc gauge is zincgauge[in] 1 0.002, 10 0.02, 15 0.04, 19 0.06, 23 0.1 In this example, `zincgauge' is the name of the piecewise linear unit. The definition of such a unit is indicated by the embedded `[' character. After the bracket, you should indicate the units to be attached to the numbers in the table. No spaces can appear before the `]' character, so a definition like `foo[kg meters]' is illegal; instead write `foo[kg*meters]'. The definition of the unit consists of a list of pairs optionally separated by commas. This list defines a function for converting from the piecewise linear unit to linear units. The first item in each pair is the function argument; the second item is the value of the function at that argument (in the units specified in brackets). In this example, we define `zincgauge' at five points. For example, we set `zincgauge(1)' equal to `0.002 in'. Definitions like this may be more readable if written using continuation characters as zincgauge[in] \ 1 0.002 \ 10 0.02 \ 15 0.04 \ 19 0.06 \ 23 0.1 With the preceding definition, the following conversion can be performed: You have: zincgauge(10) You want: in * 0.02 / 50 You have: .01 inch You want: zincgauge 5 If you define a piecewise linear unit that is not strictly monotonic, then the inverse will not be well defined. If the inverse is requested for such a unit, `units' will return the smallest inverse. The `--check' option will print a warning if a non-monotonic piecewise linear unit is encountered.  File: units.info, Node: Defining Unit List Aliases, Prev: Defining Nonlinear Units, Up: Defining Your Own Units 9.4 Defining Unit List Aliases ============================== Unit list aliases are treated differently from unit definitions, because they are a data entry shorthand rather than a true definition for a new unit. A unit list alias definition begins with `!unitlist' and includes the alias and the definition; for example, the aliases included in the standard units data file are !unitlist hms hr;min;sec !unitlist time year;day;hr;min;sec !unitlist dms deg;arcmin;arcsec !unitlist ftin ft;in;1|8 in !unitlist usvol cup;3|4 cup;2|3 cup;1|2 cup;1|3 cup;1|4 cup;\ tbsp;tsp;1|2 tsp;1|4 tsp;1|8 tsp Unit list aliases are only for unit lists, so the definition must include a `;'. Unit list aliases can never be combined with units or other unit list aliases, so the definition of `time' shown above could _not_ have been shortened to `year;day;hms'. As usual, be sure to run `units --check' to ensure that the units listed in unit list aliases are conformable.  File: units.info, Node: Numeric Output Format, Next: Localization, Prev: Defining Your Own Units, Up: Top 10 Numeric Output Format ************************ * Menu: * Format Specification:: The output format specification * Flags:: Optional format flags * Field Width:: Specifying output field width * Precision:: Specifying output precision By default, `units' shows results to eight significant digits. You can change this with the `--exponential', `--digits', and `--output-format' options. The first sets an exponential format (i.e., scientific notation) like that used in the original Unix `units' program, the second allows you to specify a different number of significant digits, and the last allows you to control the output appearance using the format for the `printf()' function in the C programming language. If you only want to change the number of significant digits or specify exponential format type, use the `--digits' and `--exponential' options. The `--output-format' option affords the greatest control of the output appearance, but requires at least rudimentary knowledge of the `printf()' format syntax. *Note Invoking Units::, for descriptions of these options.  File: units.info, Node: Format Specification, Next: Flags, Up: Numeric Output Format 10.1 Format Specification ========================= The format specification recognized with the `--output-format' option is a subset of that for `printf()'. The format specification has the form `%'[flags][width][`.'precision]type; it must begin with `%', and must end with a floating-point type specifier: `g' or `G' to specify the number of significant digits, `e' or `E' for scientific notation, and `f' for fixed-point decimal. The ISO C99 standard added the `F' type for fixed-point decimal and the `a' and `A' types for hexadecimal floating point; these types are allowed with compilers that support them. Type length modifiers (e.g., `L' to indicate a long double) are inapplicable and are not allowed. The default format for `units' is `%.8g'; for greater precision, you could specify `-o %.15g'. The `g' and `G' format types use exponential format whenever the exponent would be less than -4, so the value 0.000013 displays as `1.3e-005'. These types also use exponential notation when the exponent is greater than or equal to the precision, so with the default format, the value 5e7 displays as `50000000' and the value 5e8 displays as `5e+008'. If you prefer fixed-point display, you might specify `-o %.8f'; however, small numbers will display very few significant digits, and values less than 0.5e-8 will show nothing but zeros. The format specification may include one or more optional flags: `+', ` ' (space), `#', `-', or `0' (the digit zero). The digit-grouping flag `'' (apostrophe) is allowed with compilers that support it. Flags are followed by an optional value for the minimum field width, and an optional precision specification that begins with a period (e.g., `.6'). The field width includes the digits, decimal point, the exponent, thousands separators (with the digit-grouping flag), and the sign if any of these are shown.  File: units.info, Node: Flags, Next: Field Width, Prev: Format Specification, Up: Numeric Output Format 10.2 Flags ========== The `+' flag causes the output to have a sign (`+' or `-'). The space flag ` ' is similar to the `+' flag, except that when the value is positive, it is prefixed with a space rather than a plus sign; this flag is ignored if the `+' flag is also given. The `+' or ` ' flag could be useful if conversions might include positive and negative results, and you wanted to align the decimal points in exponential notation. The `#' flag causes the output value to contain a decimal point in all cases; by default, the output contains a decimal point only if there are digits (which can be trailing zeros) to the right of the point. With the `g' or `G' types, the `#' flag also prevents the suppression of trailing zeros. The digit-grouping flag `'' shows a thousands separator in digits to the left of the decimal point. This can be useful when displaying large numbers in fixed-point decimal; for example, with the format `%f', You have: mile You want: microfurlong * 8000000.000000 / 0.000000 the magnitude of the first result may not be immediately obvious without counting the digits to the left of the decimal point. If the thousands separator is the comma (`,'), the output with the format `%'f' might be You have: mile You want: microfurlong * 8,000,000.000000 / 0.000000 making the magnitude readily apparent. Unfortunately, few compilers support the digit-grouping flag. With the `-' flag, the output value is left aligned within the specified field width. If a field width greater than needed to show the output value is specified, the `0' (zero) flag causes the output value to be left padded with zeros until the specified field width is reached; for example, with the format `%011.6f', You have: troypound You want: grain * 5760.000000 / 0000.000174 The `0' flag has no effect if the `-' (left align) flag is given.  File: units.info, Node: Field Width, Next: Precision, Prev: Flags, Up: Numeric Output Format 10.3 Field Width ================ By default, the output value is left aligned and shown with the minimum width necessary for the specified (or default) precision. If a field width greater than this is specified, the value shown is right aligned, and padded on the left with enough spaces to provide the specified field width. A width specification is typically used with fixed-point decimal to have columns of numbers align at the decimal point; this arguably is less useful with `units' than with long columnar output, but it may nonetheless assist in quickly assessing the relative magnitudes of results. For example, with the format `%12.6f', You have: km You want: in * 39370.078740 / 0.000025 You have: km You want: rod * 198.838782 / 0.005029 You have: km You want: furlong * 4.970970 / 0.201168  File: units.info, Node: Precision, Prev: Field Width, Up: Numeric Output Format 10.4 Precision ============== The meaning of "precision" depends on the format type. With `g' or `G', it specifies the number of significant digits (like the `--digits' option); with `e', `E', `f', or `F', it specifies the maximum number of digits to be shown after the decimal point. With the `g' and `G' format types, trailing zeros are suppressed, so the results may sometimes have fewer digits than the specified precision (as indicated above, the `#' flag causes trailing zeros to be displayed). The default precision is 6, so `%g' is equivalent to `%.6g', and would show the output to six significant digits. Similarly, `%e' or `%f' would show the output with six digits after the decimal point. The C `printf()' function allows a precision of arbitrary size, whether or not all of the digits are meaningful. With most compilers, the maximum internal precision with `units' is 15 decimal digits (or 13 hexadecimal digits). With the `--digits' option, you are limited to the maximum internal precision; with the `--output-format' option, you may specify a precision greater than this, but it may not be meaningful. In some cases, specifying excess precision can result in rounding artifacts. For example, a pound is exactly 7000 grains, but with the format `%.18g', the output might be You have: pound You want: grain * 6999.9999999999991 / 0.00014285714285714287 With the format `%.25g' you might get the following: You have: 1/3 You want: Definition: 0.333333333333333314829616256247 In this case the displayed value includes a series of digits that represent the underlying binary floating-point approximation to 1/3 but are not meaningful for the desired computation. In general, the result with excess precision is system dependent. The precision affects only the _display_ of numbers; if a result relies on physical constants that are not known to the specified precision, the number of physically meaningful digits may be less than the number of digits shown. See the documentation for `printf()' for more detailed descriptions of the format specification. The `--output-format' option is incompatible with the `--exponential' or `--digits' options; if the former is given in combination with either of the latter, the format is controlled by the last option given.  File: units.info, Node: Localization, Next: Environment Vars, Prev: Numeric Output Format, Up: Top 11 Localization *************** * Menu: * Locale:: What is a locale? * Additional Localization:: When the locale isn't enough Some units have different values in different locations. The localization feature accommodates this by allowing a units data file to specify definitions that depend on the user's locale.  File: units.info, Node: Locale, Next: Additional Localization, Up: Localization 11.1 Locale =========== A locale is a subset of a user's environment that indicates the user's language and country, and some attendant preferences, such as the formatting of dates. The `units' program attempts to determine the locale from the POSIX setlocale function; if this cannot be done, `units' examines the environment variables `LC_CTYPE' and `LANG'. On POSIX systems, a locale is of the form LANGUAGE`_'COUNTRY, where LANGUAGE is the two-character code from ISO 639-1 and COUNTRY is the two-character code from ISO 3166-1; LANGUAGE is lower case and COUNTRY is upper case. For example, the POSIX locale for the United Kingdom is `en_GB'. On systems running Microsoft Windows, the value returned by setlocale() is different from that on POSIX systems; `units' attempts to map the Windows value to a POSIX value by means of a table in the file `locale.map' in the same directory, typically `/usr/local/share/units', as the default units data files. The file includes entries for many combinations of language and country, and can be extended to include other combinations. The `locale.map' comprises two tab-separated columns; each entry is of the form WINDOWS-LOCALE POSIX-LOCALE where POSIX-LOCALE is as described above, and WINDOWS-LOCALE typically spells out both the language and country. For example, the entry for the United States is English_United States en_US You can force `units' to run in a desired locale by using the `-l' option. In order to create unit definitions for a particular locale you begin a block of definitions in a unit datafile with `!locale' followed by a locale name. The `!' must be the first character on the line. The `units' program reads the following definitions only if the current locale matches. You end the block of localized units with `!endlocale'. Here is an example, which defines the British gallon. !locale en_GB gallon 4.54609 liter !endlocale  File: units.info, Node: Additional Localization, Prev: Locale, Up: Localization 11.2 Additional Localization ============================ Sometimes the locale isn't sufficient to determine unit preferences. There could be regional preferences, or a company could have specific preferences. Though probably uncommon, such differences could arise with the choice of English customary units outside of English-speaking countries. To address this, `units' allows specifying definitions that depend on environment variable settings. The environment variables can be controled based on the current locale, or the user can set them to force a particular group of definitions. A conditional block of definitions in a units data file begins with either `!var' or `!varnot' following by an environment variable name and then a space separated list of values. The leading `!' must appear in the first column of a units data file, and the conditional block is terminated by `!endvar'. Definitions in blocks beginning with `!var' are executed only if the environment variable is exactly equal to one of the listed values. Definitions in blocks beginning with `!varnot' are executed only if the environment variable does _not_ equal any of the list values. The inch has long been a customary measure of length in many places. The word comes from the latin _uncia_ meaning "one twelfth," referring to its relationship with the foot. By the 20th century, the inch was officially defined in English-speaking countries relative to the yard, but until 1959, the yard differed slightly among those countries. In France the customary inch, which was displaced in 1799 by the meter, had a different length based on a french foot. These customary definitions could be accommodated as follows: !var INCH_UNIT usa yard 3600|3937 m !endvar !var INCH_UNIT canada yard 0.9144 meter !endvar !var INCH_UNIT uk yard 0.91439841 meter !endvar !var INCH_UNIT canada uk usa foot 1|3 yard inch 1|12 foot !endvar !var INCH_UNIT france foot 144|443.296 m inch 1|12 foot line 1|12 inch !endvar !varnot INCH_UNIT usa uk france canada !message Unknown value for INCH_UNIT !endvar When `units' reads the above definitions it will check the environment variable `INCH_UNIT' and load only the definitions for the appropriate section. If `INCH_UNIT' is unset or is not set to one of the four values listed then `units' will run the last block. In this case that block uses the `!message' command to display a warning message. Alternatively that block could set default values. In order to create default values that are overridden by user settings the data file can use the `!set' command, which sets an environment variable _only if it is not already set_; these settings are only for the current `units' invocation and do not persist. So if the example above were preceded by `!set INCH_UNIT france' then this would make `france' the default value for `INCH_UNIT'. If the user had set the variable in the environment before invoking `units', then `units' would use the user's value. To link these settings to the user's locale you combine the `!set' command with the `!locale' command. If you wanted to combine the above example with suitable locales you could do by _preceding_ the above definition with the following: !locale en_US !set INCH_UNIT usa !endlocale !locale en_GB !set INCH_UNIT uk !endlocale !locale en_CA !set INCH_UNIT canada !endlocale !locale fr_FR !set INCH_UNIT france !endlocale !set INCH_UNIT france These definitions set the overall default for `INCH_UNIT' to `france' and set default values for four locales appropriately. The overall default setting comes last so that it only applies when `INCH_UNIT' was not set by one of the other commands or by the user. If the variable given after `!var' or `!varnot' is undefined then `units' prints an error message and ignores the definitions that follow. Use `!set' to create defaults to prevent this situation from arising. The `-c' option only checks the definitions that are active for the current environment and locale, so when adding new definitions take care to check that all cases give rise to a well defined set of definitions.  File: units.info, Node: Environment Vars, Next: Unicode Support, Prev: Localization, Up: Top 12 Environment Variables ************************ The `units' program uses the following environment variables: `HOME' Specifies the location of your home directory; it is used by `units' to find a personal units data file `.units'. On systems running Microsoft Windows, `units' tries to determine your home directory from the `HOMEDRIVE' and `HOMEPATH' environment variables if `HOME' does not exist. `LC_CTYPE, LANG' Checked to determine the locale if `units' cannot obtain it from the operating system. Sections of the standard units data file are specific to certain locales. `MYUNITSFILE' Specifies your personal units data file. If this variable exists, `units' uses its value rather than searching your home directory for `.units'. The personal units file will not be loaded if any data files are given using the `-f' option. `PAGER' Specifies the pager to use for help and for displaying the conformable units. The help function browses the units database and calls the pager using the `+n'N syntax for specifying a line number. The default pager is `more'; `PAGER' can be used to specify alternatives such as `less', `pg', `emacs', or `vi'. `UNITS_ENGLISH' Set to either `US' or `GB' to choose United States or British volume definitions, overriding the default from your locale. `UNITSFILE' Specifies the units data file to use (instead of the default). You can only specify a single units data file using this environment variable. If units data files are given using the `-f' option, the file specified by `UNITSFILE' will be not be loaded unless the `-f' option is given with the empty string (`units -f ""').  File: units.info, Node: Unicode Support, Next: Readline Support, Prev: Environment Vars, Up: Top 13 Unicode Support ****************** The standard units data file is in Unicode, using UTF-8 encoding. Most definitions use only ASCII characters (i.e., code points U+0000 through U+007F); definitions using non-ASCII characters appear in blocks beginning with `!utf8' and ending with `!endutf8'. When `units' starts, it checks the locale to determine the character set. If `units' is compiled with Unicode support and if the character set is UTF-8, `units' reads the UTF-8 definitions; otherwise these definitions are ignored. When Unicode support is active, `units' will check every line of all of the units data files for invalid or non-printing UTF-8 sequences; if such sequences occur, `units' ignores the entire line. In addition to checking validity, `units' determines the display width of non-ASCII characters to ensure proper positioning of the pointer in some error messages and to align columns for the `search' and `?' commands. At present, `units' does not support Unicode under Microsoft Windows. The UTF-16 and UTF-32 encodings are not supported on any systems. If definitions that contain non-ASCII characters are added to a units data file, those definitions should be enclosed within `!utf8' ... `!endutf8' to ensure that they are only loaded when Unicode support is available. As usual, the `!' must appear as the first character on the line. As discussed in *note Units Data Files::, it's usually best to put such definitions in supplemental data files linked by an `!include' command or in a personal units data file. When Unicode support is not active, `units' makes no assumptions about character encoding, except that characters in the range 00-7F hexadecimal correspond to ASCII encoding. Non-ASCII characters are simply sequences of bytes, and have no special meanings; for definitions in supplementary units data files, you can use any encoding consistent with this assumption. For example, if you wish to use non-ASCII characters in definitions when running `units' under Windows, you can use a character set such as Windows "ANSI" (code page 1252 in the US and Western Europe). You can even use UTF-8, though some messages may be improperly aligned, and `units' will not detect invalid UTF-8 sequences. If you use UTF-8 encoding when Unicode support is not active, you should place any definitions with non-ASCII characters _outside_ `!utf8' ... `!endutf8' blocks--otherwise, they will be ignored. Typeset material other than code examples usually uses the Unicode minus (U+2212) rather than the ASCII hyphen-minus operator (U+002D) used in `units'; the figure dash (U+2012) and en dash (U+2013) are also occasionally used. To allow such material to be copied and pasted for interactive use or in units data files, `units' converts these characters to U+002D before further processing. Because of this, none of these characters can appear in unit names.  File: units.info, Node: Readline Support, Next: Currency, Prev: Unicode Support, Up: Top 14 Readline Support ******************* If the `readline' package has been compiled in, then when `units' is used interactively, numerous command line editing features are available. To check if your version of `units' includes `readline', invoke the program with the `--version' option. For complete information about `readline', consult the documentation for the `readline' package. Without any configuration, `units' will allow editing in the style of emacs. Of particular use with `units' are the completion commands. If you type a few characters and then hit followed by `?' then `units' will display a list of all the units that start with the characters typed. For example, if you type `metr' and then request completion, you will see something like this: You have: metr metre metriccup metrichorsepower metrictenth metretes metricfifth metricounce metricton metriccarat metricgrain metricquart metricyarncount You have: metr If there is a unique way to complete a unitname, you can hit the key and `units' will provide the rest of the unit name. If `units' beeps, it means that there is no unique completion. Pressing the key a second time will print the list of all completions.  File: units.info, Node: Currency, Next: Database Syntax, Prev: Readline Support, Up: Top 15 Updating Currency Exchange Rates *********************************** The units program includes currency exchange rates and prices for some precious metals in the database. Of course, these values change over time, sometimes very rapidly, and `units' cannot provide real time values. To update the exchange rates run the `units_cur', which rewrites the files containing the currency rates, typically `/usr/local/share/units/currency.units'. This program must be run with suitable permissions to write the file. To keep the rates updated automatically, it could be run by a cron job on a Unix-like system, or a similar scheduling program on a different system. Currency exchange rates are taken from Time Genie (`http://www.timegenie.com') and precious metals pricing from Packetizer (`www.packetizer.com'). These sites update once per day, so there is no benefit in running the update script more often than daily. You can run `units_cur' with a filename specified on the command line and it will write the data to that file. If you give `-' for the file it will write to standard output.  File: units.info, Node: Database Syntax, Next: GNU Free Documentation License, Prev: Currency, Up: Top 16 Database Command Syntax ************************** UNIT DEFINITION Define a regular unit. PREFIX- DEFINITION Define a prefix. FUNCNAME(VAR) units=[IN-UNITS,OUT-UNITS] domain=[X1,X2] range=[Y1,Y2] DEFINITION(VAR) ; INVERSE(FUNCNAME) Define a nonlinear unit or unit function. The three optional keywords `units=', `range=' and `domain=' can appear in any order. The definition of the inverse is optional. TABNAME[OUT-UNITS] PAIR-LIST Define a piecewise linear unit. The pair list gives the points on the table listed in ascending order. !endlocale End a block of definitions beginning with `!locale' !endutf8 End a block of definitions begun with `!utf8' !endvar End a block of definitions begun with `!var' or `!varnot' !include FILE Include the specified file. !locale VALUE Load the following definitions only of the locale is set to VALUE. !message TEXT Display TEXT when the database is read unless the quiet option (`-q') is enabled. !set VARIABLE VALUE Sets the environment variable, VARIABLE, to the specified value _only if_ it is not already set. !unitlist ALIAS DEFINITION Define a unit list alias. !utf8 Load the following definitions only if `units' is running with UTF-8 enabled. !var VARIABLE VALUE-LIST Load the following definitions only if the environment variable, VARIABLE is set to one of the values listed on the space separated value list. If VARIABLE is not set then `units' prints an error message and ignores the following definitions. !varnot VARIABLE VALUE-LIST Load the following definitions only if the environment variable, VARIABLE is NOT set to one of the values listed on the space separated value list. If VARIABLE is not set then `units' prints an error message and ignores the following definitions.  File: units.info, Node: GNU Free Documentation License, Next: Index, Prev: Database Syntax, Up: Top 17 GNU Free Documentation License ********************************* Version 1.3, 3 November 2008 Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. `http://fsf.org/' Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. The "publisher" means any person or entity that distributes copies of the Document to the public. A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. 2. VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. 3. COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. 4. MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document. E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. O. Preserve any Warranty Disclaimers. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. 5. COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements." 6. COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. 7. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. 8. TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License. However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it. 10. FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See `http://www.gnu.org/copyleft/'. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document. 11. RELICENSING "Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A "Massive Multiauthor Collaboration" (or "MMC") contained in the site means any set of copyrightable works thus published on the MMC site. "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization. "Incorporate" means to publish or republish a Document, in whole or in part, as part of another Document. An MMC is "eligible for relicensing" if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008. The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. ADDENDUM: How to use this License for your documents ==================================================== To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: Copyright (C) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.  File: units.info, Node: Index, Prev: GNU Free Documentation License, Up: Top Index ***** [index] * Menu: * ! to indicate primitive units: Defining New Units. (line 6) * !endlocale: Localization. (line 6) * !endutf8: Unicode Support. (line 6) * !include: Units Data Files. (line 6) * !locale: Localization. (line 6) * !unitlist: Defining Unit List Aliases. (line 6) * !utf8: Unicode Support. (line 6) * * operator: Operators. (line 33) * ** operator: Operators. (line 19) * + operator: Sums and Differences of Units. (line 6) * - as multiplication operator: Backwards Compatibility. (line 17) * - as subtraction operator: Sums and Differences of Units. (line 6) * --check (option for units): Invoking Units. (line 50) * --check-verbose (option for units): Invoking Units. (line 59) * --compact (option for units): Invoking Units. (line 150) * --digits (option for units): Invoking Units. (line 67) * --exponential (option for units): Invoking Units. (line 84) * --file (option for units): Invoking Units. (line 115) * --help (option for units): Invoking Units. (line 126) * --locale (option for units): Invoking Units. (line 223) * --minus (option for units): Invoking Units. (line 130) * --newstar (option for units): Invoking Units. (line 145) * --oldstar (option for units): Invoking Units. (line 141) * --one-line (option for units): Invoking Units. (line 197) * --output-format (option for units): Invoking Units. (line 93) * --product (option for units): Invoking Units. (line 135) * --quiet (option for units): Invoking Units. (line 156) * --silent (option for units): Invoking Units. (line 156) * --strict (option for units): Invoking Units. (line 188) * --terse (option for units): Invoking Units. (line 204) * --verbose (option for units): Invoking Units. (line 211) * --verbose-check (option for units): Invoking Units. (line 59) * --version (option for units): Invoking Units. (line 217) * -1 (option for units): Invoking Units. (line 197) * -c (option for units): Invoking Units. (line 50) * -d (option for units): Invoking Units. (line 67) * -e (option for units): Invoking Units. (line 84) * -f (option for units): Invoking Units. (line 115) * -h (option for units): Invoking Units. (line 126) * -l (option for units): Invoking Units. (line 223) * -m (option for units): Invoking Units. (line 130) * -o (option for units): Invoking Units. (line 93) * -p (option for units): Invoking Units. (line 135) * -q (option for units): Invoking Units. (line 156) * -s (option for units): Invoking Units. (line 188) * -t (option for units): Invoking Units. (line 204) * -V (option for units): Invoking Units. (line 217) * -v (option for units): Invoking Units. (line 211) * ? for unit completion with readline: Readline Support. (line 16) * ? to show conformable units: Interactive Use. (line 121) * abrasive grit size: Other Nonlinear Units. (line 36) * addition of units: Sums and Differences of Units. (line 9) * additional units data files: Units Data Files. (line 6) * backwards compatibility: Backwards Compatibility. (line 6) * British Imperial measure: Unit Definitions. (line 36) * circle, area of: Other Nonlinear Units. (line 42) * command, ! to indicate primitive units: Defining New Units. (line 6) * command, !endlocale: Localization. (line 6) * command, !endutf8: Unicode Support. (line 6) * command, !endvar: Localization. (line 6) * command, !include: Units Data Files. (line 6) * command, !locale: Localization. (line 6) * command, !message: Localization. (line 6) * command, !set: Localization. (line 6) * command, !unitlist: Defining Unit List Aliases. (line 6) * command, !utf8: Unicode Support. (line 6) * command, !var: Localization. (line 6) * command, !varnot: Localization. (line 6) * command-line options: Invoking Units. (line 6) * command-line unit conversion: Command Line Use. (line 6) * commands in units database: Database Syntax. (line 6) * compatibility: Backwards Compatibility. (line 6) * compatibility with earlier versions: Backwards Compatibility. (line 6) * completion, unit, using ? (readline only): Readline Support. (line 16) * conformable units, ? to show: Interactive Use. (line 121) * currency, updating: Currency. (line 6) * Darcy-Weisbach equation: Complicated Unit Expressions. (line 7) * data files, additional: Units Data Files. (line 6) * database syntax summary: Database Syntax. (line 6) * defining nonlinear units: Defining Nonlinear Units. (line 6) * defining prefixes: Defining New Units. (line 6) * defining units: Defining New Units. (line 6) * defining units with `-': Backwards Compatibility. (line 33) * differences of units: Sums and Differences of Units. (line 9) * dimensionless units: Interactive Use. (line 119) * dimensionless units, defining: Defining New Units. (line 39) * division of numbers: Operators. (line 71) * division of units: Operators. (line 33) * environment dependent definitions: Localization. (line 6) * environment variable, HOME: Environment Vars. (line 9) * environment variable, LANG: Environment Vars. (line 16) * environment variable, LC_CTYPE: Environment Vars. (line 16) * environment variable, MYUNITSFILE <1>: Environment Vars. (line 21) * environment variable, MYUNITSFILE: Units Data Files. (line 41) * environment variable, PAGER: Environment Vars. (line 27) * environment variable, UNITS_ENGLISH: Environment Vars. (line 34) * environment variable, UNITSFILE: Environment Vars. (line 38) * environment variables: Environment Vars. (line 6) * exchange rates, updating: Currency. (line 6) * exponent operator: Operators. (line 19) * flags, output format: Flags. (line 6) * format specification, output: Format Specification. (line 6) * fractions, numerical: Operators. (line 71) * functions of units: Defining Nonlinear Units. (line 107) * functions, built in: Built-in Functions. (line 6) * help <1>: Environment Vars. (line 27) * help: Interactive Use. (line 126) * HOME environment variable: Environment Vars. (line 9) * hyphen as multiplication operator: Backwards Compatibility. (line 17) * Imperial measure: Unit Definitions. (line 36) * include files: Defining New Units. (line 15) * including additional units data files: Units Data Files. (line 6) * incompatible units: Interactive Use. (line 86) * interactive use: Interactive Use. (line 6) * international mile: Unit Definitions. (line 74) * international yard: Unit Definitions. (line 74) * invoking units: Invoking Units. (line 6) * LANG environment variable: Environment Vars. (line 16) * LC_CTYPE environment variable: Environment Vars. (line 16) * length measure, English customary: Unit Definitions. (line 74) * length measure, UK: Unit Definitions. (line 74) * linear interpolation: Defining Nonlinear Units. (line 117) * locale: Locale. (line 6) * locale.map: Locale. (line 17) * localization: Localization. (line 6) * measure, Imperial: Unit Definitions. (line 36) * mile, international: Unit Definitions. (line 74) * minus (-) operator, subtraction: Sums and Differences of Units. (line 6) * multiplication of units: Operators. (line 33) * multiplication, hyphen: Backwards Compatibility. (line 17) * MYUNITSFILE environment variable <1>: Environment Vars. (line 21) * MYUNITSFILE environment variable: Units Data Files. (line 41) * non-conformable units: Interactive Use. (line 86) * non-interactive unit conversion: Command Line Use. (line 6) * nonlinear unit conversions <1>: Defining Nonlinear Units. (line 6) * nonlinear unit conversions: Nonlinear Conversions. (line 6) * nonlinear units, defining: Defining Nonlinear Units. (line 6) * nonlinear units, other: Other Nonlinear Units. (line 6) * numbers as units: Numbers as Units. (line 6) * numeric output format: Numeric Output Format. (line 6) * numerical fractions: Operators. (line 71) * operator precedence: Operators. (line 40) * operator, (**): Operators. (line 19) * operator, caret (^): Operators. (line 19) * operator, hyphen (-) as multiplication: Backwards Compatibility. (line 17) * operator, hyphen (-) as subtraction: Sums and Differences of Units. (line 6) * operator, minus (-): Sums and Differences of Units. (line 6) * operator, per: Operators. (line 33) * operator, plus (+): Sums and Differences of Units. (line 6) * operator, slash (/): Operators. (line 33) * operator, solidus (/): Operators. (line 33) * operator, space: Operators. (line 33) * operator, star (*): Operators. (line 33) * operator, vertical bar (|): Operators. (line 71) * operators: Operators. (line 6) * output field width: Field Width. (line 6) * output format: Numeric Output Format. (line 6) * output format flags: Flags. (line 6) * output format specification: Format Specification. (line 6) * output precision: Precision. (line 6) * PAGER environment variable: Environment Vars. (line 27) * parentheses <1>: Defining Nonlinear Units. (line 35) * parentheses <2>: Defining New Units. (line 48) * parentheses <3>: Complicated Unit Expressions. (line 27) * parentheses <4>: Sums and Differences of Units. (line 33) * parentheses: Operators. (line 19) * per operator: Operators. (line 33) * personal units data file: Units Data Files. (line 26) * piecewise linear units: Defining Nonlinear Units. (line 117) * plus (+) operator: Sums and Differences of Units. (line 6) * powers: Operators. (line 19) * precision, output: Precision. (line 6) * prefixes: Unit Definitions. (line 53) * prefixes and exponents: Operators. (line 40) * prefixes, definition of: Defining New Units. (line 6) * primitive units: Defining New Units. (line 6) * products of units: Operators. (line 33) * quotients of units: Operators. (line 33) * readline, use with units: Readline Support. (line 6) * reciprocal conversion: Interactive Use. (line 61) * roots: Built-in Functions. (line 27) * setlocale function: Locale. (line 17) * slash (/) operator: Operators. (line 33) * solidus (/) operator: Operators. (line 33) * sphere, volume of: Other Nonlinear Units. (line 42) * square roots: Built-in Functions. (line 27) * star (*) operator: Operators. (line 33) * State Plane Coordinate System, US: Unit Definitions. (line 74) * strict conversion: Interactive Use. (line 70) * subtraction of units: Sums and Differences of Units. (line 9) * sums and differences of units: Sums and Differences of Units. (line 6) * sums of units <1>: Unit Lists. (line 6) * sums of units: Sums and Differences of Units. (line 9) * survey foot, US: Unit Definitions. (line 74) * survey measure, US: Unit Definitions. (line 74) * survey mile, US: Unit Definitions. (line 74) * syntax of units database: Database Syntax. (line 6) * temperature conversions: Temperature Conversions. (line 6) * Unicode support: Unicode Support. (line 6) * unit completion using ? (readline only): Readline Support. (line 16) * unit definitions: Unit Definitions. (line 6) * unit expressions: Unit Expressions. (line 6) * unit expressions, complicated: Complicated Unit Expressions. (line 6) * unit list aliases, defining: Defining Unit List Aliases. (line 6) * unit lists: Unit Lists. (line 6) * unit name completion: Readline Support. (line 19) * units data file, personal: Units Data Files. (line 26) * units data files, additional: Units Data Files. (line 6) * units definitions, adding: Defining New Units. (line 6) * units definitions, changing: Defining New Units. (line 6) * units functions: Defining Nonlinear Units. (line 107) * units quotients: Operators. (line 33) * units, definition of: Defining New Units. (line 6) * units, lookup method: Unit Definitions. (line 44) * units, piecewise linear: Defining Nonlinear Units. (line 117) * units, primitive: Defining New Units. (line 6) * units, sums and differences: Sums and Differences of Units. (line 6) * units, sums of: Unit Lists. (line 6) * UNITS_ENGLISH environment variable: Environment Vars. (line 34) * UNITSFILE environment variable: Environment Vars. (line 38) * US State Plane Coordinate System: Unit Definitions. (line 74) * US survey foot: Unit Definitions. (line 74) * US survey measure: Unit Definitions. (line 74) * US survey mile: Unit Definitions. (line 74) * UTF-8: Unicode Support. (line 6) * verbose output: Interactive Use. (line 52) * vertical bar (|) operator: Operators. (line 71) * volume measure, English customary: Unit Definitions. (line 59) * wire gauge: Other Nonlinear Units. (line 14) * yard, international: Unit Definitions. (line 74) * | operator: Operators. (line 71)  Tag Table: Node: Top853 Node: Overview2187 Ref: Overview-Footnote-13890 Node: Interactive Use4084 Node: Command Line Use9592 Node: Unit Definitions10839 Node: Unit Expressions16873 Node: Operators17418 Node: Sums and Differences of Units21124 Node: Numbers as Units23169 Node: Built-in Functions23975 Node: Complicated Unit Expressions25271 Node: Backwards Compatibility26910 Node: Nonlinear Conversions28813 Node: Temperature Conversions29252 Node: Other Nonlinear Units31001 Node: Unit Lists32871 Node: Invoking Units41633 Ref: Invoking Units-Footnote-151909 Node: Defining Your Own Units52163 Node: Units Data Files52622 Node: Defining New Units54900 Node: Defining Nonlinear Units58815 Node: Defining Unit List Aliases66502 Node: Numeric Output Format67660 Node: Format Specification68935 Node: Flags70906 Node: Field Width73005 Node: Precision74040 Node: Localization76497 Node: Locale76943 Node: Additional Localization78988 Node: Environment Vars83444 Node: Unicode Support85308 Node: Readline Support88331 Node: Currency89737 Node: Database Syntax90934 Node: GNU Free Documentation License92937 Node: Index118089  End Tag Table units-2.02/parse.y0000600000175000017500000003011512156460475013363 0ustar adrianadrian/* * parse.y: the parser for GNU units, a program for units conversion * Copyright (C) 1999, 2000, 2001, 2002, 2007, 2009 Free Software * Foundation, Inc * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * This program was written by Adrian Mariano (adrianm@gnu.org) */ %{ #define YYPARSE_PARAM comm #define YYLEX_PARAM comm #define COMM ((struct commtype *)comm) #include "units.h" int yylex(); void yyerror(char *); static int err; /* value used by parser to store return values */ #define CHECK if (err) { COMM->errorcode=err; YYABORT; } #define MEMSIZE 100 struct unittype *memtable[MEMSIZE]; int nextunit=0; int maxunit=0; struct commtype { int location; char *data; struct unittype *result; int errorcode; char *paramname; struct unittype *paramvalue; }; struct function { char *name; double (*func)(double); int type; }; #define DIMENSIONLESS 0 #define ANGLEIN 1 #define ANGLEOUT 2 struct unittype * getnewunit() { if (nextunit>=MEMSIZE) return 0; memtable[nextunit] = (struct unittype *) mymalloc(sizeof(struct unittype),"(getnewunit)"); if (!memtable[nextunit]) return 0; initializeunit(memtable[nextunit]); return memtable[nextunit++]; } struct unittype * makenumunit(double num,int *myerr) { struct unittype *ret; ret=getnewunit(); if (!ret){ *myerr = E_PARSEMEM; return 0; } ret->factor = num; *myerr = 0; return ret; } double logb2(double x) { return log(x)/log(2.0); } int funcunit(struct unittype *theunit, struct function *fun) { struct unittype angleunit; if (fun->type==ANGLEIN){ err=unit2num(theunit); if (err==E_NOTANUMBER){ initializeunit(&angleunit); angleunit.denominator[0] = dupstr("radian"); angleunit.denominator[1] = 0; err = multunit(theunit, &angleunit); freeunit(&angleunit); if (!err) err = unit2num(theunit); } if (err) return err; } else if (fun->type==ANGLEOUT || fun->type == DIMENSIONLESS) { if ((err=unit2num(theunit))) return err; } else return E_BADFUNCTYPE; errno = 0; theunit->factor = (*(fun->func))(theunit->factor); if (errno) return E_FUNC; if (fun->type==ANGLEOUT) { theunit->numerator[0] = dupstr("radian"); theunit->numerator[1] = 0; } return 0; } %} %pure_parser %name-prefix="units" %union { double number; int integer; struct unittype *utype; struct function *dfunc; struct func *ufunc; } %token REAL %token UNIT %token RFUNC %token UFUNC %token EXPONENT %token MULTIPLY %token MULTSTAR %token DIVIDE %token NUMDIV %token SQRT %token CUBEROOT %token MULTMINUS %token EOL %token FUNCINV %token MEMERROR %token BADNUMBER %token UNITEND %type numexpr %type expr %type list %type pexpr %type unitexpr %left ADD MINUS %left UNARY %left DIVIDE MULTSTAR %left MULTIPLY MULTMINUS %nonassoc '(' SQRT CUBEROOT RFUNC UNIT REAL UFUNC FUNCINV MEMERROR BADNUMBER UNITEND %right EXPONENT %left NUMDIV %% input: EOL { COMM->result = makenumunit(1,&err); CHECK; YYACCEPT; } | unitexpr EOL { COMM->result = $1; YYACCEPT; } | error { YYABORT; } ; unitexpr: expr {$$ = $1;} | DIVIDE list { invertunit($2); $$=$2;} ; expr: list { $$ = $1; } | MULTMINUS list %prec UNARY { $$ = $2; $$->factor *= -1; } | MINUS list %prec UNARY { $$ = $2; $$->factor *= -1; } | expr ADD expr { err = addunit($1,$3); CHECK; $$=$1;} | expr MINUS expr { $3->factor *= -1; err = addunit($1,$3); CHECK; $$=$1;} | expr DIVIDE expr { err = divunit($1, $3); CHECK; $$=$1;} | expr MULTIPLY expr { err = multunit($1,$3); CHECK; $$=$1;} | expr MULTSTAR expr { err = multunit($1,$3); CHECK; $$=$1;} ; numexpr: REAL { $$ = $1; } | numexpr NUMDIV numexpr { $$ = $1 / $3; } ; pexpr: '(' expr ')' { $$ = $2; } ; /* list is a list of units, possibly raised to powers, to be multiplied together. */ list: numexpr { $$ = makenumunit($1,&err); CHECK;} | UNIT { $$ = $1; } | list EXPONENT list { err = unitpower($1,$3); CHECK; $$=$1;} | list MULTMINUS list { err = multunit($1,$3); CHECK; $$=$1;} | list list %prec MULTIPLY { err = multunit($1,$2); CHECK; $$=$1;} | pexpr { $$=$1; } | SQRT pexpr { err = rootunit($2,2); CHECK; $$=$2;} | CUBEROOT pexpr { err = rootunit($2,3); CHECK; $$=$2;} | RFUNC pexpr { err = funcunit($2,$1); CHECK; $$=$2;} | UFUNC pexpr { err = evalfunc($2,$1,0); CHECK; $$=$2;} | FUNCINV UFUNC pexpr { err = evalfunc($3,$2,1); CHECK; $$=$3;} | list EXPONENT MULTMINUS list %prec EXPONENT { $4->factor *= -1; err = unitpower($1,$4); CHECK; $$=$1;} | list EXPONENT MINUS list %prec EXPONENT { $4->factor *= -1; err = unitpower($1,$4); CHECK; $$=$1;} | BADNUMBER { err = E_BADNUM; CHECK; } | MEMERROR { err = E_PARSEMEM; CHECK; } | UNITEND { err = E_UNITEND; CHECK; } ; %% #ifndef strchr # ifdef NO_STRCHR # define strchr(a,b) index((a),(b)) # else char *strchr(); # endif #endif /* !strchr */ double strtod(); struct function realfunctions[] = { {"sin", sin, ANGLEIN}, {"cos", cos, ANGLEIN}, {"tan", tan, ANGLEIN}, {"ln", log, DIMENSIONLESS}, {"log", log10, DIMENSIONLESS}, {"log2", logb2, DIMENSIONLESS}, {"exp", exp, DIMENSIONLESS}, {"acos", acos, ANGLEOUT}, {"atan", atan, ANGLEOUT}, {"asin", asin, ANGLEOUT}, {0, 0, 0}}; struct { char op; int value; } optable[] = { {'*', MULTIPLY}, {'/', DIVIDE}, {'|', NUMDIV}, {'+', ADD}, {'(', '('}, {')', ')'}, {'^', EXPONENT}, {'~', FUNCINV}, {0, 0}}; struct { char *name; int value; } strtable[] = { {"sqrt", SQRT}, {"cuberoot", CUBEROOT}, {"per" , DIVIDE}, {0, 0}}; int yylex(YYSTYPE *lvalp, struct commtype *comm) { int length, count; struct unittype *output; char *inptr; char *nonunitchars = "~;+-*/|\t\n^ ()"; /* Chars not allowed in unit name */ char *nonunitends = ".,_"; /* Can't start or end a unit */ char *number_start = ".,0123456789"; /* Can be first char of a number */ if (comm->location==-1) return 0; inptr = comm->data + comm->location; /* Point to start of data */ /* Skip white space */ while( *inptr && strchr(WHITE,*inptr)) inptr++, comm->location++; if (*inptr==0) { comm->location = -1; return EOL; /* Return failure if string has ended */ } /* Check for **, an exponent operator. */ if (0==strncmp("**",inptr,2)){ comm->location += 2; return EXPONENT; } /* Check for '-' and '*' which get special handling */ if (*inptr=='-'){ comm->location++; if (parserflags.minusminus) return MINUS; return MULTMINUS; } if (*inptr=='*'){ comm->location++; if (parserflags.oldstar) return MULTIPLY; return MULTSTAR; } /* Look for single character ops */ for(count=0; optable[count].op; count++){ if (*inptr==optable[count].op) { comm->location++; return optable[count].value; } } /* Look for numbers */ if (strchr(number_start,*inptr)){ /* prevent "nan" from being recognized */ char *endloc; lvalp->number = strtod(inptr, &endloc); if (inptr != endloc) { comm->location += (endloc-inptr); if (*endloc && strchr(number_start,*endloc)) return BADNUMBER; else return REAL; } } /* Look for a word (function name or unit name) */ length = strcspn(inptr,nonunitchars); if (!length){ /* Next char is not a valid unit char */ comm->location++; return 0; } /* Check that unit name doesn't start or end with forbidden chars */ if (strchr(nonunitends,*inptr)){ comm->location++; return 0; } if (strchr(nonunitends, inptr[length-1])){ comm->location+=length; return 0; } /* Look for string operators */ for(count=0;strtable[count].name;count++){ if (length==strlen(strtable[count].name) && 0==strncmp(strtable[count].name,inptr,length)){ comm->location += length; return strtable[count].value; } } /* Look for real function names */ for(count=0;realfunctions[count].name;count++){ if (length==strlen(realfunctions[count].name) && 0==strncmp(realfunctions[count].name,inptr,length)){ lvalp->dfunc = realfunctions+count; comm->location += length; return RFUNC; } } /* Look for function parameter */ if (function_parameter && length==strlen(function_parameter) && 0==strncmp(function_parameter, inptr, length)){ output = getnewunit(); if (!output) return MEMERROR; unitcopy(output, parameter_value); lvalp->utype = output; comm->location += length; return UNIT; } /* Look for user defined function */ lvalp->ufunc = fnlookup(inptr,length); if (lvalp->ufunc){ comm->location += length; return UFUNC; } /* Didn't find a special string, so treat it as unit name */ comm->location+=length; if (strchr("23456789",inptr[length-1]) && !hassubscript(inptr,length)) { /* do exponent handling like m3 */ count = inptr[length-1] - '0'; length--; if (strchr(number_start, inptr[length-1])){ return UNITEND; } } else count=1; output = getnewunit(); if (!output) return MEMERROR; output->numerator[count]=0; for(;count;count--){ output->numerator[count-1] = mymalloc(length+1,"(yylex)"); strncpy(output->numerator[count-1], inptr, length); output->numerator[count-1][length]=0; } lvalp->utype=output; return UNIT; } void yyerror(char *s){} void freelist(int startunit) { if (nextunit>maxunit) maxunit = nextunit; while(nextunit>startunit){ freeunit(memtable[--nextunit]); free(memtable[nextunit]); } } int parseunit(struct unittype *output, char *input,char **errstr,int *errloc) { struct commtype comm; int startunit; startunit = nextunit; initializeunit(output); comm.location = 0; comm.data = input; comm.errorcode = E_PARSE; /* Assume parse error */ if (yyparse(&comm)){ if (comm.location==-1) comm.location = strlen(input); if (errstr){ if (smarterror && comm.errorcode==E_FUNC) *errstr = strerror(errno); else *errstr=errormsg[comm.errorcode]; } if (errloc) *errloc = comm.location; freelist(startunit); return comm.errorcode; } else { if (errstr) *errstr = 0; multunit(output,comm.result); freeunit(comm.result); freelist(startunit); return 0; } } units-2.02/fdl-1.3.texi0000664000175000017500000005560712007313547014035 0ustar adrianadrian@c The GNU Free Documentation License. @center Version 1.3, 3 November 2008 @c This file is intended to be included within another document, @c hence no sectioning command or @node. @display Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. @uref{http://fsf.org/} Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @end display @enumerate 0 @item PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document @dfn{free} in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of ``copyleft'', which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. @item APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The ``Document'', below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as ``you''. You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A ``Modified Version'' of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A ``Secondary Section'' is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The ``Invariant Sections'' are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The ``Cover Texts'' are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A ``Transparent'' copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not ``Transparent'' is called ``Opaque''. Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, La@TeX{} input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. The ``Title Page'' means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, ``Title Page'' means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. The ``publisher'' means any person or entity that distributes copies of the Document to the public. A section ``Entitled XYZ'' means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as ``Acknowledgements'', ``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title'' of such a section when you modify the Document means that it remains a section ``Entitled XYZ'' according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. @item VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. @item COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. @item MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: @enumerate A @item Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. @item List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. @item State on the Title page the name of the publisher of the Modified Version, as the publisher. @item Preserve all the copyright notices of the Document. @item Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. @item Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. @item Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. @item Include an unaltered copy of this License. @item Preserve the section Entitled ``History'', Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled ``History'' in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. @item Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the ``History'' section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. @item For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. @item Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. @item Delete any section Entitled ``Endorsements''. Such a section may not be included in the Modified Version. @item Do not retitle any existing section to be Entitled ``Endorsements'' or to conflict in title with any Invariant Section. @item Preserve any Warranty Disclaimers. @end enumerate If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled ``Endorsements'', provided it contains nothing but endorsements of your Modified Version by various parties---for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. @item COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled ``History'' in the various original documents, forming one section Entitled ``History''; likewise combine any sections Entitled ``Acknowledgements'', and any sections Entitled ``Dedications''. You must delete all sections Entitled ``Endorsements.'' @item COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. @item AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an ``aggregate'' if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. @item TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled ``Acknowledgements'', ``Dedications'', or ``History'', the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. @item TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License. However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it. @item FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See @uref{http://www.gnu.org/copyleft/}. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License ``or any later version'' applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document. @item RELICENSING ``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A ``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the site means any set of copyrightable works thus published on the MMC site. ``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization. ``Incorporate'' means to publish or republish a Document, in whole or in part, as part of another Document. An MMC is ``eligible for relicensing'' if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008. The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. @end enumerate @page @heading ADDENDUM: How to use this License for your documents To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: @smallexample @group Copyright (C) @var{year} @var{your name}. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. @end group @end smallexample If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the ``with@dots{}Texts.''@: line with this: @smallexample @group with the Invariant Sections being @var{list their titles}, with the Front-Cover Texts being @var{list}, and with the Back-Cover Texts being @var{list}. @end group @end smallexample If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. @c Local Variables: @c ispell-local-pdict: "ispell-dict" @c End: units-2.02/Makefile.dos0000664000175000017500000000111510232761036014301 0ustar adrianadrian# edit these lines to suit CC = cl CFLAGS = -O2 -G5 -W3 -Za -nologo OBJS = units.obj getopt.obj getopt1.obj parse.obj # Uncomment this line and edit to suit # UDEFINES = -D'UNITSFILE="c:/usr/local/share/units.dat"' units.exe: $(OBJS) $(CC) $(CFLAGS) $(OBJS) $(LIBS) getopt.obj: getopt.c $(CC) $(CFLAGS) $(CDEFINES) -c getopt.c getopt1.obj: getopt1.c $(CC) $(CFLAGS) $(CDEFINES) -c getopt1.c units.obj: units.c $(CC) $(CFLAGS) $(UDEFINES) $(CDEFINES) -c units.c parse.obj: parse.tab.c $(CC) $(CFLAGS) $(CDEFINES) -c parse.tab.c mv parse.tab.obj parse.obj clean: rm -f $(OBJS) units-2.02/locale.map0000664000175000017500000001270611747125613014032 0ustar adrianadrianAfrikaans_South Africa af_ZA Albanian_Albania sq_AL Alsatian_France gsw_FR Amharic_Ethiopia am_ET Arabic_Algeria ar_DZ Arabic_Bahrain ar_BH Arabic_Egypt ar_EG Arabic_Iraq ar_IQ Arabic_Jordan ar_JO Arabic_Kuwait ar_KW Arabic_Lebanon ar_LB Arabic_Libya ar_LY Arabic_Morocco ar_MA Arabic_Oman ar_OM Arabic_Qatar ar_QA Arabic_Saudi Arabia ar_SA Arabic_Syria ar_SY Arabic_Tunisia ar_TN Arabic_U.A.E. ar_AE Arabic_Yemen ar_YE Armenian_Armenia hy_AM Assamese_India as_IN Azeri_Azerbaijan, Cyrillic az_AZ Azeri_Azerbaijan, Latin az_AZ Bashkir_Russia ba_RU Basque_Basque eu_ES Belarusian_Belarus be_BY Bengali_Bangladesh bn_?? Bengali_India bn_IN Bosnian_Neutral bs_?? Bosnian_Bosnia and Herzegovina, Cyrillic bs_BA Bosnian_Bosnia and Herzegovina, Latin bs_BA Breton_France br_FR Bulgarian_Bulgaria bg_BG Central Kurdish_Iraq ku_IQ Cherokee_Cherokee chr_Cher Catalan_Spain ca_ES Chinese_Hong Kong SAR, PRC zh_HK Chinese_Macao SAR zh_MO Chinese_Singapore zh_SG Chinese_Simplified zh_Hans Chinese_Traditional zh_Hant Corsican_France co_FR Croatian_Neutral hr_?? Croatian_Bosnia and Herzegovina, Latin hr_BA Croatian_Croatia hr_HR Czech_Czech Republic cs_CZ Danish_Denmark da_DK Dari_Afghanistan prs_AF Divehi_Maldives dv_MV Dutch_Belgium nl_BE Dutch_Netherlands nl_NL English_Australia en_AU English_Belize en_BZ English_Canada en_CA English_Caribbean en_029 English_India en_IN English_Ireland en_IE English_Ireland en_IE English_Jamaica en_JM English_Malaysia en_MY English_New Zealand en_NZ English_Philippines en_PH English_Singapore en_SG English_South Africa en_ZA English_Trinidad and Tobago en_TT English_United Kingdom en_GB English_United States en_US English_Zimbabwe en_ZW Estonian_Estonia et_EE Faroese_Faroe Islands fo_FO Filipino_Philippines fil_PH Finnish_Finland fi_FI French_Belgium fr_BE French_Canada fr_CA French_France fr_FR French_Luxembourg fr_LU French_Monaco fr_MC French_Switzerland fr_CH Frisian_Netherlands fy_NL Galician_Spain gl_ES Georgian_Georgia ka_GE German_Austria de_AT German_Germany de_DE German_Liechtenstein de_LI German_Luxembourg de_LU German_Switzerland de_CH Greek_Greece el_GR Greenlandic_Greenland kl_GL Gujarati_India gu_IN Hausa_Nigeria ha_NG Hawiian_United States haw_US Hebrew_Israel he_IL Hindi_India hi_IN Hungarian_Hungary hu_HU Icelandic_Iceland is_IS Igbo_Nigeria ig_NG Indonesian_Indonesia id_ID Inuktitut_Canada iu_CA, Latin Inuktitut_Canada iu_CA, Canadian Syllabics Irish_Ireland ga_IE isiXhosa_South Africa xh_ZA isiZulu_South Africa zu_ZA Italian_Italy it_IT Italian_Switzerland it_CH Japanese_Japan ja_JP Kannada_India kn_IN Kazakh_Kazakhstan kk_KZ Khmer_Cambodia kh_KH K'iche_Guatemala qut_GT Kinyarwanda_Rwanda rw_RW Konkani_India kok_IN Korean_Korea ko_KR Kyrgyz_Kyrgyzstan ky_KG Lao_Lao PDR lo_LA Latvian_Latvia lv_LV Lithuanian_Lithuanian lt_LT Lower Sorbian_Germany dsb_DE Luxembourgish_Luxembourg lb_LU Macedonian_Macedonia, FYROM mk_MK Malay_Brunei Darassalam ms_BN Malay_Malaysia ms_MY Malayalam_India ml_IN Maltese_Malta mt_MT Maori_New Zealand mi_NZ Mapudungun_Chile arn_CL Marathi_India mr_IN Mohawk_Canada moh_CA Mongolian_Mongolia, Cyrillic mn_MN Mongolian_Mongolia, Mong mn_MN Nepali_Nepal ne_NP Nepali_India ne_IN Norwegian_Bokmål, Norway no_NO Norwegian_Nynorsk, Norway no_NO Occitan_France oc_FR Oriya_India or_IN Pashto_Afghanistan ps_AF Persian_Iran fa_IR Polish_Poland pl_PL Portuguese_Brazil pt_BR Portuguese_Portugal pt_PT Pular_Senegal ff_SN Punjabi_India, Gurmukhi script pa_IN Punjabi_Pakistan, Arabic script pa_PK Quechua_Bolivia quz_BO Quechua_Ecuador quz_EC Quechua_Peru quz_PE Romanian_Romania ro_RO Romansh_Switzerland rm_CH Russian_Russia ru_RU Sakha_Russia sah_RU Sami_Inari, Finland smn_FI Sami_Lule, Norway smj_NO Sami_Lule, Sweden smj_SE Sami_Northern, Finland se_FI Sami_Northern, Norway se_NO Sami_Northern, Sweden se_SE Sami_Skolt, Finland sms_FI Sami_Southern, Norway sma_NO Sami_Southern, Sweden sma_SE Sanskrit_India sa_IN Serbian_Neutral sr_?? Serbian_Bosnia and Herzegovina, Cyrillic sr_BA Serbian_Bosnia and Herzegovina, Latin sr_BA Serbian_Croatia sr_HR Serbian_Serbia and Montenegro, Former, Cyrillic sr_CS Serbian_Serbia and Montenegro, Former, Latin sr_CS Sesotho sa Leboa_South Africa nso_ZA Setswana / Tswana_Botswana tn_BW Setswana / Tswana_South Africa tn_ZA Sindhi_Pakistan sd_PK Sinhala_Sri Lanka si_LK Slovak_Slovakia sk_SK Slovenian_Slovenia sl_SI Spanish_Argentina es_AR Spanish_Bolivia es_BO Spanish_Chile es_CL Spanish_Colombia es_CO Spanish_Costa Rica es_CR Spanish_Dominican Republic es_DO Spanish_Ecuador es_EC Spanish_El Salvador es_SV Spanish_Guatemala es_GT Spanish_Honduras es_HN Spanish_Mexico es_MX Spanish_Nicaragua es_NI Spanish_Panama es_PA Spanish_Paraguay es_PY Spanish_Peru es_PE Spanish_Puerto Rico es_PR Spanish_Spain, Modern Sort es_ES Spanish_Spain, Traditional Sort es_ES Spanish_United States es_US Spanish_Uruguay es_UY Spanish_Venezuela es_VE Swahili_Kenya sw_KE Swedish_Finland sv_FI Swedish_Sweden sv_SE Swedish_Sweden sv_SE Syriac_Syria syr_SY Tajik_Tajikistan, Cyrillic tg_TJ Tamazight_Algeria, Latin tzm_DZ Tamil_India ta_IN Tamil_Sri Lanka ta_LK Tatar_Russia tt_RU Telugu_India te_IN Thai_Thailand th_TH Tibetan_PRC bo_CN Tigrinya_Eritrea ti_ER Tigrinya_Ethiopia ti_ET Turkish_Turkey tr_TR Turkmen_Turkmenistan tk_TM Ukrainian_Ukraine uk_UA Upper Sorbian_Germany hsb_DE Urdu_(reserved) ur_?? Urdu_Pakistan ur_PK Uyghur_PRC ug_CN Uzbek_Uzbekistan, Cyrillic uz_UZ Uzbek_Uzbekistan, Latin uz_UZ Valencian_Valencia ca_ES-Valencia Vietnamese_Vietnam vi_VN Welsh_United Kingdom cy_GB Wolof_Senegal wo_SN Yi_PRC ii_CN Yoruba_Nigeria yo_NG units-2.02/parse.tab.c0000664000175000017500000017347712156460651014133 0ustar adrianadrian/* A Bison parser, made by GNU Bison 2.5. */ /* Bison implementation for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "2.5" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 1 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* Using locations. */ #define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ #define yyparse unitsparse #define yylex unitslex #define yyerror unitserror #define yylval unitslval #define yychar unitschar #define yydebug unitsdebug #define yynerrs unitsnerrs /* Copy the first part of user declarations. */ /* Line 268 of yacc.c */ #line 24 "parse.y" #define YYPARSE_PARAM comm #define YYLEX_PARAM comm #define COMM ((struct commtype *)comm) #include "units.h" int yylex(); void yyerror(char *); static int err; /* value used by parser to store return values */ #define CHECK if (err) { COMM->errorcode=err; YYABORT; } #define MEMSIZE 100 struct unittype *memtable[MEMSIZE]; int nextunit=0; int maxunit=0; struct commtype { int location; char *data; struct unittype *result; int errorcode; char *paramname; struct unittype *paramvalue; }; struct function { char *name; double (*func)(double); int type; }; #define DIMENSIONLESS 0 #define ANGLEIN 1 #define ANGLEOUT 2 struct unittype * getnewunit() { if (nextunit>=MEMSIZE) return 0; memtable[nextunit] = (struct unittype *) mymalloc(sizeof(struct unittype),"(getnewunit)"); if (!memtable[nextunit]) return 0; initializeunit(memtable[nextunit]); return memtable[nextunit++]; } struct unittype * makenumunit(double num,int *myerr) { struct unittype *ret; ret=getnewunit(); if (!ret){ *myerr = E_PARSEMEM; return 0; } ret->factor = num; *myerr = 0; return ret; } double logb2(double x) { return log(x)/log(2.0); } int funcunit(struct unittype *theunit, struct function *fun) { struct unittype angleunit; if (fun->type==ANGLEIN){ err=unit2num(theunit); if (err==E_NOTANUMBER){ initializeunit(&angleunit); angleunit.denominator[0] = dupstr("radian"); angleunit.denominator[1] = 0; err = multunit(theunit, &angleunit); freeunit(&angleunit); if (!err) err = unit2num(theunit); } if (err) return err; } else if (fun->type==ANGLEOUT || fun->type == DIMENSIONLESS) { if ((err=unit2num(theunit))) return err; } else return E_BADFUNCTYPE; errno = 0; theunit->factor = (*(fun->func))(theunit->factor); if (errno) return E_FUNC; if (fun->type==ANGLEOUT) { theunit->numerator[0] = dupstr("radian"); theunit->numerator[1] = 0; } return 0; } /* Line 268 of yacc.c */ #line 195 "parse.tab.c" /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* Enabling the token table. */ #ifndef YYTOKEN_TABLE # define YYTOKEN_TABLE 0 #endif /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { REAL = 258, UNIT = 259, RFUNC = 260, UFUNC = 261, EXPONENT = 262, MULTIPLY = 263, MULTSTAR = 264, DIVIDE = 265, NUMDIV = 266, SQRT = 267, CUBEROOT = 268, MULTMINUS = 269, EOL = 270, FUNCINV = 271, MEMERROR = 272, BADNUMBER = 273, UNITEND = 274, MINUS = 275, ADD = 276, UNARY = 277 }; #endif #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 293 of yacc.c */ #line 142 "parse.y" double number; int integer; struct unittype *utype; struct function *dfunc; struct func *ufunc; /* Line 293 of yacc.c */ #line 263 "parse.tab.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif /* Copy the second part of user declarations. */ /* Line 343 of yacc.c */ #line 275 "parse.tab.c" #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #elif (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) typedef signed char yytype_int8; #else typedef short int yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) # endif # endif # ifndef YY_ # define YY_(msgid) msgid # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(e) ((void) (e)) #else # define YYUSE(e) /* empty */ #endif /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint # define YYID(n) (n) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int YYID (int yyi) #else static int YYID (yyi) int yyi; #endif { return yyi; } #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (YYID (0)) # endif # endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 32 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 171 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 25 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 7 /* YYNRULES -- Number of rules. */ #define YYNRULES 33 /* YYNRULES -- Number of states. */ #define YYNSTATES 57 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 277 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 23, 24, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const yytype_uint8 yyprhs[] = { 0, 0, 3, 5, 8, 10, 12, 15, 17, 20, 23, 27, 31, 35, 39, 43, 45, 49, 53, 55, 57, 61, 65, 68, 70, 73, 76, 79, 82, 86, 91, 96, 98, 100 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { 26, 0, -1, 15, -1, 27, 15, -1, 1, -1, 28, -1, 10, 31, -1, 31, -1, 14, 31, -1, 20, 31, -1, 28, 21, 28, -1, 28, 20, 28, -1, 28, 10, 28, -1, 28, 8, 28, -1, 28, 9, 28, -1, 3, -1, 29, 11, 29, -1, 23, 28, 24, -1, 29, -1, 4, -1, 31, 7, 31, -1, 31, 14, 31, -1, 31, 31, -1, 30, -1, 12, 30, -1, 13, 30, -1, 5, 30, -1, 6, 30, -1, 16, 6, 30, -1, 31, 7, 14, 31, -1, 31, 7, 20, 31, -1, 18, -1, 17, -1, 19, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { 0, 187, 187, 188, 189, 192, 193, 196, 197, 198, 199, 200, 202, 203, 204, 207, 208, 211, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 231, 234, 235, 236 }; #endif #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "REAL", "UNIT", "RFUNC", "UFUNC", "EXPONENT", "MULTIPLY", "MULTSTAR", "DIVIDE", "NUMDIV", "SQRT", "CUBEROOT", "MULTMINUS", "EOL", "FUNCINV", "MEMERROR", "BADNUMBER", "UNITEND", "MINUS", "ADD", "UNARY", "'('", "')'", "$accept", "input", "unitexpr", "expr", "numexpr", "pexpr", "list", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 40, 41 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 25, 26, 26, 26, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 30, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 1, 2, 1, 1, 2, 1, 2, 2, 3, 3, 3, 3, 3, 1, 3, 3, 1, 1, 3, 3, 2, 1, 2, 2, 2, 2, 3, 4, 4, 1, 1, 1 }; /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. Performed when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 0, 4, 15, 19, 0, 0, 0, 0, 0, 0, 2, 0, 32, 31, 33, 0, 0, 0, 0, 5, 18, 23, 7, 26, 27, 6, 24, 25, 8, 0, 9, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 22, 28, 17, 13, 14, 12, 11, 10, 16, 0, 0, 20, 21, 29, 30 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { -1, 17, 18, 19, 20, 21, 42 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -17 static const yytype_int16 yypact[] = { 43, -17, -17, -17, -16, -16, 148, -16, -16, 148, -17, 7, -17, -17, -17, 148, 64, 8, -1, 65, 16, -17, 85, -17, -17, 85, -17, -17, 85, -16, 85, 9, -17, -17, 64, 64, 64, 64, 64, 17, 106, 148, 127, -17, -17, -17, 20, 20, 2, 2, -17, 148, 148, 24, 127, 24, 24 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -17, -17, -17, -13, -7, -3, 0 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -1 static const yytype_uint8 yytable[] = { 22, 23, 24, 31, 26, 27, 25, 16, 32, 28, 34, 35, 36, 29, 33, 30, 22, 34, 35, 36, 2, 45, 46, 47, 48, 49, 43, 39, 34, 37, 38, 40, 50, 44, 22, 22, 22, 22, 22, 0, 53, 54, 0, 0, 1, 0, 2, 3, 4, 5, 0, 55, 56, 6, 0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 0, 16, 2, 3, 4, 5, 0, 0, 34, 35, 36, 7, 8, 9, 0, 11, 12, 13, 14, 15, 37, 38, 16, 2, 3, 4, 5, 40, 0, 0, 0, 0, 7, 8, 41, 0, 11, 12, 13, 14, 0, 0, 0, 16, 2, 3, 4, 5, 0, 0, 0, 0, 0, 7, 8, 51, 0, 11, 12, 13, 14, 52, 0, 0, 16, 2, 3, 4, 5, 40, 0, 0, 0, 0, 7, 8, 0, 0, 11, 12, 13, 14, 0, 0, 0, 16, 2, 3, 4, 5, 0, 0, 0, 0, 0, 7, 8, 0, 0, 11, 12, 13, 14, 0, 0, 0, 16 }; #define yypact_value_is_default(yystate) \ ((yystate) == (-17)) #define yytable_value_is_error(yytable_value) \ YYID (0) static const yytype_int8 yycheck[] = { 0, 4, 5, 16, 7, 8, 6, 23, 0, 9, 8, 9, 10, 6, 15, 15, 16, 8, 9, 10, 3, 34, 35, 36, 37, 38, 29, 11, 8, 20, 21, 7, 39, 24, 34, 35, 36, 37, 38, -1, 40, 41, -1, -1, 1, -1, 3, 4, 5, 6, -1, 51, 52, 10, -1, 12, 13, 14, 15, 16, 17, 18, 19, 20, -1, -1, 23, 3, 4, 5, 6, -1, -1, 8, 9, 10, 12, 13, 14, -1, 16, 17, 18, 19, 20, 20, 21, 23, 3, 4, 5, 6, 7, -1, -1, -1, -1, 12, 13, 14, -1, 16, 17, 18, 19, -1, -1, -1, 23, 3, 4, 5, 6, -1, -1, -1, -1, -1, 12, 13, 14, -1, 16, 17, 18, 19, 20, -1, -1, 23, 3, 4, 5, 6, 7, -1, -1, -1, -1, 12, 13, -1, -1, 16, 17, 18, 19, -1, -1, -1, 23, 3, 4, 5, 6, -1, -1, -1, -1, -1, 12, 13, -1, -1, 16, 17, 18, 19, -1, -1, -1, 23 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 1, 3, 4, 5, 6, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 23, 26, 27, 28, 29, 30, 31, 30, 30, 31, 30, 30, 31, 6, 31, 28, 0, 15, 8, 9, 10, 20, 21, 11, 7, 14, 31, 30, 24, 28, 28, 28, 28, 28, 29, 14, 20, 31, 31, 31, 31 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. However, YYFAIL appears to be in use. Nevertheless, it is formally deprecated in Bison 2.4.2's NEWS entry, where a plan to phase it out is discussed. */ #define YYFAIL goto yyerrlab #if defined YYFAIL /* This is here to suppress warnings from the GCC cpp's -Wunused-macros. Normally we don't worry about that warning, but some users do, and we want to make it easy for users to remove YYFAIL uses, which will produce warnings from Bison 2.5. */ #endif #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ YYPOPSTACK (1); \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ #define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (YYID (N)) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (YYID (0)) #endif /* This macro is provided for backward compatibility. */ #ifndef YY_LOCATION_PRINT # define YY_LOCATION_PRINT(File, Loc) ((void) 0) #endif /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, YYLEX_PARAM) #else # define YYLEX yylex (&yylval) #endif /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (YYID (0)) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (YYID (0)) /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_value_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # else YYUSE (yyoutput); # endif switch (yytype) { default: break; } } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void yy_stack_print (yybottom, yytop) yytype_int16 *yybottom; yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_reduce_print (YYSTYPE *yyvsp, int yyrule) #else static void yy_reduce_print (yyvsp, yyrule) YYSTYPE *yyvsp; int yyrule; #endif { int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyvsp, Rule); \ } while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) #else static YYSIZE_T yystrlen (yystr) const char *yystr; #endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) #else static char * yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; #endif { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message about the unexpected token YYTOKEN for the state stack whose top is YYSSP. Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return 2 if the required number of bytes is too large to store. */ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); YYSIZE_T yysize = yysize0; YYSIZE_T yysize1; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ const char *yyformat = 0; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per "expected"). */ int yycount = 0; /* There are many possibilities here to consider: - Assume YYFAIL is not used. It's too flawed to consider. See for details. YYERROR is fine as it does not invoke this function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected tokens because there are none. - The only way there can be no lookahead present (in yychar) is if this state is a consistent state with a default action. Thus, detecting the absence of a lookahead is sufficient to determine that there is no unexpected or expected token to report. In that case, just report a simple "syntax error". - Don't assume there isn't a lookahead just because this state is a consistent state with a default action. There might have been a previous inconsistent state, consistent state with a non-default action, or user semantic action that manipulated yychar. - Of course, the expected token list depends on states to have correct lookahead information, and it depends on the parser not to perform extra reductions after fetching a lookahead from the scanner and before detecting a syntax error. Thus, state merging (from LALR or IELR) and default reductions corrupt the expected token list. However, the list is correct for canonical LR with one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ if (yytoken != YYEMPTY) { int yyn = yypact[*yyssp]; yyarg[yycount++] = yytname[yytoken]; if (!yypact_value_is_default (yyn)) { /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. In other words, skip the first -YYN actions for this state because they are default actions. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yyx; for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR && !yytable_value_is_error (yytable[yyx + yyn])) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; break; } yyarg[yycount++] = yytname[yyx]; yysize1 = yysize + yytnamerr (0, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; } } } switch (yycount) { # define YYCASE_(N, S) \ case N: \ yyformat = S; \ break YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); # undef YYCASE_ } yysize1 = yysize + yystrlen (yyformat); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; if (*yymsg_alloc < yysize) { *yymsg_alloc = 2 * yysize; if (! (yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; return 1; } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; int yyi = 0; while ((*yyp = *yyformat) != '\0') if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyformat += 2; } else { yyp++; yyformat++; } } return 0; } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else static void yydestruct (yymsg, yytype, yyvaluep) const char *yymsg; int yytype; YYSTYPE *yyvaluep; #endif { YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { default: break; } } /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); #else int yyparse (); #endif #else /* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus int yyparse (void); #else int yyparse (); #endif #endif /* ! YYPARSE_PARAM */ /*----------. | yyparse. | `----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void *YYPARSE_PARAM) #else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else int yyparse () #endif #endif { /* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: `yyss': related to states. `yyvs': related to semantic values. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs; YYSTYPE *yyvsp; YYSIZE_T yystacksize; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; yytoken = 0; yyss = yyssa; yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss; yyvsp = yyvs; goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yytable_value_is_error (yyn)) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token. */ yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 2: /* Line 1806 of yacc.c */ #line 187 "parse.y" { COMM->result = makenumunit(1,&err); CHECK; YYACCEPT; } break; case 3: /* Line 1806 of yacc.c */ #line 188 "parse.y" { COMM->result = (yyvsp[(1) - (2)].utype); YYACCEPT; } break; case 4: /* Line 1806 of yacc.c */ #line 189 "parse.y" { YYABORT; } break; case 5: /* Line 1806 of yacc.c */ #line 192 "parse.y" {(yyval.utype) = (yyvsp[(1) - (1)].utype);} break; case 6: /* Line 1806 of yacc.c */ #line 193 "parse.y" { invertunit((yyvsp[(2) - (2)].utype)); (yyval.utype)=(yyvsp[(2) - (2)].utype);} break; case 7: /* Line 1806 of yacc.c */ #line 196 "parse.y" { (yyval.utype) = (yyvsp[(1) - (1)].utype); } break; case 8: /* Line 1806 of yacc.c */ #line 197 "parse.y" { (yyval.utype) = (yyvsp[(2) - (2)].utype); (yyval.utype)->factor *= -1; } break; case 9: /* Line 1806 of yacc.c */ #line 198 "parse.y" { (yyval.utype) = (yyvsp[(2) - (2)].utype); (yyval.utype)->factor *= -1; } break; case 10: /* Line 1806 of yacc.c */ #line 199 "parse.y" { err = addunit((yyvsp[(1) - (3)].utype),(yyvsp[(3) - (3)].utype)); CHECK; (yyval.utype)=(yyvsp[(1) - (3)].utype);} break; case 11: /* Line 1806 of yacc.c */ #line 200 "parse.y" { (yyvsp[(3) - (3)].utype)->factor *= -1; err = addunit((yyvsp[(1) - (3)].utype),(yyvsp[(3) - (3)].utype)); CHECK; (yyval.utype)=(yyvsp[(1) - (3)].utype);} break; case 12: /* Line 1806 of yacc.c */ #line 202 "parse.y" { err = divunit((yyvsp[(1) - (3)].utype), (yyvsp[(3) - (3)].utype)); CHECK; (yyval.utype)=(yyvsp[(1) - (3)].utype);} break; case 13: /* Line 1806 of yacc.c */ #line 203 "parse.y" { err = multunit((yyvsp[(1) - (3)].utype),(yyvsp[(3) - (3)].utype)); CHECK; (yyval.utype)=(yyvsp[(1) - (3)].utype);} break; case 14: /* Line 1806 of yacc.c */ #line 204 "parse.y" { err = multunit((yyvsp[(1) - (3)].utype),(yyvsp[(3) - (3)].utype)); CHECK; (yyval.utype)=(yyvsp[(1) - (3)].utype);} break; case 15: /* Line 1806 of yacc.c */ #line 207 "parse.y" { (yyval.number) = (yyvsp[(1) - (1)].number); } break; case 16: /* Line 1806 of yacc.c */ #line 208 "parse.y" { (yyval.number) = (yyvsp[(1) - (3)].number) / (yyvsp[(3) - (3)].number); } break; case 17: /* Line 1806 of yacc.c */ #line 211 "parse.y" { (yyval.utype) = (yyvsp[(2) - (3)].utype); } break; case 18: /* Line 1806 of yacc.c */ #line 217 "parse.y" { (yyval.utype) = makenumunit((yyvsp[(1) - (1)].number),&err); CHECK;} break; case 19: /* Line 1806 of yacc.c */ #line 218 "parse.y" { (yyval.utype) = (yyvsp[(1) - (1)].utype); } break; case 20: /* Line 1806 of yacc.c */ #line 219 "parse.y" { err = unitpower((yyvsp[(1) - (3)].utype),(yyvsp[(3) - (3)].utype)); CHECK; (yyval.utype)=(yyvsp[(1) - (3)].utype);} break; case 21: /* Line 1806 of yacc.c */ #line 220 "parse.y" { err = multunit((yyvsp[(1) - (3)].utype),(yyvsp[(3) - (3)].utype)); CHECK; (yyval.utype)=(yyvsp[(1) - (3)].utype);} break; case 22: /* Line 1806 of yacc.c */ #line 221 "parse.y" { err = multunit((yyvsp[(1) - (2)].utype),(yyvsp[(2) - (2)].utype)); CHECK; (yyval.utype)=(yyvsp[(1) - (2)].utype);} break; case 23: /* Line 1806 of yacc.c */ #line 222 "parse.y" { (yyval.utype)=(yyvsp[(1) - (1)].utype); } break; case 24: /* Line 1806 of yacc.c */ #line 223 "parse.y" { err = rootunit((yyvsp[(2) - (2)].utype),2); CHECK; (yyval.utype)=(yyvsp[(2) - (2)].utype);} break; case 25: /* Line 1806 of yacc.c */ #line 224 "parse.y" { err = rootunit((yyvsp[(2) - (2)].utype),3); CHECK; (yyval.utype)=(yyvsp[(2) - (2)].utype);} break; case 26: /* Line 1806 of yacc.c */ #line 225 "parse.y" { err = funcunit((yyvsp[(2) - (2)].utype),(yyvsp[(1) - (2)].dfunc)); CHECK; (yyval.utype)=(yyvsp[(2) - (2)].utype);} break; case 27: /* Line 1806 of yacc.c */ #line 226 "parse.y" { err = evalfunc((yyvsp[(2) - (2)].utype),(yyvsp[(1) - (2)].ufunc),0); CHECK; (yyval.utype)=(yyvsp[(2) - (2)].utype);} break; case 28: /* Line 1806 of yacc.c */ #line 227 "parse.y" { err = evalfunc((yyvsp[(3) - (3)].utype),(yyvsp[(2) - (3)].ufunc),1); CHECK; (yyval.utype)=(yyvsp[(3) - (3)].utype);} break; case 29: /* Line 1806 of yacc.c */ #line 229 "parse.y" { (yyvsp[(4) - (4)].utype)->factor *= -1; err = unitpower((yyvsp[(1) - (4)].utype),(yyvsp[(4) - (4)].utype)); CHECK; (yyval.utype)=(yyvsp[(1) - (4)].utype);} break; case 30: /* Line 1806 of yacc.c */ #line 232 "parse.y" { (yyvsp[(4) - (4)].utype)->factor *= -1; err = unitpower((yyvsp[(1) - (4)].utype),(yyvsp[(4) - (4)].utype)); CHECK; (yyval.utype)=(yyvsp[(1) - (4)].utype);} break; case 31: /* Line 1806 of yacc.c */ #line 234 "parse.y" { err = E_BADNUM; CHECK; } break; case 32: /* Line 1806 of yacc.c */ #line 235 "parse.y" { err = E_PARSEMEM; CHECK; } break; case 33: /* Line 1806 of yacc.c */ #line 236 "parse.y" { err = E_UNITEND; CHECK; } break; /* Line 1806 of yacc.c */ #line 1788 "parse.tab.c" default: break; } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. One alternative is translating here after every semantic action, but that translation would be missed if the semantic action invokes YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an incorrect destructor might then be invoked immediately. In the case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ yyssp, yytoken) { char const *yymsgp = YY_("syntax error"); int yysyntax_error_status; yysyntax_error_status = YYSYNTAX_ERROR; if (yysyntax_error_status == 0) yymsgp = yymsg; else if (yysyntax_error_status == 1) { if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); if (!yymsg) { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; yysyntax_error_status = 2; } else { yysyntax_error_status = YYSYNTAX_ERROR; yymsgp = yymsg; } } yyerror (yymsgp); if (yysyntax_error_status == 2) goto yyexhaustedlab; } # undef YYSYNTAX_ERROR #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } *++yyvsp = yylval; /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = YYTRANSLATE (yychar); yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); } /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif /* Make sure YYID is used. */ return YYID (yyresult); } /* Line 2067 of yacc.c */ #line 242 "parse.y" #ifndef strchr # ifdef NO_STRCHR # define strchr(a,b) index((a),(b)) # else char *strchr(); # endif #endif /* !strchr */ double strtod(); struct function realfunctions[] = { {"sin", sin, ANGLEIN}, {"cos", cos, ANGLEIN}, {"tan", tan, ANGLEIN}, {"ln", log, DIMENSIONLESS}, {"log", log10, DIMENSIONLESS}, {"log2", logb2, DIMENSIONLESS}, {"exp", exp, DIMENSIONLESS}, {"acos", acos, ANGLEOUT}, {"atan", atan, ANGLEOUT}, {"asin", asin, ANGLEOUT}, {0, 0, 0}}; struct { char op; int value; } optable[] = { {'*', MULTIPLY}, {'/', DIVIDE}, {'|', NUMDIV}, {'+', ADD}, {'(', '('}, {')', ')'}, {'^', EXPONENT}, {'~', FUNCINV}, {0, 0}}; struct { char *name; int value; } strtable[] = { {"sqrt", SQRT}, {"cuberoot", CUBEROOT}, {"per" , DIVIDE}, {0, 0}}; int yylex(YYSTYPE *lvalp, struct commtype *comm) { int length, count; struct unittype *output; char *inptr; char *nonunitchars = "~;+-*/|\t\n^ ()"; /* Chars not allowed in unit name */ char *nonunitends = ".,_"; /* Can't start or end a unit */ char *number_start = ".,0123456789"; /* Can be first char of a number */ if (comm->location==-1) return 0; inptr = comm->data + comm->location; /* Point to start of data */ /* Skip white space */ while( *inptr && strchr(WHITE,*inptr)) inptr++, comm->location++; if (*inptr==0) { comm->location = -1; return EOL; /* Return failure if string has ended */ } /* Check for **, an exponent operator. */ if (0==strncmp("**",inptr,2)){ comm->location += 2; return EXPONENT; } /* Check for '-' and '*' which get special handling */ if (*inptr=='-'){ comm->location++; if (parserflags.minusminus) return MINUS; return MULTMINUS; } if (*inptr=='*'){ comm->location++; if (parserflags.oldstar) return MULTIPLY; return MULTSTAR; } /* Look for single character ops */ for(count=0; optable[count].op; count++){ if (*inptr==optable[count].op) { comm->location++; return optable[count].value; } } /* Look for numbers */ if (strchr(number_start,*inptr)){ /* prevent "nan" from being recognized */ char *endloc; lvalp->number = strtod(inptr, &endloc); if (inptr != endloc) { comm->location += (endloc-inptr); if (*endloc && strchr(number_start,*endloc)) return BADNUMBER; else return REAL; } } /* Look for a word (function name or unit name) */ length = strcspn(inptr,nonunitchars); if (!length){ /* Next char is not a valid unit char */ comm->location++; return 0; } /* Check that unit name doesn't start or end with forbidden chars */ if (strchr(nonunitends,*inptr)){ comm->location++; return 0; } if (strchr(nonunitends, inptr[length-1])){ comm->location+=length; return 0; } /* Look for string operators */ for(count=0;strtable[count].name;count++){ if (length==strlen(strtable[count].name) && 0==strncmp(strtable[count].name,inptr,length)){ comm->location += length; return strtable[count].value; } } /* Look for real function names */ for(count=0;realfunctions[count].name;count++){ if (length==strlen(realfunctions[count].name) && 0==strncmp(realfunctions[count].name,inptr,length)){ lvalp->dfunc = realfunctions+count; comm->location += length; return RFUNC; } } /* Look for function parameter */ if (function_parameter && length==strlen(function_parameter) && 0==strncmp(function_parameter, inptr, length)){ output = getnewunit(); if (!output) return MEMERROR; unitcopy(output, parameter_value); lvalp->utype = output; comm->location += length; return UNIT; } /* Look for user defined function */ lvalp->ufunc = fnlookup(inptr,length); if (lvalp->ufunc){ comm->location += length; return UFUNC; } /* Didn't find a special string, so treat it as unit name */ comm->location+=length; if (strchr("23456789",inptr[length-1]) && !hassubscript(inptr,length)) { /* do exponent handling like m3 */ count = inptr[length-1] - '0'; length--; if (strchr(number_start, inptr[length-1])){ return UNITEND; } } else count=1; output = getnewunit(); if (!output) return MEMERROR; output->numerator[count]=0; for(;count;count--){ output->numerator[count-1] = mymalloc(length+1,"(yylex)"); strncpy(output->numerator[count-1], inptr, length); output->numerator[count-1][length]=0; } lvalp->utype=output; return UNIT; } void yyerror(char *s){} void freelist(int startunit) { if (nextunit>maxunit) maxunit = nextunit; while(nextunit>startunit){ freeunit(memtable[--nextunit]); free(memtable[nextunit]); } } int parseunit(struct unittype *output, char *input,char **errstr,int *errloc) { struct commtype comm; int startunit; startunit = nextunit; initializeunit(output); comm.location = 0; comm.data = input; comm.errorcode = E_PARSE; /* Assume parse error */ if (yyparse(&comm)){ if (comm.location==-1) comm.location = strlen(input); if (errstr){ if (smarterror && comm.errorcode==E_FUNC) *errstr = strerror(errno); else *errstr=errormsg[comm.errorcode]; } if (errloc) *errloc = comm.location; freelist(startunit); return comm.errorcode; } else { if (errstr) *errstr = 0; multunit(output,comm.result); freeunit(comm.result); freelist(startunit); return 0; } } units-2.02/configure0000775000175000017500000042525112157322210013772 0ustar adrianadrian#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68 for GNU units 2.02. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and adrianm@gnu.org $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do $0: have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='GNU units' PACKAGE_TARNAME='units' PACKAGE_VERSION='2.02' PACKAGE_STRING='GNU units 2.02' PACKAGE_BUGREPORT='adrianm@gnu.org' PACKAGE_URL='http://www.gnu.org/software/units/' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='LTLIBOBJS LIBOBJS EGREP GREP CPP INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC UDAT STRFUNC DEFIS target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_path_search ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures GNU units 2.02 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/units] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of GNU units 2.02:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-path-search search path for units database (default is NO) Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . GNU units home page: . General help using GNU software: . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF GNU units configure 2.02 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ------------------------------ ## ## Report this to adrianm@gnu.org ## ## ------------------------------ ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by GNU units $as_me 2.02, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` saveCFLAGS=$CFLAGS ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in gcc cc egcs cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in gcc cc egcs cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } if ${ac_cv_prog_cc_c99+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include // Check varargs macros. These examples are taken from C99 6.10.3.5. #define debug(...) fprintf (stderr, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK your preprocessor is broken; #endif #if BIG_OK #else your preprocessor is broken; #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\0'; ++i) continue; return 0; } // Check varargs and va_copy. static void test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str; int number; float fnumber; while (*format) { switch (*format++) { case 's': // string str = va_arg (args_copy, const char *); break; case 'd': // int number = va_arg (args_copy, int); break; case 'f': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); } int main () { // Check bool. _Bool success = false; // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. test_varargs ("s, d' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' || dynamic_array[ni.number - 1] != 543); ; return 0; } _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c99" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c99" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; esac if test "x$ac_cv_prog_cc_c99" != xno; then : fi if test "$CC" = cl.exe -a -z "$saveCFLAGS" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: setting special CFLAGS value for cl" >&5 $as_echo "$as_me: setting special CFLAGS value for cl" >&6;} CFLAGS="-G6 -O2 -Za -W3 -nologo" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sin" >&5 $as_echo_n "checking for library containing sin... " >&6; } if ${ac_cv_search_sin+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sin (); int main () { return sin (); ; return 0; } _ACEOF for ac_lib in '' m; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sin=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sin+:} false; then : break fi done if ${ac_cv_search_sin+:} false; then : else ac_cv_search_sin=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sin" >&5 $as_echo "$ac_cv_search_sin" >&6; } ac_res=$ac_cv_search_sin if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { ac_cv_lib_readline_readline=; unset ac_cv_lib_readline_readline;} for termlib in "" -ltermcap -lncurses -lcurses; do if test "$ac_cv_lib_readline_readline" != yes ; then { ac_cv_lib_readline_readline=; unset ac_cv_lib_readline_readline;} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 $as_echo_n "checking for readline in -lreadline... " >&6; } if ${ac_cv_lib_readline_readline+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $termlib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char readline (); int main () { return readline (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_readline_readline=yes else ac_cv_lib_readline_readline=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5 $as_echo "$ac_cv_lib_readline_readline" >&6; } if test "x$ac_cv_lib_readline_readline" = xyes; then : LIBS="-lreadline $termlib $LIBS";DEFIS="$DEFIS -DREADLINE" fi fi done ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" if test "x$ac_cv_header_string_h" = xyes; then : else DEFIS="$DEFIS -DSTRINGS_H" fi ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : else DEFIS="$DEFIS -DNO_STDLIB_H" fi ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr" if test "x$ac_cv_func_strchr" = xyes; then : else DEFIS="$DEFIS -DNO_STRCHR" fi ac_fn_c_check_func "$LINENO" "strspn" "ac_cv_func_strspn" if test "x$ac_cv_func_strspn" = xyes; then : else DEFIS="$DEFIS -DNO_STRSPN";STRFUNC="strfunc.$OBJEXT" fi ac_fn_c_check_func "$LINENO" "strtok" "ac_cv_func_strtok" if test "x$ac_cv_func_strtok" = xyes; then : else DEFIS="$DEFIS -DNO_STRTOK";STRFUNC="strfunc.$OBJEXT" fi ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv" if test "x$ac_cv_func_setenv" = xyes; then : else DEFIS="$DEFIS -DNO_SETENV" fi ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" if test "x$ac_cv_func_setlocale" = xyes; then : else DEFIS="$DEFIS -DNO_SETLOCALE" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for locale and UTF-8 support" >&5 $as_echo_n "checking for locale and UTF-8 support... " >&6; } if ${am_cv_utf8+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _XOPEN_SOURCE 600 #include #include #include int main () { wchar_t *out;char *in;char *res; res=setlocale(LC_CTYPE,"");res=in; mbsrtowcs(out, &res, 2, NULL); wcswidth(out,2); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_utf8=yes else am_cv_utf8=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_utf8" >&5 $as_echo "$am_cv_utf8" >&6; } if test $am_cv_utf8 = yes; then DEFIS="$DEFIS -DSUPPORT_UTF8" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isfinite" >&5 $as_echo_n "checking for isfinite... " >&6; } if ${am_cv_isfinite+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _XOPEN_SOURCE 600 #include int main () { float a;a=1;isfinite(a); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_isfinite=yes else am_cv_isfinite=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_isfinite" >&5 $as_echo "$am_cv_isfinite" >&6; } if test $am_cv_isfinite = no; then DEFIS="$DEFIS -DNO_ISFINITE" fi # Check whether --enable-path-search was given. if test "${enable_path_search+set}" = set; then : enableval=$enable_path_search; UDAT="" else UDAT="$datadir/units/" fi ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by GNU units $as_me 2.02, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Report bugs to . GNU units home page: . General help using GNU software: ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ GNU units config.status 2.02 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi units-2.02/units.h0000600000175000017500000001046312156460500013363 0ustar adrianadrian/* * units, a program for units conversion * Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * This program was written by Adrian Mariano (adrianm@gnu.org) */ #include #include /* Apparently popen and pclose require leading _ under windows */ #if defined(_MSC_VER) || defined(__MINGW32__) # define popen(c,m) _popen(c,m) # define pclose(p) _pclose(p) #endif #ifdef NO_ISFINITE # if defined _WIN32 && defined _MSC_VER # define isfinite(x) (!_isnan(x) && _finite(x)) # else # define isfinite(x) ( -DBL_MAX <= (x) && (x) <= DBL_MAX ) # endif #endif #ifdef STRINGS_H # include #else # include #endif #ifndef NO_STDLIB_H # include #else char *malloc(), *realloc(), *getenv(); #endif #ifndef strchr # ifdef NO_STRCHR # define strchr(a,b) index((a),(b)) # else char *strchr(); # endif #endif /* !strchr */ #ifndef strerror # define smarterror 0 #else # define smarterror 1 #endif char *strtok(); double strtod(); #ifndef __STDC__ # define void int #endif #define E_NORMAL 0 #define E_PARSE 1 #define E_PRODOVERFLOW 2 #define E_REDUCE 3 #define E_BADSUM 4 #define E_NOTANUMBER 5 #define E_NOTROOT 6 #define E_UNKNOWNUNIT 7 #define E_FUNC 8 /* If errno is set after calling a function */ #define E_BADFUNCTYPE 9 #define E_BADFUNCARG 10 #define E_NOTINDOMAIN 11 #define E_BADTABLE 12 #define E_NOINVERSE 13 #define E_PARSEMEM 14 #define E_FUNARGDEF 15 #define E_FILE 16 #define E_BADFILE 17 #define E_MEMORY 18 #define E_BADNUM 19 #define E_UNITEND 20 #define WHITE " \t\n" extern char *errormsg[]; /* Data type used to store a single unit being operated on. The numerator and denominator arrays contain lists of units (strings) which are terminated by a null pointer. The special string NULLUNIT is used to mark blank units that occur in the middle of the list. */ extern char *NULLUNIT; #define MAXSUBUNITS 100 /* Size of internal unit reduction buffer */ struct unittype { char *numerator[MAXSUBUNITS]; char *denominator[MAXSUBUNITS]; double factor; }; struct functype { char *param; char *def; char *dimen; double *domain_min, *domain_max; }; struct pair { double location, value; }; struct func { char *name; struct functype forward; struct functype inverse; struct pair *table; int tablelen; char *tableunit; struct func *next; int linenumber; char *file; /* file where defined */ }; struct parseflag { int oldstar; /* Does '*' have higher precedence than '/' */ int minusminus; /* Does '-' character give subtraction */ }; extern struct parseflag parserflags; extern struct unittype *parameter_value; extern char *function_parameter; void *mymalloc(int bytes,char *mesg); int hassubscript(const char *str, int length); void initializeunit(struct unittype *theunit); void freeunit(struct unittype *theunit); void unitcopy(struct unittype *dest, struct unittype *src); int divunit(struct unittype *left, struct unittype *right); void invertunit(struct unittype *theunit); int multunit(struct unittype *left, struct unittype *right); int expunit(struct unittype *theunit, int power); int addunit(struct unittype *unita, struct unittype *unitb); int rootunit(struct unittype *inunit,int n); int unitpower(struct unittype *base, struct unittype *exponent); char *dupstr(char *str); int unit2num(struct unittype *input); struct func *fnlookup(const char *str, int length); int evalfunc(struct unittype *theunit, struct func *infunc, int inverse); int parseunit(struct unittype *output, char *input,char **errstr,int *errloc); units-2.02/units.texinfo0000600000175000017500000032354412157471367014635 0ustar adrianadrian\input texinfo @c -*-texinfo-*- @c %**start of header @setfilename units.info @settitle Units: A Unit Conversion Program and Scientific Calculator @finalout @setchapternewpage off @firstparagraphindent none @set EDITION 2.02 @set VERSION 2.02 @c %**end of header @c ifman .\" @copying This manual is for GNU Units (version @value{VERSION}), which performs units conversions and units calculations. Copyright @copyright{} 1996, 1997, 1999, 2000, 2001, 2002, 2004, 2005, 2007, 2011, 2012, 2013 Free Software Foundation, Inc. @quotation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. @c end ifman @c noman A copy of the license is included in the section entitled ``GNU Free Documentation License''. @end quotation @end copying @c end noman @defcodeindex op @syncodeindex op cp @c noman @dircategory Science @direntry * Units: (units). Units conversion and scientific calculation. @end direntry @c end noman @c man .TH UNITS 1 "7 June 2013" @c man .SH NAME @c man units \(em unit conversion and calculation program @titlepage @title Units Conversion @subtitle Edition @value{EDITION} for @command{units} Version @value{VERSION} @author Adrian Mariano @page @vskip 0pt plus 1filll @insertcopying @end titlepage @contents @iftex @headings off @everyheading Units Conversion @| @| @thispage @end iftex @ifnottex @node Top @top Units Conversion @c noman This manual describes the @command{units} command for units conversion and how you can use it as a powerful scientific calculator that keeps track of units. This is Edition @value{EDITION} of @cite{The Units Conversion Manual} for @command{units} Version @value{VERSION}. @c end noman @end ifnottex @menu * Overview:: What does @command{units} do? * Interactive Use:: How to use @command{units}. * Command Line Use:: How to use @command{units} noninteractively. * Unit Definitions:: What units are defined? * Unit Expressions:: Forming compound units. * Nonlinear Conversions:: Nonlinear unit conversions (e.g., temperature) * Unit Lists:: Conversion to sums of units (e.g., feet and inches) * Invoking Units:: Command line options. * Defining Your Own Units:: Adding your own unit definitions * Numeric Output Format:: How to change the output format * Localization:: How to define and use regional unit names. * Environment Vars:: Environment variables used by @command{units}. * Unicode Support:: Support for Unicode (UTF-8). * Readline Support:: Unit name completion and editing. * Currency:: Updating currency exchange rates. * Database Syntax:: Summary of database command syntax. * GNU Free Documentation License:: License. * Index:: General index. @end menu @c noman @node Overview @chapter Overview of @command{units} @c end noman @c ifman @ignore @c '.PP' for consistency with spacing before other sections. .PP .SH SYNOPSIS .PP .CW units .RI [ options ] .RI [ from-unit .RI [ to-unit ]] .PP .SH DESCRIPTION @end ignore @c end ifman The @command{units} program converts quantities expressed in various systems of measurement to their equivalents in other systems of measurement. Like many similar programs, it can handle multiplicative scale changes. It can also handle nonlinear conversions such as Fahrenheit to @c man Celsius. @c noman Celsius.@footnote{But Fahrenheit to Celsius is linear, you insist. Not so. A transformation @math{T} is linear if @math{T(x+y)=T(x)+T(y)} and this fails for @math{T(x)=ax+b}. This transformation is affine, but not linear. } @xref{Temperature Conversions}. @c end noman @c man See the examples below. The program can also perform conversions from and to sums of units, such as converting between meters and feet plus inches. Beyond simple unit conversions, @command{units} can be used as a general-purpose scientific calculator that keeps track of units in its calculations. You can form arbitrary complex mathematical expressions of dimensions including sums, products, quotients, powers, and even roots of dimensions. Thus you can ensure accuracy and dimensional consistency when working with long expressions that involve many different units that may combine in complex ways. The units are defined in an external data file. You can use the extensive data file that comes with this program, or you can provide your own data file to suit your needs. You can also use your own data file to supplement the standard data file. Basic operation is simple: you enter the units that you want to convert @emph{from} and the units that you want to convert @emph{to}. You can use the program interactively with prompts, or you can use it from the command line. You can change the default behavior of @command{units} with various options given on the command line. @xref{Invoking Units}, for a description of the available options. @node Interactive Use @chapter Interacting with @command{units} @cindex interactive use To invoke units for interactive use, type @kbd{units} at your shell prompt. The program will print something like this: @example @group Currency exchange rates from 04/23/12 2516 units, 85 prefixes, 65 nonlinear units You have: @end group @end example @noindent At the @samp{You have:} prompt, type the quantity and units that you are converting @emph{from}. For example, if you want to convert ten meters to feet, type @kbd{10 meters}. Next, @command{units} will print @samp{You want:}. You should type the units you want to convert @emph{to}. To convert to feet, you would type @kbd{feet}. If the @command{readline} library was compiled in then the tab key can be used to complete unit names. @xref{Readline Support}, for more information about @command{readline}. To quit the program press Ctrl-C or Ctrl-D under Unix. Under Windows press Ctrl-Z. The answer will be displayed in two ways. The first line of output, which is marked with a @samp{*} to indicate multiplication, gives the result of the conversion you have asked for. The second line of output, which is marked with a @samp{/} to indicate division, gives the inverse of the conversion factor. If you convert 10 meters to feet, @command{units} will print @example @group * 32.808399 / 0.03048 @end group @end example @noindent which tells you that 10 meters equals about 32.8 feet. The second number gives the conversion in the opposite direction. In this case, it tells you that 1 foot is equal to about 0.03 dekameters since the dekameter is 10 meters. It also tells you that 1/32.8 is about 0.03. The @command{units} program prints the inverse because sometimes it is a more convenient number. In the example above, for example, the inverse value is an exact conversion: a foot is exactly 0.03048 dekameters. But the number given the other direction is inexact. If you convert grains to pounds, you will see the following: @example @group You have: grains You want: pounds * 0.00014285714 / 7000 @end group @end example @noindent From the second line of the output you can immediately see that a grain is equal to a seven thousandth of a pound. This is not so obvious from the first line of the output. If you find the output format confusing, try using the @option{--verbose} option: @cindex verbose output @example @group You have: grain You want: aeginamina grain = 0.00010416667 aeginamina grain = (1 / 9600) aeginamina @end group @end example @noindent If you request a conversion between units that measure reciprocal dimensions, then @command{units} will display the conversion results with an extra note indicating that reciprocal conversion has been done: @cindex reciprocal conversion @example @group You have: 6 ohms You want: siemens reciprocal conversion * 0.16666667 / 6 @end group @end example @noindent Reciprocal conversion can be suppressed by using the @option{--strict} option. As usual, use the @option{--verbose} option to get more comprehensible output: @cindex verbose output @cindex strict conversion @example @group You have: tex You want: typp reciprocal conversion 1 / tex = 496.05465 typp 1 / tex = (1 / 0.0020159069) typp You have: 20 mph You want: sec/mile reciprocal conversion 1 / 20 mph = 180 sec/mile 1 / 20 mph = (1 / 0.0055555556) sec/mile @end group @end example @noindent If you enter incompatible unit types, the @command{units} program will print a message indicating that the units are not conformable and it will display the reduced form for each unit: @cindex incompatible units @cindex non-conformable units @example @group You have: ergs/hour You want: fathoms kg^2 / day conformability error 2.7777778e-11 kg m^2 / sec^3 2.1166667e-05 kg^2 m / sec @end group @end example @noindent If you only want to find the reduced form or definition of a unit, simply press @key{Enter} at the @samp{You want:} prompt. Here is an example: @example @group You have: jansky You want: Definition: fluxunit = 1e-26 W/m^2 Hz = 1e-26 kg / s^2 @end group @end example @noindent The output from @command{units} indicates that the jansky is defined to be equal to a fluxunit which in turn is defined to be a certain combination of watts, meters, and hertz. The fully reduced (and in this case somewhat more cryptic) form appears on the far right. Some named units are treated as dimensionless in some situations. These units include the radian and steradian. These units will be treated as equal to 1 in units conversions. Power is equal to torque times angular velocity. This conversion can only be performed if the radian is dimensionless. @example @group You have: (14 ft lbf) (12 radians/sec) You want: watts * 227.77742 / 0.0043902509 @end group @end example @noindent Named dimensionless units are not treated as dimensionless in other contexts. They cannot be used as exponents so for example, @samp{meter^radian} is not allowed. @cindex dimensionless units @cindex @samp{?} to show conformable units @cindex conformable units, @samp{?} to show If you want a list of options you can type @kbd{?} at the @samp{You want:} prompt. The program will display a list of named units that are conformable with the unit that you entered at the @samp{You have:} prompt above. Conformable unit @emph{combinations} will not appear on this list. @cindex help Typing @kbd{help} at either prompt displays a short help message. You can also type @kbd{help} followed by a unit name. This will invoke a pager on the units data base at the point where that unit is defined. You can read the definition and comments that may give more details or historical information about the unit. (You can generally quit out of the page by pressing @samp{q}.) Typing @kbd{search} @var{text} will display a list of all of the units whose names contain @var{text} as a substring along with their definitions. This may help in the case where you aren't sure of the right unit name. @node Command Line Use @chapter Using @command{units} Non-Interactively @cindex command-line unit conversion @cindex non-interactive unit conversion The @command{units} program can perform units conversions non-interactively from the command line. To do this, type the command, type the original unit expression, and type the new units you want. If a units expression contains non-alphanumeric characters, you may need to protect it from interpretation by the shell using single or double quote characters. If you type @example units "2 liters" quarts @end example @noindent then @command{units} will print @example @group * 2.1133764 / 0.47317647 @end group @end example @noindent and then exit. The output tells you that 2 liters is about 2.1 quarts, or alternatively that a quart is about 0.47 times 2 liters. If the conversion is successful, then @command{units} will return success (zero) to the calling environment. If you enter non-conformable units then @command{units} will print a message giving the reduced form of each unit and it will return failure (nonzero) to the calling environment. When you invoke @command{units} with only one argument, it will print out the definition of the specified unit. It will return failure if the unit is not defined and success if the unit is defined. @node Unit Definitions @chapter Unit Definitions @cindex unit definitions The conversion information is read from a units data file that is called @file{definitions.units} and is usually located in the @file{/usr/share/units} directory. If you invoke @command{units} with the @option{-V} option, it will print the location of this file. The default file includes definitions for all familiar units, abbreviations and metric prefixes. It also includes many obscure or archaic units. Many constants of nature are defined, including these: @example pi @r{ratio of circumference to diameter} c @r{speed of light} e @r{charge on an electron} force @r{acceleration of gravity} mole @r{Avogadro's number} water @r{pressure per unit height of water} Hg @r{pressure per unit height of mercury} au @r{astronomical unit} k @r{Boltzman's constant} mu0 @r{permeability of vacuum} epsilon0 @r{permittivity of vacuum} G @r{Gravitational constant} mach @r{speed of sound} @end example @noindent The standard data file includes atomic masses for all of the elements and numerous other constants. Also included are the densities of various ingredients used in baking so that @samp{2 cups flour_sifted} can be converted to @samp{grams}. This is not an exhaustive list. Consult the units data file to see the complete list, or to see the definitions that are used. @cindex measure, Imperial @cindex Imperial measure @cindex British Imperial measure The @samp{pound} is a unit of mass. To get force, multiply by the force conversion unit @samp{force} or use the shorthand @samp{lbf}. (Note that @samp{g} is already taken as the standard abbreviation for the gram.) The unit @samp{ounce} is also a unit of mass. The fluid ounce is @samp{fluidounce} or @samp{floz}. British capacity units that differ from their US counterparts, such as the British Imperial gallon, are prefixed with @samp{br}. Currency is prefixed with its country name: @samp{belgiumfranc}, @samp{britainpound}. @cindex units, lookup method When searching for a unit, if the specified string does not appear exactly as a unit name, then the @command{units} program will try to remove a trailing @samp{s}, @samp{es}. Next units will replace a trailing @samp{ies} with @samp{y}. If that fails, @command{units} will check for a prefix. The database includes all of the standard metric prefixes. Only one prefix is permitted per unit, so @samp{micromicrofarad} will fail. However, prefixes can appear alone with no unit following them, so @samp{micro*microfarad} will work, as will @samp{micro microfarad}. @cindex prefixes To find out which units and prefixes are available, read the standard units data file, which is extensively annotated. @comment @node English Customary Units @section English Customary Units @cindex volume measure, English customary English customary units differ in various ways in different regions. In Britain a complex system of volume measurements featured different gallons for different materials such as a wine gallon and ale gallon that different by twenty percent. This complexity was swept away in 1824 by a reform that created an entirely new gallon, the British Imperial gallon defined as the volume occupied by ten pounds of water. Meanwhile in the USA the gallon is derived from the 1707 Winchester wine gallon, which is 231 cubic inches. These gallons differ by about twenty percent. By default if @command{units} runs in the @samp{en_GB} locale you will get the British volume measures. If it runs in the @samp{en_US} locale you will get the US volume measures. In other locales the default values are the US definitions. If you wish to force different definitions then set the environment variable @env{UNITS_ENGLISH} to either @samp{US} or @samp{GB} to set the desired definitions independent of the locale. @cindex length measure, English customary @cindex length measure, UK @cindex survey measure, US @cindex US survey measure @cindex survey mile, US @cindex US survey foot @cindex State Plane Coordinate System, US @cindex US State Plane Coordinate System @cindex survey foot, US @cindex US survey mile @cindex mile, international @cindex international mile @cindex yard, international @cindex international yard Before 1959, the value of a yard (and other units of measure defined in terms of it) differed slightly among English-speaking countries. In 1959, Australia, Canada, New Zealand, the United Kingdom, the United States, and South Africa adopted the Canadian value of 1@tie{}yard = 0.9144@tie{}m (exactly), which was approximately halfway between the values used by the UK and the US; it had the additional advantage of making 1@tie{}inch = 2.54@tie{}cm (exactly). This new standard was termed the @dfn{International Yard}. Australia, Canada, and the UK then defined all customary lengths in terms of the International Yard (Australia did not define the furlong or rod); because many US land surveys were in terms of the pre-1959 units, the US continued to define customary surveyors' units (furlong, chain, rod, and link) in terms of the previous value for the foot, which was termed the @dfn{US survey foot}. The US defined a @dfn{US survey mile} as 5280 US survey feet, and defined a @dfn{statute mile} as a US survey mile. The US values for these units differ from the international values by about 2@tie{}ppm. The @command{units} program uses the international values for these units; the US values can be obtained by using either the @samp{US} or the @samp{survey} prefix. In either case, the simple familiar relationships among the units are maintained, e.g., 1 @samp{furlong} = 660 @samp{ft}, and 1 @samp{USfurlong} = 660 @samp{USft}, though the metric equivalents differ slightly between the two cases. The @samp{US} prefix or the @samp{survey} prefix can also be used to obtain the US survey mile and the value of the US yard prior to 1959, e.g., @samp{USmile} or @samp{surveymile} (but @emph{not} @samp{USsurveymile}). To get the US value of the statute mile, use either @samp{USstatutemile} or @samp{USmile}. Except for distances that extend over hundreds of miles (such as in the US State Plane Coordinate System), the differences in the miles are usually insignificant: @example @group You have: 100 surveymile - 100 mile You want: inch * 12.672025 / 0.078913984 @end group @end example @noindent The pre-1959 UK values for these units can be obtained with the prefix @samp{UK}. In the US, the acre is officially defined in terms of the US survey foot, but @command{units} uses a definition based on the international foot. If you want the official US acre use @samp{USacre} and similarly use @samp{USacrefoot} for the official US version of that unit. The difference between these units is about 4 parts per million. @node Unit Expressions @chapter Unit Expressions @cindex unit expressions @menu * Operators:: The usual arithmetic operators, with a few extras * Sums and Differences of Units:: Adding and subtracting units * Numbers as Units:: A number is a dimensionless unit * Built-in Functions:: Trigonometric functions, logarithms, roots * Complicated Unit Expressions:: A complicated example * Backwards Compatibility:: Alternate behavior for @samp{*} and @samp{-} @end menu @node Operators @section Operators @cindex operators You can enter more complicated units by combining units with operations such as powers, multiplication, division, addition, subtraction, and parentheses for grouping. You can use the customary symbols for these operators when @command{units} is invoked with its default options. Additionally, @command{units} supports some extensions, including high priority multiplication using a space, and a high priority numerical division operator (@samp{|}) that can simplify some expressions. Powers of units can be specified using the @samp{^} character as shown in the following example, or by simple concatenation of a unit and its exponent: @samp{cm3} is equivalent to @samp{cm^3}; if the exponent is more than one digit, the @samp{^} is required. An exponent like @samp{2^3^2} is evaluated right to left as usual. The @samp{^} operator has the second highest precedence. You can also use @samp{**} as an exponent operator. @cindex powers @cindex exponent operator @cindex operator, caret (@samp{^}) @cindex operator, (@samp{**}) @cindex @samp{**} operator @cindex parentheses @example @group You have: cm^3 You want: gallons * 0.00026417205 / 3785.4118 You have: arabicfoot * arabictradepound * force You want: ft lbf * 0.7296 / 1.370614 @end group @end example @noindent You multiply units using a space or an asterisk (@samp{*}). The example above shows both forms. You can divide units using the slash (@samp{/}) or with @samp{per}. @cindex products of units @cindex quotients of units @cindex units quotients @cindex multiplication of units @cindex division of units @cindex operator, @samp{per} @cindex @samp{per} operator @cindex operator, space @cindex operator, star (@samp{*}) @cindex star (@samp{*}) operator @cindex @samp{*} operator @cindex operator, slash (@samp{/}) @cindex slash (@samp{/}) operator @cindex operator, solidus (@samp{/}) @cindex solidus (@samp{/}) operator @example @group You have: furlongs per fortnight You want: m/s * 0.00016630986 / 6012.8727 @end group @end example @noindent @cindex operator precedence @cindex parentheses @cindex prefixes and exponents When a unit includes a prefix, exponent operators apply to the combination, so @samp{centimeter^3} gives cubic centimeters. If you separate the prefix from the unit with any multiplication operator, such as @samp{centi meter^3}, then the prefix is treated as a separate unit, so the exponent does not apply. The second example would be a hundredth of a cubic meter, not a centimeter. Multiplication using a space has a higher precedence than division using a slash and is evaluated left to right; in effect, the first @samp{/} character marks the beginning of the denominator of a unit expression. This makes it simple to enter a quotient with several terms in the denominator: @samp{W / m^2 Hz}. If you multiply with @samp{*} then you must group the terms in the denominator with parentheses: @samp{W / (m^2 * Hz)}. The higher precedence of the space operator may not always be advantageous. For example, @samp{m/s s/day} is equivalent to @samp{m / s s day} and has dimensions of length per time cubed. Similarly, @samp{1/2 meter} refers to a unit of reciprocal length equivalent to 0.5/meter, perhaps not what you would intend if you entered that expression. The @samp{*} operator is convenient for multiplying a sequence of quotients. With the @samp{*} operator, the example above becomes @samp{m/s * s/day}, which is equivalent to @samp{m/day}. Similarly, you could write @samp{1/2 * meter} to get half a meter. Alternatively, parentheses can be used for grouping: you could write @samp{(1/2) meter} to get half a meter. @xref{Complicated Unit Expressions}, for an illustration of the various options. The @command{units} program supports another option for numerical fractions. You can indicate division of @emph{numbers} with the vertical bar (@samp{|}), so if you wanted half a meter you could write @samp{1|2 meter}. This operator has the highest precedence, so you can write the square root of two thirds @samp{2|3^1|2}. You cannot use the vertical bar to indicate division of non-numerical units (e.g., @samp{m|s} results in an error message). @cindex fractions, numerical @cindex numerical fractions @cindex division of numbers @cindex operator, vertical bar (@samp{|}) @cindex vertical bar (@samp{|}) operator @cindex @samp{|} operator @example @group You have: 1|2 inch You want: cm * 1.27 / 0.78740157 @end group @end example @cindex parentheses @noindent You can use parentheses for grouping: @example @group You have: (1/2) kg / (kg/meter) You want: league * 0.00010356166 / 9656.0833 @end group @end example @node Sums and Differences of Units @section Sums and Differences of Units @cindex sums and differences of units @cindex units, sums and differences @cindex operator, plus (@samp{+}) @cindex plus (@samp{+}) operator @cindex @samp{+} operator @cindex operator, minus (@samp{-}) @cindex minus (@samp{-}) operator, subtraction @cindex operator, hyphen (@samp{-}) as subtraction @cindex @samp{-} as subtraction operator @noindent You may sometimes want to add values of different units that are outside the SI. You may also wish to use @command{units} as a calculator that keeps track of units. Sums of conformable units are written with the @samp{+} character, and differences with the @samp{-} character. @cindex sums of units @cindex addition of units @cindex subtraction of units @cindex differences of units @example @group You have: 2 hours + 23 minutes + 32 seconds You want: seconds * 8612 / 0.00011611705 @end group @group You have: 12 ft + 3 in You want: cm * 373.38 / 0.0026782366 @end group @group You have: 2 btu + 450 ft lbf You want: btu * 2.5782804 / 0.38785542 @end group @end example @noindent The expressions that are added or subtracted must reduce to identical expressions in primitive units, or an error message will be displayed: @example @group You have: 12 printerspoint - 4 heredium ^ Illegal sum of non-conformable units @end group @end example @cindex parentheses @noindent As usual, the precedence for @samp{+} and @samp{-} is lower than that of the other operators. A fractional quantity such as 2@tie{}1/2 cups can be given as @samp{(2+1|2) cups}; the parentheses are necessary because multiplication has higher precedence than addition. If you omit the parentheses, @command{units} attempts to add @samp{2} and @samp{1|2 cups}, and you get an error message: @example @group You have: 2+1|2 cups ^ Illegal sum or difference of non-conformable units @end group @end example @noindent The expression could also be correctly written as @samp{(2+1/2) cups}. If you write @samp{2 1|2 cups} the space is interpreted as @emph{multiplication} so the result is the same as @samp{1 cup}. The @samp{+} and @samp{-} characters sometimes appears in exponents like @samp{3.43e+8}. This leads to an ambiguity in an expression like @samp{3e+2 yC}. The unit @samp{e} is a small unit of charge, so this can be regarded as equivalent to @samp{(3e+2) yC} or @samp{(3 e)+(2 yC)}. This ambiguity is resolved by always interpreting @samp{+} and @samp{-} as part of an exponent if possible. @node Numbers as Units @section Numbers as Units @cindex numbers as units For @command{units}, numbers are just another kind of unit. They can appear as many times as you like and in any order in a unit expression. For example, to find the volume of a box that is 2 ft by 3 ft by 12 ft in steres, you could do the following: @example @group You have: 2 ft 3 ft 12 ft You want: stere * 2.038813 / 0.49048148 You have: $ 5 / yard You want: cents / inch * 13.888889 / 0.072 @end group @end example @noindent And the second example shows how the dollar sign in the units conversion can precede the five. Be careful: @command{units} will interpret @samp{$5} with no space as equivalent to @samp{dollar^5}. @node Built-in Functions @section Built-in Functions @cindex functions, built in Several built-in functions are provided: @samp{sin}, @samp{cos}, @samp{tan}, @samp{ln}, @samp{log}, @samp{log2}, @samp{exp}, @samp{acos}, @samp{atan} and @samp{asin}. The @samp{sin}, @samp{cos}, and @samp{tan} functions require either a dimensionless argument or an argument with dimensions of angle. @example @group You have: sin(30 degrees) You want: Definition: 0.5 You have: sin(pi/2) You want: Definition: 1 You have: sin(3 kg) ^ Unit not dimensionless @end group @end example @noindent The other functions on the list require dimensionless arguments. The inverse trigonometric functions return arguments with dimensions of angle. @cindex roots @cindex square roots If you wish to take roots of units, you may use the @samp{sqrt} or @samp{cuberoot} functions. These functions require that the argument have the appropriate root. You can obtain higher roots by using fractional exponents: @example @group You have: sqrt(acre) You want: feet * 208.71074 / 0.0047913202 You have: (400 W/m^2 / stefanboltzmann)^(1/4) You have: Definition: 289.80882 K You have: cuberoot(hectare) ^ Unit not a root @end group @end example @node Complicated Unit Expressions @section Complicated Unit Expressions @cindex unit expressions, complicated @noindent The @command{units} program is especially helpful in ensuring accuracy and dimensional consistency when converting lengthy unit expressions. @c noman @cindex Darcy--Weisbach equation For example, one form of the Darcy--Weisbach fluid-flow equation is @tex $$ @Delta P = {8 @over @pi^2} @rho fL { Q^2 @over d^5} $$ @end tex @ifnottex @example Delta P = (8/pi^2) rho f L (Q^2 / d^5) @end example @end ifnottex @noindent where @math{ \Delta P} is the pressure drop, @math{\rho} is the mass density, @math{f} is the (dimensionless) friction factor, @math{L} is the length of the pipe, @math{Q} is the volumetric flow rate, and @math{d} is the pipe diameter. It might be desired to have the equation in the form @tex $$ @Delta P = A_1 @rho fL {Q^2 @over d^5} $$ @end tex @ifnottex @example Delta P = A1 rho f L (Q^2 / d^5) @end example @end ifnottex @c end noman @c ----------------------------------- @c nroff--assume neqn is not available @c ----------------------------------- @c man .if t .ig ++ @c man For example, one form of the Darcy-Weisbach fluid-flow equation is @c man .RS 5n @c man .PP @c man Delta \fIP\fP = (8 / pi)^2 (rho \fIfLQ\fP^2) / \fId\fP^5, @c man .RE @c man .PP @c man where Delta \fIP\fP is the pressure drop, rho is the mass density, @c man \fIf\fP is the (dimensionless) friction factor, \fIL\fP is the length @c man of the pipe, \fIQ\fP is the volumetric flow rate, and \fId\fP @c man is the pipe diameter. @c man It might be desired to have the equation in the form @c man .RS 5n @c man .PP @c man Delta \fIP\fP = A1 rho \fIfLQ\fP^2 / \fId\fP^5 @c man .RE @c man .PP @c man .++ @c ----- @c troff @c ----- @c man .if n .ig ++ @c man .EQ @c man delim $$ @c man .EN @c dont assume en dash is available @c man For example, one form of the Darcy\-Weisbach fluid-flow equation is @c man .RS 5n @c man .PP @c man .EQ @c man DELTA P = 8 over pi sup 2 rho fL Q sup 2 over d sup 5 , @c man .EN @c man .RE @c man .PP @c man where $DELTA P$ is the pressure drop, $rho$ is the mass density, @c man $f$ is the (dimensionless) friction factor, $L$ is the length @c man of the pipe, $Q$ is the volumetric flow rate, and $d$ @c man is the pipe diameter. @c man It might be desired to have the equation in the form @c man .RS 5n @c man .PP @c man .EQ @c man DELTA P = A sub 1 rho fL Q sup 2 over d sup 5 @c man .EN @c man .RE @c man .PP @c man .EQ @c man delim off @c man .EN @c man .++ @c @noindent that accepted the user's normal units; for typical units used in the US, the required conversion could be something like @example @group You have: (8/pi^2)(lbm/ft^3)ft(ft^3/s)^2(1/in^5) You want: psi * 43.533969 / 0.022970568 @end group @end example @cindex parentheses @noindent The parentheses allow individual terms in the expression to be entered naturally, as they might be read from the formula. Alternatively, the multiplication could be done with the @samp{*} rather than a space; then parentheses are needed only around @samp{ft^3/s} because of its exponent: @example @group You have: 8/pi^2 * lbm/ft^3 * ft * (ft^3/s)^2 /in^5 You want: psi * 43.533969 / 0.022970568 @end group @end example @noindent Without parentheses, and using spaces for multiplication, the previous conversion would need to be entered as @example @group You have: 8 lb ft ft^3 ft^3 / pi^2 ft^3 s^2 in^5 You want: psi * 43.533969 / 0.022970568 @end group @end example @node Backwards Compatibility @section Backwards Compatibility: @samp{*} and @samp{-} @cindex backwards compatibility @cindex compatibility @cindex compatibility with earlier versions The original @command{units} assigned multiplication a higher precedence than division using the slash. This differs from the usual precedence rules, which give multiplication and division equal precedence, and can be confusing for people who think of units as a calculator. The star operator (@samp{*}) included in this @command{units} program has, by default, the same precedence as division, and hence follows the usual precedence rules. For backwards compatibility you can invoke @command{units} with the @option{--oldstar} option. Then @samp{*} has a higher precedence than division, and the same precedence as multiplication using the space. @cindex @samp{-} as multiplication operator @cindex operator, hyphen (@samp{-}) as multiplication @cindex multiplication, hyphen @cindex hyphen as multiplication operator Historically, the hyphen (@samp{-}) has been used in technical publications to indicate products of units, and the original @command{units} program treated it as a multiplication operator. Because @command{units} provides several other ways to obtain unit products, and because @samp{-} is a subtraction operator in general algebraic expressions, @command{units} treats the binary @samp{-} as a subtraction operator by default. For backwards compatibility use the @option{--product} option, which causes @command{units} to treat the binary @samp{-} operator as a product operator. When @samp{-} is a multiplication operator it has the same precedence as multiplication with a space, giving it a higher precedence than division. When @samp{-} is used as a unary operator it negates its operand. Regardless of the @command{units} options, if @samp{-} appears after @samp{(} or after @samp{+} then it will act as a negation operator. So you can always compute 20 degrees minus 12 minutes by entering @samp{20 degrees + -12 arcmin}. You must use this construction when you define new units because you cannot know what options will be in force when your definition is processed. @cindex defining units with `-' @node Nonlinear Conversions @chapter Nonlinear Unit Conversions @cindex nonlinear unit conversions Nonlinear units are represented using functional notation. They make possible nonlinear unit conversions such as temperature. @menu * Temperature Conversions:: Conversion between temperature scales * Other Nonlinear Units:: Ring size, wire gauge, abrasive grit size @end menu @node Temperature Conversions @section Temperature Conversions @cindex temperature conversions Conversions between temperatures are different from linear conversions between temperature @emph{increments}---see the example below. The absolute temperature conversions are handled by units starting with @samp{temp}, and you must use functional notation. The temperature-increment conversions are done using units starting with @samp{deg} and they do not require functional notation. @example @group You have: tempF(45) You want: tempC 7.2222222 You have: 45 degF You want: degC * 25 / 0.04 @end group @end example @noindent Think of @samp{tempF(@var{x})} not as a function but as a notation that indicates that @var{x} should have units of @samp{tempF} attached to it. @xref{Defining Nonlinear Units}. The first conversion shows that if it's 45 degrees Fahrenheit outside, it's 7.2 degrees Celsius. The second conversion indicates that a change of 45 degrees Fahrenheit corresponds to a change of 25 degrees Celsius. The conversion from @samp{tempF(@var{x})} is to absolute temperature, so that @example @group You have: tempF(45) You want: degR * 504.67 / 0.0019814929 @end group @end example @noindent gives the same result as @example @group You have: tempF(45) You want: tempR * 504.67 / 0.0019814929 @end group @end example @noindent But if you convert @samp{tempF(@var{x})} to @samp{degC}, the output is probably not what you expect: @example @group You have: tempF(45) You want: degC * 280.37222 / 0.0035666871 @end group @end example @noindent The result is the temperature in K, because @samp{degC} is defined as @samp{K}, the Kelvin. For consistent results, use the @samp{temp@var{X}} units when converting to a temperature rather than converting a temperature increment. @node Other Nonlinear Units @section Other Nonlinear Units @cindex nonlinear units, other Some other examples of nonlinear units are numerous different ring sizes and wire gauges, the grit sizes used for abrasives, the decibel scale, shoe size, scales for the density of sugar (e.g. baume). The standard data file also supplies units for computing the area of a circle and the volume of a sphere. See the standard units data file for more details. Wire gauges with multiple zeroes are signified using negative numbers where two zeroes is @samp{-1}. Alternatively, you can use the synonyms @samp{g00}, @samp{g000}, and so on that are defined in the standard units data file. @cindex wire gauge @example @group You have: wiregauge(11) You want: inches * 0.090742002 / 11.020255 You have: brwiregauge(g00) You want: inches * 0.348 / 2.8735632 You have: 1 mm You want: wiregauge 18.201919 You have: grit_P(600) You want: grit_ansicoated 342.76923 @end group @end example @noindent The last example shows the conversion from P graded sand paper, which is the European standard and may be marked ``P600'' on the back, to the USA standard. @cindex abrasive grit size You can compute the area of a circle using the nonlinear unit, @samp{circlearea}. You can also do this using the circularinch or circleinch. The next example shows two ways to compute the area of a circle with a five inch radius and one way to compute the volume of a sphere with a radius of one meter. @cindex circle, area of @cindex sphere, volume of @example @group You have: circlearea(5 in) You want: in2 * 78.539816 / 0.012732395 You have: 10^2 circleinch You want: in2 * 78.539816 / 0.012732395 You have: spherevol(meter) You want: ft3 * 147.92573 / 0.0067601492 @end group @end example @node Unit Lists @chapter Unit Lists: Conversion to Sums of Units @cindex sums of units @cindex unit lists @cindex units, sums of Outside of the SI, it is sometimes desirable to convert a single unit to a sum of units---for example, feet to feet plus inches. The conversion @emph{from} sums of units was described in @ref{Sums and Differences of Units}, and is a simple matter of adding the units with the @samp{+} sign: @example @group You have: 12 ft + 3 in + 3|8 in You want: ft * 12.28125 / 0.081424936 @end group @end example @noindent Although you can similarly write a sum of units to convert @emph{to}, the result will not be the conversion to the units in the sum, but rather the conversion to the particular sum that you have entered: @example @group You have: 12.28125 ft You want: ft + in + 1|8 in * 11.228571 / 0.089058524 @end group @end example @noindent The unit expression given at the @samp{You want:} prompt is equivalent to asking for conversion to multiples of @samp{1 ft + 1 in + 1|8 in}, which is 1.09375 ft, so the conversion in the previous example is equivalent to @example @group You have: 12.28125 ft You want: 1.09375 ft * 11.228571 / 0.089058524 @end group @end example @noindent In converting to a sum of units like miles, feet and inches, you typically want the largest integral value for the first unit, followed by the largest integral value for the next, and the remainder converted to the last unit. You can do this conversion easily with @command{units} using a special syntax for lists of units. You must list the desired units in order from largest to smallest, separated by the semicolon (@samp{;}) character: @example @group You have: 12.28125 ft You want: ft;in;1|8 in 12 ft + 3 in + 3|8 in @end group @end example @noindent The conversion always gives integer coefficients on the units in the list, except possibly the last unit when the conversion is not exact: @example @group You have: 12.28126 ft You want: ft;in;1|8 in 12 ft + 3 in + 3.00096 * 1|8 in @end group @end example @noindent The order in which you list the units is important: @example @group You have: 3 kg You want: oz;lb 105 oz + 0.051367866 lb You have: 3 kg You want: lb;oz 6 lb + 9.8218858 oz @end group @end example @noindent Listing ounces before pounds produces a technically correct result, but not a very useful one. You must list the units in descending order of size in order to get the most useful result. Ending a unit list with the separator @samp{;} has the same effect as repeating the last unit on the list, so @samp{ft;in;1|8 in;} is equivalent to @samp{ft;in;1|8 in;1|8 in}. With the example above, this gives @example @group You have: 12.28126 ft You want: ft;in;1|8 in; 12 ft + 3 in + 3|8 in + 0.00096 * 1|8 in @end group @end example @noindent in effect separating the integer and fractional parts of the coefficient for the last unit. If you instead prefer to round the last coefficient to an integer you can do this with the @option{--round} (@option{-r}) option. With the previous example, the result is @example @group You have: 12.28126 ft You want: ft;in;1|8 in 12 ft + 3 in + 3|8 in (rounded down to nearest 1|8 in) @end group @end example @noindent When you use the @option{-r} option, repeating the last unit on the list has no effect (e.g., @samp{ft;in;1|8 in;1|8 in} is equivalent to @samp{ft;in;1|8 in}), and hence neither does ending a list with a @samp{;}. With a single unit and the @option{-r} option, a terminal @samp{;} @emph{does} have an effect: it causes @command{units} to treat the single unit as a list and produce a rounded value for the single unit. Without the extra @samp{;}, the @option{-r} option has no effect on single unit conversions. This example shows the output using the @option{-r} option: @example @group You have: 12.28126 ft You want: in * 147.37512 / 0.0067854058 You have: 12.28126 ft You want: in; 147 in (rounded down to nearest in) @end group @end example @noindent Each unit that appears in the list must be conformable with the first unit on the list, and of course the listed units must also be conformable with the @emph{You have} unit that you enter. @example @group You have: meter You want: ft;kg ^ conformability error ft = 0.3048 m kg = 1 kg @end group @group You have: meter You want: lb;oz conformability error 1 m 0.45359237 kg @end group @end example @noindent In the first case, @command{units} reports the disagreement between units appearing on the list. In the second case, @command{units} reports disagreement between the unit you entered and the desired conversion. This conformability error is based on the first unit on the unit list. Other common candidates for conversion to sums of units are angles and time: @example @group You have: 23.437754 deg You want; deg;arcmin;arcsec 23 deg + 26 arcmin + 15.9144 arcsec @end group @group You have: 7.2319 hr You want: hr;min;sec 7 hr + 13 min + 54.84 sec @end group @end example @noindent In North America, recipes for cooking typically measure ingredients by volume, and use units that are not always convenient multiples of each other. Suppose that you have a recipe for 6 and you wish to make a portion for 1. If the recipe calls for 2@tie{}1/2 cups of an ingredient, you might wish to know the measurements in terms of measuring devices you have available, you could use @command{units} and enter @example @group You have: (2+1|2) cup / 6 You want: cup;1|2 cup;1|3 cup;1|4 cup;tbsp;tsp;1|2 tsp;1|4 tsp 1|3 cup + 1 tbsp + 1 tsp @end group @end example @noindent By default, if a unit in a list begins with fraction of the form 1|@var{x} and its multiplier is an integer, the fraction is given as the product of the multiplier and the numerator; for example, @example @group You have: 12.28125 ft You want: ft;in;1|8 in; 12 ft + 3 in + 3|8 in @end group @end example @noindent In many cases, such as the example above, this is what is wanted, but sometimes it is not. For example, a cooking recipe for 6 might call for 5@tie{}1/4 cup of an ingredient, but you want a portion for 2, and your 1-cup measure is not available; you might try @example @group You have: (5+1|4) cup / 3 You want: 1|2 cup;1|3 cup;1|4 cup 3|2 cup + 1|4 cup @end group @end example @noindent This result might be fine for a baker who has a 1@tie{}1/2-cup measure (and recognizes the equivalence), but it may not be as useful to someone with more limited set of measures, who does want to do additional calculations, and only wants to know ``How many 1/2-cup measures to I need to add?'' After all, that's what was actually asked. With the @option{--show-factor} option, the factor will not be combined with a unity numerator, so that you get @example @group You have: (5+1|4) cup / 3 You want: 1|2 cup;1|3 cup;1|4 cup 3 * 1|2 cup + 1|4 cup @end group @end example @noindent A user-specified fractional unit with a numerator other than 1 is never overridden, however---if a unit list specifies @samp{3|4 cup;1|2 cup}, a result equivalent to 1@tie{}1/2 cups will always be shown as @samp{2 * 3|4 cup} whether or not the @option{--show-factor} option is given. Some applications for unit lists may be less obvious. Suppose that you have a postal scale and wish to ensure that it's accurate at 1@tie{}oz, but have only metric calibration weights. You might try @example @group You have: 1 oz You want: 100 g;50 g; 20 g;10 g;5 g;2 g;1 g; 20 g + 5 g + 2 g + 1 g + 0.34952312 * 1 g @end group @end example @noindent You might then place one each of the 20@tie{}g, 5@tie{}g, 2@tie{}g, and 1@tie{}g weights on the scale and hope that it indicates close to @example @group You have: 20 g + 5 g + 2 g + 1 g You want: oz; 0.98767093 oz @end group @end example @noindent Appending @samp{;} to @samp{oz} forces a one-line display that includes the unit; here the integer part of the result is zero, so it is not displayed. A unit list such as @example cup;1|2@tie{}cup;1|3@tie{}cup;1|4@tie{}cup;tbsp;tsp;1|2@tie{}tsp;1|4@tie{}tsp @end example @noindent can be tedious to enter. The @command{units} program provides shorthand names for some common combinations: @example hms @r{hours, minutes, seconds} dms @r{angle: degrees, minutes, seconds} time @r{years, days, hours, minutes and seconds} usvol @r{US cooking volume: cups and smaller} @end example @noindent Using these shorthands, or @dfn{unit list aliases}, you can do the following conversions: @example @group You have: anomalisticyear You want: time 1 year + 25 min + 3.4653216 sec You have: 1|6 cup You want: usvol 2 tbsp + 2 tsp @end group @end example @noindent You cannot combine a unit list alias with other units: it must appear alone at the @samp{You want:} prompt. You can display the definition of a unit list alias by entering it at the @samp{You have:} prompt: @example @group You have: dms Definition: unit list, deg;arcmin;arcsec @end group @end example @noindent When you specify compact output with @option{--compact}, @option{--terse} or @option{-t} and perform conversion to a unit list, @command{units} lists the conversion factors for each unit in the list, separated by semicolons. @example @group You have: year You want: day;min;sec 365;348;45.974678 @end group @end example @noindent Unlike the case of regular output, zeros @emph{are} included in this output list: @example @group You have: liter You want: cup;1|2 cup;1|4 cup;tbsp 4;0;0;3.6280454 @end group @end example @node Invoking Units @chapter Invoking @command{units} @cindex invoking units @cindex command-line options You invoke @command{units} like this: @example units [@var{options}] [@var{from-unit} [@var{to-unit}]] @end example @noindent If the @var{from-unit} and @var{to-unit} are omitted, the program will use interactive prompts to determine which conversions to perform. @xref{Interactive Use}. If both @var{from-unit} and @var{to-unit} are given, @command{units} will print the result of that single conversion and then exit. If only @var{from-unit} appears on the command line, @command{units} will display the definition of that unit and exit. Units specified on the command line may need to be quoted to protect them from shell interpretation and to group them into two arguments. @xref{Command Line Use}. The default behavior of @command{units} can be changed by various options given on the command line. In most cases, the options may be given in either short form (a single @samp{-} followed by a single character) or long form (@samp{--} followed by a word or hyphen-separated words). Short-form options are cryptic but require less typing; long-form options require more typing but are more explanatory and may be more mnemonic. With long-form options you need only enter sufficient characters to uniquely identify the option to the program. For example, @samp{--out@tie{}%f} works, but @samp{--o@tie{}%f} fails because @command{units} has other long options beginning with @samp{o}. However, @samp{--q} works because @samp{--quiet} is the only long option beginning with @samp{q}. Some options require arguments to specify a value (e.g., @samp{-d@tie{}12} or @samp{--digits@tie{}12}). Short-form options that do not take arguments may be concatenated (e.g., @samp{-erS} is equivalent to @samp{-e@tie{}-r@tie{}-S}); the last option in such a list may be one that takes an argument (e.g., @samp{-ed@tie{}12}). With short-form options, the space between an option and its argument is optional (e.g., @samp{-d12} is equivalent to @samp{-d@tie{}12}). Long-form options may not be concatenated, and the space between a long-form option and its argument is required. Short-form and long-form options may be intermixed on the command line. Options may be given in any order, but when incompatible options (e.g., @option{--output-format} and @option{--exponential}) are given in combination, behavior is controlled by the last option given. For example, @samp{-o%.12f@tie{}-e} gives exponential format with the default eight significant digits). The following options are available: @table @env @item -c @itemx --check @opindex -c @r{(option for} @command{units}@r{)} @opindex --check @r{(option for} @command{units}@r{)} Check that all units and prefixes defined in the units data file reduce to primitive units. Print a list of all units that cannot be reduced. Also display some other diagnostics about suspicious definitions in the units data file. Only definitions active in the current locale are checked. You should always run @command{units} with this option after modifying a units data file. @item --check-verbose @itemx --verbose-check @opindex --check-verbose @r{(option for} @command{units}@r{)} @opindex --verbose-check @r{(option for} @command{units}@r{)} Like the @option{--check} option, this option prints a list of units that cannot be reduced. But to help find unit definitions that cause endless loops, it lists the units as they are checked. If @command{units} hangs, then the last unit to be printed has a bad definition. Only definitions active in the current locale are checked. @item -d @var{ndigits} @itemx --digits @var{ndigits} @opindex -d @r{(option for} @command{units}@r{)} @opindex --digits @r{(option for} @command{units}@r{)} Set the number of significant digits in the output to the value specified (which must be greater than zero). For example, @samp{-d@tie{}12} sets the number of significant digits to 12. With exponential output @command{units} displays one digit to the left of the decimal @c man point @c noman point@footnote{This document refers to ``decimal point,'' but strictly, the @dfn{radix} separates the integer and fractional parts of a floating-point number; in English-speaking countries, the radix is a point (@samp{.}), but in most other countries it is a comma (@samp{,}).} @c end noman and eleven digits to the right of the decimal point. On most systems, the maximum number of internally meaningful digits is 15; if you specify a greater number than your system's maximum, @command{units} will print a warning and set the number to the largest meaningful value. To directly set the maximum value, give an argument of @code{max} (e.g., @samp{-d@tie{}max}). Be aware, of course, that ``significant'' here refers only to the @emph{display} of numbers; if results depend on physical constants not known to this precision, the physically meaningful precision may be less than that shown. The @option{--digits} option conflicts with the @option{--output-format} option. @item -e @itemx --exponential @opindex -e @r{(option for} @command{units}@r{)} @opindex --exponential @r{(option for} @command{units}@r{)} Set the numeric output format to exponential (i.e., scientific notation), like that used in the Unix @command{units} program. The default precision is eight significant digits (seven digits to the right of the decimal point); this can be changed with the @option{--digits} option. The @option{--exponential} option conflicts with the @option{--output-format} option. @item -o @var{format} @itemx --output-format @var{format} @opindex -o @r{(option for} @command{units}@r{)} @opindex --output-format @r{(option for} @command{units}@r{)} This option affords complete control over the numeric output format using the specified @var{format}. The format is a single floating point numeric format for the @code{printf()} function in the C programming language. All compilers support the format types @samp{g} and @samp{G} to specify significant digits, @samp{e} and @samp{E} for scientific notation, and @samp{f} for fixed-point decimal. The ISO C99 standard introduced the @samp{F} type for fixed-point decimal and the @samp{a} and @samp{A} types for hexadecimal floating point; these types are allowed with compilers that support them. The default format is @samp{%.8g}; for greater precision, you could specify @samp{-o@tie{}%.15g}. @xref{Numeric Output Format}, and the documentation for @code{printf()} for more detailed descriptions of the format specification. The @option{--output-format} option affords the greatest control of the output appearance, but requires at least rudimentary knowledge of the @code{printf()} format syntax. If you don't want to bother with the @code{printf()} syntax, you can specify greater precision more simply with the @option{--digits} option or select exponential format with @option{--exponential}. The @option{--output-format} option is incompatible with the @option{--exponential} and @option{--digits} options. @item -f @var{filename} @itemx --file @var{filename} @opindex -f @r{(option for} @command{units}@r{)} @opindex --file @r{(option for} @command{units}@r{)} Instruct @command{units} to load the units file @code{filename}. You can specify up to 25 units files on the command line. When you use this option, @command{units} will load @emph{only} the files you list on the command line; it will not load the standard file or your personal units file unless you explicitly list them. If @var{filename} is the empty string (@samp{-f ""}), the default units file (or that specified by @env{UNITSFILE}) will be loaded in addition to any others specified with @samp{-f}. @item -h @itemx --help @opindex -h @r{(option for} @command{units}@r{)} @opindex --help @r{(option for} @command{units}@r{)} Print out a summary of the options for @command{units}. @item -m @itemx --minus @opindex -m @r{(option for} @command{units}@r{)} @opindex --minus @r{(option for} @command{units}@r{)} Causes @samp{-} to be interpreted as a subtraction operator. This is the default behavior. @item -p @itemx --product @opindex -p @r{(option for} @command{units}@r{)} @opindex --product @r{(option for} @command{units}@r{)} Causes @samp{-} to be interpreted as a multiplication operator when it has two operands. It will act as a negation operator when it has only one operand: @samp{(-3)}. By default @samp{-} is treated as a subtraction operator. @item --oldstar @opindex --oldstar @r{(option for} @command{units}@r{)} Causes @samp{*} to have the old-style precedence, higher than the precedence of division so that @samp{1/2*3} will equal @samp{1/6}. @item --newstar @opindex --newstar @r{(option for} @command{units}@r{)} Forces @samp{*} to have the new (default) precedence that follows the usual rules of algebra: the precedence of @samp{*} is the same as the precedence of @samp{/}, so that @samp{1/2*3} will equal @samp{3/2}. @item --compact @opindex --compact @r{(option for} @command{units}@r{)} Give compact output featuring only the conversion factor. This turns off the @option{--verbose} option. @item -q @itemx --quiet @itemx --silent @opindex -q @r{(option for} @command{units}@r{)} @opindex --quiet @r{(option for} @command{units}@r{)} @opindex --silent @r{(option for} @command{units}@r{)} Suppress prompting of the user for units and the display of statistics about the number of units loaded. @item -n @itemx --nolists Disable conversion to unit lists. @item -r @itemx --round When converting to a combination of units given by a unit list, round the value of the last unit in the list to the nearest integer. @item -S @itemx --show-factor When converting to a combination of units specified in a list, always show a non-unity factor before a unit that begins with a fraction with a unity denominator. By default, if the unit in a list begins with fraction of the form 1|@var{x} and its multiplier is an integer other than 1, the fraction is given as the product of the multiplier and the numerator (e.g., @samp{3|8 in} rather than @samp{3 * 1|8 in}). In some cases, this is not what is wanted; for example, the results for a cooking recipe might show @samp{3 * 1|2 cup} as @samp{3|2 cup}. With the @option{--show-factor} option, a result equivalent to 1.5 cups will display as @samp{3 * 1|2 cup} rather than @samp{3|2 cup}. A user-specified fractional unit with a numerator other than 1 is never overridden, however---if a unit list specifies @samp{3|4 cup;1|2 cup}, a result equivalent to 1@tie{}1/2 cups will always be shown as @samp{2 * 3|4 cup} whether or not the @option{--show-factor} option is given. @item -s @itemx --strict @opindex -s @r{(option for} @command{units}@r{)} @opindex --strict @r{(option for} @command{units}@r{)} Suppress conversion of units to their reciprocal units. For example, @command{units} will normally convert hertz to seconds because these units are reciprocals of each other. The strict option requires that units be strictly conformable to perform a conversion, and will give an error if you attempt to convert hertz to seconds. @item -1 @itemx --one-line @opindex -1 @r{(option for} @command{units}@r{)} @opindex --one-line @r{(option for} @command{units}@r{)} Give only one line of output (the forward conversion). Do not print the reverse conversion. If a reciprocal conversion is performed then @command{units} will still print the ``reciprocal conversion'' line. @item -t @itemx --terse @opindex -t @r{(option for} @command{units}@r{)} @opindex --terse @r{(option for} @command{units}@r{)} Give terse output when converting units. This option can be used when calling @command{units} from another program so that the output is easy to parse. This option has the combined effect of these options: @option{--strict} @option{--quiet} @option{--one-line} @option{--compact}. @item -v @itemx --verbose @opindex -v @r{(option for} @command{units}@r{)} @opindex --verbose @r{(option for} @command{units}@r{)} Give slightly more verbose output when converting units. When combined with the @option{-c} option this gives the same effect as @option{--check-verbose}. @item -V @itemx --version @opindex -V @r{(option for} @command{units}@r{)} @opindex --version @r{(option for} @command{units}@r{)} Print program version number, tell whether the @command{readline} library has been included, and give the location of the default units data file. @item -l @var{locale} @itemx --locale @var{locale} @opindex -l @r{(option for} @command{units}@r{)} @opindex --locale @r{(option for} @command{units}@r{)} Force a specified locale such as @samp{en_GB} to get British definitions by default. This overrides the locale determined from system settings or environment variables. @xref{Locale}, for a description of locale format. @end table @node Defining Your Own Units @chapter Adding Your Own Definitions @menu * Units Data Files:: Where are units defined? * Defining New Units:: Writing your own unit and prefix definitions * Defining Nonlinear Units:: Writing your own nonlinear unit definitions * Defining Unit List Aliases:: Writing your own unit list aliases @end menu @node Units Data Files @section Units Data Files @cindex additional units data files @cindex data files, additional @cindex units data files, additional @cindex @samp{!include} @cindex command, @samp{!include} @cindex including additional units data files The units and prefixes that @command{units} can convert are defined in the units data file, typically @file{/usr/share/units/definitions.units}. Although you can extend or modify this data file if you have appropriate user privileges, it's usually better to put extensions in separate files so that the definitions will be preserved when you update @command{units}. You can include additional data files in the units database using the @samp{!include} command in the standard units data file. For example @example !include /usr/local/share/units/local.units @end example @noindent might be appropriate for a site-wide supplemental data file. The location of the @samp{!include} statement in the standard units data file is important; later definitions replace earlier ones, so any definitions in an included file will override definitions before the @samp{!include} statement in the standard units data file. With normal invocation, no warning is given about redefinitions; to ensure that you don't have an unintended redefinition, run @samp{units@tie{}-c} after making changes to any units data file. @cindex personal units data file @cindex units data file, personal If you want to add your own units in addition to or in place of standard or site-wide supplemental units data files, you can include them in the @file{.units} file in your home directory. If this file exists it is read after the standard units data file, so that any definitions in this file will replace definitions of the same units in the standard data file or in files included from the standard data file. This file will not be read if any units files are specified on the command line. (Under Windows the personal units file is named @file{unitdef.units}.) The @command{units} program first tries to determine your home directory from the @env{HOME} environment variable. On systems running Microsoft Windows, if @env{HOME} does not exist, @command{units} attempts to find your home directory from @env{HOMEDRIVE} and @env{HOMEPATH}. Running @command{units -V} will display the location and name of your personal units file. @cindex MYUNITSFILE environment variable @cindex environment variable, MYUNITSFILE You can specify an arbitrary file as your personal units data file with the @env{MYUNITSFILE} environment variable; if this variable exists, its value is used without searching your home directory. @node Defining New Units @section Defining New Units and Prefixes @cindex defining units @cindex units, definition of @cindex units definitions, adding @cindex units definitions, changing @cindex prefixes, definition of @cindex defining prefixes @cindex primitive units @cindex units, primitive @cindex @samp{!} to indicate primitive units @cindex command, @samp{!} to indicate primitive units A unit is specified on a single line by giving its name and an equivalence. Comments start with a @samp{#} character, which can appear anywhere in a line. The backslash character (@samp{\}) acts as a continuation character if it appears as the last character on a line, making it possible to spread definitions out over several lines if desired. A file can be included by giving the command @samp{!include} followed by the file's name. The @samp{!} must be the first character on the line. The file will be sought in the same directory as the parent file unless you give a full path. The name of the file to be included cannot contain the comment character @samp{#}. @cindex include files Unit names must not contain any of the operator characters @samp{+}, @samp{-}, @samp{*}, @samp{/}, @samp{|}, @samp{^}, @samp{;}, @samp{~}, the comment character @samp{#}, or parentheses. They cannot begin or end with an underscore (@samp{_}), a comma (@samp{,}) or a decimal point (@samp{.}). The figure dash (U+2012), typographical minus (`@minus{}'; U+2212), and en dash (`--'; U+2013) are converted to the operator @samp{-}, so none of these characters can appear in unit names. Names cannot begin with a digit, and if a name ends in a digit other than zero, the digit must be preceded by a string beginning with an underscore, and afterwards consisting only of digits, decimal points, or commas. For example, @samp{foo_2}, @samp{foo_2,1}, or @samp{foo_3.14} would be valid names but @samp{foo2} or @samp{foo_a2} would be invalid. You could define nitrous oxide as @example N2O nitrogen 2 + oxygen @end example @noindent but would need to define nitrogen dioxide as @example NO_2 nitrogen + oxygen 2 @end example @noindent Be careful to define new units in terms of old ones so that a reduction leads to the primitive units, which are marked with @samp{!} characters. Dimensionless units are indicated by using the string @samp{!dimensionless} for the unit definition. @cindex dimensionless units, defining When adding new units, be sure to use the @option{-c} option to check that the new units reduce properly. If you create a loop in the units definitions, then @command{units} will hang when invoked with the @option{-c} option. You will need to use the @option{--check-verbose} option, which prints out each unit as it is checked. The program will still hang, but the last unit printed will be the unit that caused the infinite loop. @cindex parentheses If you define any units that contain @samp{+} characters, carefully check them because the @option{-c} option will not catch non-conformable sums. Be careful with the @samp{-} operator as well. When used as a binary operator, the @samp{-} character can perform addition or multiplication depending on the options used to invoke @command{units}. To ensure consistent behavior use @samp{-} only as a unary negation operator when writing units definitions. To multiply two units leave a space or use the @samp{*} operator with care, recalling that it has two possible precedence values and may require parentheses to ensure consistent behavior. To compute the difference of @samp{foo} and @samp{bar} write @samp{foo+(-bar)} or even @samp{foo+-bar}. Here is an example of a short data file that defines some basic units: @example @group m ! # The meter is a primitive unit sec ! # The second is a primitive unit rad !dimensionless # A dimensionless primitive unit micro- 1e-6 # Define a prefix minute 60 sec # A minute is 60 seconds hour 60 min # An hour is 60 minutes inch 0.0254 m # Inch defined in terms of meters ft 12 inches # The foot defined in terms of inches mile 5280 ft # And the mile @end group @end example @cindex parentheses @noindent A unit that ends with a @samp{-} character is a prefix. If a prefix definition contains any @samp{/} characters, be sure they are protected by parentheses. If you define @samp{half- 1/2} then @samp{halfmeter} would be equivalent to @samp{1 / (2 meter)}. @node Defining Nonlinear Units @section Defining Nonlinear Units @cindex defining nonlinear units @cindex nonlinear units, defining @cindex nonlinear unit conversions Some unit conversions of interest are nonlinear; for example, temperature conversions between the Fahrenheit and Celsius scales cannot be done by simply multiplying by conversion factors. When you give a linear unit definition such as @samp{inch 2.54 cm} you are providing information that @command{units} uses to convert values in inches into primitive units of meters. For nonlinear units, you give a functional definition that provides the same information. Nonlinear units are represented using a functional notation. It is best to regard this notation not as a function call but as a way of adding units to a number, much the same way that writing a linear unit name after a number adds units to that number. Internally, nonlinear units are defined by a pair of functions that convert to and from linear units in the data file, so that an eventual conversion to primitive units is possible. Here is an example nonlinear unit definition: @example @group tempF(x) units=[1;K] (x+(-32)) degF + stdtemp ; \ (tempF+(-stdtemp))/degF + 32 @end group @end example @noindent A nonlinear unit definition comprises a unit name, a dummy parameter name, two functions, and two corresponding units. The functions tell @command{units} how to convert to and from the new unit. In order to produce valid results, the arguments of these functions need to have the correct dimensions. To facilitate error checking, you may optionally indicate units for these arguments. @cindex parentheses The definition begins with the unit name followed immediately (with no spaces) by a @samp{(} character. In parentheses is the name of the parameter. Next is an optional specification of the units required by the functions in this definition. In the example above, the @samp{tempF} function requires an input argument conformable with @samp{1}. For normal nonlinear units definitions the forward function will always take a dimensionless argument. The inverse function requires an input argument conformable with @samp{K}. In general the inverse function will need units that match the quantity measured by your nonlinear unit. The purpose of the expression in brackets to enable @command{units} to perform error checking on function arguments, and also to assign units to range and domain specifications, which are described later. Next the function definitions appear. In the example above, the @samp{tempF} function is defined by @example @group tempF(x) = (x+(-32)) degF + stdtemp @end group @end example @noindent This gives a rule for converting @samp{x} in the units @samp{tempF} to linear units of absolute temperature, which makes it possible to convert from tempF to other units. In order to make conversions to Fahrenheit possible, you must give a rule for the inverse conversions. The inverse will be @samp{x(tempF)} and its definition appears after a @samp{;} character. In our example, the inverse is @example @group x(tempF) = (tempF+(-stdtemp))/degF + 32 @end group @end example @noindent This inverse definition takes an absolute temperature as its argument and converts it to the Fahrenheit temperature. The inverse can be omitted by leaving out the @samp{;} character, but then conversions to the unit will be impossible. If the inverse is omitted then the @option{--check} option will display a warning. It is up to you to calculate and enter the correct inverse function to obtain proper conversions. The @option{--check} option tests the inverse at one point and prints an error if it is not valid there, but this is not a guarantee that your inverse is correct. If you wish to make synonyms for nonlinear units, you still need to define both the forward and inverse functions. Inverse functions can be obtained using the @samp{~} operator. So to create a synonym for @samp{tempF} you could write @example @group fahrenheit(x) units=[1;K] tempF(x); ~tempF(fahrenheit) @end group @end example @noindent You may define a function whose range and domain do not cover all of the real numbers. In this case @command{units} can handle errors better if you specify an appropriate range and domain. You specify the range and domain as shown below. @example @group baume(d) units=[1;g/cm^3] domain=[0,130.5] range=[1,10] \ (145/(145-d)) g/cm^3 ; (baume+-g/cm^3) 145 / baume @end group @end example @noindent In this example the domain is specified after the @samp{domain=} with the endpoints given in brackets. One of the end points can be omitted to get an interval that goes to infinity. So the range could be specified as nonnegative by writing @samp{range=[0,]}. Both the range and domain are optional and can appear independently and in any order along with the @samp{units} specification. The values in the range and domain are attached to the units given in the @samp{units} specification. If you don't specify the units then the parameter inputs are reduced to primitive units for the numeric comparison to the values you give in the range or domain. In this case you should only use @samp{range} or @samp{domain} if the endpoints are zero and infinity. Specifying the range and domain allows @command{units} to perform better error checking and give more helpful error messages when you invoke nonlinear units conversions outside of their bounds. It also enables the @option{-c} option to find a point in the domain to use for its point check of your inverse definition. @cindex units functions @cindex functions of units You may occasionally wish to define a function that operates on units. This can be done using a nonlinear unit definition. For example, the definition below provides conversion between radius and the area of a circle. This definition requires a length as input and produces an area as output, as indicated by the @samp{units=} specification. Specifying the range as the nonnegative numbers can prevent cryptic error messages. @example @group circlearea(r) units=[m;m^2] range=[0,] pi r^2 ; sqrt(circlearea/pi) @end group @end example @cindex linear interpolation @cindex units, piecewise linear @cindex piecewise linear units @noindent Sometimes you may be interested in a piecewise linear unit such as many wire gauges. Piecewise linear units can be defined by specifying conversions to linear units on a list of points. Conversion at other points will be done by linear interpolation. A partial definition of zinc gauge is @example @group zincgauge[in] 1 0.002, 10 0.02, 15 0.04, 19 0.06, 23 0.1 @end group @end example @noindent In this example, @samp{zincgauge} is the name of the piecewise linear unit. The definition of such a unit is indicated by the embedded @samp{[} character. After the bracket, you should indicate the units to be attached to the numbers in the table. No spaces can appear before the @samp{]} character, so a definition like @samp{foo[kg meters]} is illegal; instead write @samp{foo[kg*meters]}. The definition of the unit consists of a list of pairs optionally separated by commas. This list defines a function for converting from the piecewise linear unit to linear units. The first item in each pair is the function argument; the second item is the value of the function at that argument (in the units specified in brackets). In this example, we define @samp{zincgauge} at five points. For example, we set @samp{zincgauge(1)} equal to @samp{0.002 in}. Definitions like this may be more readable if written using continuation characters as @example @group zincgauge[in] \ 1 0.002 \ 10 0.02 \ 15 0.04 \ 19 0.06 \ 23 0.1 @end group @end example @noindent With the preceding definition, the following conversion can be performed: @example @group You have: zincgauge(10) You want: in * 0.02 / 50 You have: .01 inch You want: zincgauge 5 @end group @end example @noindent If you define a piecewise linear unit that is not strictly monotonic, then the inverse will not be well defined. If the inverse is requested for such a unit, @command{units} will return the smallest inverse. The @option{--check} option will print a warning if a non-monotonic piecewise linear unit is encountered. @node Defining Unit List Aliases @section Defining Unit List Aliases @cindex unit list aliases, defining @cindex @samp{!unitlist} @cindex command, @samp{!unitlist} Unit list aliases are treated differently from unit definitions, because they are a data entry shorthand rather than a true definition for a new unit. A unit list alias definition begins with @samp{!unitlist} and includes the alias and the definition; for example, the aliases included in the standard units data file are @example @group !unitlist hms hr;min;sec !unitlist time year;day;hr;min;sec !unitlist dms deg;arcmin;arcsec !unitlist ftin ft;in;1|8 in !unitlist usvol cup;3|4 cup;2|3 cup;1|2 cup;1|3 cup;1|4 cup;\ tbsp;tsp;1|2 tsp;1|4 tsp;1|8 tsp @end group @end example @noindent Unit list aliases are only for unit lists, so the definition must include a @samp{;}. Unit list aliases can never be combined with units or other unit list aliases, so the definition of @samp{time} shown above could @emph{not} have been shortened to @samp{year;day;hms}. As usual, be sure to run @command{units --check} to ensure that the units listed in unit list aliases are conformable. @node Numeric Output Format @chapter Numeric Output Format @cindex numeric output format @cindex output format @menu * Format Specification:: The output format specification * Flags:: Optional format flags * Field Width:: Specifying output field width * Precision:: Specifying output precision @end menu By default, @code{units} shows results to eight significant digits. You can change this with the @option{--exponential}, @option{--digits}, and @option{--output-format} options. The first sets an exponential format (i.e., scientific notation) like that used in the original Unix @command{units} program, the second allows you to specify a different number of significant digits, and the last allows you to control the output appearance using the format for the @code{printf()} function in the C programming language. If you only want to change the number of significant digits or specify exponential format type, use the @option{--digits} and @option{--exponential} options. The @option{--output-format} option affords the greatest control of the output appearance, but requires at least rudimentary knowledge of the @code{printf()} format syntax. @xref{Invoking Units}, for descriptions of these options. @node Format Specification @section Format Specification @cindex output format specification @cindex format specification, output The format specification recognized with the @option{--output-format} option is a subset of that for @code{printf()}. The format specification has the form @c noman @code{%}[@i{flags}][@i{width}][@code{.}@i{precision}]@i{type}; @c end noman @c ifman @ignore .\".CW "%\fR[\fP\fIflags\fP\fR][\fP\fIwidth\fP\fR][\fP.\fIprecision\fP\fR]\fP\fItype\fP" ; @code{%}[@i{flags}][@i{width}][\c @code{.}@i{precision}]@i{type}; @end ignore @c end ifman it must begin with @samp{%}, and must end with a floating-point type specifier: @samp{g} or @samp{G} to specify the number of significant digits, @samp{e} or @samp{E} for scientific notation, and @samp{f} for fixed-point decimal. The ISO C99 standard added the @samp{F} type for fixed-point decimal and the @samp{a} and @samp{A} types for hexadecimal floating point; these types are allowed with compilers that support them. Type length modifiers (e.g., @samp{L} to indicate a long double) are inapplicable and are not allowed. The default format for @command{units} is @samp{%.8g}; for greater precision, you could specify @samp{-o@tie{}%.15g}. The @samp{g} and @samp{G} format types use exponential format whenever the exponent would be less than @minus{}4, so the value 0.000013 displays as @samp{1.3e-005}. These types also use exponential notation when the exponent is greater than or equal to the precision, so with the default format, the value @c @tex $5\times 10^7$ @end tex @ifnottex @c noman 5e7 @c end noman @c man .if t .ig ++ @c man 5e7 @c man .++ @c man .if n .ig ++ @c man .EQ @c man 5 times 10 sup 7 @c man .EN @c man .++ @end ifnottex displays as @samp{50000000} and the value @tex $5\times 10^8$ @end tex @ifnottex @c noman 5e8 @c end noman @c man .if t .ig ++ @c man 5e8 @c man .++ @c man .if n .ig ++ @c man .EQ @c man 5 times 10 sup 8 @c man .EN @c man .++ @end ifnottex displays as @samp{5e+008}. If you prefer fixed-point display, you might specify @samp{-o@tie{}%.8f}; however, small numbers will display very few significant digits, and values less than @tex $0.5\times10^{-8}$ @end tex @ifnottex @c noman 0.5e@minus{}8 @c end noman @c man .if t .ig ++ @c man 0.5e\-8 @c man .++ @c man .if n .ig ++ @c man .EQ @c man 0.5 times 10 sup -8 @c man .EN @c man .++ @end ifnottex will show nothing but zeros. The format specification may include one or more optional flags: @samp{+}, @samp{@tie{}} (space), @samp{#}, @samp{-}, or @samp{0} (the digit zero). The digit-grouping flag @c noman @set codequoteundirected @samp{'} (apostrophe) @clear codequoteundirected @c end noman @c if the troff formatter is groff, ensure an ASCII single quote @c man .ie \n(.g .CQ "\(aq" @c man .el .CQ "'" is allowed with compilers that support it. Flags are followed by an optional value for the minimum field width, and an optional precision specification that begins with a period (e.g., @samp{.6}). The field width includes the digits, decimal point, the exponent, thousands separators (with the digit-grouping flag), and the sign if any of these are shown. @node Flags @section Flags @cindex output format flags @cindex flags, output format The @samp{+} flag causes the output to have a sign (@samp{+} or @samp{-}). The space flag @samp{@tie{}} is similar to the @samp{+} flag, except that when the value is positive, it is prefixed with a space rather than a plus sign; this flag is ignored if the @samp{+} flag is also given. The @samp{+} or @samp{@tie{}} flag could be useful if conversions might include positive and negative results, and you wanted to align the decimal points in exponential notation. @c The @samp{#} flag causes the output value to contain a decimal point in all cases; by default, the output contains a decimal point only if there are digits (which can be trailing zeros) to the right of the point. With the @samp{g} or @samp{G} types, the @samp{#} flag also prevents the suppression of trailing zeros. @c The digit-grouping flag @c noman @set codequoteundirected @samp{'} @clear codequoteundirected @c end noman @c if the troff formatter is groff, ensure an ASCII single quote @c man .ie \n(.g .CQ "\(aq" @c man .el .CQ "'" shows a thousands separator in digits to the left of the decimal point. @c (e.g., @samp{1,234.56}). This can be useful when displaying large numbers in fixed-point decimal; for example, with the format @samp{%f}, @example You have: mile You want: microfurlong * 8000000.000000 / 0.000000 @end example @noindent the magnitude of the first result may not be immediately obvious without counting the digits to the left of the decimal point. If the thousands separator is the comma (@samp{,}), the output with the format @c noman @set codequoteundirected @samp{%'f} @clear codequoteundirected @c end noman @c if the troff formatter is groff, ensure an ASCII single quote @c man .ie \n(.g .CQ "%\(aqf" @c man .el .CQ "%'f" might be @example You have: mile You want: microfurlong * 8,000,000.000000 / 0.000000 @end example @noindent making the magnitude readily apparent. Unfortunately, few compilers support the digit-grouping flag. @c With the @samp{-} flag, the output value is left aligned within the specified field width. If a field width greater than needed to show the output value is specified, the @samp{0} (zero) flag causes the output value to be left padded with zeros until the specified field width is reached; for example, with the format @samp{%011.6f}, @example You have: troypound You want: grain * 5760.000000 / 0000.000174 @end example @noindent The @samp{0} flag has no effect if the @samp{-} (left align) flag is given. @node Field Width @section Field Width @cindex output field width By default, the output value is left aligned and shown with the minimum width necessary for the specified (or default) precision. If a field width greater than this is specified, the value shown is right aligned, and padded on the left with enough spaces to provide the specified field width. A width specification is typically used with fixed-point decimal to have columns of numbers align at the decimal point; this arguably is less useful with @command{units} than with long columnar output, but it may nonetheless assist in quickly assessing the relative magnitudes of results. For example, with the format @samp{%12.6f}, @example @group You have: km You want: in * 39370.078740 / 0.000025 @end group @group You have: km You want: rod * 198.838782 / 0.005029 @end group @group You have: km You want: furlong * 4.970970 / 0.201168 @end group @end example @node Precision @section Precision @cindex output precision @cindex precision, output The meaning of ``precision'' depends on the format type. With @samp{g} or @samp{G}, it specifies the number of significant digits (like the @option{--digits} option); with @samp{e}, @samp{E}, @samp{f}, or @samp{F}, it specifies the maximum number of digits to be shown after the decimal point. @c With the @samp{g} and @samp{G} format types, trailing zeros are suppressed, so the results may sometimes have fewer digits than the specified precision (as indicated above, the @samp{#} flag causes trailing zeros to be displayed). The default precision is 6, so @samp{%g} is equivalent to @samp{%.6g}, and would show the output to six significant digits. Similarly, @samp{%e} or @samp{%f} would show the output with six digits after the decimal point. The C @code{printf()} function allows a precision of arbitrary size, whether or not all of the digits are meaningful. With most compilers, the maximum internal precision with @command{units} is 15 decimal digits (or 13 hexadecimal digits). With the @samp{--digits} option, you are limited to the maximum internal precision; with the @option{--output-format} option, you may specify a precision greater than this, but it may not be meaningful. In some cases, specifying excess precision can result in rounding artifacts. For example, a pound is exactly 7000 grains, but with the format @samp{%.18g}, the output might be @example You have: pound You want: grain * 6999.9999999999991 / 0.00014285714285714287 @end example @noindent With the format @samp{%.25g} you might get the following: @example You have: 1/3 You want: Definition: 0.333333333333333314829616256247 @end example @noindent In this case the displayed value includes a series of digits that represent the underlying binary floating-point approximation to 1/3 but are not meaningful for the desired computation. In general, the result with excess precision is system dependent. @c The precision affects only the @emph{display} of numbers; if a result relies on physical constants that are not known to the specified precision, the number of physically meaningful digits may be less than the number of digits shown. See the documentation for @code{printf()} for more detailed descriptions of the format specification. The @option{--output-format} option is incompatible with the @option{--exponential} or @option{--digits} options; if the former is given in combination with either of the latter, the format is controlled by the last option given. @node Localization @chapter Localization @cindex environment dependent definitions @cindex localization @cindex @samp{!locale} @cindex command, @samp{!locale} @cindex @samp{!endlocale} @cindex command, @samp{!endlocale} @cindex command, @samp{!endvar} @cindex command, @samp{!var} @cindex command, @samp{!varnot} @cindex command, @samp{!set} @cindex command, @samp{!message} @menu * Locale:: What is a locale? * Additional Localization:: When the locale isn't enough @end menu Some units have different values in different locations. The localization feature accommodates this by allowing a units data file to specify definitions that depend on the user's locale. @node Locale @section Locale @cindex locale A locale is a subset of a user's environment that indicates the user's language and country, and some attendant preferences, such as the formatting of dates. The @command{units} program attempts to determine the locale from the POSIX setlocale function; if this cannot be done, @command{units} examines the environment variables @env{LC_CTYPE} and @env{LANG}. On POSIX systems, a locale is of the form @var{language}@code{_}@var{country}, where @var{language} is the two-character code from ISO 639-1 and @var{country} is the two-character code from ISO 3166-1; @var{language} is lower case and @var{country} is upper case. For example, the POSIX locale for the United Kingdom is @code{en_GB}. @cindex @file{locale.map} @cindex setlocale function On systems running Microsoft Windows, the value returned by setlocale() is different from that on POSIX systems; @command{units} attempts to map the Windows value to a POSIX value by means of a table in the file @file{locale.map} in the same directory, typically @file{/usr/local/share/units}, as the default units data files. The file includes entries for many combinations of language and country, and can be extended to include other combinations. The @file{locale.map} comprises two tab-separated columns; each entry is of the form @display @var{Windows-locale}@ @ @ @var{POSIX-locale} @end display @noindent where @var{POSIX-locale} is as described above, and @var{Windows-locale} typically spells out both the language and country. For example, the entry for the United States is @example English_United States en_US @end example @noindent You can force @command{units} to run in a desired locale by using the @option{-l} option. In order to create unit definitions for a particular locale you begin a block of definitions in a unit datafile with @samp{!locale} followed by a locale name. The @samp{!} must be the first character on the line. The @command{units} program reads the following definitions only if the current locale matches. You end the block of localized units with @samp{!endlocale}. Here is an example, which defines the British gallon. @example @group !locale en_GB gallon 4.54609 liter !endlocale @end group @end example @node Additional Localization @section Additional Localization Sometimes the locale isn't sufficient to determine unit preferences. There could be regional preferences, or a company could have specific preferences. Though probably uncommon, such differences could arise with the choice of English customary units outside of English-speaking countries. To address this, @command{units} allows specifying definitions that depend on environment variable settings. The environment variables can be controled based on the current locale, or the user can set them to force a particular group of definitions. A conditional block of definitions in a units data file begins with either @samp{!var} or @samp{!varnot} following by an environment variable name and then a space separated list of values. The leading @samp{!} must appear in the first column of a units data file, and the conditional block is terminated by @samp{!endvar}. Definitions in blocks beginning with @samp{!var} are executed only if the environment variable is exactly equal to one of the listed values. Definitions in blocks beginning with @samp{!varnot} are executed only if the environment variable does @emph{not} equal any of the list values. The inch has long been a customary measure of length in many places. The word comes from the latin @emph{uncia} meaning ``one twelfth,'' referring to its relationship with the foot. By the 20th century, the inch was officially defined in English-speaking countries relative to the yard, but until 1959, the yard differed slightly among those countries. In France the customary inch, which was displaced in 1799 by the meter, had a different length based on a french foot. These customary definitions could be accommodated as follows: @example @group !var INCH_UNIT usa yard 3600|3937 m !endvar @end group @group !var INCH_UNIT canada yard 0.9144 meter !endvar @end group @group !var INCH_UNIT uk yard 0.91439841 meter !endvar @end group @group !var INCH_UNIT canada uk usa foot 1|3 yard inch 1|12 foot !endvar @end group @group !var INCH_UNIT france foot 144|443.296 m inch 1|12 foot line 1|12 inch !endvar @end group @group !varnot INCH_UNIT usa uk france canada !message Unknown value for INCH_UNIT !endvar @end group @end example @noindent When @command{units} reads the above definitions it will check the environment variable @env{INCH_UNIT} and load only the definitions for the appropriate section. If @env{INCH_UNIT} is unset or is not set to one of the four values listed then @command{units} will run the last block. In this case that block uses the @samp{!message} command to display a warning message. Alternatively that block could set default values. In order to create default values that are overridden by user settings the data file can use the @samp{!set} command, which sets an environment variable @emph{only if it is not already set}; these settings are only for the current @command{units} invocation and do not persist. So if the example above were preceded by @samp{!set INCH_UNIT france} then this would make @samp{france} the default value for @env{INCH_UNIT}. If the user had set the variable in the environment before invoking @command{units}, then @command{units} would use the user's value. To link these settings to the user's locale you combine the @samp{!set} command with the @samp{!locale} command. If you wanted to combine the above example with suitable locales you could do by @emph{preceding} the above definition with the following: @example @group !locale en_US !set INCH_UNIT usa !endlocale !locale en_GB !set INCH_UNIT uk !endlocale !locale en_CA !set INCH_UNIT canada !endlocale !locale fr_FR !set INCH_UNIT france !endlocale !set INCH_UNIT france @end group @end example @noindent These definitions set the overall default for @env{INCH_UNIT} to @samp{france} and set default values for four locales appropriately. The overall default setting comes last so that it only applies when @env{INCH_UNIT} was not set by one of the other commands or by the user. If the variable given after @samp{!var} or @samp{!varnot} is undefined then @command{units} prints an error message and ignores the definitions that follow. Use @samp{!set} to create defaults to prevent this situation from arising. The @option{-c} option only checks the definitions that are active for the current environment and locale, so when adding new definitions take care to check that all cases give rise to a well defined set of definitions. @node Environment Vars @chapter Environment Variables @cindex environment variables The @command{units} program uses the following environment variables: @table @env @item HOME @cindex HOME environment variable @cindex environment variable, HOME Specifies the location of your home directory; it is used by @command{units} to find a personal units data file @samp{.units}. On systems running Microsoft Windows, @command{units} tries to determine your home directory from the @env{HOMEDRIVE} and @env{HOMEPATH} environment variables if @env{HOME} does not exist. @item LC_CTYPE, LANG @cindex LANG environment variable @cindex LC_CTYPE environment variable @cindex environment variable, LANG @cindex environment variable, LC_CTYPE Checked to determine the locale if @command{units} cannot obtain it from the operating system. Sections of the standard units data file are specific to certain locales. @item MYUNITSFILE @cindex MYUNITSFILE environment variable @cindex environment variable, MYUNITSFILE Specifies your personal units data file. If this variable exists, @command{units} uses its value rather than searching your home directory for @samp{.units}. The personal units file will not be loaded if any data files are given using the @samp{-f} option. @item PAGER @cindex PAGER environment variable @cindex environment variable, PAGER @cindex help Specifies the pager to use for help and for displaying the conformable units. The help function browses the units database and calls the pager using the @samp{+n}@var{n} syntax for specifying a line number. The default pager is @command{more}; @env{PAGER} can be used to specify alternatives such as @command{less}, @command{pg}, @command{emacs}, or @command{vi}. @item UNITS_ENGLISH @cindex UNITS_ENGLISH environment variable @cindex environment variable, UNITS_ENGLISH Set to either @samp{US} or @samp{GB} to choose United States or British volume definitions, overriding the default from your locale. @item UNITSFILE @cindex UNITSFILE environment variable @cindex environment variable, UNITSFILE Specifies the units data file to use (instead of the default). You can only specify a single units data file using this environment variable. If units data files are given using the @samp{-f} option, the file specified by @env{UNITSFILE} will be not be loaded unless the @option{-f} option is given with the empty string (@samp{units@tie{}-f@tie{}""}). @end table @node Unicode Support @chapter Unicode Support @cindex Unicode support @cindex UTF-8 @cindex @samp{!utf8} @cindex command, @samp{!utf8} @cindex @samp{!endutf8} @cindex command, @samp{!endutf8} The standard units data file is in Unicode, using UTF-8 encoding. Most definitions use only ASCII characters (i.e., code points U+0000 through U+007F); definitions using non-ASCII characters appear in blocks beginning with @samp{!utf8} and ending with @samp{!endutf8}. When @command{units} starts, it checks the locale to determine the character set. If @command{units} is compiled with Unicode support and if the character set is UTF-8, @command{units} reads the UTF-8 definitions; otherwise these definitions are ignored. When Unicode support is active, @command{units} will check every line of all of the units data files for invalid or non-printing UTF-8 sequences; if such sequences occur, @command{units} ignores the entire line. In addition to checking validity, @command{units} determines the display width of non-ASCII characters to ensure proper positioning of the pointer in some error messages and to align columns for the @samp{search} and @samp{?} commands. At present, @command{units} does not support Unicode under Microsoft Windows. The UTF-16 and UTF-32 encodings are not supported on any systems. If definitions that contain non-ASCII characters are added to a units data file, those definitions should be enclosed within @samp{!utf8} @dots{} @samp{!endutf8} to ensure that they are only loaded when Unicode support is available. As usual, the @samp{!} must appear as the first character on the line. As discussed in @ref{Units Data Files}, it's usually best to put such definitions in supplemental data files linked by an @samp{!include} command or in a personal units data file. When Unicode support is not active, @command{units} makes no assumptions about character encoding, except that characters in the range 00--7F hexadecimal correspond to ASCII encoding. Non-ASCII characters are simply sequences of bytes, and have no special meanings; for definitions in supplementary units data files, you can use any encoding consistent with this assumption. For example, if you wish to use non-ASCII characters in definitions when running @command{units} under Windows, you can use a character set such as Windows ``ANSI'' (code page 1252 in the US and Western Europe). You can even use UTF-8, though some messages may be improperly aligned, and @command{units} will not detect invalid UTF-8 sequences. If you use UTF-8 encoding when Unicode support is not active, you should place any definitions with non-ASCII characters @emph{outside} @samp{!utf8} @dots{} @samp{!endutf8} blocks---otherwise, they will be ignored. Typeset material other than code examples usually uses the Unicode minus (U+2212) rather than the ASCII hyphen-minus operator (U+002D) used in @command{units}; the figure dash (U+2012) and en dash (U+2013) are also occasionally used. To allow such material to be copied and pasted for interactive use or in units data files, @command{units} converts these characters to U+002D before further processing. Because of this, none of these characters can appear in unit names. @node Readline Support @chapter Readline Support @cindex @command{readline}, use with @command{units} If the @command{readline} package has been compiled in, then when @command{units} is used interactively, numerous command line editing features are available. To check if your version of @command{units} includes @command{readline}, invoke the program with the @option{--version} option. For complete information about @command{readline}, consult the documentation for the @command{readline} package. Without any configuration, @command{units} will allow editing in the style of emacs. Of particular use with @command{units} are the completion commands. @cindex @samp{?} for unit completion with @command{readline} @cindex unit completion using @samp{?} (@command{readline} only) @cindex completion, unit, using @samp{?} (@command{readline} only) If you type a few characters and then hit @key{ESC} followed by @kbd{?} then @command{units} will display a list of all the units that start with the characters typed. For example, if you type @kbd{metr} and then request completion, you will see something like this: @cindex unit name completion @example @group You have: metr metre metriccup metrichorsepower metrictenth metretes metricfifth metricounce metricton metriccarat metricgrain metricquart metricyarncount You have: metr @end group @end example @noindent If there is a unique way to complete a unitname, you can hit the @key{TAB} key and @command{units} will provide the rest of the unit name. If @command{units} beeps, it means that there is no unique completion. Pressing the @key{TAB} key a second time will print the list of all completions. @node Currency @chapter Updating Currency Exchange Rates @cindex currency, updating @cindex exchange rates, updating The units program includes currency exchange rates and prices for some precious metals in the database. Of course, these values change over time, sometimes very rapidly, and @command{units} cannot provide real time values. To update the exchange rates run the @command{units_cur}, which rewrites the files containing the currency rates, typically @file{/usr/local/share/units/currency.units}. This program must be run with suitable permissions to write the file. To keep the rates updated automatically, it could be run by a cron job on a Unix-like system, or a similar scheduling program on a different system. Currency exchange rates are taken from Time Genie (@uref{http://www.timegenie.com}) and precious metals pricing from Packetizer (@uref{www.packetizer.com}). These sites update once per day, so there is no benefit in running the update script more often than daily. You can run @command{units_cur} with a filename specified on the command line and it will write the data to that file. If you give @samp{-} for the file it will write to standard output. @node Database Syntax @chapter Database Command Syntax @cindex database syntax summary @cindex syntax of units database @cindex commands in units database @table @t @item @var{unit} @var{definition} Define a regular unit. @item @var{prefix}- @var{definition} Define a prefix. @item @var{funcname}(@var{var}) units=[@var{in-units},@var{out-units}] domain=[@var{x1},@var{x2}] range=[@var{y1},@var{y2}] @var{definition(var)} ; @var{inverse(funcname)} Define a nonlinear unit or unit function. The three optional keywords @command{units=}, @command{range=} and @command{domain=} can appear in any order. The definition of the inverse is optional. @item @var{tabname}[@var{out-units}] @var{pair-list} Define a piecewise linear unit. The pair list gives the points on the table listed in ascending order. @item !endlocale End a block of definitions beginning with @samp{!locale} @item !endutf8 End a block of definitions begun with @samp{!utf8} @item !endvar End a block of definitions begun with @samp{!var} or @samp{!varnot} @item !include @var{file} Include the specified file. @item !locale @var{value} Load the following definitions only of the locale is set to @var{value}. @item !message @var{text} Display @var{text} when the database is read unless the quiet option (@option{-q}) is enabled. @item !set @var{variable} @var{value} Sets the environment variable, @var{variable}, to the specified value @emph{only if} it is not already set. @item !unitlist @var{alias} @var{definition} Define a unit list alias. @item !utf8 Load the following definitions only if @command{units} is running with UTF-8 enabled. @item !var @var{variable} @var{value-list} Load the following definitions only if the environment variable, @var{variable} is set to one of the values listed on the space separated value list. If @var{variable} is not set then @command{units} prints an error message and ignores the following definitions. @item !varnot @var{variable} @var{value-list} Load the following definitions only if the environment variable, @var{variable} is @var{not} set to one of the values listed on the space separated value list. If @var{variable} is not set then @command{units} prints an error message and ignores the following definitions. @end table @node GNU Free Documentation License @chapter GNU Free Documentation License @include fdl-1.3.texi @node Index @unnumbered Index @printindex cp @bye @c man .SH FILES @c man @DATAFILE@ \(em the standard units data file @c man .SH AUTHOR units-2.02/texi2man0000711000175000017500000002725512156244702013540 0ustar adrianadrian#!/usr/bin/perl # $Id: $ # Written by Adrian Mariano, additional features by Eric Backus. A few # additional features by Jeff Conrad to give better formatting with # troff. # Script to translate a texinfo file into an nroff/troff manual page. # last revision: 2 June 2013 Jeff Conrad $version="1.01p"; $html=0; $example=0; $ignore=0; $tex=0; $doman=0; $title=0; $diditem=0; $justdidlp=1; $noman=0; $manprefix=""; $args=($#ARGV < 0) ? "stdin" : "@ARGV"; printf(".\\\"Do not edit this file. It was created from %s\n", $args); printf(".\\\"using texi2man version %s on %s", $version, `date`); while(<>) { # use font CW in tables if (/\@c man\s+l\s/) { s/\@c man //; s/l/lfCWp-1/; print; next; } if (s/\@c man //) { print; if (/\.TH/) { add_extensions(); } next; } if (/\@c noman/) { $noman=1; next; } if (/\@c end noman/) { $noman=0; next; } if ($noman) { next; } if (/\@c ifman\s*(.*)/) { $doman=1; $manprefix = $1; next; } if (/\@c end ifman/) { $doman=0; $manprefix = ""; next; } if (/^\\input/) { next; } if (/^\*/) { next; } if (/^START-INFO-DIR-ENTRY/) { next; } if (/^END-INFO-DIR-ENTRY/) { next; } if (/\@titlepage/) { $title=1; next; } if (/\@end titlepage/) { $title=0; next; } if (/\@tex/) { $tex=1; next; } if (/\@end tex/) { $tex=0; next; } if (/\@ignore/) { $ignore=1; next; } if (/\@end ignore/) { $ignore=0; next; } if (/\@ifhtml/) { $html=1; next; } if (/\@end ifhtml/) { $html=0; next; } if (!$doman && ($ignore || $html || $title || $tex)) { next; } if (/\@codequoteundirected/) { next; } s/\@\*$/\n\.br/g; s/^\@\*/.br/g; s/\@\*$/\n.br/g; s/\@tie\{}/\@no_break\{}/g; s/\@ / /g; s/\@w\{}/\@no_break\{}/g; # ellipsis, defined in extensions s/\@dots\{}/\\*(El/g; s/\@cite\{([^}]*)}/\@in_sgl_quotes\{$1}/g; s/\@url\{([^}]*)}/\@in_sgl_quotes\{$1}/g; s/\@email\{([^}]*)}/\@in_sgl_quotes\{$1}/g; s/\@dfn\{([^}]*)}/\@in_italics\{$1}/g; s/\@emph\{([^}]*)}/\@in_italics\{$1}/g; s/\@i\{([^}]*)}/\@in_italics\{$1}/g; s/\@r\{([^}]*)}/\@in_roman\{$1}/g; s/\@var\{([^}]*)}/\@in_italics\{$1}/g; s/\@b\{([^}]*)}/\@in_bold\{$1}/g; s/\@strong\{([^}]*)}/\@in_bold\{$1}/g; # remove trailing comma from xref because man won't include the page number s/\@xref\{([^}]*)},/\@xref\{$1}/g; s/\@xref\{([^}]*)}/See \@in_italics\{$1}/g; s/\@ref\{([^}]*)}/\@ref\{$1}/g; s/\@ref\{([^}]*)}/\@in_italics\{$1}/g; s/\@pxref\{([^}]*)}/see \@in_italics\{$1}/g; s/\@uref\{([^}]*)}/\@in_roman\{$1}/g; if (/\@chapter.*\@command/) { s/\@command\{([^}]*)}/\@in_italics\{$1}/g; } # show in constant-width font s/\@code\{([^}]*)}/\@constwid\{$1}/g; s/\@command\{([^}]*)}/\@constwid\{$1}/g; s/\@env\{([^}]*)}/\@constwid\{$1}/g; # show in constant-width oblique font s/\@kbd\{([^}]*)}/\@constwidI\{$1}/g; # show in constant-width font with single quotes s/\@file\{([^}]*)}/\@constwidQ\{$1}/g; s/\@option\{([^}]*)}/\@constwidQ\{$1}/g; # Pass ASCII double quotes to .CQ encoded as two double quotes # disallow single quotes here because groff converts them to # typographical closing quotes. # This substitution works only in very limited circumstances, and # needs extension to handle the general case of ASCII quotes in # sample text s/\@samp\{([^}]*)["']{2,2}}/\@samp\{$1""""}/g; s/\@samp\{(.*\@(tie|no_break)\{})["']{2,2}}/\@samp\{$1""""}/g; s/\@samp\{([^}]*)}/\@constwidQ\{$1}/g; s/\@sc\{([^}]*)}/\@to_upper\{$1}/g; s/\@key\{([^}]*)}/\@in_italics\{$1}/g; s/\@footnote\{([^}]*)}/\@in_square_br\{$1}/g; s/\@math\{([^}]*)}/\@no_decoration\{$1}/g; s/\@w\{([^}]*)}/\@no_decoration\{$1}/g; s/\@minus\{}/\\-/g; s/\@copyright\{}/\\(co/g; s/\@noindent//; s/\@\{/{/g; s/\@}/}/g; s/\@\@/@/g; s/---/\\(em/g; s/\@in_sgl_quotes\{([^}]+)}/`$1'/g; s/\@in_dbl_quotes\{([^}]+)}/\"$1\"/g; s/\@in_italics\{([^}]+)}/\\fI$1\\fP/g; s/\@in_roman\{([^}]+)}/\\fR$1\\fP/g; s/\@in_bold\{([^}]+)}/\\fB$1\\fP/g; s/\@to_upper\{([^}]*)}/\U$1\E/g; s/\@no_decoration\{([^}]*)}/$1/g; s/\@no_break\{}/\\ /g; s/\@[ ]/ /g; s/\@in_angle_br\{([^}]*)}/<$1>/g; s/\@in_square_br\{([^}]*)}/[$1]/g; # set up to use CW, CI, and CQ macros # put every instance on a new line # ensure that prepended and appended macros go on separate lines # separate concatenated commands with spaces s/([}])(\@constwid[IQ]*)/$1 $2/g; s/(\@constwid[IQ]*\{[^}]+})(\@)/$1 $2/g; # space before -> newline s/\s+(\S*\@constwid[IQ]*\{[^}]+}\S*)/\n$1/g; # space after -> newline s/(\S*\@constwid[IQ]*\{[^}]+}\S*)\s+/$1\n/g; if (/(\S*)\@constwidI\{([^}]+)}(\S*)/) { $_ = CW_macro("$_", '@constwidI', ".CI"); } if (/(\S*)\@constwidQ\{([^}]+)}(\S*)/) { $_ = CW_macro("$_", '@constwidQ', ".CQ"); } if (/(\S*)\@constwid\{([^}]+)}(\S*)/) { $_ = CW_macro("$_", '@constwid', ".CW"); } # handle backslash character in sample s/(\.C[IQW]\s+\S+\s+)"\\"/$1"\\e"/g; s/(\.C[IQW]\s+)"\\"/$1"\\e"/g; # some versions of n/troff don't have \(en, so use \- # don't replace double hyphens in C[IQW] macros; assume true en # dashes will be closed up to previous word s/([^" ]+)--/$1\\-/g; s/\@value\{([^\s]+)}/$value{$1}/eg; if (/\@set\s+([^\s]+)\s+(.*)$/) { $value{$1} = $2; next; } if (/\@clear\s+([^\s]+)\s+(.*)$/) { delete $value{$1}; next; } # works only for @item and @itemx as used in units(1) if (/\@itemx (.*)/) { $samp = $1; # add hair space to visually separate the hyphens in roman type $samp =~ s/--/-\\^-/; $samp =~ s/-([[:alnum:]])/-\\^$1/; if (!$diditem) { printf(".TP\n.BR \"$samp\""); } else { printf(" \", \" \"$samp\""); } $diditem=1; next; } elsif ($diditem) { printf("\n"); $diditem=0; } if (/\@item (.*)/) { $samp = $1; # add hair space to visually separate the hyphens in roman type $samp =~ s/--/-\\^-/; $samp =~ s/-([[:alnum:]])/-\\^$1/; printf("%s.TP\n%s.BR \"$samp\"", $manprefix, $manprefix); $diditem=1; next; } if (s/\@chapter (.*)/.SH \U$1\E/) { # restore proper case on font switches s/\\FR/\\fR/g; s/\\FI/\\f(BI/g; # chapter headings (SH in man) are bold s/\\FP/\\fP/g; printf("%s%s", $manprefix, $_); $justdidlp=1; next; } if (s/\@section (.*)/$1/) { printf("%s.SS %s", $manprefix, $_); next; } # FIXME? why do we need $manprefix for these? # input/output example macros if (/\@example/) { printf("%s.ES\n", $manprefix); $example=1; next; } if (/\@end example/) { printf("%s.EE\n", $manprefix); $example=0; $justdidlp=0; next; } if (/\@smallexample/) { printf("%s.ES S\n", $manprefix); $example=1; next; } if (/\@end smallexample/) { printf("%s.EE\n", $manprefix); $example=0; $justdidlp=0; next; } # no CW font if (/\@display/) { printf("%s.DS\n", $manprefix, $manprefix); $example=1; next; } if (/\@end display/) { printf("%s.DE\n", $manprefix, $manprefix); $example=0; next; } # no CW font, no indent if (/\@format/) { printf("%s.nf\n", $manprefix); $example=1; next; } if (/\@end format/) { printf("%s.fi\n", $manprefix); $example=0; next; } if ($example) { s/\\\s*$/\\e\n/ }; if (!$example && /^\s*$/ && !$doman) { if ($justdidlp) { next; } printf(".PP\n"); $justdidlp=1; next; } if (/^\@/) { next; } printf("%s%s", $manprefix, $_); if (!$doman) { $justdidlp=0; } } # Extensions to legacy man macro package. groff loads the man macro file # after the call of TH, so these definitions must likewise follow that # call of TH if they are overwrite any groff extensions with the same # names that might be added in the future. sub add_extensions { # ensure that ASCII circumflex U+005E (^) is not remapped with groff printf(".\\\"\n"); printf(".\\\" ensure that ASCII circumflex U+005E (^) is not remapped with groff\n"); printf(".if \\n(.g .tr ^\\(ha\n"); # ellipsis: space periods with troff but not with nroff printf(".\\\" ellipsis: space periods with troff but not with nroff\n"); printf(".if n .ds El \\&...\n"); printf(".if t .ds El \\&.\\ .\\ .\n"); # constant-width font printf(".\\\"\n"); printf(".\\\" Extensions to man macros\n"); printf(".\\\"\n"); printf(".\\\" Constant-width font\n"); printf(".de CW\n"); printf(".hy 0\n"); # just single quotes with nroff printf(".if n \\{\\\n"); printf(".ie \\\\n(.\$>2 \\&\\\\\$1'\\\\\$2'\\\\\$3\n"); printf(".el \\&'\\\\\$1'\\\\\$2\n"); printf(".\\}\n"); # constant-width font with troff printf(".if t \\{\\\n"); printf(".ie \\\\n(.\$>2 \\&\\\\\$1\\f(CW\\\\\$2\\fR\\\\\$3\n"); printf(".el \\&\\f(CW\\\\\$1\\fR\\\\\$2\n"); printf(".\\}\n"); printf(".hy 14\n"); printf("..\n"); # constant-width oblique font printf(".\\\" Constant-width oblique font\n"); printf(".de CI\n"); printf(".hy 0\n"); # single quotes with nroff printf(".if n \\{\\\n"); printf(".ie \\\\n(.\$>2 \\&\\\\\$1'\\fI\\\\\$2\\fR'\\\\\$3\n"); printf(".el \\&'\\fI\\\\\$1\\fR'\\\\\$2\n"); printf(".\\}\n"); # constant-width oblique font with troff printf(".if t \\{\\\n"); printf(".ie \\\\n(.\$>2 \\&\\\\\$1\\f(CI\\\\\$2\\fR\\\\\$3\n"); printf(".el \\&\\f(CI\\\\\$1\\fR\\\\\$2\n"); printf(".\\}\n"); printf(".hy 14\n"); printf("..\n"); # constant-width font with quotes with troff printf(".\\\" Constant-width font with quotes\n"); printf(".de CQ\n"); printf(".hy 0\n"); # just single quotes with nroff printf(".if n \\{\\\n"); printf(".ie \\\\n(.\$>2 \\&\\\\\$1'\\\\\$2'\\\\\$3\n"); printf(".el \\&'\\\\\$1'\\\\\$2\n"); printf(".\\}\n"); # constant-width font with troff printf(".if t \\{\\\n"); # quotes passed as literal text encoded as \(fm # make it a double quote because groff converts ` and ' to opening and # closing quotes printf(".ie \\\\n(.\$>2 \\&\\\\\$1`\\f(CW\\\\\$2\\fR'\\\\\$3\n"); printf(".el \\&`\\f(CW\\\\\$1\\fR'\\\\\$2\n"); printf(".\\}\n"); printf(".hy 14\n"); printf("..\n"); # Display Start--indent, no fill printf(".\\\" Display start\n"); printf(".de DS\n"); printf(".hy 0\n"); printf(".if t .in +4n\n"); printf(".if n .in +3n\n"); printf(".nf\n"); printf("..\n"); # Display End printf(".\\\" Display end\n"); printf(".de DE\n"); printf(".fi\n"); printf(".in\n"); printf(".hy 14\n"); printf("..\n"); # Example Start--like display, but with font CW printf(".\\\" Example start\n"); printf(".de ES\n"); # call before size or font change to get consistent indent printf(".DS\n"); # CW font with troff; optionally reduce size printf(".if t \\{\\\n"); printf(".if '\\\\\$1'S' \\{\\\n"); printf(".nr Ex 1\n"); printf(".ps -1\n"); printf(".\\}\n"); printf(".el .nr Ex 0\n"); printf(".nr mE \\\\n(.f\n"); printf(".ft CW\n"); printf(".\\}\n"); printf("..\n"); # Example End printf(".\\\" Example end\n"); printf(".de EE\n"); # restore font and size with troff printf(".if t \\{\\\n"); printf(".ft \\\\n(mE\n"); printf(".if \\\\n(Ex=1 .ps\n"); printf(".\\}\n"); printf(".DE\n"); printf("..\n"); } # convert texinfo commands to .C[IQW] macros sub CW_macro { my $line = shift; my $from = shift; my $to = shift; # prepended and appended punctuation $line =~ s/(\S+)$from\{([^}]+)}(\S+)/$to $1 "$2" $3/g; # prepended punctuation $line =~ s/(\S+)$from\{([^}]+)}/$to $1 "$2" ""/g; # appended punctuation $line =~ s/$from\{([^}]+)}(\S+)/$to "$1" $2/g; # just the argument $line =~ s/$from\{([^}]+)}/$to "$1"/g; return $line; } units-2.02/NEWS0000600000175000017500000001654212161022133012543 0ustar adrianadrianGNU units NEWS - User visible changes. Copyright (C) 1996, 1997, 1999-2007, 2010-2013 Free Software Foundation, Inc. Version 2.02 * Added support for %a and %A output formats (hexadecimal floating point), and eliminated the restriction on the number of displayed digits when specifying an output format with the --output-format (-o) option. Improved error handling for formats specified with --output-format. * Added --digits (-d) to specify the number of digits to display. Giving '--digits max' (-dmax) will use the full available precision. * Added support for various Unicode minus sign symbols. Units now treats the figure dash (U+2012), the en dash (U+2013), and the minus (U+2212) as identical to the ASCII hyphen/minus symbol (U+002D). * The !message command in units data files has been fixed so it does not produce output when the --quiet option is given. * Improved error handling when unit names end with numbers without a '_'. * Removed six unicode entries from definition.units that were flagged as invalid under MacOS. * Modified units_cur to work with XML format as the txt format disappeared. * Corrected error in definition of the nat. * Improved manual. Version 2.01 - 24 October 2012 (bug fix release) * Fixed error in electronmass * New definition for au * Fixed DESTDIR support for installation * Changed configure script for success with Solaris * Small changes to manual Version 2.00 - 6 June 2012 General changes: * Unit lists provide conversion to sums of units (e.g. feet and inches). * Added --round (-r) and --show-factor (-S) options for use with unit lists. * Added unit lists aliases (e.g. time, usvol). * A python script, units_cur, can update currency data. * Units now flushes its output so you can talk to it with a pipe. * Units now works in UTF-8 if the system supports it. * Added --locale (-l) option to set the locale. * English units such as the gallon are defined in all locales, with US definitions by default except in the en_BG locale. You can force the desired definition (Great Britain or US) by setting the environment variable UNITS_ENGLISH to GB or US. * Revised and extended the documentation, with more examples. * Added locale mapping to address Windows locale names. * Updated and revised units database, including UTF-8 definitions and the 2010 CODATA. * Fixed parsing bug for "1..2" or "1.2.3". These now give an error. * Unit names can end with a number in the form of a subscript that starts with a '_', as in 'X_3'. * Units now performs error checking on the printf format specified with the --output-format (-o) option. Changes for units definition files: * Changed location and names of unit database, splitting off currency Files are /usr/local/share/units/{definitions,currency}.units and the personal units file is $HOME/.units instead of $HOME/units.dat. (Under windows personal unit file is unitdef.units.) * Personal units filename can be changed with MYUNITSFILE environment variable. * Prefixes can be defined in any order: it is no longer necessary to define longer ones before shorter ones. * New definitions replace previous ones. Personal units file is read after the system file rather than before. * Changed syntax for function definitions. Instead of [in-unit,out-unit] you must now write units=[in-unit,out-unit]. Use 'units -c' to find places in your personal data files that need to be updated. * Add optional domain and range to function definitions with syntax domain=[min,max] and range=[min,max]. Either min or max can be omitted to signal infinity. * Unit list aliases can be defined with !unitlist command. * Added !var and !varnot and !endvar to include definitions based on environment variable settings. * Added !set to set environment variables (if they aren't already set). * Added !message to display a message * Data files are in UTF-8, with !utf8 and !endutf8 commands to mark definitions that require UTF-8 support. * Improved error handling when reading units.dat. Version 1.88 - 15 Feb 2010 * Updated units.dat * Fixed bug involving readline version 4.2 Version 1.87 - 25 Sep 2007 * Units reads ~/.units.dat if it exists before reading the standard units database. * Added support for ** as an exponent operator. * Type 'search text' to list units that contain 'text' in their name. * Precedence of '*' changed to match precedence of '/'. (Multiplication by juxtaposition retains a higher precedence than '/'.) The --oldstar option selects the old precedence and --newstar forces the new precedence. Version 1.86 - 10 Nov 2006 * Added --one-line (-1) option which causes the program to print only one line of output. * Added --compact option which causes the program to print only the conversion factors and a newline on output. * Added build support for DESTDIR. * Made minor changes that allow the program to be compiled into a library and linked with other programs. * Fixed bug that caused bus error on Intel Mac. Version 1.85 - 20 May 2005 * The '-' character by default indicates subtraction. Multiplication can be obtained by '*' or ' '. The --product (-p) option selects the old behavior where '-' acts as a multiplication operator. The --minus (-m) option forces the default behavior where '-' indicates subtraction. * Handing of radian and steradian changed. These units are now treated as conformable with 1 for units conversions. This is indicated by the "!dimensionless" tag in units.dat. * Unit files can be included using !include. * Multiple -f (--file) options can appear on the command line; giving a null filename (-f '') causes the default units database to be loaded. * Added -t (--terse) option. * Improved error checking for units.dat. * Corrected and extended units.dat. Version 1.81 - October 28, 2002 * Fixed missing definition of "au" in units.dat. Version 1.80 - June 16, 2002 * Rewritten parser supports - () for grouping - noninteger powers of numbers (e.g. 3^0.25) - functions with dimensionless arguments (log, ln, log2, sin, cos, tan, exp) - roots of units: sqrt(unit), cuberoot(unit), and higher roots as unit^(1|4) * Functions can be defined in units.dat, and conversion to a function performed by specifying the function name alone as the "want" item. * Unit conversions can be specified as tables with linear interpolation. * The "help" command summarizes operations, and "help unit" browses the units database at the definition of the specified unit. * Specifying "?" for the want unit gets a list of all conformable units. * Support for locales added. * Units file extended and corrected. Version 1.55 - July 30, 1999 * Added over 600 new units and corrected errors in the units data file. * Minor bug fix affecting unit name completion. Version 1.54 - July 15, 1997 * Switched order of prefix and plural handling (plurals are now done first) * Added reciprocal unit conversion and --strict (-s) option * Fixed some erroneous unit definitions, added currency codes and other units * Improved Makefile (exec-prefix, program-transform-name supported) * Bug fixes Version 1.53 - Jan 13, 1997 * Added units containing ISO 8859-1 characters * Bug fixes Version 1.52 - Dec 18, 1996 * Sums of conformable units * Printing of unit definitions * Unitname completion with readline * Added --verbose (-v) option and moved --version to -V * Improved portability, old style C support, improved Makefile units-2.02/units.txt0000664000175000017500000026315212167664611014005 0ustar adrianadrianUNITS(1) UNITS(1) NAME units — unit conversion and calculation program SYNOPSIS 'units' [options] [from-unit [to-unit]] DESCRIPTION The 'units' program converts quantities expressed in various systems of measurement to their equivalents in other systems of measurement. Like many similar programs, it can handle multiplicative scale changes. It can also handle nonlinear conversions such as Fahrenheit to Celsius. See the examples below. The program can also perform conversions from and to sums of units, such as converting between meters and feet plus inches. Beyond simple unit conversions, 'units' can be used as a general-pur‐ pose scientific calculator that keeps track of units in its calcula‐ tions. You can form arbitrary complex mathematical expressions of dimensions including sums, products, quotients, powers, and even roots of dimensions. Thus you can ensure accuracy and dimensional consis‐ tency when working with long expressions that involve many different units that may combine in complex ways. The units are defined in an external data file. You can use the exten‐ sive data file that comes with this program, or you can provide your own data file to suit your needs. You can also use your own data file to supplement the standard data file. Basic operation is simple: you enter the units that you want to convert from and the units that you want to convert to. You can use the pro‐ gram interactively with prompts, or you can use it from the command line. You can change the default behavior of 'units' with various options given on the command line. See Invoking Units for a description of the available options. INTERACTING WITH UNITS To invoke units for interactive use, type 'units' at your shell prompt. The program will print something like this: Currency exchange rates from 04/23/12 2516 units, 85 prefixes, 65 nonlinear units You have: At the 'You have:' prompt, type the quantity and units that you are converting from. For example, if you want to convert ten meters to feet, type '10 meters'. Next, 'units' will print 'You want:'. You should type the units you want to convert to. To convert to feet, you would type 'feet'. If the 'readline' library was compiled in then the tab key can be used to complete unit names. See Readline Support for more information about 'readline'. To quit the program press Ctrl-C or Ctrl-D under Unix. Under Windows press Ctrl-Z. The answer will be displayed in two ways. The first line of output, which is marked with a '*' to indicate multiplication, gives the result of the conversion you have asked for. The second line of output, which is marked with a '/' to indicate division, gives the inverse of the conversion factor. If you convert 10 meters to feet, 'units' will print * 32.808399 / 0.03048 which tells you that 10 meters equals about 32.8 feet. The second num‐ ber gives the conversion in the opposite direction. In this case, it tells you that 1 foot is equal to about 0.03 dekameters since the dekameter is 10 meters. It also tells you that 1/32.8 is about 0.03. The 'units' program prints the inverse because sometimes it is a more convenient number. In the example above, for example, the inverse value is an exact conversion: a foot is exactly 0.03048 dekameters. But the number given the other direction is inexact. If you convert grains to pounds, you will see the following: You have: grains You want: pounds * 0.00014285714 / 7000 From the second line of the output you can immediately see that a grain is equal to a seven thousandth of a pound. This is not so obvi‐ ous from the first line of the output. If you find the output format confusing, try using the '--verbose' option: You have: grain You want: aeginamina grain = 0.00010416667 aeginamina grain = (1 / 9600) aeginamina If you request a conversion between units that measure reciprocal dimensions, then 'units' will display the conversion results with an extra note indicating that reciprocal conversion has been done: You have: 6 ohms You want: siemens reciprocal conversion * 0.16666667 / 6 Reciprocal conversion can be suppressed by using the '--strict' option. As usual, use the '--verbose' option to get more comprehensible output: You have: tex You want: typp reciprocal conversion 1 / tex = 496.05465 typp 1 / tex = (1 / 0.0020159069) typp You have: 20 mph You want: sec/mile reciprocal conversion 1 / 20 mph = 180 sec/mile 1 / 20 mph = (1 / 0.0055555556) sec/mile If you enter incompatible unit types, the 'units' program will print a message indicating that the units are not conformable and it will dis‐ play the reduced form for each unit: You have: ergs/hour You want: fathoms kg^2 / day conformability error 2.7777778e-11 kg m^2 / sec^3 2.1166667e-05 kg^2 m / sec If you only want to find the reduced form or definition of a unit, simply press Enter at the 'You want:' prompt. Here is an example: You have: jansky You want: Definition: fluxunit = 1e-26 W/m^2 Hz = 1e-26 kg / s^2 The output from 'units' indicates that the jansky is defined to be equal to a fluxunit which in turn is defined to be a certain combina‐ tion of watts, meters, and hertz. The fully reduced (and in this case somewhat more cryptic) form appears on the far right. Some named units are treated as dimensionless in some situations. These units include the radian and steradian. These units will be treated as equal to 1 in units conversions. Power is equal to torque times angular velocity. This conversion can only be performed if the radian is dimensionless. You have: (14 ft lbf) (12 radians/sec) You want: watts * 227.77742 / 0.0043902509 Named dimensionless units are not treated as dimensionless in other contexts. They cannot be used as exponents so for example, 'meter^radian' is not allowed. If you want a list of options you can type '?' at the 'You want:' prompt. The program will display a list of named units that are con‐ formable with the unit that you entered at the 'You have:' prompt above. Conformable unit combinations will not appear on this list. Typing 'help' at either prompt displays a short help message. You can also type 'help' followed by a unit name. This will invoke a pager on the units data base at the point where that unit is defined. You can read the definition and comments that may give more details or histori‐ cal information about the unit. (You can generally quit out of the page by pressing 'q'.) Typing 'search' text will display a list of all of the units whose names contain text as a substring along with their definitions. This may help in the case where you aren't sure of the right unit name. USING UNITS NON-INTERACTIVELY The 'units' program can perform units conversions non-interactively from the command line. To do this, type the command, type the original unit expression, and type the new units you want. If a units expres‐ sion contains non-alphanumeric characters, you may need to protect it from interpretation by the shell using single or double quote charac‐ ters. If you type units "2 liters" quarts then 'units' will print * 2.1133764 / 0.47317647 and then exit. The output tells you that 2 liters is about 2.1 quarts, or alternatively that a quart is about 0.47 times 2 liters. If the conversion is successful, then 'units' will return success (zero) to the calling environment. If you enter non-conformable units then 'units' will print a message giving the reduced form of each unit and it will return failure (nonzero) to the calling environment. When you invoke 'units' with only one argument, it will print out the definition of the specified unit. It will return failure if the unit is not defined and success if the unit is defined. UNIT DEFINITIONS The conversion information is read from a units data file that is called 'definitions.units' and is usually located in the '/usr/share/units' directory. If you invoke 'units' with the '-V' option, it will print the location of this file. The default file includes definitions for all familiar units, abbreviations and metric prefixes. It also includes many obscure or archaic units. Many constants of nature are defined, including these: pi ratio of circumference to diameter c speed of light e charge on an electron force acceleration of gravity mole Avogadro's number water pressure per unit height of water Hg pressure per unit height of mercury au astronomical unit k Boltzman's constant mu0 permeability of vacuum epsilon0 permittivity of vacuum G Gravitational constant mach speed of sound The standard data file includes atomic masses for all of the elements and numerous other constants. Also included are the densities of vari‐ ous ingredients used in baking so that '2 cups flour_sifted' can be converted to 'grams'. This is not an exhaustive list. Consult the units data file to see the complete list, or to see the definitions that are used. The 'pound' is a unit of mass. To get force, multiply by the force conversion unit 'force' or use the shorthand 'lbf'. (Note that 'g' is already taken as the standard abbreviation for the gram.) The unit 'ounce' is also a unit of mass. The fluid ounce is 'fluidounce' or 'floz'. British capacity units that differ from their US counterparts, such as the British Imperial gallon, are prefixed with 'br'. Currency is prefixed with its country name: 'belgiumfranc', 'britainpound'. When searching for a unit, if the specified string does not appear exactly as a unit name, then the 'units' program will try to remove a trailing 's', 'es'. Next units will replace a trailing 'ies' with 'y'. If that fails, 'units' will check for a prefix. The database includes all of the standard metric prefixes. Only one prefix is permitted per unit, so 'micromicrofarad' will fail. However, prefixes can appear alone with no unit following them, so 'micro*microfarad' will work, as will 'micro microfarad'. To find out which units and prefixes are available, read the standard units data file, which is extensively annotated. English Customary Units English customary units differ in various ways in different regions. In Britain a complex system of volume measurements featured different gallons for different materials such as a wine gallon and ale gallon that different by twenty percent. This complexity was swept away in 1824 by a reform that created an entirely new gallon, the British Impe‐ rial gallon defined as the volume occupied by ten pounds of water. Meanwhile in the USA the gallon is derived from the 1707 Winchester wine gallon, which is 231 cubic inches. These gallons differ by about twenty percent. By default if 'units' runs in the 'en_GB' locale you will get the British volume measures. If it runs in the 'en_US' locale you will get the US volume measures. In other locales the default val‐ ues are the US definitions. If you wish to force different definitions then set the environment variable 'UNITS_ENGLISH' to either 'US' or 'GB' to set the desired definitions independent of the locale. Before 1959, the value of a yard (and other units of measure defined in terms of it) differed slightly among English-speaking countries. In 1959, Australia, Canada, New Zealand, the United Kingdom, the United States, and South Africa adopted the Canadian value of 1 yard = 0.9144 m (exactly), which was approximately halfway between the values used by the UK and the US; it had the additional advantage of making 1 inch = 2.54 cm (exactly). This new standard was termed the Interna‐ tional Yard. Australia, Canada, and the UK then defined all customary lengths in terms of the International Yard (Australia did not define the furlong or rod); because many US land surveys were in terms of the pre-1959 units, the US continued to define customary surveyors' units (furlong, chain, rod, and link) in terms of the previous value for the foot, which was termed the US survey foot. The US defined a US survey mile as 5280 US survey feet, and defined a statute mile as a US survey mile. The US values for these units differ from the international val‐ ues by about 2 ppm. The 'units' program uses the international values for these units; the US values can be obtained by using either the 'US' or the 'survey' pre‐ fix. In either case, the simple familiar relationships among the units are maintained, e.g., 1 'furlong' = 660 'ft', and 1 'USfurlong' = 660 'USft', though the metric equivalents differ slightly between the two cases. The 'US' prefix or the 'survey' prefix can also be used to obtain the US survey mile and the value of the US yard prior to 1959, e.g., 'USmile' or 'surveymile' (but not 'USsurveymile'). To get the US value of the statute mile, use either 'USstatutemile' or 'USmile'. Except for distances that extend over hundreds of miles (such as in the US State Plane Coordinate System), the differences in the miles are usually insignificant: You have: 100 surveymile - 100 mile You want: inch * 12.672025 / 0.078913984 The pre-1959 UK values for these units can be obtained with the prefix 'UK'. In the US, the acre is officially defined in terms of the US survey foot, but 'units' uses a definition based on the international foot. If you want the official US acre use 'USacre' and similarly use 'USacrefoot' for the official US version of that unit. The difference between these units is about 4 parts per million. UNIT EXPRESSIONS Operators You can enter more complicated units by combining units with operations such as powers, multiplication, division, addition, subtraction, and parentheses for grouping. You can use the customary symbols for these operators when 'units' is invoked with its default options. Addition‐ ally, 'units' supports some extensions, including high priority multi‐ plication using a space, and a high priority numerical division operator ('|') that can simplify some expressions. Powers of units can be specified using the '^' character as shown in the following example, or by simple concatenation of a unit and its exponent: 'cm3' is equivalent to 'cm^3'; if the exponent is more than one digit, the '^' is required. An exponent like '2^3^2' is evaluated right to left as usual. The '^' operator has the second highest precedence. You can also use '**' as an exponent operator. You have: cm^3 You want: gallons * 0.00026417205 / 3785.4118 You have: arabicfoot * arabictradepound * force You want: ft lbf * 0.7296 / 1.370614 You multiply units using a space or an asterisk ('*'). The example above shows both forms. You can divide units using the slash ('/') or with 'per'. You have: furlongs per fortnight You want: m/s * 0.00016630986 / 6012.8727 When a unit includes a prefix, exponent operators apply to the combina‐ tion, so 'centimeter^3' gives cubic centimeters. If you separate the prefix from the unit with any multiplication operator, such as 'centi meter^3', then the prefix is treated as a separate unit, so the expo‐ nent does not apply. The second example would be a hundredth of a cubic meter, not a centimeter. Multiplication using a space has a higher precedence than division using a slash and is evaluated left to right; in effect, the first '/' character marks the beginning of the denominator of a unit expression. This makes it simple to enter a quotient with several terms in the denominator: 'W / m^2 Hz'. If you multiply with '*' then you must group the terms in the denominator with parentheses: 'W / (m^2 * Hz)'. The higher precedence of the space operator may not always be advanta‐ geous. For example, 'm/s s/day' is equivalent to 'm / s s day' and has dimensions of length per time cubed. Similarly, '1/2 meter' refers to a unit of reciprocal length equivalent to 0.5/meter, perhaps not what you would intend if you entered that expression. The '*' operator is convenient for multiplying a sequence of quotients. With the '*' oper‐ ator, the example above becomes 'm/s * s/day', which is equivalent to 'm/day'. Similarly, you could write '1/2 * meter' to get half a meter. Alternatively, parentheses can be used for grouping: you could write '(1/2) meter' to get half a meter. See Complicated Unit Expressions for an illustration of the various options. The 'units' program supports another option for numerical fractions. You can indicate division of numbers with the vertical bar ('|'), so if you wanted half a meter you could write '1|2 meter'. This operator has the highest precedence, so you can write the square root of two thirds '2|3^1|2'. You cannot use the vertical bar to indicate division of non-numerical units (e.g., 'm|s' results in an error message). You have: 1|2 inch You want: cm * 1.27 / 0.78740157 You can use parentheses for grouping: You have: (1/2) kg / (kg/meter) You want: league * 0.00010356166 / 9656.0833 Sums and Differences of Units You may sometimes want to add values of different units that are out‐ side the SI. You may also wish to use 'units' as a calculator that keeps track of units. Sums of conformable units are written with the '+' character, and differences with the '-' character. You have: 2 hours + 23 minutes + 32 seconds You want: seconds * 8612 / 0.00011611705 You have: 12 ft + 3 in You want: cm * 373.38 / 0.0026782366 You have: 2 btu + 450 ft lbf You want: btu * 2.5782804 / 0.38785542 The expressions that are added or subtracted must reduce to identical expressions in primitive units, or an error message will be displayed: You have: 12 printerspoint - 4 heredium ^ Illegal sum of non-conformable units As usual, the precedence for '+' and '-' is lower than that of the other operators. A fractional quantity such as 2 1/2 cups can be given as '(2+1|2) cups'; the parentheses are necessary because multiplication has higher precedence than addition. If you omit the parentheses, 'units' attempts to add '2' and '1|2 cups', and you get an error mes‐ sage: You have: 2+1|2 cups ^ Illegal sum or difference of non-conformable units The expression could also be correctly written as '(2+1/2) cups'. If you write '2 1|2 cups' the space is interpreted as multiplication so the result is the same as '1 cup'. The '+' and '-' characters sometimes appears in exponents like '3.43e+8'. This leads to an ambiguity in an expression like '3e+2 yC'. The unit 'e' is a small unit of charge, so this can be regarded as equivalent to '(3e+2) yC' or '(3 e)+(2 yC)'. This ambiguity is resolved by always interpreting '+' and '-' as part of an exponent if possible. Numbers as Units For 'units', numbers are just another kind of unit. They can appear as many times as you like and in any order in a unit expression. For example, to find the volume of a box that is 2 ft by 3 ft by 12 ft in steres, you could do the following: You have: 2 ft 3 ft 12 ft You want: stere * 2.038813 / 0.49048148 You have: $ 5 / yard You want: cents / inch * 13.888889 / 0.072 And the second example shows how the dollar sign in the units conver‐ sion can precede the five. Be careful: 'units' will interpret '$5' with no space as equivalent to 'dollar^5'. Built-in Functions Several built-in functions are provided: 'sin', 'cos', 'tan', 'ln', 'log', 'log2', 'exp', 'acos', 'atan' and 'asin'. The 'sin', 'cos', and 'tan' functions require either a dimensionless argument or an argument with dimensions of angle. You have: sin(30 degrees) You want: Definition: 0.5 You have: sin(pi/2) You want: Definition: 1 You have: sin(3 kg) ^ Unit not dimensionless The other functions on the list require dimensionless arguments. The inverse trigonometric functions return arguments with dimensions of angle. If you wish to take roots of units, you may use the 'sqrt' or 'cuberoot' functions. These functions require that the argument have the appropriate root. You can obtain higher roots by using fractional exponents: You have: sqrt(acre) You want: feet * 208.71074 / 0.0047913202 You have: (400 W/m^2 / stefanboltzmann)^(1/4) You have: Definition: 289.80882 K You have: cuberoot(hectare) ^ Unit not a root Complicated Unit Expressions The 'units' program is especially helpful in ensuring accuracy and dimensional consistency when converting lengthy unit expressions. For example, one form of the Darcy-Weisbach fluid-flow equation is Delta P = (8 / pi)^2 (rho fLQ^2) / d^5, where Delta P is the pressure drop, rho is the mass density, f is the (dimensionless) friction factor, L is the length of the pipe, Q is the volumetric flow rate, and d is the pipe diameter. It might be desired to have the equation in the form Delta P = A1 rho fLQ^2 / d^5 that accepted the user's normal units; for typical units used in the US, the required conversion could be something like You have: (8/pi^2)(lbm/ft^3)ft(ft^3/s)^2(1/in^5) You want: psi * 43.533969 / 0.022970568 The parentheses allow individual terms in the expression to be entered naturally, as they might be read from the formula. Alternatively, the multiplication could be done with the '*' rather than a space; then parentheses are needed only around 'ft^3/s' because of its exponent: You have: 8/pi^2 * lbm/ft^3 * ft * (ft^3/s)^2 /in^5 You want: psi * 43.533969 / 0.022970568 Without parentheses, and using spaces for multiplication, the previous conversion would need to be entered as You have: 8 lb ft ft^3 ft^3 / pi^2 ft^3 s^2 in^5 You want: psi * 43.533969 / 0.022970568 Backwards Compatibility: '*' and '-' The original 'units' assigned multiplication a higher precedence than division using the slash. This differs from the usual precedence rules, which give multiplication and division equal prece‐ dence, and can be confusing for people who think of units as a calcula‐ tor. The star operator ('*') included in this 'units' program has, by default, the same precedence as division, and hence follows the usual precedence rules. For backwards compatibility you can invoke 'units' with the '--oldstar' option. Then '*' has a higher precedence than division, and the same precedence as multiplication using the space. Historically, the hyphen ('-') has been used in technical publications to indicate products of units, and the original 'units' program treated it as a multiplication operator. Because 'units' provides several other ways to obtain unit products, and because '-' is a subtraction operator in general algebraic expressions, 'units' treats the binary '-' as a subtraction operator by default. For backwards compatibility use the '--product' option, which causes 'units' to treat the binary '-' operator as a product operator. When '-' is a multiplication oper‐ ator it has the same precedence as multiplication with a space, giving it a higher precedence than division. When '-' is used as a unary operator it negates its operand. Regard‐ less of the 'units' options, if '-' appears after '(' or after '+' then it will act as a negation operator. So you can always compute 20 degrees minus 12 minutes by entering '20 degrees + -12 arcmin'. You must use this construction when you define new units because you cannot know what options will be in force when your definition is processed. NONLINEAR UNIT CONVERSIONS Nonlinear units are represented using functional notation. They make possible nonlinear unit conversions such as temperature. Temperature Conversions Conversions between temperatures are different from linear conversions between temperature increments—see the example below. The absolute temperature conversions are handled by units starting with 'temp', and you must use functional notation. The temperature-increment conver‐ sions are done using units starting with 'deg' and they do not require functional notation. You have: tempF(45) You want: tempC 7.2222222 You have: 45 degF You want: degC * 25 / 0.04 Think of 'tempF(x)' not as a function but as a notation that indicates that x should have units of 'tempF' attached to it. See Defining Non‐ linear Units. The first conversion shows that if it's 45 degrees Fahrenheit outside, it's 7.2 degrees Celsius. The second conversion indicates that a change of 45 degrees Fahrenheit corresponds to a change of 25 degrees Celsius. The conversion from 'tempF(x)' is to absolute temperature, so that You have: tempF(45) You want: degR * 504.67 / 0.0019814929 gives the same result as You have: tempF(45) You want: tempR * 504.67 / 0.0019814929 But if you convert 'tempF(x)' to 'degC', the output is probably not what you expect: You have: tempF(45) You want: degC * 280.37222 / 0.0035666871 The result is the temperature in K, because 'degC' is defined as 'K', the Kelvin. For consistent results, use the 'tempX' units when convert‐ ing to a temperature rather than converting a temperature increment. Other Nonlinear Units Some other examples of nonlinear units are numerous different ring sizes and wire gauges, the grit sizes used for abrasives, the decibel scale, shoe size, scales for the density of sugar (e.g. baume). The standard data file also supplies units for computing the area of a cir‐ cle and the volume of a sphere. See the standard units data file for more details. Wire gauges with multiple zeroes are signified using negative numbers where two zeroes is '-1'. Alternatively, you can use the synonyms 'g00', 'g000', and so on that are defined in the standard units data file. You have: wiregauge(11) You want: inches * 0.090742002 / 11.020255 You have: brwiregauge(g00) You want: inches * 0.348 / 2.8735632 You have: 1 mm You want: wiregauge 18.201919 You have: grit_P(600) You want: grit_ansicoated 342.76923 The last example shows the conversion from P graded sand paper, which is the European standard and may be marked ``P600'' on the back, to the USA standard. You can compute the area of a circle using the nonlinear unit, 'circlearea'. You can also do this using the circularinch or cir‐ cleinch. The next example shows two ways to compute the area of a cir‐ cle with a five inch radius and one way to compute the volume of a sphere with a radius of one meter. You have: circlearea(5 in) You want: in2 * 78.539816 / 0.012732395 You have: 10^2 circleinch You want: in2 * 78.539816 / 0.012732395 You have: spherevol(meter) You want: ft3 * 147.92573 / 0.0067601492 UNIT LISTS: CONVERSION TO SUMS OF UNITS Outside of the SI, it is sometimes desirable to convert a single unit to a sum of units—for example, feet to feet plus inches. The conver‐ sion from sums of units was described in Sums and Differences of Units, and is a simple matter of adding the units with the '+' sign: You have: 12 ft + 3 in + 3|8 in You want: ft * 12.28125 / 0.081424936 Although you can similarly write a sum of units to convert to, the result will not be the conversion to the units in the sum, but rather the conversion to the particular sum that you have entered: You have: 12.28125 ft You want: ft + in + 1|8 in * 11.228571 / 0.089058524 The unit expression given at the 'You want:' prompt is equivalent to asking for conversion to multiples of '1 ft + 1 in + 1|8 in', which is 1.09375 ft, so the conversion in the previous example is equivalent to You have: 12.28125 ft You want: 1.09375 ft * 11.228571 / 0.089058524 In converting to a sum of units like miles, feet and inches, you typi‐ cally want the largest integral value for the first unit, followed by the largest integral value for the next, and the remainder converted to the last unit. You can do this conversion easily with 'units' using a special syntax for lists of units. You must list the desired units in order from largest to smallest, separated by the semicolon (';') char‐ acter: You have: 12.28125 ft You want: ft;in;1|8 in 12 ft + 3 in + 3|8 in The conversion always gives integer coefficients on the units in the list, except possibly the last unit when the conversion is not exact: You have: 12.28126 ft You want: ft;in;1|8 in 12 ft + 3 in + 3.00096 * 1|8 in The order in which you list the units is important: You have: 3 kg You want: oz;lb 105 oz + 0.051367866 lb You have: 3 kg You want: lb;oz 6 lb + 9.8218858 oz Listing ounces before pounds produces a technically correct result, but not a very useful one. You must list the units in descending order of size in order to get the most useful result. Ending a unit list with the separator ';' has the same effect as repeating the last unit on the list, so 'ft;in;1|8 in;' is equivalent to 'ft;in;1|8 in;1|8 in'. With the example above, this gives You have: 12.28126 ft You want: ft;in;1|8 in; 12 ft + 3 in + 3|8 in + 0.00096 * 1|8 in in effect separating the integer and fractional parts of the coeffi‐ cient for the last unit. If you instead prefer to round the last coef‐ ficient to an integer you can do this with the '--round' ('-r') option. With the previous example, the result is You have: 12.28126 ft You want: ft;in;1|8 in 12 ft + 3 in + 3|8 in (rounded down to nearest 1|8 in) When you use the '-r' option, repeating the last unit on the list has no effect (e.g., 'ft;in;1|8 in;1|8 in' is equivalent to 'ft;in;1|8 in'), and hence neither does ending a list with a ';'. With a single unit and the '-r' option, a terminal ';' does have an effect: it causes 'units' to treat the single unit as a list and produce a rounded value for the single unit. Without the extra ';', the '-r' option has no effect on single unit conversions. This example shows the output using the '-r' option: You have: 12.28126 ft You want: in * 147.37512 / 0.0067854058 You have: 12.28126 ft You want: in; 147 in (rounded down to nearest in) Each unit that appears in the list must be conformable with the first unit on the list, and of course the listed units must also be conform‐ able with the You have unit that you enter. You have: meter You want: ft;kg ^ conformability error ft = 0.3048 m kg = 1 kg You have: meter You want: lb;oz conformability error 1 m 0.45359237 kg In the first case, 'units' reports the disagreement between units appearing on the list. In the second case, 'units' reports disagree‐ ment between the unit you entered and the desired conversion. This conformability error is based on the first unit on the unit list. Other common candidates for conversion to sums of units are angles and time: You have: 23.437754 deg You want; deg;arcmin;arcsec 23 deg + 26 arcmin + 15.9144 arcsec You have: 7.2319 hr You want: hr;min;sec 7 hr + 13 min + 54.84 sec In North America, recipes for cooking typically measure ingredients by volume, and use units that are not always convenient multiples of each other. Suppose that you have a recipe for 6 and you wish to make a portion for 1. If the recipe calls for 2 1/2 cups of an ingredient, you might wish to know the measurements in terms of measuring devices you have available, you could use 'units' and enter You have: (2+1|2) cup / 6 You want: cup;1|2 cup;1|3 cup;1|4 cup;tbsp;tsp;1|2 tsp;1|4 tsp 1|3 cup + 1 tbsp + 1 tsp By default, if a unit in a list begins with fraction of the form 1|x and its multiplier is an integer, the fraction is given as the product of the multiplier and the numerator; for example, You have: 12.28125 ft You want: ft;in;1|8 in; 12 ft + 3 in + 3|8 in In many cases, such as the example above, this is what is wanted, but sometimes it is not. For example, a cooking recipe for 6 might call for 5 1/4 cup of an ingredient, but you want a portion for 2, and your 1-cup measure is not available; you might try You have: (5+1|4) cup / 3 You want: 1|2 cup;1|3 cup;1|4 cup 3|2 cup + 1|4 cup This result might be fine for a baker who has a 1 1/2-cup measure (and recognizes the equivalence), but it may not be as useful to someone with more limited set of measures, who does want to do additional cal‐ culations, and only wants to know ``How many 1/2-cup measures to I need to add?'' After all, that's what was actually asked. With the '--show-factor' option, the factor will not be combined with a unity numerator, so that you get You have: (5+1|4) cup / 3 You want: 1|2 cup;1|3 cup;1|4 cup 3 * 1|2 cup + 1|4 cup A user-specified fractional unit with a numerator other than 1 is never overridden, however—if a unit list specifies '3|4 cup;1|2 cup', a result equivalent to 1 1/2 cups will always be shown as '2 * 3|4 cup' whether or not the '--show-factor' option is given. Some applications for unit lists may be less obvious. Suppose that you have a postal scale and wish to ensure that it's accurate at 1 oz, but have only metric calibration weights. You might try You have: 1 oz You want: 100 g;50 g; 20 g;10 g;5 g;2 g;1 g; 20 g + 5 g + 2 g + 1 g + 0.34952312 * 1 g You might then place one each of the 20 g, 5 g, 2 g, and 1 g weights on the scale and hope that it indicates close to You have: 20 g + 5 g + 2 g + 1 g You want: oz; 0.98767093 oz Appending ';' to 'oz' forces a one-line display that includes the unit; here the integer part of the result is zero, so it is not displayed. A unit list such as cup;1|2 cup;1|3 cup;1|4 cup;tbsp;tsp;1|2 tsp;1|4 tsp can be tedious to enter. The 'units' program provides shorthand names for some common combinations: hms hours, minutes, seconds dms angle: degrees, minutes, seconds time years, days, hours, minutes and seconds usvol US cooking volume: cups and smaller Using these shorthands, or unit list aliases, you can do the following conversions: You have: anomalisticyear You want: time 1 year + 25 min + 3.4653216 sec You have: 1|6 cup You want: usvol 2 tbsp + 2 tsp You cannot combine a unit list alias with other units: it must appear alone at the 'You want:' prompt. You can display the definition of a unit list alias by entering it at the 'You have:' prompt: You have: dms Definition: unit list, deg;arcmin;arcsec When you specify compact output with '--compact', '--terse' or '-t' and perform conversion to a unit list, 'units' lists the conversion factors for each unit in the list, separated by semicolons. You have: year You want: day;min;sec 365;348;45.974678 Unlike the case of regular output, zeros are included in this output list: You have: liter You want: cup;1|2 cup;1|4 cup;tbsp 4;0;0;3.6280454 INVOKING UNITS You invoke 'units' like this: units [options] [from-unit [to-unit]] If the from-unit and to-unit are omitted, the program will use interac‐ tive prompts to determine which conversions to perform. See Interac‐ tive Use. If both from-unit and to-unit are given, 'units' will print the result of that single conversion and then exit. If only from-unit appears on the command line, 'units' will display the definition of that unit and exit. Units specified on the command line may need to be quoted to protect them from shell interpretation and to group them into two arguments. See Command Line Use. The default behavior of 'units' can be changed by various options given on the command line. In most cases, the options may be given in either short form (a single '-' followed by a single character) or long form ('--' followed by a word or hyphen-separated words). Short-form options are cryptic but require less typing; long-form options require more typing but are more explanatory and may be more mnemonic. With long-form options you need only enter sufficient characters to uniquely identify the option to the program. For example, '--out %f' works, but '--o %f' fails because 'units' has other long options beginning with 'o'. However, '--q' works because '--quiet' is the only long option beginning with 'q'. Some options require arguments to specify a value (e.g., '-d 12' or '--digits 12'). Short-form options that do not take arguments may be concatenated (e.g., '-erS' is equivalent to '-e -r -S'); the last option in such a list may be one that takes an argument (e.g., '-ed 12'). With short-form options, the space between an option and its argument is optional (e.g., '-d12' is equivalent to '-d 12'). Long-form options may not be concatenated, and the space between a long-form option and its argument is required. Short-form and long- form options may be intermixed on the command line. Options may be given in any order, but when incompatible options (e.g., '--output- format' and '--exponential') are given in combination, behavior is con‐ trolled by the last option given. For example, '-o%.12f -e' gives exponential format with the default eight significant digits). The following options are available: -c, --check Check that all units and prefixes defined in the units data file reduce to primitive units. Print a list of all units that can‐ not be reduced. Also display some other diagnostics about sus‐ picious definitions in the units data file. Only definitions active in the current locale are checked. You should always run 'units' with this option after modifying a units data file. --check-verbose, --verbose-check Like the '--check' option, this option prints a list of units that cannot be reduced. But to help find unit definitions that cause endless loops, it lists the units as they are checked. If 'units' hangs, then the last unit to be printed has a bad defi‐ nition. Only definitions active in the current locale are checked. -d ndigits, --digits ndigits Set the number of significant digits in the output to the value specified (which must be greater than zero). For example, '-d 12' sets the number of significant digits to 12. With expo‐ nential output 'units' displays one digit to the left of the decimal point and eleven digits to the right of the decimal point. On most systems, the maximum number of internally mean‐ ingful digits is 15; if you specify a greater number than your system's maximum, 'units' will print a warning and set the num‐ ber to the largest meaningful value. To directly set the maxi‐ mum value, give an argument of 'max' (e.g., '-d max'). Be aware, of course, that ``significant'' here refers only to the display of numbers; if results depend on physical constants not known to this precision, the physically meaningful precision may be less than that shown. The '--digits' option conflicts with the '--output-format' option. -e, --exponential Set the numeric output format to exponential (i.e., scientific notation), like that used in the Unix 'units' program. The default precision is eight significant digits (seven digits to the right of the decimal point); this can be changed with the '--digits' option. The '--exponential' option conflicts with the '--output-format' option. -o format, --output-format format This option affords complete control over the numeric output format using the specified format. The format is a single float‐ ing point numeric format for the 'printf()' function in the C programming language. All compilers support the format types 'g' and 'G' to specify significant digits, 'e' and 'E' for sci‐ entific notation, and 'f' for fixed-point decimal. The ISO C99 standard introduced the 'F' type for fixed-point decimal and the 'a' and 'A' types for hexadecimal floating point; these types are allowed with compilers that support them. The default for‐ mat is '%.8g'; for greater precision, you could specify '-o %.15g'. See Numeric Output Format and the documentation for 'printf()' for more detailed descriptions of the format specifi‐ cation. The '--output-format' option affords the greatest con‐ trol of the output appearance, but requires at least rudimentary knowledge of the 'printf()' format syntax. If you don't want to bother with the 'printf()' syntax, you can specify greater pre‐ cision more simply with the '--digits' option or select exponen‐ tial format with '--exponential'. The '--output-format' option is incompatible with the '--exponential' and '--digits' options. -f filename, --file filename Instruct 'units' to load the units file 'filename'. You can specify up to 25 units files on the command line. When you use this option, 'units' will load only the files you list on the command line; it will not load the standard file or your per‐ sonal units file unless you explicitly list them. If filename is the empty string ('-f ""'), the default units file (or that specified by 'UNITSFILE') will be loaded in addition to any oth‐ ers specified with '-f'. -h, --help Print out a summary of the options for 'units'. -m, --minus Causes '-' to be interpreted as a subtraction operator. This is the default behavior. -p, --product Causes '-' to be interpreted as a multiplication operator when it has two operands. It will act as a negation operator when it has only one operand: '(-3)'. By default '-' is treated as a subtraction operator. --oldstar Causes '*' to have the old-style precedence, higher than the precedence of division so that '1/2*3' will equal '1/6'. --newstar Forces '*' to have the new (default) precedence that follows the usual rules of algebra: the precedence of '*' is the same as the precedence of '/', so that '1/2*3' will equal '3/2'. --compact Give compact output featuring only the conversion factor. This turns off the '--verbose' option. -q, --quiet, --silent Suppress prompting of the user for units and the display of sta‐ tistics about the number of units loaded. -n, --nolists Disable conversion to unit lists. -r, --round When converting to a combination of units given by a unit list, round the value of the last unit in the list to the nearest integer. -S, --show-factor When converting to a combination of units specified in a list, always show a non-unity factor before a unit that begins with a fraction with a unity denominator. By default, if the unit in a list begins with fraction of the form 1|x and its multiplier is an integer other than 1, the fraction is given as the product of the multiplier and the numerator (e.g., '3|8 in' rather than '3 * 1|8 in'). In some cases, this is not what is wanted; for example, the results for a cooking recipe might show '3 * 1|2 cup' as '3|2 cup'. With the '--show-factor' option, a result equivalent to 1.5 cups will display as '3 * 1|2 cup' rather than '3|2 cup'. A user-specified fractional unit with a numerator other than 1 is never overridden, however—if a unit list speci‐ fies '3|4 cup;1|2 cup', a result equivalent to 1 1/2 cups will always be shown as '2 * 3|4 cup' whether or not the '--show- factor' option is given. -s, --strict Suppress conversion of units to their reciprocal units. For example, 'units' will normally convert hertz to seconds because these units are reciprocals of each other. The strict option requires that units be strictly conformable to perform a conver‐ sion, and will give an error if you attempt to convert hertz to seconds. -1, --one-line Give only one line of output (the forward conversion). Do not print the reverse conversion. If a reciprocal conversion is performed then 'units' will still print the ``reciprocal conver‐ sion'' line. -t, --terse Give terse output when converting units. This option can be used when calling 'units' from another program so that the out‐ put is easy to parse. This option has the combined effect of these options: '--strict' '--quiet' '--one-line' '--compact'. -v, --verbose Give slightly more verbose output when converting units. When combined with the '-c' option this gives the same effect as '--check-verbose'. -V, --version Print program version number, tell whether the 'readline' library has been included, and give the location of the default units data file. -l locale, --locale locale Force a specified locale such as 'en_GB' to get British defini‐ tions by default. This overrides the locale determined from system settings or environment variables. See Locale for a description of locale format. ADDING YOUR OWN DEFINITIONS Units Data Files The units and prefixes that 'units' can convert are defined in the units data file, typically '/usr/share/units/definitions.units'. Although you can extend or modify this data file if you have appropri‐ ate user privileges, it's usually better to put extensions in separate files so that the definitions will be preserved when you update 'units'. You can include additional data files in the units database using the '!include' command in the standard units data file. For example !include /usr/local/share/units/local.units might be appropriate for a site-wide supplemental data file. The loca‐ tion of the '!include' statement in the standard units data file is important; later definitions replace earlier ones, so any definitions in an included file will override definitions before the '!include' statement in the standard units data file. With normal invocation, no warning is given about redefinitions; to ensure that you don't have an unintended redefinition, run 'units -c' after making changes to any units data file. If you want to add your own units in addition to or in place of stan‐ dard or site-wide supplemental units data files, you can include them in the '.units' file in your home directory. If this file exists it is read after the standard units data file, so that any definitions in this file will replace definitions of the same units in the standard data file or in files included from the standard data file. This file will not be read if any units files are specified on the command line. (Under Windows the personal units file is named 'unitdef.units'.) The 'units' program first tries to determine your home directory from the 'HOME' environment variable. On systems running Microsoft Windows, if 'HOME' does not exist, 'units' attempts to find your home directory from 'HOMEDRIVE' and 'HOMEPATH'. Running 'units -V' will display the location and name of your personal units file. You can specify an arbitrary file as your personal units data file with the 'MYUNITSFILE' environment variable; if this variable exists, its value is used without searching your home directory. Defining New Units and Prefixes A unit is specified on a single line by giving its name and an equiva‐ lence. Comments start with a '#' character, which can appear anywhere in a line. The backslash character ('\') acts as a continuation char‐ acter if it appears as the last character on a line, making it possible to spread definitions out over several lines if desired. A file can be included by giving the command '!include' followed by the file's name. The '!' must be the first character on the line. The file will be sought in the same directory as the parent file unless you give a full path. The name of the file to be included cannot contain the comment character '#'. Unit names must not contain any of the operator characters '+', '-', '*', '/', '|', '^', ';', '~', the comment character '#', or parenthe‐ ses. They cannot begin or end with an underscore ('_'), a comma (',') or a decimal point ('.'). The figure dash (U+2012), typographical minus (`-'; U+2212), and en dash (`-'; U+2013) are converted to the operator '-', so none of these characters can appear in unit names. Names cannot begin with a digit, and if a name ends in a digit other than zero, the digit must be preceded by a string beginning with an underscore, and afterwards consisting only of digits, decimal points, or commas. For example, 'foo_2', 'foo_2,1', or 'foo_3.14' would be valid names but 'foo2' or 'foo_a2' would be invalid. You could define nitrous oxide as N2O nitrogen 2 + oxygen but would need to define nitrogen dioxide as NO_2 nitrogen + oxygen 2 Be careful to define new units in terms of old ones so that a reduction leads to the primitive units, which are marked with '!' characters. Dimensionless units are indicated by using the string '!dimensionless' for the unit definition. When adding new units, be sure to use the '-c' option to check that the new units reduce properly. If you create a loop in the units defini‐ tions, then 'units' will hang when invoked with the '-c' option. You will need to use the '--check-verbose' option, which prints out each unit as it is checked. The program will still hang, but the last unit printed will be the unit that caused the infinite loop. If you define any units that contain '+' characters, carefully check them because the '-c' option will not catch non-conformable sums. Be careful with the '-' operator as well. When used as a binary operator, the '-' character can perform addition or multiplication depending on the options used to invoke 'units'. To ensure consistent behavior use '-' only as a unary negation operator when writing units definitions. To multiply two units leave a space or use the '*' operator with care, recalling that it has two possible precedence values and may require parentheses to ensure consistent behavior. To compute the difference of 'foo' and 'bar' write 'foo+(-bar)' or even 'foo+-bar'. Here is an example of a short data file that defines some basic units: m ! # The meter is a primitive unit sec ! # The second is a primitive unit rad !dimensionless # A dimensionless primitive unit micro- 1e-6 # Define a prefix minute 60 sec # A minute is 60 seconds hour 60 min # An hour is 60 minutes inch 0.0254 m # Inch defined in terms of meters ft 12 inches # The foot defined in terms of inches mile 5280 ft # And the mile A unit that ends with a '-' character is a prefix. If a prefix defini‐ tion contains any '/' characters, be sure they are protected by paren‐ theses. If you define 'half- 1/2' then 'halfmeter' would be equivalent to '1 / (2 meter)'. Defining Nonlinear Units Some unit conversions of interest are nonlinear; for example, tempera‐ ture conversions between the Fahrenheit and Celsius scales cannot be done by simply multiplying by conversion factors. When you give a linear unit definition such as 'inch 2.54 cm' you are providing information that 'units' uses to convert values in inches into primitive units of meters. For nonlinear units, you give a func‐ tional definition that provides the same information. Nonlinear units are represented using a functional notation. It is best to regard this notation not as a function call but as a way of adding units to a number, much the same way that writing a linear unit name after a number adds units to that number. Internally, nonlinear units are defined by a pair of functions that convert to and from lin‐ ear units in the data file, so that an eventual conversion to primitive units is possible. Here is an example nonlinear unit definition: tempF(x) units=[1;K] (x+(-32)) degF + stdtemp ; \ (tempF+(-stdtemp))/degF + 32 A nonlinear unit definition comprises a unit name, a dummy parameter name, two functions, and two corresponding units. The functions tell 'units' how to convert to and from the new unit. In order to produce valid results, the arguments of these functions need to have the cor‐ rect dimensions. To facilitate error checking, you may optionally indicate units for these arguments. The definition begins with the unit name followed immediately (with no spaces) by a '(' character. In parentheses is the name of the parame‐ ter. Next is an optional specification of the units required by the functions in this definition. In the example above, the 'tempF' func‐ tion requires an input argument conformable with '1'. For normal non‐ linear units definitions the forward function will always take a dimen‐ sionless argument. The inverse function requires an input argument conformable with 'K'. In general the inverse function will need units that match the quantity measured by your nonlinear unit. The purpose of the expression in brackets to enable 'units' to perform error check‐ ing on function arguments, and also to assign units to range and domain specifications, which are described later. Next the function definitions appear. In the example above, the 'tempF' function is defined by tempF(x) = (x+(-32)) degF + stdtemp This gives a rule for converting 'x' in the units 'tempF' to linear units of absolute temperature, which makes it possible to convert from tempF to other units. In order to make conversions to Fahrenheit possible, you must give a rule for the inverse conversions. The inverse will be 'x(tempF)' and its definition appears after a ';' character. In our example, the inverse is x(tempF) = (tempF+(-stdtemp))/degF + 32 This inverse definition takes an absolute temperature as its argument and converts it to the Fahrenheit temperature. The inverse can be omitted by leaving out the ';' character, but then conversions to the unit will be impossible. If the inverse is omitted then the '--check' option will display a warning. It is up to you to calculate and enter the correct inverse function to obtain proper conversions. The '--check' option tests the inverse at one point and prints an error if it is not valid there, but this is not a guarantee that your inverse is correct. If you wish to make synonyms for nonlinear units, you still need to define both the forward and inverse functions. Inverse functions can be obtained using the '~' operator. So to create a synonym for 'tempF' you could write fahrenheit(x) units=[1;K] tempF(x); ~tempF(fahrenheit) You may define a function whose range and domain do not cover all of the real numbers. In this case 'units' can handle errors better if you specify an appropriate range and domain. You specify the range and domain as shown below. baume(d) units=[1;g/cm^3] domain=[0,130.5] range=[1,10] \ (145/(145-d)) g/cm^3 ; (baume+-g/cm^3) 145 / baume In this example the domain is specified after the 'domain=' with the endpoints given in brackets. One of the end points can be omitted to get an interval that goes to infinity. So the range could be specified as nonnegative by writing 'range=[0,]'. Both the range and domain are optional and can appear independently and in any order along with the 'units' specification. The values in the range and domain are attached to the units given in the 'units' specification. If you don't specify the units then the parameter inputs are reduced to primitive units for the numeric comparison to the values you give in the range or domain. In this case you should only use 'range' or 'domain' if the endpoints are zero and infinity. Specifying the range and domain allows 'units' to perform better error checking and give more helpful error messages when you invoke nonlinear units conversions outside of their bounds. It also enables the '-c' option to find a point in the domain to use for its point check of your inverse definition. You may occasionally wish to define a function that operates on units. This can be done using a nonlinear unit definition. For example, the definition below provides conversion between radius and the area of a circle. This definition requires a length as input and produces an area as output, as indicated by the 'units=' specification. Specifying the range as the nonnegative numbers can prevent cryptic error mes‐ sages. circlearea(r) units=[m;m^2] range=[0,] pi r^2 ; sqrt(circlearea/pi) Sometimes you may be interested in a piecewise linear unit such as many wire gauges. Piecewise linear units can be defined by specifying con‐ versions to linear units on a list of points. Conversion at other points will be done by linear interpolation. A partial definition of zinc gauge is zincgauge[in] 1 0.002, 10 0.02, 15 0.04, 19 0.06, 23 0.1 In this example, 'zincgauge' is the name of the piecewise linear unit. The definition of such a unit is indicated by the embedded '[' charac‐ ter. After the bracket, you should indicate the units to be attached to the numbers in the table. No spaces can appear before the ']' char‐ acter, so a definition like 'foo[kg meters]' is illegal; instead write 'foo[kg*meters]'. The definition of the unit consists of a list of pairs optionally separated by commas. This list defines a function for converting from the piecewise linear unit to linear units. The first item in each pair is the function argument; the second item is the value of the function at that argument (in the units specified in brackets). In this example, we define 'zincgauge' at five points. For example, we set 'zincgauge(1)' equal to '0.002 in'. Definitions like this may be more readable if written using continuation characters as zincgauge[in] \ 1 0.002 \ 10 0.02 \ 15 0.04 \ 19 0.06 \ 23 0.1 With the preceding definition, the following conversion can be per‐ formed: You have: zincgauge(10) You want: in * 0.02 / 50 You have: .01 inch You want: zincgauge 5 If you define a piecewise linear unit that is not strictly monotonic, then the inverse will not be well defined. If the inverse is requested for such a unit, 'units' will return the smallest inverse. The '--check' option will print a warning if a non-monotonic piecewise lin‐ ear unit is encountered. Defining Unit List Aliases Unit list aliases are treated differently from unit definitions, because they are a data entry shorthand rather than a true definition for a new unit. A unit list alias definition begins with '!unitlist' and includes the alias and the definition; for example, the aliases included in the standard units data file are !unitlist hms hr;min;sec !unitlist time year;day;hr;min;sec !unitlist dms deg;arcmin;arcsec !unitlist ftin ft;in;1|8 in !unitlist usvol cup;3|4 cup;2|3 cup;1|2 cup;1|3 cup;1|4 cup;\ tbsp;tsp;1|2 tsp;1|4 tsp;1|8 tsp Unit list aliases are only for unit lists, so the definition must include a ';'. Unit list aliases can never be combined with units or other unit list aliases, so the definition of 'time' shown above could not have been shortened to 'year;day;hms'. As usual, be sure to run 'units --check' to ensure that the units listed in unit list aliases are conformable. NUMERIC OUTPUT FORMAT By default, 'units' shows results to eight significant digits. You can change this with the '--exponential', '--digits', and '--output-format' options. The first sets an exponential format (i.e., scientific nota‐ tion) like that used in the original Unix 'units' program, the second allows you to specify a different number of significant digits, and the last allows you to control the output appearance using the format for the 'printf()' function in the C programming language. If you only want to change the number of significant digits or specify exponential format type, use the '--digits' and '--exponential' options. The '--output-format' option affords the greatest control of the output appearance, but requires at least rudimentary knowledge of the 'printf()' format syntax. See Invoking Units for descriptions of these options. Format Specification The format specification recognized with the '--output-format' option is a subset of that for 'printf()'. The format specification has the form '%'[flags][width]['.'precision]type; it must begin with '%', and must end with a floating-point type specifier: 'g' or 'G' to specify the number of significant digits, 'e' or 'E' for scientific notation, and 'f' for fixed-point decimal. The ISO C99 standard added the 'F' type for fixed-point decimal and the 'a' and 'A' types for hexadecimal floating point; these types are allowed with compilers that support them. Type length modifiers (e.g., 'L' to indicate a long double) are inapplicable and are not allowed. The default format for 'units' is '%.8g'; for greater precision, you could specify '-o %.15g'. The 'g' and 'G' format types use exponential format whenever the exponent would be less than -4, so the value 0.000013 displays as '1.3e-005'. These types also use exponential notation when the exponent is greater than or equal to the precision, so with the default format, the value 5e7 displays as '50000000' and the value 5e8 displays as '5e+008'. If you prefer fixed-point display, you might specify '-o %.8f'; however, small numbers will display very few significant digits, and values less than 0.5e-8 will show nothing but zeros. The format specification may include one or more optional flags: '+', ' ' (space), '#', '-', or '0' (the digit zero). The digit-grouping flag ''' is allowed with compilers that support it. Flags are followed by an optional value for the minimum field width, and an optional pre‐ cision specification that begins with a period (e.g., '.6'). The field width includes the digits, decimal point, the exponent, thousands sepa‐ rators (with the digit-grouping flag), and the sign if any of these are shown. Flags The '+' flag causes the output to have a sign ('+' or '-'). The space flag ' ' is similar to the '+' flag, except that when the value is pos‐ itive, it is prefixed with a space rather than a plus sign; this flag is ignored if the '+' flag is also given. The '+' or ' ' flag could be useful if conversions might include positive and negative results, and you wanted to align the decimal points in exponential notation. The '#' flag causes the output value to contain a decimal point in all cases; by default, the output contains a decimal point only if there are digits (which can be trailing zeros) to the right of the point. With the 'g' or 'G' types, the '#' flag also prevents the suppression of trailing zeros. The digit-grouping flag ''' shows a thousands sepa‐ rator in digits to the left of the decimal point. This can be useful when displaying large numbers in fixed-point decimal; for example, with the format '%f', You have: mile You want: microfurlong * 8000000.000000 / 0.000000 the magnitude of the first result may not be immediately obvious with‐ out counting the digits to the left of the decimal point. If the thou‐ sands separator is the comma (','), the output with the format '%'f' might be You have: mile You want: microfurlong * 8,000,000.000000 / 0.000000 making the magnitude readily apparent. Unfortunately, few compilers support the digit-grouping flag. With the '-' flag, the output value is left aligned within the speci‐ fied field width. If a field width greater than needed to show the output value is specified, the '0' (zero) flag causes the output value to be left padded with zeros until the specified field width is reached; for example, with the format '%011.6f', You have: troypound You want: grain * 5760.000000 / 0000.000174 The '0' flag has no effect if the '-' (left align) flag is given. Field Width By default, the output value is left aligned and shown with the minimum width necessary for the specified (or default) precision. If a field width greater than this is specified, the value shown is right aligned, and padded on the left with enough spaces to provide the specified field width. A width specification is typically used with fixed-point decimal to have columns of numbers align at the decimal point; this arguably is less useful with 'units' than with long columnar output, but it may nonetheless assist in quickly assessing the relative magni‐ tudes of results. For example, with the format '%12.6f', You have: km You want: in * 39370.078740 / 0.000025 You have: km You want: rod * 198.838782 / 0.005029 You have: km You want: furlong * 4.970970 / 0.201168 Precision The meaning of ``precision'' depends on the format type. With 'g' or 'G', it specifies the number of significant digits (like the '--digits' option); with 'e', 'E', 'f', or 'F', it specifies the maximum number of digits to be shown after the decimal point. With the 'g' and 'G' format types, trailing zeros are suppressed, so the results may sometimes have fewer digits than the specified preci‐ sion (as indicated above, the '#' flag causes trailing zeros to be dis‐ played). The default precision is 6, so '%g' is equivalent to '%.6g', and would show the output to six significant digits. Similarly, '%e' or '%f' would show the output with six digits after the decimal point. The C 'printf()' function allows a precision of arbitrary size, whether or not all of the digits are meaningful. With most compilers, the max‐ imum internal precision with 'units' is 15 decimal digits (or 13 hexa‐ decimal digits). With the '--digits' option, you are limited to the maximum internal precision; with the '--output-format' option, you may specify a precision greater than this, but it may not be meaningful. In some cases, specifying excess precision can result in rounding arti‐ facts. For example, a pound is exactly 7000 grains, but with the for‐ mat '%.18g', the output might be You have: pound You want: grain * 6999.9999999999991 / 0.00014285714285714287 With the format '%.25g' you might get the following: You have: 1/3 You want: Definition: 0.333333333333333314829616256247 In this case the displayed value includes a series of digits that rep‐ resent the underlying binary floating-point approximation to 1/3 but are not meaningful for the desired computation. In general, the result with excess precision is system dependent. The precision affects only the display of numbers; if a result relies on physical constants that are not known to the specified precision, the number of physically meaningful digits may be less than the number of digits shown. See the documentation for 'printf()' for more detailed descriptions of the format specification. The '--output-format' option is incompatible with the '--exponential' or '--digits' options; if the former is given in combination with either of the latter, the format is controlled by the last option given. LOCALIZATION Some units have different values in different locations. The localiza‐ tion feature accommodates this by allowing a units data file to specify definitions that depend on the user's locale. Locale A locale is a subset of a user's environment that indicates the user's language and country, and some attendant preferences, such as the for‐ matting of dates. The 'units' program attempts to determine the locale from the POSIX setlocale function; if this cannot be done, 'units' examines the environment variables 'LC_CTYPE' and 'LANG'. On POSIX systems, a locale is of the form language'_'country, where language is the two-character code from ISO 639-1 and country is the two-character code from ISO 3166-1; language is lower case and country is upper case. For example, the POSIX locale for the United Kingdom is 'en_GB'. On systems running Microsoft Windows, the value returned by setlocale() is different from that on POSIX systems; 'units' attempts to map the Windows value to a POSIX value by means of a table in the file 'locale.map' in the same directory, typically '/usr/local/share/units', as the default units data files. The file includes entries for many combinations of language and country, and can be extended to include other combinations. The 'locale.map' comprises two tab-separated col‐ umns; each entry is of the form Windows-locale POSIX-locale where POSIX-locale is as described above, and Windows-locale typically spells out both the language and country. For example, the entry for the United States is English_United States en_US You can force 'units' to run in a desired locale by using the '-l' option. In order to create unit definitions for a particular locale you begin a block of definitions in a unit datafile with '!locale' followed by a locale name. The '!' must be the first character on the line. The 'units' program reads the following definitions only if the current locale matches. You end the block of localized units with '!endlocale'. Here is an example, which defines the British gallon. !locale en_GB gallon 4.54609 liter !endlocale Additional Localization Sometimes the locale isn't sufficient to determine unit preferences. There could be regional preferences, or a company could have specific preferences. Though probably uncommon, such differences could arise with the choice of English customary units outside of English-speaking countries. To address this, 'units' allows specifying definitions that depend on environment variable settings. The environment variables can be controled based on the current locale, or the user can set them to force a particular group of definitions. A conditional block of definitions in a units data file begins with either '!var' or '!varnot' following by an environment variable name and then a space separated list of values. The leading '!' must appear in the first column of a units data file, and the conditional block is terminated by '!endvar'. Definitions in blocks beginning with '!var' are executed only if the environment variable is exactly equal to one of the listed values. Definitions in blocks beginning with '!varnot' are executed only if the environment variable does not equal any of the list values. The inch has long been a customary measure of length in many places. The word comes from the latin uncia meaning ``one twelfth,'' referring to its relationship with the foot. By the 20th century, the inch was officially defined in English-speaking countries relative to the yard, but until 1959, the yard differed slightly among those countries. In France the customary inch, which was displaced in 1799 by the meter, had a different length based on a french foot. These customary defini‐ tions could be accommodated as follows: !var INCH_UNIT usa yard 3600|3937 m !endvar !var INCH_UNIT canada yard 0.9144 meter !endvar !var INCH_UNIT uk yard 0.91439841 meter !endvar !var INCH_UNIT canada uk usa foot 1|3 yard inch 1|12 foot !endvar !var INCH_UNIT france foot 144|443.296 m inch 1|12 foot line 1|12 inch !endvar !varnot INCH_UNIT usa uk france canada !message Unknown value for INCH_UNIT !endvar When 'units' reads the above definitions it will check the environment variable 'INCH_UNIT' and load only the definitions for the appropriate section. If 'INCH_UNIT' is unset or is not set to one of the four values listed then 'units' will run the last block. In this case that block uses the '!message' command to display a warning message. Alter‐ natively that block could set default values. In order to create default values that are overridden by user settings the data file can use the '!set' command, which sets an environment variable only if it is not already set; these settings are only for the current 'units' invocation and do not persist. So if the example above were preceded by '!set INCH_UNIT france' then this would make 'france' the default value for 'INCH_UNIT'. If the user had set the variable in the environment before invoking 'units', then 'units' would use the user's value. To link these settings to the user's locale you combine the '!set' com‐ mand with the '!locale' command. If you wanted to combine the above example with suitable locales you could do by preceding the above defi‐ nition with the following: !locale en_US !set INCH_UNIT usa !endlocale !locale en_GB !set INCH_UNIT uk !endlocale !locale en_CA !set INCH_UNIT canada !endlocale !locale fr_FR !set INCH_UNIT france !endlocale !set INCH_UNIT france These definitions set the overall default for 'INCH_UNIT' to 'france' and set default values for four locales appropriately. The overall default setting comes last so that it only applies when 'INCH_UNIT' was not set by one of the other commands or by the user. If the variable given after '!var' or '!varnot' is undefined then 'units' prints an error message and ignores the definitions that fol‐ low. Use '!set' to create defaults to prevent this situation from arising. The '-c' option only checks the definitions that are active for the current environment and locale, so when adding new definitions take care to check that all cases give rise to a well defined set of definitions. ENVIRONMENT VARIABLES The 'units' program uses the following environment variables: HOME Specifies the location of your home directory; it is used by 'units' to find a personal units data file '.units'. On systems running Microsoft Windows, 'units' tries to determine your home directory from the 'HOMEDRIVE' and 'HOMEPATH' environment vari‐ ables if 'HOME' does not exist. LC_CTYPE, LANG Checked to determine the locale if 'units' cannot obtain it from the operating system. Sections of the standard units data file are specific to certain locales. MYUNITSFILE Specifies your personal units data file. If this variable exists, 'units' uses its value rather than searching your home directory for '.units'. The personal units file will not be loaded if any data files are given using the '-f' option. PAGER Specifies the pager to use for help and for displaying the con‐ formable units. The help function browses the units database and calls the pager using the '+n'n syntax for specifying a line number. The default pager is 'more'; 'PAGER' can be used to specify alternatives such as 'less', 'pg', 'emacs', or 'vi'. UNITS_ENGLISH Set to either 'US' or 'GB' to choose United States or British volume definitions, overriding the default from your locale. UNITSFILE Specifies the units data file to use (instead of the default). You can only specify a single units data file using this envi‐ ronment variable. If units data files are given using the '-f' option, the file specified by 'UNITSFILE' will be not be loaded unless the '-f' option is given with the empty string ('units -f ""'). UNICODE SUPPORT The standard units data file is in Unicode, using UTF-8 encoding. Most definitions use only ASCII characters (i.e., code points U+0000 through U+007F); definitions using non-ASCII characters appear in blocks begin‐ ning with '!utf8' and ending with '!endutf8'. When 'units' starts, it checks the locale to determine the character set. If 'units' is compiled with Unicode support and if the character set is UTF-8, 'units' reads the UTF-8 definitions; otherwise these def‐ initions are ignored. When Unicode support is active, 'units' will check every line of all of the units data files for invalid or non- printing UTF-8 sequences; if such sequences occur, 'units' ignores the entire line. In addition to checking validity, 'units' determines the display width of non-ASCII characters to ensure proper positioning of the pointer in some error messages and to align columns for the 'search' and '?' commands. At present, 'units' does not support Unicode under Microsoft Windows. The UTF-16 and UTF-32 encodings are not supported on any systems. If definitions that contain non-ASCII characters are added to a units data file, those definitions should be enclosed within '!utf8' ... '!endutf8' to ensure that they are only loaded when Unicode support is available. As usual, the '!' must appear as the first character on the line. As discussed in Units Data Files, it's usually best to put such definitions in supplemental data files linked by an '!include' command or in a personal units data file. When Unicode support is not active, 'units' makes no assumptions about character encoding, except that characters in the range 00-7F hexadeci‐ mal correspond to ASCII encoding. Non-ASCII characters are simply sequences of bytes, and have no special meanings; for definitions in supplementary units data files, you can use any encoding consistent with this assumption. For example, if you wish to use non-ASCII char‐ acters in definitions when running 'units' under Windows, you can use a character set such as Windows ``ANSI'' (code page 1252 in the US and Western Europe). You can even use UTF-8, though some messages may be improperly aligned, and 'units' will not detect invalid UTF-8 sequences. If you use UTF-8 encoding when Unicode support is not active, you should place any definitions with non-ASCII characters out‐ side '!utf8' ... '!endutf8' blocks—otherwise, they will be ignored. Typeset material other than code examples usually uses the Unicode minus (U+2212) rather than the ASCII hyphen-minus operator (U+002D) used in 'units'; the figure dash (U+2012) and en dash (U+2013) are also occasionally used. To allow such material to be copied and pasted for interactive use or in units data files, 'units' converts these charac‐ ters to U+002D before further processing. Because of this, none of these characters can appear in unit names. READLINE SUPPORT If the 'readline' package has been compiled in, then when 'units' is used interactively, numerous command line editing features are avail‐ able. To check if your version of 'units' includes 'readline', invoke the program with the '--version' option. For complete information about 'readline', consult the documentation for the 'readline' package. Without any configuration, 'units' will allow editing in the style of emacs. Of particular use with 'units' are the completion commands. If you type a few characters and then hit ESC followed by '?' then 'units' will display a list of all the units that start with the char‐ acters typed. For example, if you type 'metr' and then request comple‐ tion, you will see something like this: You have: metr metre metriccup metrichorsepower metrictenth metretes metricfifth metricounce metricton metriccarat metricgrain metricquart metricyarncount You have: metr If there is a unique way to complete a unitname, you can hit the TAB key and 'units' will provide the rest of the unit name. If 'units' beeps, it means that there is no unique completion. Pressing the TAB key a second time will print the list of all completions. UPDATING CURRENCY EXCHANGE RATES The units program includes currency exchange rates and prices for some precious metals in the database. Of course, these values change over time, sometimes very rapidly, and 'units' cannot provide real time val‐ ues. To update the exchange rates run the 'units_cur', which rewrites the files containing the currency rates, typically '/usr/local/share/units/currency.units'. This program must be run with suitable permissions to write the file. To keep the rates updated automatically, it could be run by a cron job on a Unix-like system, or a similar scheduling program on a different system. Currency exchange rates are taken from Time Genie (http://www.timegenie.com) and precious metals pricing from Packetizer (www.packetizer.com). These sites update once per day, so there is no benefit in running the update script more often than daily. You can run 'units_cur' with a filename specified on the command line and it will write the data to that file. If you give '-' for the file it will write to standard output. DATABASE COMMAND SYNTAX unit definition Define a regular unit. prefix- definition Define a prefix. funcname(var) units=[in-units,out-units] domain=[x1,x2] range=[y1,y2] definition(var) ; inverse(funcname) Define a nonlinear unit or unit function. The three optional keywords 'units=', 'range=' and 'domain=' can appear in any order. The definition of the inverse is optional. tabname[out-units] pair-list Define a piecewise linear unit. The pair list gives the points on the table listed in ascending order. !endlocale End a block of definitions beginning with '!locale' !endutf8 End a block of definitions begun with '!utf8' !endvar End a block of definitions begun with '!var' or '!varnot' !include file Include the specified file. !locale value Load the following definitions only of the locale is set to value. !message text Display text when the database is read unless the quiet option ('-q') is enabled. !set variable value Sets the environment variable, variable, to the specified value only if it is not already set. !unitlist alias definition Define a unit list alias. !utf8 Load the following definitions only if 'units' is running with UTF-8 enabled. !var variable value-list Load the following definitions only if the environment variable, variable is set to one of the values listed on the space sepa‐ rated value list. If variable is not set then 'units' prints an error message and ignores the following definitions. !varnot variable value-list Load the following definitions only if the environment variable, variable is not set to one of the values listed on the space separated value list. If variable is not set then 'units' prints an error message and ignores the following definitions. GNU FREE DOCUMENTATION LICENSE FILES /usr/local/share/units/definitions.units — the standard units data file AUTHOR 7 June 2013 UNITS(1) units-2.02/INSTALL0000664000175000017500000001705110232761036013114 0ustar adrianadrianBasic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. units-2.02/getopt.h0000664000175000017500000001066112040123025013523 0ustar adrianadrian/* Declarations for getopt. Copyright (C) 1989, 90, 91, 92, 93, 94 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02111 USA. */ #ifdef STRINGS_H # include #else # include #endif #ifndef _GETOPT_H #define _GETOPT_H 1 #ifdef __cplusplus extern "C" { #endif /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ extern char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller and for communication between successive calls to `getopt'. On entry to `getopt', zero means this is the first call; initialize. When `getopt' returns EOF, this is the index of the first of the non-option elements that the caller should itself scan. Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ extern int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ extern int opterr; /* Set to an option character which was unrecognized. */ extern int optopt; /* Describe the long-named options requested by the application. The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector of `struct option' terminated by an element containing a name which is zero. The field `has_arg' is: no_argument (or 0) if the option does not take an argument, required_argument (or 1) if the option requires an argument, optional_argument (or 2) if the option takes an optional argument. If the field `flag' is not NULL, it points to a variable that is set to the value given in the field `val' when the option is found, but left unchanged if the option is not found. To have a long-named option do something other than set an `int' to a compiled-in constant, such as set a value from `optarg', set the option's `flag' field to zero and its `val' field to a nonzero value (the equivalent single-letter option character, if there is one). For long options that have a zero `flag' field, `getopt' returns the contents of the `val' field. */ struct option { #if defined (__STDC__) && __STDC__ const char *name; #else char *name; #endif /* has_arg can't be an enum because some compilers complain about type mismatches in all the code that assumes it is an int. */ int has_arg; int *flag; int val; }; /* Names for the values of the `has_arg' field of `struct option'. */ #define no_argument 0 #define required_argument 1 #define optional_argument 2 #if defined (__STDC__) && __STDC__ #ifdef __GNU_LIBRARY__ /* Many other libraries have conflicting prototypes for getopt, with differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ extern int getopt (int argc, char *const *argv, const char *shortopts); #else /* not __GNU_LIBRARY__ */ extern int getopt (); #endif /* __GNU_LIBRARY__ */ extern int getopt_long (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); extern int getopt_long_only (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind); /* Internal only. Users should not call this directly. */ extern int _getopt_internal (int argc, char *const *argv, const char *shortopts, const struct option *longopts, int *longind, int long_only); #else /* not __STDC__ */ extern int getopt (); extern int getopt_long (); extern int getopt_long_only (); extern int _getopt_internal (); #endif /* __STDC__ */ #ifdef __cplusplus } #endif #endif /* _GETOPT_H */ units-2.02/units.dvi0000664000175000017500000064375412167664613013764 0ustar adrianadrian; TeX output 2013.07.11:222733GGNj cmbx12GUnitsƧConZversionG 2K`y 3 cmr10Editionf2.02for3 3 cmmi10:ۍ:::::::::::::::::::::::::::::::::::::: 5 GY532UnitffExpressionsgt32`:Q 32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32: Y6!G5.1 5OpMerators:ۍ::::::::::::::::::::::::::::::::::::::::::::::::::::: RH6 33!G5.2 5SumsfandDi erencesofUnits#:ۍ::::::::::::::::::::::::::::::::: 7!G5.3 5Num!bMersfasUnits7$:ۍ::::::::::::::::::::::::::::::::::::::::::::: \8!G5.4 5Built-infFeunctionsߍ:ۍ::::::::::::::::::::::::::::::::::::::::::::: 38!G5.5 5ComplicatedfUnitExpressionsպ:ۍ::::::::::::::::::::::::::::::::: Y9!G5.6 5Bac!kwardsfCompatibility:`*'and`-':퍑:ۍ::::::::::::::::::::::::: $10 GY632NonlinearffUnitConversions\32`:Q 32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32: Y10!G6.1 5TeempMeraturefCon!versionsG:ۍ:::::::::::::::::::::::::::::::::::: 11!G6.2 5OtherfNonlinearUnits,a:ۍ::::::::::::::::::::::::::::::::::::::: 11GY732UnitffLists:32ConversiontoSumsofUnits 32`:Q 32:32:32: vsY12mdG832Invokingff\units_32`:Q 32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32: Y16mcG932AddingffYfourOwnDe nitions$32`:Q 32:32:32:32:32:32:32:32:32:32:32:32:32:32:32: "Y20!G9.1 5UnitsfDataFilesލ:ۍ::::::::::::::::::::::::::::::::::::::::::::: b20!G9.2 5De ningfNewUnitsandPre xes~:ۍ::::::::::::::::::::::::::::: 21!G9.3 5De ningfNonlinearUnits C:ۍ::::::::::::::::::::::::::::::::::::: z22!G9.4 5De ningfUnitListAliases::ۍ:::::::::::::::::::::::::::::::::::: 124 GY1032NumericffOutputFformat32`:Q 32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32: Y25!G10.1 5FeormatfSpMeci cationa:ۍ:::::::::::::::::::::::::::::::::::::::: &25!G10.2 5Flags:ۍ::::::::::::::::::::::::::::::::::::::::::::::::::::::: 0826!G10.3 5FieldfWidth(:ۍ:::::::::::::::::::::::::::::::::::::::::::::::: 26!G10.4 5Precisionj:ۍ::::::::::::::::::::::::::::::::::::::::::::::::::: 27 GY1132Los3calizationw퍑32`:Q 32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32: /UY28!G11.1 5LoMcaleeꍑ:ۍ:::::::::::::::::::::::::::::::::::::::::::::::::::::: "28!G11.2 5AdditionalfLoMcalizationڛ:ۍ::::::::::::::::::::::::::::::::::::: ^29 ii33͍GY1232EnvironmentffVfariables!32`:Q 32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:Y30 G1332Unicos3deffSupport32`:Q 32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32: RvY31G1432ReadlineffSupps3orta32`:Q 32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:Y32G1532Ups3datingffCurrencyExchangeRatesC32`:Q 32:32:32:32:32:32:32: Y32G1632DatabaseffCommandSyntaxEύ32`:Q 32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32: 7Y33G1732GNUffFfreeDos3cumentationLicenseǍ32`:Q 32:32:32:32:32:32:32:32:.Y34GIndexr32`:Q 32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32:32: *Y41-GUnitsfCon!versionY*133͍GP1 QOvuerviewzofS߆TG cmtt12Sunits)=GTheunitsprogramcon!vertsquantitiesexpressedinvdDarioussystemsofmeasurementtotheir 33GequivdDalen!ts;inother;systemsofmeasurement.Likemanysimilar;programs,`-itcanhandleGm!ultiplicative\{scalec!hanges.Itcan\zalsohandlenonlinearconversionssuchasFeahrenheitGtoCelsius.ٓRcmr71 ]SeeSection6.1[TeempMeratureCon!versions],page11.TheprogramcanalsoGpMerformYcon!versionsYfromandtosumsofunits,isuc!hascon!vertingbMetweenmetersYandfeetGplusfinc!hes.15!GBey!ondsimpleunitconversions,:unitscanbMeusedasageneral-purpMosescien!ti ccal-Gculatorm(thatm)k!eepstrackofunitsm)initscalculations.Yeoucanformarbitrarycomplexmath-Gematical expressionsofdimensions includingsums,?wproMducts,quotien!ts,po!wers,?wand evenGroMotsΧofdimensions.Th!usyoucanensureaccuracyanddimensionalconsistencywhenwork-Ging!withlong!expressionsthatin!volve!manydi erent!unitsthatma!ycombine!incomplexGw!ays.!GTheunitsarede nedinanexternaldata le.Yeoucanusetheextensiv!edata lethatGcomesMwithMthisprogram,wuory!oucanpro!videyourMowndataM letosuity!ourneeds.ӜYeouGcanfalsousey!ourowndata letosupplementthestandarddata le.!GBasicJkopMerationissimple:%y!ouentertheunitsthatyouwanttoconvert5': 3 cmti10frpom!vandtheGunits thaty!ouwanttoconvertto.Yeoucanusetheprograminteractivelywithprompts,orGy!oufcanuseitfromthecommandline.!GYeouUcanTc!hangethedefaultbMeha!viorofunitswithvdDariousoptionsgiv!enonthecommandGline.SeefChapter8[In!vokingfUnits],page16,foradescriptionofthea!vdDailableoptions.!GP2 QInuteractingzwithSunits)=GTeoxin!vokewunitsforinteractiveuse,Teoconverttofeet,youGw!ouldKtypMeKfeet.ͣIfthereadlinelibraryw!ascompiledinthenthetabk!eycanbMeusedGtoa9completeunita8names.SeeChapter14[ReadlineSuppMort],opage32,oformoreinformationGabMout`Ureadline.ƃTeoquit`VtheprogrampressCtrl-C`DorCtrl-DunderUnix.ƃUnderWindo!wsGpressfCtrl-Z.!GThe%answ!er%willbMedispla!yed%intwo%ways.The rst%lineofoutput,?mwhic!hismark!edwithGaL`*'Mtoindicatem!ultiplication,givesLtheresultofthecon!versionLyouhaveLaskedfor.TheGsecond#lineofoutput,Rwhic!hismarkedwith$a`/'toindicatedivision,RgivestheinverseofGthefcon!versionfactor.Ifyouconvert10meterstofeet,unitswillprintG ff= /㏟-=1o cmr9ButF:ahrenheittoCelsiusislinear,Yy9ouinsist.'zNotso.'yAtransformation5" cmmi9TaislinearifTH(xW+yR)B= TH(x)8+T(yR)TandthisfailsforT(x)=ax8+b.pThisTtransformationisane,butnotlinear.4GUnitsfCon!versionY*233͍ED*32.808399 33ED/0.0304834Gwhic!h#tells#youthat#10metersequalsabMout32.8feet.V\Thesecondn!umbMergives#thecon- 33Gv!ersionginthegoppMositedirection.Inthiscase,t8ittellsy!outhat1foMotisequaltoabMout0.03GdekdDametersfsincethedekameteris10meters.Italsotellsy!outhat1/32.8isabMout0.03.!GTheunitsprogramprin!tstheinversebMecausesometimesitisamoreconvenientnumbMer.GIntheexampleabMo!ve, forexample,thein!versevdDalueisanexactcon!version:}-afoMotisexactlyG0.03048fdekdDameters.Butthen!umbMerfgiventheotherdirectionisinexact.!GIffy!ouconvertgrainstopMounds,youwillseethefollowing:.Youhave:grains.Youwant:pounds\*0.00014285714\/70009GFeromCTthesecondCUlineoftheoutputy!oucanimmediatelyseethatagrainisequaltoasev!enGthousandthKofLapMound.Thisisnotsoob!viousfromthe rstlineoftheoutput.Ify!ou ndGthefoutputformatconfusing,tryusingthe`--verbose'option:.Youhave:grain.Youwant:aeginamina\grain=0.00010416667aeginamina\grain=(1/9600)aeginamina9GIfpy!ouorequestacon!versionpbMetweenunitspthatmeasurereciproMcaldimensions,1thenunitsGwillXdispla!ytheYconversionresultswithanextranoteYindicatingthatreciproMcalconversionGhasfbMeendone:.Youhave:6ohms.Youwant:siemens\reciprocalconversion\*0.16666667\/6F͍GReciproMcalscon!versionscanbMesuppressedb!yusingthe`--strict'option.Asusual,}TusetheG`--verbose'foptiontogetmorecomprehensibleoutput:.Youhave:tex.Youwant:typp\reciprocalconversion\1/tex=496.05465typp\1/tex=(1/0.0020159069)typpff.Youhave:20mph.Youwant:sec/mile\reciprocalconversion\1/20mph=180sec/mile\1/20mph=(1/0.0055555556)sec/mileGIfy!ouenterincompatibleunittypMes,PtheunitsprogramwillprintamessageindicatingGthatftheunitsarenotconformableanditwilldispla!ythereducedformforeachunit:EcGUnitsfCon!versionY*333͍.Youhave:ergs/hour 33.Youwant:fathomskg^2/day.conformabilityerror\2.7777778e-11kgm^2/sec^3\2.1166667e-05kg^2m/secDڍGIfy!ouonlywantto ndthereducedformorde nitionofaunit, simplypressENTERat 33Gthef`Youwant:'prompt.Hereisanexample: .Youhave:jansky.Youwant:\Definition:fluxunit=1e-26W/m^2Hz=1e-26kg/s^2*KtGThewoutputfromunitsindicateswthatthejanskyisde nedtobMeequaltoa uxunitwhic!hGinturnisde nedtobMeacertaincom!binationofw!atts,meters,andhertz.ThefullyreducedG(andfinthiscasesomewhatmorecryptic)formappMearsonthefarrigh!t.!GSomenamedunitsaretreatedasdimensionlessinsomesituations."TheseunitsincludeGthejoradianandsteradian.)TheseunitswillbMetreatedasequalto1inunitscon!versions.GP!owerisequaltotorquetimesangularv!eloMcitye.xThisconversioncanonlybMeperformedifGthefradianisdimensionless..Youhave:(14ftlbf)(12radians/sec).Youwant:watts\*227.77742\/0.00439025097~GNameddimensionlessunitsarenottreatedasdimensionlessinothercon!texts.TheycannotGbMefusedasexponen!tssoforexample,`meter^radian'isnotallowed.!GIf.y!ou.wanta.listofoptionsy!oucant!ypMe?atthe`Youfwant:'prompt.vzTheprogramGwill@displa!yalist@ofnamedunitsthatareconformablewiththeunitthaty!ouenteredatGtheC_`Youfhave:'C`promptabMo!ve.ConformableC_unitcpombinations)wwillnotappMearonthislist.!GT!ypingDhelpDateitherpromptdisplaysDashorthelpmessage.Yeoucanalsot!ypMehelpGfollo!wed50byaunitname. Thiswillinvokeapagerontheunits5/databaseatthepMointwhereGthatunitisde ned.ңYeoucanreadthede nitionandcommen!tsthatma!ygivemoredetailsGorhistoricalinformationabMouttheunit.d(Yeoucangenerallyquitoutofthepageb!ypressingG`q'.)!GT!ypingsearch6p0J 3 cmsl10textwilldisplayalistofalloftheunitswhosenamescon!taintextasaGsubstringalongwiththeirde nitions.Thisma!yhelpinthecasewhereyouaren'tsureofGthefrigh!tunitname.!cGP3 QUsingzSunitsPNon-InuteractivelyxGThetunitssprogramcanpMerformunitscon!versionstnon-interactivelyfromsthecommandGline.TeoCqdothis,jt!ypMethecommand,t!ypMetheoriginalunitexpression,andt!ypMethenewGunitsRy!ouwant.IfaunitsSexpressioncontainsnon-alphanumericcharacters, youmayneedGtofprotectitfromin!terpretationbytheshellusingsingleordoublequotecharacters.!GIffy!outypMe .units"2liters"quartsGthenfunitswillprin!tOÍGUnitsfCon!versionY*433͍ED*2.1133764 33ED/0.47317647~Gand]then^exit.Theoutputtellsy!outhat2litersisabMout2.1quarts,oralternativ!elythat 33GafquartisabMout0.47times2liters.K!GIfTthecon!versionTissuccessful,thenunitswillreturnsuccess(zero)tothecallingen-Gvironmen!t.{&Ifyouenternon-conformableunitsthenunitswillprintamessagegivingtheGreducedfformofeac!hunitanditwillreturnfailure(nonzero)tothecallingenvironment.L!GWhen0y!ou/invokeunitswith/onlyoneargument,itwillprint/outthede nitionoftheGspMeci edunit.]Itwillreturnfailureiftheunitisnotde nedandsuccessiftheunitisGde ned."0GP4 QUnitzDe nitions|GThegcon!versioninformationfisreadfromaunitsdata lethatiscalled`definitions.units'GandisusuallyloMcatedinthe`/usr/share/units'directorye.Ify!ouinvokeunitswiththeG`-V'eoption,itdwillprin!ttheloMcationofthis le.Thedefault leincludesde nitionsforallGfamiliarunits,abbreviationsandmetricpre xes.lvItalsoincludesman!yobscureorarchaicGunits.!GMan!yfconstantsofnaturearede ned,includingthese:.pi9|ratiofofcircumferencetodiameter.c?eitheradimensionlessGargumen!tforanargumentwithdimensionsofangle. JGUnitsfCon!versionY*933͍.Youhave:sin(30degrees) 33.Youwant:\Definition:0.5ff.Youhave:sin(pi/2).Youwant:\Definition:1.Youhave:sin(3kg)s^.UnitnotdimensionlessAߍGTheWDotherfunctionsonthelistrequiredimensionlessargumen!ts.|Theinversetrigonometric 33Gfunctionsfreturnargumen!tswithdimensionsofangle.Aፑ!GIfVy!ouwishtotakeroMotsofWunits,'&youmayusethe`sqrt'or`cuberoot'functions.TheseGfunctionsdrequirethattheargumen!thavetheappropriatecroMot.2YeoucanobtainhigherrootsGb!yfusingfractionalexpMonents:.Youhave:sqrt(acre).Youwant:feet\*208.71074\/0.0047913202ff.Youhave:(400W/m^2/stefanboltzmann)^(1/4).Youhave:\Definition:289.80882K.Youhave:cuberoot(hectare)p^.UnitnotarootPGY5.5Complicatedf@UnitExpressions33GTheunitsprogramisespMeciallyhelpfulinensuringaccuracyanddimensionalconsistencyGwhen#con!verting#lengthyunit#expressions.U]Feorexample,BoneformoftheDarcy{Weeisbac!hG uid- o!wfequationis"aP=8=ڟȉfe  td02f-L33Q233ȉfe $ tzd05 GwhereܝPaisthepressureܜdrop,isthemassdensit!ye,f Xisthe(dimensionless)frictionfactor,GLEistheElengthofthepipMe,mQisthev!olumetric owrate,mandEdisthepipMediameter.ItGmigh!tfbMedesiredtohavetheequationintheformAP= Az1|sf-L33Q233ȉfe $ tzd058Gthat.accepted.theuser'snormalunits;rfort!ypicalunitsusedintheUS,therequiredcon-Gv!ersionfcouldbMesomethinglike.Youhave:(8/pi^2)(lbm/ft^3)ft(ft^3/s)^2(1/in^5).Youwant:psi\*43.533969\/0.022970568 iGUnitsfCon!versionTd1033͍GThe,paren!theses,allowindividual,termsintheexpressiontobMeen!terednaturallye,Nasthey 33Gmigh!tmbMereadfromntheformula.Alternativelye, themultiplicationcouldnbMedonewiththeG`*'Q+ratherQ,thanaspace;thenparen!thesesareneededonlyaround`ft^3/s'bMecauseofitsGexpMonen!t:k.Youhave:8/pi^2*lbm/ft^3*ft*(ft^3/s)^2/in^5.Youwant:psi\*43.533969\/0.022970568;VGWithoutparen!theses,oandusingspacesformultiplication,othepreviousconversionwouldGneedftobMeen!teredas.Youhave:8lbftft^3ft^3/pi^2ft^3s^2in^5.Youwant:psi\*43.533969\/0.022970568HlGY5.6Backwardsf@Compatibility:`\*Y'f@and`\-Y'33GThe?original>unitsassignedm!ultiplicationahigherprecedencethandivisionusingtheslash.GThis3di ersfromtheusual3precedencerules,Vwhic!hgive3multiplicationanddivisionequalGprecedence,fandcanbMeconfusingforpeoplewhothinkofunitsasacalculator.!GThestaropMerator(`*')includedinthisunitsprogramhas,b!ydefault,thesameprece-Gdenceasdivision,+andhencefollo!wstheusualprecedencerules.Feorbac!kwardscompatibilityGy!oucaninvokeunitswiththe`--oldstar'option.VThen`*'hasahigherprecedencethanGdivision,fandthesameprecedenceasm!ultiplicationusingthespace.!GHistoricallye,the@h!yphen?(`-')hasbMeenusedintec!hnicalpublicationstoindicateproMductsGofunits,.andtheoriginalunitsprogramtreateditasam!ultiplicationopMerator.%BecauseGunits^pro!videsseveralotherwaystoobtainunitproMducts,mandbecause`-'isasubtractionGopMeratoringeneralalgebraicexpressions,unitstreatsthebinary`-'asasubtractionop-Gerator8%b!y8&default.Feorbackwards8%compatibilityusethe8&`--product'option,\whichcausesGunitstotreatthebinary`-'opMeratorasaproMductoperator.When`-'isam!ultiplica-Gtion-opMeratorithasthesameprecedenceasm!ultiplicationwithaspace,՞givingitahigherGprecedencefthandivision.!GWhenH`-'isusedasaunaryopMeratoritHnegatesitsoperand.xRegardlessoftheunitsGoptions,if``-'_appMearsafter`('orafter`+'thenitwillactasanegationopMerator.Soy!ouGcanfalw!aysecompute20degreesmin!us12min!utesbyeentering`20fdegrees+-12arcmin'.GYeou/m!ustusethisconstructionwhenyoude nenewunitsbMecauseyoucannotknowwhatGoptionsfwillbMeinforcewheny!ourde nitionisprocessed.)oGP6 QNonlinearzUnitConuversions&ۍGNonlinearc7unitsarerepresen!tedusingfunctionalc8notation.PTheymakepMossiblenonlinearGunitfcon!versionssuchastempMerature. RGUnitsfCon!versionTd1133͍GY6.1Tfemps3eraturef@Conversions33GCon!versionsbMetweentemperaturesaredi eren!tfromlinearconversionsbMetweentempMera- 33Gturetincrpements|seestheexamplebMelo!w.7TheabsolutetempMeraturecon!versionsarethandledGb!yunitsstartingwith`temp',$6andyoumustusefunctionalnotation.r9ThetempMerature-Gincremen!t conversionsaredoneusingunitsstarting with`deg'andtheydonotrequireGfunctionalfnotation.͍.Youhave:tempF(45).Youwant:tempC\7.2222222ff.Youhave:45degF.Youwant:degC\*25\/0.04n33GThinkof`tempF(xDs)'notasafunctionbutasanotationthatindicatesthatxqBshouldha!veGunits<(of<)`tempF'attac!hedtoit.$SeeSection9.3[De ningNonlinearUnits],apage22.$TheG rstcon!versionshowsthatifit's45degreesFeahrenheitoutside,@it's7.2degreesCelsius.cTheGsecond^.conformabilityerror\ft=0.3048m\kg=1kg\fe.Youhave:meter.Youwant:lb;oz.conformabilityerror\1m\0.45359237kgD׍GInFrtheFq rstcase,nuunitsrepMortsthedisagreemen!tbMetweenFrunitsappearingFqonthelist.InGthesecondcase,sunitsrepMortsdisagreemen!tbet!weentheunity!ouenteredandthedesiredGcon!version.Thisfconformabilityerrorisbasedonthe rstunitontheunitlist.!GOtherfcommoncandidatesforcon!versionftosumsofunitsareanglesandtime:.Youhave:23.437754deg.Youwant;deg;arcmin;arcsecED23deg+26arcmin+15.9144arcsecōGUnitsfCon!versionTd1533͍EDYouhave:7.2319hr 33EDYouwant:hr;min;sec\7hr+13min+54.84sec,GIn NorthAmerica,2recipMesforcookingt!ypically measureingredientsbyvolume,2anduse 33Gunitsthatarenotalw!aysconvenientmultiplesofeachother.6SuppMosethatyouhaveaGrecipMecfor6andy!ouwishtomakeapMortionfor1.Iftherecipecallsfor21/2cupsofanGingredien!t,^ you9Omightwishtoknowthe9PmeasurementsintermsofmeasuringdevicesyouGha!vefavdDailable,youcoulduseunitsandenter.Youhave:(2+1|2)cup/6.Youwant:cup;1|2cup;1|3cup;1|4cup;tbsp;tsp;1|2tsp;1|4tsp\1|3cup+1tbsp+1tspGBy9default,)ifa:unitinalistbMeginswithfractionoftheform1|xanditsm!ultiplierisGanin!teger,thefractionisgivenastheproMductofthemultiplierandthenumerator;$NforGexample,.Youhave:12.28125ft.Youwant:ft;in;1|8in;\12ft+3in+3|8inGInman!ycases,suchastheexampleabMo!ve,thisiswhatisw!anted,butsometimesitisnot.GFeorxbexample,acoMokingxarecipexbfor6migh!tcallfor51/4cupofaningredien!t,butyouxbwantGafpMortionfor2,andy!our1-cupmeasureisnotavdDailable;youmighttry.Youhave:(5+1|4)cup/3.Youwant:1|2cup;1|3cup;1|4cup\3|2cup+1|4cupGThisϿresultmigh!tbMe neforabakerwhohasa11/2-cupmeasure(andrecognizestheGequivdDalence),butnitma!ynotbMenasusefultosomeonewithmorelimitedsetofmeasures,GwhodoMesw!anttodoadditionalcalculations,+andonlyw!antstokno!w\Howmany1/2-Gcup measures toIneedtoadd?" Afterall,jrthat'swhatw!asactuallyask!ed. WiththeG`--show-factor' option,#thefactor willnotbMecom!binedwithaunit!ynumerator,#sothatGy!oufget.Youhave:(5+1|4)cup/3.Youwant:1|2cup;1|3cup;1|4cup\3*1|2cup+1|4cupGA|user-spMeci ed|fractionalunitwith|an!umeratorotherthan1isnev!eroverridden,nhowever|GifGaunitlistspMeci es`3|4fcup;1|2cup',paGresultequivdDalen!tto11/2cupswillalwaysbMeGsho!wnfas`2*3|4cup'whetherornotthe`--show-factor'optionisgiven.!GSomepapplicationspforunitlistsma!ybMelessobvious.most>cases,Stheoptionsma!ybMegivenineithershortform(a>single`-'followedbyaGsingle|c!haracter)orlongform(`--'|followedbyawordorhyphen-separatedwords).Short-Gformnsoptionsnrarecrypticbutrequirelesst!yping;long-formoptionsrequiremoret!ypingbutGarermoreqexplanatoryandma!ybMemoremnemonic. Withlong-formoptionsy!ouneedonlyGen!ter{sucientcharacterstouniquelyidentifytheoptionztotheprogram.Feorexample,G`--out%f'vw!orks,{but`--o%f'failswbMecauseunitshasotherlongoptionsbMeginningwithG`o'.Ho!wever,f`--q'w!orksbMecause`--quiet'istheonlylongoptionbeginningwith`q'.!GSome=optionsrequire=argumen!tstospMecifyavdDalue(e.g.,`-d12'or`--digits12').GShort-formoptionsthatdonottak!eargumentsmaybMeconcatenated(e.g.,j`-erS'isequiv-Galen!tto`-e-r-S');8thelastoptioninsuc!halistma!ybMeonethattak!esanargumen!tG(e.g.,\O`-ed12').tWith7short-formoptions,thespacebMet!ween7an7optionanditsargumen!tGis_optional(e.g.,;`-d12'isequivdDalen!tto`-d12').BLong-formoptionsmay`notbMeconcate-Gnated,PandthespacebMet!weenalong-formoptionanditsargumen!tisrequired.ܔShort-formGandlong-formoptionsma!ybMeintermixedonthecommandline.>OptionsmaybMegiveninGan!yUorder,butwhenincompatibleVoptions(e.g.,`--output-format'and`--exponential')GareIgiv!eninHcombination,'AbMehavioriscontrolledbyHthelastoptiongiven.yFeorexample,G`-o%.12f-e'fgiv!esexpMonentialformatwiththedefaulteightsigni cantdigits).!GTheffollo!wingoptionsareavdDailable:G-cG--checkMChec!k.that-allunitsandpre xesde nedintheunitsdata lereducetoprimitiv!eK:units.Prin!t$a%listofallunitsthatcannotbMereduced.Alsodispla!ysomeotherK:diagnosticsabMoutsuspiciousde nitionsintheunitsdata le.QOnlyde nitionsK:activ!e!inthe!currentloMcalearechecked.Yeoushouldalwaysrun!unitswiththisK:optionfaftermoMdifyingaunitsdata le.G--check-verboseG--verbose-checkK:Lik!e:the`--check':option,thisoptionprints:alistofunitsthatcannotbMeK:reduced.LBut5to6help ndunitde nitionsthatcauseendlessloMops,itliststheK:unitsastheyarec!hecked.Ifunitshangs,thenthelastunittobMeprin!tedhasK:afbadde nition.Onlyde nitionsactiv!einthecurrentloMcalearechecked.G-dfndigitsG--digitsfndigitsK:SetRtheQn!umbMerofsigni cantQdigitsintheoutputtothevdDaluespMeci ed(whic!hK:m!ust# bMegreaterthan# zero).Feorexample,=Q`-d12'setsthen!umbMer# ofsigni can!tK:digitscttocu12.WithexpMonen!tialoutputunitsdisplayscuonedigittotheleftofK:thedecimalpMoin!t2 andelevendigitstotherightofthedecimalpMoint. FtOnG Xff= /㏟-=2ThisvdoAcumen9treferstov\decimalpoin9t,"butstrictly:,the"q[ cmsl9radixseparatesthevintegerandfractionalparts of^a_ oating-pAoin9tnumbAer;cinEnglish-speaking_coun9tries,`theradix^isapoin9t_(`ߤN cmtt9.'),`butinmostothercoun9triesTitisacomma(`,').GUnitsfCon!versionTd1833͍K:mostsystems,themaxim!umnumbMerofinternallymeaningfuldigitsis15;?!if 33K:y!ou&spMecify'agreatern!umbMer&thany!oursystem'smaxim!um,unitswillprin!taK:w!arningandsetthenumbMertothelargestmeaningfulvdDalue.=TeodirectlysettheK:maxim!umh(vdDalue,tgiveanargumenth'ofmax(e.g.,t`-dmax').Beaware,tofcourse,K:that\signi can!t"hererefersonlytothedisplayofn!umbMers;ifresultsdependK:onph!ysicalconstantsnotknowntothisprecision,theph!ysicallymeaningfulK:precisionIpma!yIqbMelessthanthatsho!wn.The`--digits'optioncon ictswithK:thef`--output-format'option.fhG-eG--exponentialK:Set!|the!{n!umericoutputformattoexpMonen!tial(i.e.,Ascienti c!|notation),@likeK:thatZDusedZEintheUnixunitsprogram.|Thedefaultprecisioniseigh!tsigni cantK:digits=(sev!en=digitstotherigh!tofthedecimalpMoin!t); `thiscanbMec!hangedK:withthe`--digits'option.The`--exponential'optioncon ictswiththeK:`--output-format'foption.fiG-offormatG--output-formatfformatK:Thisoptiona ordscompletecon!troloverthenumericoutputformatusingtheK:spMeci ed format..Theformat isasingle oatingpMoin!tnumeric formatfortheK:printf()functionintheCprogramminglanguage.AllcompilerssuppMorttheK:formatt!ypMes`g'and`G'tospecifysigni can!tdigits,`e'and`E'forscienti cK:notation,=and`f'for xed-pMoin!tdecimal.TheISOC99standardin!troMducedK:theD`F't!ypMeDfor xed-poin!tdecimalandDthe`a'and`A't!ypMesforhexadecimalK: oatingpMoin!t;̟thesetypMesareallowedwithcompilersthatsuppMortthem.*PTheK:defaultformatis`%.8g';jforgreaterprecision,>y!oucouldspMecify`-o%.15g'.K:SeepChapter10[NumericOutputFeormat],N2page25,andthedoMcumen!tationK:formprintf()formoreldetaileddescriptionsoftheformatspMeci cation.TheK:`--output-format'optiona ordsthegreatestcon!troloftheoutputappMear-K:ance,Q&but;requires;atleastrudimen!taryknowledgeofthe;printf()formatsyn-K:tax.?Ifqy!ouqdon'twanttobMotherwiththeprintf()syntax,youcanspMecifyK:greater-precisionmoresimplywiththe.`--digits'optionorselectexpMonen!tialK:formatwith`--exponential'.`FThe`--output-format'optionisincompatibleK:withfthe`--exponential'and`--digits'options.G-fffilenameG--fileffilenameK:Instructunitstoloadtheunits lefilename.PYeoucanspMecifyupto25unitsK: lesEonthecommandline.vyWheny!ouusethisoption,%unitswillloadonlyK:them lesy!oulistonthemcommandline;itwillnotloadthestandard leory!ourK:pMersonalunits leunlessy!ouexplicitlylistthem.kIf lenameistheempt!ystringK:(`-ff""'),thepdefaultunits leq(orthatspMeci edb!yUNITSFILE)willbMeloadedK:infadditiontoan!yothersspMeci edwith`-f'.G-hG--helpRPrin!tfoutasummaryoftheoptionsforunits.ۍGUnitsfCon!versionTd1933͍G-m 33G--minusMCauses;`-';tobMein!terpretedasasubtractionopMerator. ThisisthedefaultK:bMeha!vior.s4G-pG--productK:CausesЬ`-'ЫtobMein!terpretedasam!ultiplicationopMeratorwhenithast!woK:opMerands.|It^will]actasanegationoperatorwhenit^hasonlyoneoperand:K:`(-3)'.Byfdefault`-'istreatedasasubtractionopMerator.G--oldstarK:Causes[`*'toha!ve[theold-st!yleprecedence,jhigherthantheprecedenceofdivi-K:sionfsothat`1/2*3'willequal`1/6'.G--newstarK:Feorcesn`*'toha!venthenew(default)precedencethatfollo!wstheusualrulesK:of4Salgebra:theprecedence4Tof`*'isthesameastheprecedenceof`/',WsothatK:`1/2*3'fwillequal`3/2'.G--compactK:Giv!e=compactoutput=featuringonlytheconversion=factor.Thisturns=o theK:`--verbose'foption.G-qG--quietG--silent ӣSuppressOpromptingOoftheuserforunitsandthedispla!yofstatisticsabMouttheK:n!umbMerfofunitsloaded.G-nG--nolistsK:Disablefcon!versiontounitlists.G-rG--roundMWhen)con!vertingtoacombinationofunitsgivenbyaunitlist,BroundthevdDalueK:offthelastunitinthelisttothenearestin!teger.G-SG--show-factorK:Whenvcon!vertingtoacombinationofunitsspMeci edvinalist,alwaysshowaK:non-unit!y^factorbMeforeaunitthatbeginswithafractionwithaunit!ydenomi-K:nator.By|default,3ifthe|unitinalistbMeginswithfractionoftheform1|x>EandK:itsm!ultiplierisanintegerotherthan1,,thefractionisgiv!enastheproMductofK:the m!ultiplierand thenumerator(e.g.,?`3|8fin'ratherthan`3*1|8in').LeInK:some0cases,Sthisisnot0whatisw!anted;ufor0example,theresultsfor0acoMokingK:recipMe9migh!t9show`3f*1|2cup'as`3|2cup'.Withthe9`--show-factor'op-K:tion,gas5results4equivdDalen!tto1.5cupswilldispla!yas`3f*1|2cup's4ratherthanK:`3|2fcup'.*Auser-spMeci edfractionalunitwithan!umeratorotherthan1isK:nev!erVoverridden,however|ifaunitVlistspMeci es`3|4fcup;1|2cup',aresultK:equivdDalen!tIto1J1/2cupswillalwaysJbMeshownas`2f*3|4cup'JwhetherIornotK:thef`--show-factor'optionisgiv!en.GUnitsfCon!versionTd2033͍G-s 33G--strict ӣSuppresscon!versionofunitstotheirreciproMcalunits.Feorexample,'unitswillK:normally\tcon!verthertz\stosecondsbMecausetheseunitsarereciproMcalsofeac!hK:other.ݨThestrictoptionrequiresthatunitsbMestrictlyconformabletopMerformK:acon!version,Dandwillgiveanerrorifyouattempttoconverthertztoseconds.)G-1G--one-lineK:Giv!eRonlyoneRlineofoutput(theforwardRconversion).DonotRprintthereverseK:con!version.^IfK;aKdimensions.\Teofacilitate>errorc!hecking,Syoumay>optionallyindicateunitsfortheseGargumen!ts.=GUnitsfCon!versionTd2333͍!GTheAde nitionbMeginsAwiththeunitnamefollo!wedimmediatelyA(withnospaces)b!ya`(' 33Gc!haracter.6In\parenthesesisthe]nameoftheparameter.6NextisanoptionalspMeci cationGofDtheunitsrequiredb!ytheCfunctionsinthisde nition.wIntheexampleabMove,the`tempF'GfunctionDHrequiresDIaninputargumen!tconformablewith`1'. FeornormalnonlinearunitsGde nitionstheforw!ardfunctionwillalw!aystakeadimensionlessargumen!t.|TheinverseGfunctionrequiresaninputargumen!tconformablewith`K'.Ingeneralthein!versefunctionGwillneedunitsthatmatc!hthequan!titymeasuredbyyournonlinearunit.4ThepurpMoseofGtheݾexpressionݽinbrac!ketstoݾenableunitstopMerformerrorc!heckingݾonfunctionargumen!ts,GandfalsotoassignunitstorangeanddomainspMeci cations,whic!haredescribedlater.!GNextthefunctionde nitionsappMear.IntheexampleabMo!ve,]}the`tempF'functionisGde nedfb!y.tempF(x)=(x+(-32))degF+stdtempGThisgiv!esaruleforconverting`x'intheunits`tempF'tolinearunitsofabsolutetempMera-Gture,fwhic!hmakesitpMossibletoconvertfromtempFtootherunits.!GInGorderGtomak!econversionsGtoFeahrenheitpMossible,Z%youmustgiveGaruleforthein!verseGcon!versions.TheinversewillbMe`x(tempF)'anditsde nitionappearsaftera`;'c!haracter.GInfourexample,thein!versefis.x(tempF)=(tempF+(-stdtemp))/degF+32GThis*\in!versede nition*]takesanabsolutetempMeratureas*]itsargumentandconverts*]ittotheGFeahrenheittempMerature.Thein!versecanbeomittedb!yleavingoutthe`;'character,butGthenDcon!versionstotheunitwillbMeimpossible.Ifthein!verseisomittedthenthe`--check'Goptionvwilldispla!yauwarning. ItisuputoyoutocalculateandenteruthecorrectinverseGfunctionCtoDobtainpropMercon!versions.uTheC`--check'optionteststhein!verseCatonepMoin!tGandprin!tsanerrorifitisnotvdDalidthere,butthisisnotaguaran!teethaty!ourinverseisGcorrect.!GIf y!ouwishtomakesynonymsfornonlinearunits,Xyoustillneedtode nebMoththeGforw!arddQandinversefunctions.InversefunctionscandPbMeobtainedusingthe`~'operator.SoGtofcreateasynon!ymfor`tempF'youcouldwrite.fahrenheit(x)units=[1;K]tempF(x);~tempF(fahrenheit)GYeouZma!y[de neafunctionwhoserangeanddomaindonotco!verallZoftherealn!umbMers.GIn2this2caseunitscanhandleerrorsbMetterify!ouspMecifyanappropriaterangeanddomain.GYeoufspMecifytherangeanddomainassho!wnbelo!w..baume(d)units=[1;g/cm^3]domain=[0,130.5]range=[1,10]\b(145/(145-d))g/cm^3;(baume+-g/cm^3)145/baume4GInthisexamplethedomainisspMeci edafterthe`domain='withtheendpMoin!tsgiveninGbrac!kets.4OneQoftheendPpMoin!tscanbeomittedPtogetanin!tervdDalthatgoMestoin nit!ye.4SoGthe(range'couldbMespeci ed(asnonnegativ!eby(writing`range=[0,]'."BoththerangeandGdomain; areoptionaland;canappMearindependen!tlyandinanyorder;alongwiththe`units'GspMeci cation.TheJ_vdDaluesintheJ^rangeanddomainareattac!hedtotheunitsgiv!enintheG`units'BspMeci cation.sIfy!oudon'tCspecifytheCunitsthentheparameterinputsarereducedGtoprimitiv!eunitsforthenumericcomparisontothevdDaluesyougiveintherangeordomain.GInfthiscasey!oushouldonlyuse`range'or`domain'iftheendpMointsarezeroandin nitye.!GSpMecifying'the'rangeanddomainallo!wsunitstopMerformbetter'errorc!heckingand'giveGmoreKhelpfulKerrormessageswheny!ouinvokenonlinearKunitsconversionsoutsideKoftheirMPGUnitsfCon!versionTd2433͍GbMounds.It@also@enablesthe`-c'optionto ndapoin!tinthedomain@touseforitspoin!t 33Gc!heckfofy!ourinversede nition.t^!GYeou%ma!y%oMccasionallywishtode neafunctionthatopMeratesonunits.ThiscanbMedoneGusinganonlinearunitde nition.-Feorexample,thede nitionbMelo!wprovidesconversionGbMet!ween#radiusand"theareaofacircle.Thisde nitionrequiresalengthasinputandGproMduces an areaasoutput,+asindicatedb!ythe`units='spMeci cation.Specifyingthe rangeGasfthenonnegativ!enumbMerscanpreventcrypticerrormessages.t].circlearea(r)units=[m;m^2]range=[0,]>pir^2;sqrt(circlearea/pi)GSometimesyy!oumaybMexinterestedinapiecewiselinearunitsuchxasmanywiregauges.GPiecewise*?linearunitscanbMede nedb!yspecifyingcon!versions*?tolinearunitsonalistofGpMoin!ts.ConversionRatRotherpoin!tswillRbedoneb!yRlinearinterpMolation.ARpartialde nitionGoffzincgaugeis.zincgauge[in]10.002,100.02,150.04,190.06,230.1t]GInthisexample, i`zincgauge'isthenameofthepiecewiselinearunit. Thede nitionofsuc!hGaunitisindicatedb!ytheembMedded`['character.5lAfterthebracket,5youshouldindicateGtheunits tobMeattac!hedtothen!umbMersinthetable.xNospacescanappMearbefore the`]'Gc!haracter,qso ade nitionlike`foo[kgfmeters]'isillegal;insteadwrite`foo[kg*meters]'.GThede nitionoftheunitconsistsofalistofpairsoptionallyseparatedb!ycommas.ThisGlistDde nesaDfunctionforcon!vertingDfromthepiecewiselinearunittolinearunits.DThe rstGitem͌in͍eac!hpairisthefunctionargumen!t;theseconditemisthevdDalueofthefunctionatGthatargumen!t(intheunitsspMeci edinbrac!kets).`Inthisexample,ܧw!ede ne`zincgauge'Gat} v!epMoints.aFeorexample,weset`zincgauge(1)'equalto`0.002fin'.aDe nitionslikeGthisfma!ybMemorereadableifwrittenusingcontinuationcharactersas.zincgauge[in]\K10.002 T\ED100.02>\ED150.04>\ED190.06>\ED230.1Qt\GWithftheprecedingde nition,thefollo!wingconversioncanbMeperformed:.Youhave:zincgauge(10).Youwant:inED*0.02ED/50.Youhave:.01inch.Youwant:zincgaugeED5^GIfZy!oude neZapiecewiselinearunitthatisnotstrictlymonotonic,iHthenthein!verseZwillnotGbMew!ellde ned."Iftheinverseisrequestedforsuc!haunit,-unitswillreturnthesmallestGin!verse.ŪThe]`--check']optionwillprin!taw!arningifanon-monotonicpiecewiselinearunitGisfencoun!tered.UGY9.4De ningf@UnitListAliases33GUnitlistaliasesaretreateddi eren!tlyfromunitde nitions,8bMecausetheyareadataen!tryGshorthand5ratherthanatrue5de nitionforanewunit.A5unitlistaliasde nitionbMegins_GUnitsfCon!versionTd2533͍Gwith`!unitlist'andincludesthealiasandthede nition;hmsRhr;min;sec.!unitlist>timeyear;day;hr;min;sec.!unitlist>dmsRdeg;arcmin;arcsec.!unitlist>ftinft;in;1|8in.!unitlist>usvolcup;3|4cup;2|3cup;1|2cup;1|3cup;1|4cup;\tbsp;tsp;1|2tsp;1|4tsp;1|8tspRGUnitTlistSaliasesareonlyforunitlists,sothede nitionm!ustincludea`;'.UnitlistaliasesGcannev!erbMecombinedwithunitsorotherunitlistaliases,9sothede nitionof`time'sho!wnGabMo!vecouldnot)ha!vebeenshortenedto`year;day;hms'.GAsusual,=DbesuretorununitsG--checkftoensurethattheunitslistedinunitlistaliasesareconformable.!GP10 QNumericzOutputFaGormat35GBySbdefault,~unitssho!wsresultstoSaeightsigni cantdigits.YeoucanchangeSathiswiththeG`--exponential',`--digits',andޥ`--output-format'options.Theޤ rstsetsanexpMonen-Gtialformat(i.e.,aYscien!ti cnotation)lik!ethatusedintheoriginalUnixunitsprogram,Gthe/secondallo!ws0you/tospMecifyadi eren!tnumbMer/ofsigni can!tdigits,andthelastal-Glo!wsjyoutocontroltheoutputappMearanceusingitheformatfortheprintf()functioninGtheiCi]programminglanguage.'XIfy!ouonlywanttochangethenumbMerofsigni cantdig-GitsorspMecifyexponen!tialformattypMe,usethe`--digits'and`--exponential'options.GThex`--output-format'woptiona ordsthegreatestcon!troloftheoutputappMearance,|butGrequiresatleastrudimen!taryknowledgeoftheprintf()formatsyn!tax.pSeeChapter8G[In!vokingfUnits],page16,fordescriptionsoftheseoptions.GY10.1Fformatf@Sps3eci cation33GTheformatspMeci cationrecognizedwiththe`--output-format'optionisasubsetofthatGfor,printf().QTheformatspMeci cationhastheform%[ ags][width ][.prpecision]typeҡ;UNit,m!ustGbMegin)with`%',Jandm!ust)endwitha oating-poin!ttypMe)speci er:`g')or`G'tospMecifytheGn!umbMerOofOsigni cantdigits,a;`e'Oor`E'forscien!ti cnotation,a;and`f'for xed-pMoin!tdecimal.GTheISOC99standardaddedthe`F't!ypMefor xed-poin!tdecimalandthe`a'and`A'typMesGforhexadecimal oatingpMoin!t;@thesetypMesareallowedwithcompilersthatsuppMortthem.GT!ypMe!length"modi ers(e.g.,j`L'to"indicatealongdouble)areinapplicableandarenotGallo!wed.!GTheQdefaultRformatforunitsis`%.8g';forgreaterprecision, y!oucouldspMecifyG`-o%.15g'.$5Theh`g'hand`G'formatt!ypMesuseexpMonen!tialformatwhenev!ertheexpMonen!tGw!ouldJbMeKlessthan4,ʃsothevdDalue0.000013displa!ysas`1.3e-005'.4Theset!ypMesalsouseGexpMonen!tialnotationwhentheexponen!tisgreaterthanorequaltotheprecision,sowithGthe,default-format,thevdDalue5^y107displa!ysas-`50000000'andthevdDalue5^y108displa!ysGasH`5e+008'.vIfy!ouprefer xed-pMointdisplaye,youmightGspMecify`-o%.8f';however,smallGn!umbMerswilldisplayveryfewsigni cantdigits,/.Youhave:mile.Youwant:microfurlong\*8000000.000000\/0.000000Gthe֫magnitudeofthe rstresultma!y֪notbMeimmediatelyobviouswithoutcountingtheGdigitstotheleftofthedecimalpMoin!t.=Ifthethousandsseparatoristhecomma(`,'),9theGoutputfwiththeformat`%'f'migh!tbMe.Youhave:mile.Youwant:microfurlong\*8,000,000.000000\/0.000000Gmakingc-thec,magnitudereadilyapparen!t.1Unfortunatelye,^fewcompilerssuppMortthedigit-Ggroupingf ag.!GWiththe`-' ag,#theoutputvdDalueisleftalignedwithinthespMeci ed eldwidth.Ifa eldGwidth"greater!thanneededtosho!wtheoutputvdDalueisspMeci ed,the`0'(zero) agcausesGtheKoutputJvdDaluetobMeleftpaddedwithzerosun!tilthespMeci ed eldwidthisreac!hed;νforGexample,fwiththeformat`%011.6f',.Youhave:troypound.Youwant:grain\*5760.000000\/0000.000174GThef`0' aghasnoe ectifthe`-'(leftalign) agisgiv!en.GY10.3Fieldf@Width33GBy2default,ftheoutput3vdDalueisleftalignedandsho!wnwiththeminim!umwidthnecessaryGfordothednspMeci ed(ordefault)precision.Ifa eldwidthgreaterthanthisisspMeci ed,theGvdDaluedsho!wneisrightealigned,andpaddedontheleftwithenoughspacestopro!videtheGspMeci edE eldDwidth.yAwidthspeci cationEist!ypicallyDusedwith xed-poin!tDdecimalto~卟GUnitsfCon!versionTd2733͍Gha!veTcolumnsTofn!umbMersTalignatthedecimalpMoin!t;othisarguablyislessusefulwithunits 33Gthanwithlongcolumnaroutput,kbutitma!ynonethelessassistinquicklyassessingtheGrelativ!efmagnitudesofresults.Feorexample,withtheformat`%12.6f', ȍ.Youhave:km.Youwant:in\*39370.078740\/R0.0000254̍.Youhave:km.Youwant:rod\*>198.838782\/R0.005029.Youhave:km.Youwant:furlong\*R4.970970\/R0.201168DGY10.4Precision33GTheg%meaningg$of\precision"depMendsontheformatt!ypMe. With`g'or`G',TitspMeci estheGn!umbMerm!ofsigni can!tdigits(likethe`--digits'option);8with`e',x`E',x`f',orm!`F',itspMeci esGthefmaxim!umnumbMerofdigitstobesho!wnafterthedecimalpoin!t. ȍ!GWith/the/`g'and`G'formatt!ypMes,Ttrailingzerosaresuppressed,sothe/resultsma!yGsometimesYha!vefewerdigitsthanZthespMeci edprecision(asindicatedabo!ve,the`#' agGcausesftrailingzerostobMedispla!yed).!GThe\defaultprecision]is6,so`%g'isequivdDalen!tto`%.6g',andwouldshow]theoutputtoGsix"signi can!t!digits.Similarlye,`%e'or`%f'w!ouldshow!theoutputwithsixdigitsaftertheGdecimalfpMoin!t.!GThe2C!printf()3functionallo!wsaprecisionofarbitrarysize,whetherornotalloftheGdigitseZaremeaningful..Withmostcompilers,r\themaxim!uminternalprecisionwithunitsisG15decimaldigits(or13hexadecimaldigits).Withthe`--digits'option,y!ouarelimitedGtozEthezFmaxim!uminternalzFprecision;withthe`--output-format'option,y!oumayzFspMecifyaGprecisiongreaterthanthis,"butitma!ynotbMemeaningful.@Insomecases,!specifyingexcessGprecisiona'canresultina&roundingartifacts.Feorexample,oapMoundisexactly7000grains,butGwithftheformat`%.18g',theoutputmigh!tbMe.Youhave:pound.Youwant:grain\*6999.9999999999991\/0.00014285714285714287GWithftheformat`%.25g'y!oumightgetthefollowing:.Youhave:1/3.Youwant:\Definition:0.333333333333333314829616256247GIn{thiscasethe{displa!yed{vdDalueincludesaseriesofdigitsthatrepresen!ttheunderlyingbinaryG oating-pMoin!tsapproximationto1/3butaresnotmeaningfulforthedesiredcomputation.GIngeneral,-theresultwith excessprecisionissystemdepMenden!t.pTheprecisiona ectsonlyGUnitsfCon!versionTd2833͍Gthe9display1ofn!umbMers;if9a9resultreliesonph!ysicalconstants9thatarenotkno!wntothe 33GspMeci edprecision,6then!umberofph!ysicallymeaningfuldigitsmaybMelessthanthenumbMerGoffdigitssho!wn.!GSeethedoMcumen!tationforprintf()formoredetaileddescriptionsoftheformatspMeci-G cation.!GThe; `--output-format'optionisincompatible; withthe`--exponential'or`--digits'Goptions;X4iftheformerisgiv!enincombinationwitheitherofthelatter,:theformatiscon-Gtrolledfb!ythelastoptiongiven.#эGP11 QLo=calizationmGSomesunitsha!vesdi erenttvdDaluesindi erentloMcations.Thelocalizationfeatureaccommo-Gdates thisb!y allowing aunitsdata letospMecifyde nitionsthatdepend ontheuser'sGloMcale.=GY11.1Los3cale33GAloMcaleisasubsetofauser'sen!vironmentthatindicatestheuser'slanguageandcoun!trye,GandHsomeattendan!tpreferences,suchastheformattingofHdates. ŐTheunitsprogramGattempts^todeterminetheloMcale]fromthePOSIXen_USGYeoufcanforceunitstoruninadesiredloMcaleb!yusingthe`-l'option.!GIny&ordery'tocreateunitde nitionsforaparticularloMcaley!oubMeginabloMc!kofde nitions 33Ginaunitdata lewith`!locale'follo!wedbyaloMcalename. 8The`!'m!ustbMethe rstGc!haracter1ontheline.The1unitsprogramreadsthefollowingde nitions1onlyifthecurrentGloMcalematc!hes. Yeouendthebloc!koflocalizedunitswith`!endlocale'. Hereisanexample,Gwhic!hfde nestheBritishgallon..!localeen_GB.gallon(=4.54609liter.!endlocaleGUnitsfCon!versionTd2933͍GY11.2Additionalf@Los3calization33GSometimescthecloMcaleisn'tsucien!ttodetermineunitpreferences.ǦTherecouldbMeregional 33Gpreferences,orzacompan!ycouldhavespMeci cpreferences.ZThoughprobablyuncommon,Gsuc!hڀdi erencesځcouldarisewiththec!hoiceofEnglishcustomaryunitsoutsideofEnglish-GspMeakingcoun!tries.wTeoaddressthis,&unitsallowsspMecifyingde nitionsthatdependonGen!vironmentsvdDariablessettings.F/Theen!vironmentvdDariablesscanbMecon!troledbasedontheGcurren!tfloMcale,ortheusercansetthemtoforceaparticulargroupofde nitions.!GAconditional1252in>theUS=andWeesternEuropMe).Youcan>ev!enuseUTF-8,cthoughsomemes- 33GsagesMma!ybMeLimproperlyMaligned, andunitswillnotdetectin!vdDalidUTF-8sequences.Ify!ouGusegUTF-8hencoMdingwhenUnicoMdesupporthisnotactiv!e,'youshouldgplaceanygde nitionsGwithnon-ASCIMIc!haractersoutsidex6`!utf8'Oy...`!endutf8'bloc!ks|otherwise,theywillbeGignored.0!GT!ypMesetl}materialotherl~thancodeexamplesusuallyusesthel~Unicodemin!us(U+2212)GratherZthanYtheASCIMIh!yphen-minusZoperatorY(U+002D)usedinZunits;!the guredashG(U+2012)1andendash(U+2013)1arealsooMccasionallyused.jTeoallo!wsuch1materialtobMeGcopiedandpastedforin!teractiveuseorinunitsdata les,Gunitscon!vertsthesec!haractersGtoU+002DbMeforefurtherprocessing.Becauseofthis,Cnoneofthesec!haracterscanappearGinfunitnames."GP14 QReadlinezSupp=ort\*GIf`Wthereadline`Vpac!kdDagehasbMeencompiledin,thenwhenunitsisusedin!teractivelye,Gn!umerousB"commandB!lineeditingfeaturesarea!vdDailable.TeocheckB"ify!ourversionB!ofunitsGincludesfreadline,in!vokeftheprogramwiththe`--version'option.!GFeorF'completeF(informationabMoutreadline,YgconsultthedoMcumen!tationforthereadlineGpac!kdDage.Withoutanycon guration,Uunitswillalloweditinginthestyleofemacs.OfGparticularfusewithunitsarethecompletioncommands.1!GIfy!outypMeafewcharactersandthenhitESCfollo!wedby?thenunitswilldispla!yaGlistZofalltheZunitsthatstartwiththec!haracterstypMed.ěFeorZexample,iifyouZtypMemetrandGthenfrequestcompletion,y!ouwillseesomethinglikethis:.Youhave:metr.metreJmetriccup3metrichorsepower Tmetrictenth.metretes9|metricfifth(=metricouncemetricton.metriccarat(=metricgrainmetricquartmetricyarncount.Youhave:metrEbGIfthereisauniquew!aytocompleteaunitname,Ty!oucanhittheTeABk!eyandunitsGwilllpro!videltherestoftheunitname.0{IfunitsbMeeps,'itmeansthatthereisnouniqueGcompletion.PressingftheTeABk!eyasecondtimewillprintthelistofallcompletions."GP15 QUp=datingzCurrencyExcuhangeRates\*GTheunitsprogramincludescurrencyexc!hangeratesandpricesforsomepreciousGmetalsinthedatabase. Ofcourse,ethesevdDaluesc!hangeovertime,esometimesveryGrapidlye,4and~unitscannotpro!viderealtimevdDalues. g ToupMdatetheexc!hangeratesGrunUtheTunits_cur,mwhic!hrewritesthe lescon!tainingthecurrencyrates,mt!ypicallyG`/usr/local/share/units/currency.units'. xmThis/@program/Am!ustbMerunwithsuitableGpMermissionsltowritethe le.Teok!eeptheratesupdatedautomaticallye,itcouldberunb!yGaqcronqjobonaUnix-lik!esystem,jorasimilarsc!hedulingprogramonadi eren!tsystem.GCurrencyծexc!hangeratesaretakenfromTimeGenie(http://www.timegenie.com)andGpreciousLmetalspricingfromP!acketizerL(www.packetizer.com).ThesesitesupMdateonceGpMerda!ye,Lsothereisnobene tinrunningtheupdatescriptmoreoftenthandailye.hYoucan!РGUnitsfCon!versionTd3333͍Grununits_curwitha lenamespMeci edonthecommandlineanditwillwritethedatato 33Gthatf le.Ify!ougive`-'forthe leitwillwritetostandardoutput.!!GP16 QDatabasezCommandSynutaxGunitdefinitionK:De nefaregularunit.DTGprefix-definitionK:De nefapre x.GfuncnameDs(var)units=[in-units,out-units]domain=[x1,x2]range=[y1,y2]Gdefinition(var);inverse(funcname)K:De neanonlinearunitorunitfunction.fThethreeoptionalk!eywordsunits=,K:range=anddomain=canappMearinan!yorder.Thede nitionofthein!verseisK:optional.GtabnameDs[out-units]pair-listK:De ne#apiecewiselinearunit.Thepairlistgiv!esthepMointsonthetablelistedK:infascendingorder.G!endlocaleK:EndfabloMc!kofde nitionsbeginningwith`!locale'G!endutf8 ӣEndfabloMc!kofde nitionsbegunwith`!utf8'G!endvarMEndfabloMc!kofde nitionsbegunwith`!var'or`!varnot'G!includefileK:IncludefthespMeci ed le.G!localevalueK:Loadfthefollo!wingde nitionsonlyoftheloMcaleissettovdDalue.DUG!messagetextK:Displa!ytext<~whenthe~databaseisreadunlessthequietoption(`-q')isenabled.G!setvariablevalueK:SetsVtheen!vironmentWvdDariable,Rvariable,toVthespMeci edvdDalueWonly)jifdoMcumentation:afreeprogramshould>comewithmanuals'pro!vidingurtheussamefreedomsthatthesoft!wareurdoMes.͌ButthisLicenseisnotlimitedto'soft!waremanuals;itcanbMeusedforan!ytextualw!ork,regardlessofsubjectmatteror'whether2itispublishedasaprin!tedbMook.@BWee2recommendthisLicenseprincipallyfor'w!orksfwhosepurpMoseisinstructionorreference.-1.'APPLICABILITYfANDDEFINITIONSP'This>License=appliestoan!ymanual=orotherwork,inany=medium,thatcontains>a'noticeplacedb!ythecop!yrightholdersayingitcanbMedistributedundertheterms'ofthisLicense.l=Suc!hanoticegrantsaworld-wide, royalty-freelicense,unlimitedin'duration, toouseothatw!orkundertheconditionsstatedherein. 9The\DoMcumen!t",'bMelo!w,tkrefersgtoanysuchgmanualorwork. AnymembMerofthegpublicisalicensee,tkand'isaddressedas\y!ou".@Yeouacceptthelicenseifyoucopye, moMdifyordistributethework'infaw!ayfrequiringpMermissionundercop!yrightflaw.'A \MoMdi ed Veersion" oftheDocumen!tmeans anyworkcontainingthe DoMcumentor'ahpMortiongofit,heithercopiedv!erbatim,horwithmoMdi cationsand/ortranslatedin!to'anotherflanguage.'A\SecondarySection"isanamedappMendixorafron!t-mattersectionoftheDoMcumen!t'that/dealsexclusiv!ely0withtherelationshipofthepublishersorauthorsoftheDoMcumen!t'toz thezDoMcumen!t'soverallzsubject(ortorelatedmatters)andcon!tainsnothingthat'couldخfallدdirectlywithinthato!verallsubject.t(Thus,%@iftheخDoMcumentisinدparta'textbMookՆofՅmathematics,MaSecondarySectionma!ynotexplainan!ymathematics.)=The'relationshipGcouldbMeamatterofhistoricalconnectionwiththesubjectorwithrelated'matters,jorBofBlegal,commercial,jphilosophical,ethicalorpMoliticalBpositionregarding'them.'Ther\In!vdDariantsSections"arecertainSecondarySectionswhosetitlesaredesignated,0as'bMeing2Dthose2CofIn!vdDariant2DSections,I}inthenoticethatsa!ysthattheDoMcumen!tisreleased#獟GUnitsfCon!versionTd3533͍'underS5thisLicense."IfS4asectiondoMesnot ttheabMo!veS5de nitionofSecondarythenitis 33'notӍallo!wedtoӎbMedesignatedasInvdDariant.eSTheDoMcumentmayӎcontainzeroInvdDariant'Sections.IftheDoMcumen!tdoesnotiden!tifyanyInvdDariantSectionsthentherearenone.&g'Thef\Co!verfTeexts"arecertainshortpassagesoftextthatarelisted,asFeron!t-Cover'Teexts-orBac!k-Cover,Texts,"8in-thenoticethat,sa!ysthattheDoMcument,isreleasedunder'thisLicense.AAnFeron!t-CoverTeextmaybMeatmost5words,6andaBack-CoverTeextmay'bMefatmost25w!ords.&h'AC\Teransparen!t"CcopyofCtheDoMcumentmeansaCmachine-readablecopye,k(represented'inJmaformatJnwhosespMeci cationisa!vdDailabletothegeneralpublic,snthatissuitablefor'revisingthedoMcumen!tstraightforwardlywithgenerictexteditorsor(forimagescom-'pMosedofpixels)genericpain!tprogramsor(fordra!wings)somewidelya!vdDailabledrawing'editor,and}thatissuitableforinputto}textformattersorforautomatictranslationto'a9OvdDariet!yof9Nformatssuitableforinputtotextformatters.A93cop!ymadeinanotherwise'Teransparen!t leformatwhosemarkup,orabsenceofmarkup,hasbMeenarrangedto'th!wart0or0discouragesubsequen!tmoMdi cationb!yreadersisnotTeransparen!t.Animage'format isnotTeransparen!tifused foranysubstantialamountoftext.MA copythatis'notf\Teransparen!t"iscalled\Opaque".'ExamplesZofYsuitableformatsforTeransparen!tcopiesincludeplainASCIMIwithout'markup, kTeexinfoinputformat,LaT,[wEB Xinputformat,SGMLorXMLusingapublicly'a!vdDailable DTD,andstandard-conformingsimpleHTML,PostScriptorPDF designed'forEh!umanmoMdi cation.ExamplesEoftransparentimageformatsincludePNG,XCF'andJPG.OpaqueformatsincludeproprietaryformatsthatcanbMereadandedited'onlyb!yproprietarywordproMcessors, [SGML|orXMLforwhic!htheDTDand/orpro-'cessingltoMolsmarenotgenerallya!vdDailable,(andthemac!hine-generatedHTML,P!ostScript'orfPDFproMducedb!ysomewordproMcessorsforoutputpurposesonlye.'The\TitleP!age"means,or7state7inorwitheac!hOpaquecopy7acomputer-networkloMcation7fromwhich'theSgeneralRnet!work-usingpublichasRaccesstodownloadusingRpublic-standardnetwork'protoMcols=acomplete>Teransparen!tcopyoftheDoMcument,freeofaddedmaterial.cIf'y!ouusethelatteroption,youmusttakereasonablyprudentsteps,whenyoubMegin'distributionlofmOpaquecopiesinquan!titye,ӮtolensurethatthisTeransparen!tcopylwill'remainCth!usaccessibleDatthestatedloMcationuntilDatleastoneyearafterDthelasttime'y!oukdistributekanOpaquecopyk(directlyorthroughyourkagentsorretailers)kofthat'editionftothepublic.'It&Nisrequested,FHbutnotrequired,FGthaty!oucontacttheauthorsoftheDoMcumentwell'bMeforeoredistributingoan!ylargenumbMeroofcopies,ztogiv!ethemac!hancetopro!videyou'withfanupMdatedv!ersionoftheDocumen!t.-4.'MODIFICAeTIONS'Yeou*ma!ycopyand)distributeaMoMdi edVeersionoftheDoMcumen!tundertheconditions'ofsections2and3abMo!ve,]providedthatyoureleasetheMoMdi edVeersionunderprecisely'this{License,`withthe{MoMdi edVeersion llingtheroleoftheDoMcumen!t,`thus{licensing'distributionandmoMdi cationoftheModi edVeersiontowhoev!erpossessesacop!yof'it.Infaddition,y!oumustdothesethingsintheMoMdi edVeersion:*A.=nUsepintheTitleP!age(andonthecovers,2ifany)atitledistinctfromthatofthe=nDoMcumen!t,+andfromthoseofpreviousversions(whichshould,+iftherewereanye,% |GUnitsfCon!versionTd3733͍=nbMelistedintheHistorysectionoftheDocumen!t).3Yeoumayusethesametitleas 33=nafpreviousv!ersioniftheoriginalpublisherofthatversiongivespMermission.+gB.=nList\ontheTitle[P!age,Zasauthors,YoneormorepMersonsoren!titiesrespMonsiblefor=nauthorship"of"themoMdi cationsintheMoMdi edVeersion,<|togetherwithatleast v!e=nof߸theprincipalauthorsoftheDoMcumen!t(allofitsprincipalauthors,uifithasfewer=nthanf v!e),unlesstheyreleaseyoufromthisrequirement.+@C.=nStateontheTitlepagethenameofthepublisheroftheMoMdi edVeersion,asthe=npublisher.*D.=nPreserv!efallthecopyrightnoticesoftheDoMcument.+oE.=nAddeandappropriatecop!yrightnoticeeforyouremoMdi cationsadjacentetotheother=ncop!yrightfnotices.,LF.=nInclude,hSimmediatelyXafterthecop!yrightXnotices,alicensenoticegivingthepublic=npMermissiontousetheMoMdi edVeersionunderthetermsofthisLicense,Pintheform=nsho!wnfintheAddendumbMelow.*nG.=nPreserv!eminlthatlicensenoticethefulllistsofIn!vdDariantSectionsmandrequiredCo!ver=nTeextsfgiv!enintheDoMcument'slicensenotice.*H.=nIncludefanunalteredcop!yofthisLicense./4I.=nPreserv!eچtheڇsectionEntitledڇ\History",PreserveitsڇTitle,andaddtoitanitem=nstating_ at_ leastthetitle,mQy!ear,newauthors,and_ publisheroftheMoMdi edVeersion=nasXgiv!enonWtheTitlePage.7IfWthereisnosectionEntitled\History"WintheDoMcu-=nmen!t,O#create-eone-dstatingthetitle,O$year,O#authors,and-epublisher-doftheDoMcument=nasWgiv!enonitsTitlePage,FthenaddanitemdescribingtheMoMdi edVeersionas=nstatedfintheprevioussen!tence.-J.=nPreserv!ethenetworkloMcation,ifanye,givenintheDoMcumentforpublicaccessto=naTeransparen!tcopyoftheDoMcument,MandlikewisethenetworkloMcationsgivenin=nthë́DoMcumen!t̓forpreviousversions̓itwasbasedon.S6These̓maybMeplaced̓inthe=n\History"8section.Yeou9ma!yomitanet!work8loMcationforaw!orkthatw!aspublished=natKleastfourKy!earsbMeforetheDocumen!titself,t@oriftheoriginalKpublisherofthe=nv!ersionfitreferstogivespMermission.*K.=nFeorran!ysectionEntitled\Acknowledgements"or\Dedications",oPreservetheTitle=nof/Rthe/Qsection,G#andpreserv!einthesectionallthesubstanceandtoneofeac!hofthe=ncon!tributorfacknowledgementsand/ordedicationsgiventherein.,Q*L.=nPreserv!e?all?theInvdDariant?SectionsoftheDoMcumen!t,f/unalteredintheirtextand=ninPtheirPtitles.@Sectionn!umbMersorPtheequivdDalentParenotconsideredpartofthe=nsectionftitles.)M.=nDelete5an!ysectionEntitled4\Endorsements".JSuchasection4maynotbMeincluded=ninftheMoMdi edVeersion.*N.=nDog!notg"retitlean!yexistingsectiontobMeEn!titled\Endorsements"g"ortocon ictin=ntitlefwithan!yInvdDariantSection.*O.=nPreserv!efanyWearrantyDisclaimers.΍'IftheMoMdi edVeersionincludesnewfron!t-mattersectionsorappMendicesthatqualify'asXSecondaryX Sectionsandcon!tainnomaterialcopiedfromtheDoMcumen!t,gyoumayXat'y!ourkoptionldesignatesomeorallofthesesectionsasin!vdDariant.Teodokthis,addtheir&GUnitsfCon!versionTd3833͍'titles@tothelist@ofIn!vdDariant@SectionsintheMoMdi edVeersion'slicensenotice.These 33'titlesfm!ustbMedistinctfromanyothersectiontitles.('Yeoupma!yqaddasectionEntitledq\Endorsements",sprovideditcontainsqnothingbut'endorsemen!tsofyourMoMdi edVeersionbyvdDariousparties|forexample,Zstatementsof'pMeerD revieworDthatthetexthasbeenDappro!vedD byanorganizationDastheauthoritative'de nitionfofastandard.('Yeouf,ma!yf-addapassageofupto v!ewordsf-asaFeron!t-Coverf,Text,sandf-apassageofup'to@25w!ords@asaBack-CoverTeext,Tto@theendofthelistofCo!ver@TeextsintheMoMdi ed'Veersion.+OnlyN+oneN*passageofFron!t-CoverN*TextN+andoneN*ofBac!k-CoverN+TextN*mayN+bMe'addedNb!y(orthrougharrangementsmadeby)Nanyoneentitye.IftheDoMcumentalready'includesaco!vertextforthesameco!ver,/!previouslyaddedbyyouorbyarrangement'made:b!ythesameentityyouareactingonbMehalfof,_youmay:notaddanother;but'y!ou)mayreplace*theoldone,2onexplicitpMermissionfromthepreviouspublisherthat'addedftheoldone.'The^author(s)]andpublisher(s)oftheDoMcumen!tdonotb!ythisLicensegiv!epMermission'tojusetheirknamesforpublicit!yforortoassertorimplyendorsemen!tofan!yMoMdi ed'Veersion.(-5.'COMBININGfDOCUMENTS'Yeouma!ycombinetheDoMcumentwithotherdoMcumen!tsreleasedunderthisLicense,'understhetermstde nedinsection4abMo!vesformodi edv!ersions,ӷprovidedsthaty!ou'include in thecom!binationalloftheIn!vdDariant SectionsofalloftheoriginaldoMcumen!ts,'unmoMdi ed,L3and5list5themallasIn!vdDariant5Sectionsofy!ourcombined5workin5itslicense'notice,fandthaty!oupreservealltheirWearrantyDisclaimers.'The@com!binedworkneedonlycontainonecopyofthisLicense,andmultipleidentical'In!vdDariantSectionsma!ybMereplacedwithasinglecopye.BIftherearemultipleInvdDariant'Sections6with6thesamenamebutdi eren!tcontents,Mmake6thetitleofeac!hsuch6section'uniquebb!ycaddingattheendofit,1"inparen!theses,1!thenameoftheoriginalauthoror'publisherofthat~sectionifkno!wn,!orelseauniquen!umbMer.Makethesameadjustmen!t'tothesectiontitlesinthelistofIn!vdDariantSectionsinthelicensenoticeofthecom!bined'w!ork.('In"the#com!bination,Jyoumust#combineany#sectionsEntitled#\History"inthevdDari-'ousoriginaldoMcumen!ts,xformingonesectionEn!titled\History";likewisecombineany'sectionsEn!titled\Acknowledgements",ۿandanysectionsEntitled\Dedications".]Yeou'm!ustfdeleteallsectionsEntitled\Endorsements."-6.'COLLECTIONSfOFDOCUMENTS('YeouҤma!ymakeacollectionconsistingofңtheDoMcumentandotherdoMcumentsreleased'underthisLicense,sandreplacetheindividualcopiesofthisLicenseinthevdDarious'doMcumen!tsDwithCasinglecopyCthatisincludedinthecollection,ypro!videdthaty!ou'follo!wtthetrulesofthisLicenseforv!erbatimcopyingtofeachtofthedoMcumen!tsinall'otherfrespMects.'Yeou=ma!yextractasingledoMcumentfromsuchacollection,2anddistributeitindividu-'ally4under4thisLicense,Wnpro!videdyou4insertacop!yofthisLicensein!totheextracted'doMcumen!t,andBfollowAthisLicenseinallotherrespMectsregardingv!erbatimcopyingAof'thatfdoMcumen!t.'/GUnitsfCon!versionTd3933͍-7.'A!GGREGAeTIONfWITHINDEPENDENTWORKS('A]compilation]oftheDoMcumen!t]oritsderivdDativeswithother]separateandindepMendent 33'doMcumen!tshoriworks,inoroniavolumeiofastorageordistributionmedium,iscalled'an \aggregate"ifthe cop!yright resultingfromthecompilationisnotusedtolimitthe'legal1 righ!ts1ofthecompilation'susersbMey!ondwhattheindividualw!orkspMermit.When'theDoMcumen!tisincludedinanaggregate,thisLicensedoesnotapplytotheother'w!orksfintheaggregatewhicharenotthemselvesderivdDativeworksoftheDoMcument.('IfVtheCo!verVTeextrequiremen!tofsection3UisapplicabletothesecopiesoftheDoMcument,'thenDifEtheDoMcumen!tislessthanonehalfoftheen!tireaggregate,~theDoMcumen!t'sCover'Teexts0ma!ybMeplacedoncoversthatbrackettheDoMcumentwithinthe0aggregate,Gorthe'electronic5qequivdDalen!t5pofcovers5piftheDoMcumen!tisinelectronicform.Otherwisethey'm!ustfappMearonprintedcoversthatbracketthewholeaggregate.-8.'TRANSLAeTION('Teranslation̯is̰consideredakindofmoMdi cation,Asoy!oumay̰distributetranslations'ofTtheTDoMcumen!tunderthetermsofsection4. ReplacingIn!vdDariantSectionsTwith'translationsvrequiresvspMecialpermissionfromtheirvcop!yrightvholders,butyouvmay'includektranslationsofsomejorallIn!vdDariantkSectionsinadditiontotheoriginalv!ersions'oftheseIn!vdDariantSections.=YeoumayincludeatranslationofthisLicense, andallthe'licensenoticesintheDoMcumen!t,FandanyWearrantyDisclaimers,Fprovidedthatyou'alsoincludetheoriginalEnglishv!ersionofthisLicenseandtheoriginalv!ersionsof'thosenoticesanddisclaimers.5Incaseofadisagreemen!tbMetweenthetranslationand'the:original:v!ersionofthisLicenseoranoticeordisclaimer,_theoriginalv!ersionwill'prevdDail.'IfpasectioninptheDoMcumen!tisEntitled\Acknowledgements",{\Dedications",orp\His-'tory",Athe(requiremen!t(section4)toPreserveitsTitle(section1)willtypicallyrequire'c!hangingftheactualtitle.-9.'TERMINAeTION('Yeouma!ynotcopye,moMdify,sublicense,ordistributetheDoMcumen!texceptasexpressly'pro!videdunderthisLicense.|Anyattemptotherwisetocop!ye,moMdify,sublicense,or'distributefitisv!oid,andwillautomaticallyterminateyourrightsunderthisLicense.'Ho!wever,ifAyou@ceaseallviolationofthisLicense,theny!ourlicensefromaparticular'cop!yrightJholderisJreinstated(a)pro!visionallye,sunlessanduntilJthecopyrightholder'explicitly_and nallyterminatesy!ourlicense,0and(b)pMermanentlye,0ifthecopyright'holder"failstonotifyy!ouoftheviolation"bysomereasonablemeanspriorto60days'afterfthecessation.('Moreo!ver,8your licensefromaparticularcop!yright holderisreinstatedpMermanen!tlyif'theV`cop!yrightholderVanoti esyouoftheviolationVabysomereasonablemeans,fbthisisthe' rstWtimey!ouWhaveWreceivednoticeofviolationWofthisLicense(foranyWwork)fromthat'cop!yrightholder,andy!oucuretheviolationpriorto30daysafteryourreceiptofthe'notice.'TeerminationNuofy!ourrightsunderthissectionNtdoMesnotterminatethelicensesofparties'whoqha!vereceivedcopiesorrightsfromyoupunderthisLicense.Ifyourrightshave'bMeenterminatedandnotpermanen!tlyreinstated,:receiptofacopyofsomeorallofthe'samefmaterialdoMesnotgiv!eyouanyrightstouseit.(AAGUnitsfCon!versionTd4033͍10.'FUTUREfREVISIONSOFTHISLICENSE33'TheaFereebSoft!wareFeoundationbmaypublishbnew,Urevisedv!ersionsoftheGNU Feree 33'DoMcumen!tationLicensefromtimetotime.xRSuchnewversionswillbMesimilarinspirit'to thepresen!tversion,?butmaydi erindetailtoaddress newproblemsorconcerns.'Seefhttp://www.gnu.org/copyleft/.'Eac!hversionoftheLicenseisgivenadistinguishingversionnumbMer.IftheDocumen!t'spMeci esrthataparticularn!umberedrversionofthisLicense\oranylaterversion"'appliesQtoPit,Ly!ouhaveQtheoptionPoffollowingthetermsPandconditionseitherofthat'spMeci edv!ersionorofanylaterversionthathasbMeenpublished(notasadraft)by'the!Feree"Soft!wareFeoundation.If"theDoMcument"does!notspecify"av!ersionnumbMer!of'this$License,D)y!oumaychoMose$anyversioneverpublished(notasadraft)bytheFeree'Soft!wareUFeoundation.mIftheDoMcumen!tspeci esthatapro!xyTcandecidewhichfuture'v!ersions)of*thisLicensecanbMeused,thatpro!xy'spublicstatement*ofacceptanceofa'v!ersionfpMermanentlyauthorizesyoutochoMosethatversionfortheDoMcument.11.'RELICENSING'\Massiv!e{"Multiauthor{#CollabMorationSite"(or\MMCzSite")meansany{#WeorldWide'WeebLeserv!erthatpublishescopyrightableLfworksandalsoprovidesprominentfacilities'forMan!ybModytoeditthosew!orks.EAMpublicwikithatManybModycaneditisanexampleof'suc!h Yaserver.A ?\Massive XMultiauthorCollabMoration"(or\MMC") >containedinthe'sitefmeansan!ysetofcopyrightableworksthuspublishedontheMMCsite.'\CC-BY-SA"8means8the8Creativ!eCommonsAttribution-Share8Alike3.08licensepub-'lished8b!y8CreativeCommons8CorpMoration,N(anot-for-pro tcorpMorationwithaprincipal'placeofbusinessinSanFerancisco,7California,7asw!ellasfuturecopyleftversionsofthat'licensefpublishedb!ythatsameorganization.'\IncorpMorate"zmeanstopublishyorrepublishaDocumen!t,?inwholeoryinpart,aspart'offanotherDoMcumen!t.'An&\MMC&UU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:p25GoutputTformat agsU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:'26GoutputTformatspAeci cationU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:˵25GoutputTprecisionlU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:H'27֍GYP2GP:A9GERTenvironmentv|rariable}U:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:t31Gparen9thesesjU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:>6,T7,8,9,22G`per'TopAerator*U:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U: 6GpAersonalTunitsdata leU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U: 'Z21GpiecewiseTlinearunitsPKU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:24GplusT(`+')opAeratoriU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:[7GpAo9wersU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U: ._6Gprecision,ToutputU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U: |27Gpre xesqU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:D5Gpre xesTandexpAonen9tsU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:6Gpre xes,Tde nitionofލU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U: 21Gprimitiv9eTunitsPU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:A 21GproAductsTofunits՟U:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U: Y6֍GYQ2Gquotien9tsTofunits񟍑U:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:#Z6͍YRnreadline,TusewithunitsrU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:u32 creciproAcalTcon9versionKQU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:} 2roAotsyU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:C9;yYSnsetloAcaleTfunctionލU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:28 bslashT(`/')opAerator暍U:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U: U6solidusT(`/')opAerator)U:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:K6sphere,Tv9olumeofߍU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:䙬12squareTroAotsNU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:9starT(`*')opAeratorꄍU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U: >6StateTPlaneCoAordinateSystem,USU:pU:U:U:U:U:U:U:U:U:U:U:U:¬5strictTcon9version.U:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:_̬2subtractionTofunitsU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:Z7sumsTanddi erencesofunits~?U:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:7sumsTofunits򙍑U:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U: $S7,T12surv9eyTfoAot,USӍU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:5surv9eyTmeasure,US덑U:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:5surv9eyTmile,USPԍU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:5syn9taxTofunitsdatabase U:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:=33<YTntempAeratureTcon9versionsJU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:|11YUUnicoAdeTsupportr)U:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:31 cunitTcompletionusing`?'(readlineonly)΍U:pU:U:U:U:U:32 bunitTde nitionsU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:_4unitTexpressions U:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U: Ƭ6unitTexpressions,complicatedӍU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:ލ9unitTlistaliases,de ningMDU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:~24unitTlistsIU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U: 12unitTnamecompletionU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:Iج32unitsTdata le,pAersonalU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:w21unitsTdata les,additionalU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:ˬ20unitsTde nitions,addingU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:ˬ21unitsTde nitions,c9hangingu-U:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:21unitsTfunctions-U:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U: *24unitsTquotien9ts gU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:=!6units,Tde nitionof3U:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:)21units,TloAokupmethod9U:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:k4units,TpiecewiselinearhU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:9"24units,Tprimitiv9eԥU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:`21units,Tsumsanddi erences]\U:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:7units,TsumsofҍU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:⌬12UNITSƉc4gENGLISHTen9vironmentv|rariableU:pU:U:U:U:U:U: /31UNITSFILETen9vironmentv|rariableTU:pU:U:U:U:U:U:U:U:U:U:U:U: 31USTStatePlaneCoAordinateSystemU:pU:U:U:U:U:U:U:U:U:U:U:U:U:Pm5USTsurv9eyfoAot~U:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:A95USTsurv9eymeasure΍U:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U: 5USTsurv9eymileU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:q5UTF-8EU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U: 31,ᖍGUnitsfCon!versionTd4433 9GYV4ƍGv9erbAoseToutput3U:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U: -2 Gv9erticalTbar(`|')opAeratorU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:7Gv9olumeTmeasure,EnglishcustomaryU:pU:U:U:U:U:U:U:U:U:U:U:U:l59YWwireTgaugesU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:G-120YYy9ard,TinternationalU:pU:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:U:f5@=;33ï0`gff cmmi12\߆Tff cmtt12YNff cmbx12S߆TG cmtt12PNG cmbx12GNj cmbx12B 3 cmmi109 * parse.y (yylex): Tweaked scanner to raise a new error (BADNUMBER) when a number is immediately followed by more numeric characters. This prevents things like 1.2.3 and 1..2 which were both legal and had possibly unexpected parsings before. Added new error code to units.h and new error message to units.c. 2010-05-20 Adrian Mariano * units.c: Added utf8 support. Added code to check for !utf8 in units.dat. Added better checking for locale. Added strwidth() to determine with of a utf8 string, and corrected code to use this function where appropriate. 2009-12-05 Adrian Mariano * units.c (rootunit): Fixed bug (n & 1==0) is always false * Numerous minor changes for eliminating warnings with -Wall 2009-10-03 Adrian Mariano * units.c (main): Changed RL_READLINE_VERSION test from > to >=. 2007-05-18 adrian * units.c (personalunitsfile): Added personalunitsfile() function to find ~/.units.dat if it exists. Added code in main() to load this file (first) when no -f specifications occur. (tryallunits): Modified to perform searching either for conformable units or for text matching units. This required changes to addtolist() as well. * parse.y: Added entry to support x^-y when - is not a multiply operator. Added MULTSTAR type and support for lower multiply precedence for '*'. Added special check for '**' operator as the old code didn't work. 2006-02-26 adrian * units.c: Added -1/--one-line option to display one line of output only. * units.c: Added --compact option to print output with only the conversion factor. * units.c: Changed verbose variable. Now it is 1 for normal output, zero for less output and 2 for more verbose output. The --compact option sets it to zero, and --verbose sets it to 2. The --terse option now simply sets other options. 2005-09-10 adrian * parse.y: Declared err as static and added %name-prefix to parser to make it possible to use units as a library. Note that declaring err as static also averts a bus error on the Intel Mac. 2004-12-12 adrian * units.c (checkunits): Added check for units that use '-' as a binary operator. These units will act differently depending on the way the program is invoked, so print a warning. * units.c (compareproducts): Modified to use a pointer to a function to decide whether a unit should be regarded as dimensionless. Added functions ignore_dimless(), ignore_primitive() and ignore_nothing() to use for invoking compareproducts. Modified compareunits to take this parameter as well. 2004-06-20 Adrian Mariano * parse.y: Added MINUS token and changed lexer to treat '-' according to the global variable minusminus either as MINUS or in the old fashion as MULTMINUS. * parse.y (funcunit): Added call to freeunit() to close memory leak. * units.c (compareproducts): Altered this function to use isdimless() when comparing units so that dimensionless units can be ignored in the comparison. Added isdimless() which checks whether a unit is defined as NODIM. 2003-12-04 Adrian Mariano * units.c (lookupunit): Added check for -ies plural 2003-09-20 Adrian Mariano * units.c (readunits): Wrote in a file to capture error messages, pass back an error return instead of calling exit(), do included units files with "!include", give error on nested "!locale" statements. 2003-05-09 Adrian Mariano * units.c: (readunits): Added error checking for function and prefix names. 2002-05-06 Adrian Mariano * units.c (reduceunit): The last change to reduceunit was screwed up. Corrected it. 2001-11-26 Adrian Mariano * units.c (readunits): Added locale checks to support the '!locale' syntax in units.dat. * configure.in: Added --enable-path-search option which replaces the use of an empty datadir for specifying path searching. 2001-08-30 Adrian Mariano * units.c (reduceunit): Separated two calls to reduceproduct(). This fixes a bug where "Unit reduction error" occurs instead of "Unknown unit". 2001-08-17 Adrian Mariano * units.c (tryallunits): Added signal() calls to ignore the SIGPIPE signal and hopefully prevent premature termination. 2000-05-28 Adrian Mariano * units.c (addtolist): Modified tryallunits() to search function definitions and produce a sorted list, piped through the pager. Modified ishelpquery to invoke ishelpquery to produce a list. 2000-04-18 Adrian Mariano * units.c (fgetscont): Added fix for backslash at the end of the buffer. 2000-04-13 Adrian Mariano * units.c (readunits): Set "userfile" when a path search is performed so that "help" can find the data file. (ishelpquery): Modified to find functions and prefixes. 2000-04-12 Adrian Mariano * units.c (ishelpquery): Wrote new function to print help messages by invoking a pager on units.dat. This required new field in unitlist structure, and code in main() to check for the "help" command. 2000-04-10 Adrian Mariano * parse.y: rewrote parser rules for correct unary '-'. * units.c (showdefinition): Substantially simplified and made correct for expressions that start with an operator (/ or -). 2000-04-09 Adrian Mariano * units.c (isfunction): Fixed call to removepadding() 2000-02-12 Adrian Mariano * units.c (fgetscont): Fixed buffer full test 1999-04-27 Adrian Mariano * units.c (addsubunit,addsubunitlist): Changed overflow test. Mon Aug 17 13:12:01 1998 Adrian Mariano * units.c (addunit): Added declaration for handlesum() so that it isn't called before being declared. Moved handlesum down the code past completereduce() so that handlesum doesn't call completereduce() before its definition. Sun Mar 8 10:08:56 1998 Adrian Mariano * units.c (main): Set rl_basic_word_break_characters to delimit words properly for unit completion. Mon Jun 9 19:12:08 1997 Adrian Mariano * units.c (lookupunit): Switched order of prefix and plural handling so that plurals are handled first. (This fixes the problem of "pints" being interpreted as p- plus ints.) Sun Apr 6 01:01:24 1997 Adrian Mariano * units.c (removepadding): Added check for zero length strings. This caused units to hang when invoked with arguments that consisted only of whitespace. Mon Mar 10 19:23:21 1997 Adrian Mariano * units.c: Changed 2 strdup() calls into dupstr() calls. Sun Mar 2 18:02:16 1997 Adrian Mariano * units.c: replaced sscanf with strtod affecting numlength() and addnumber(). This circumvents a bug in NeXT's C library and yields simpler code. Wed Feb 12 22:28:42 1997 Adrian Mariano * units.c (showanswer): Fixed to give slightly better display when verbose mode is active. Tue Jan 21 18:51:58 1997 Adrian Mariano * units.c: Changed showanswer() to convert reciprocal units. Added -s,--strict option to disable this conversion. Mon Jan 13 20:37:26 1997 Adrian Mariano * units.c: Added addnumber() because recursive call to addunit() was causing problems with strtok. Tue Dec 31 00:57:42 1996 Adrian Mariano * units.c (prefixhash): Changed to AND with 127 because signed chars seem to be causing segmentation faults with 8 bit characters. Changed size of the table to 128 to correspond. Thu Dec 26 13:54:59 1996 Adrian Mariano * units.c (completeunits): Added 1 to mymalloc() call so there is enough space. (This fixes the tab bug.) Mon Dec 9 23:46:27 1996 Adrian Mariano * unit.c (addunit): Changed logic for calling handlesum() to check that the character immediately before the '+' is not an 'e' since this would probably be an exponent. Mon Dec 7 10:47:43 1996 Adrian Mariano * units.c (lookupunit): Added tempbuf variable to prevent problems when the output from one call to lookupunit is used as input to a later call to lookupunit. * units.c: Changed main() and processargs() to allow invoking units with just one unit specified on the command line. Tue Dec 3 14:19:33 1996 Adrian Mariano * units.c: added verbose option, changed showanswer() to give verbose display, removed first argument from showunit(), added new function removepadding() to trim whitespace. * New file: texi2man, a perl script for converting the texinfo documentation into the man page format. Makefile.in changed to generate units.man from units.texinfo. Mon Dec 2 14:10:56 1996 Adrian Mariano * units.c: New functions handlesum(), addsubunitlist(), and productoverflow(). (addunit): Call handlesum() if there are '+' characters in the string to be added. This handles sums of conformable units. Added free() calls to free savescr when returning with an error. Sun Dec 1 17:30:52 1996 Adrian Mariano * units.c: Added isblank() and showdefinition(). Changed main() to call showdefinition if the second unit entered is blank. Also changed the loop to re-prompt the user for the first unit until something nonblank is entered. Changed showunit() to take two arguments. Wed Nov 27 23:08:33 1996 Adrian Mariano * units.c: Added function completeunits() for doing completion when readline is in use. * makefile.in: added support for LDFLAGS. * units.c (lookupunits): Added tests to avoid trying plurals on one character long base units. Fri Nov 22 19:25:23 1996 Kaveh R. Ghazi * Makefile.in, configure.in, units.c: add ansi2knr support. * New files: aclocal.m4, ansi2knr.1 and ansi2knr.c. Fri Nov 22 10:33:43 1996 Adrian Mariano * units.c: Added removespaces() function called from addunits() to remove spaces around '^' characters so the user doesn't have to be so careful. Thu Nov 21 23:39:09 1996 Adrian Mariano * units.c (lookupunit): Added check to return the input if it is a number. This was made necessary by the change in the handling of numbers which broke the '^' operator on numbers. Thu Nov 21 15:22:40 1996 Adrian Mariano * units.c (numlength): Changed test for sscanf to require a return value of exactly 1. For some reason, sscanf sometimes returns -1 instead of 0 when no fields were read. Thu Nov 21 09:17:26 1996 Adrian Mariano * Makefile.in: Added ALL_CFLAGS so that CFLAGS can be used by the user. * configure.in: Added fix to look for ncurses library to go with readline. (Required by some linux version.) Wed Nov 20 14:03:22 1996 Adrian Mariano * configure.in: Added check for const support. * Makefile.in: added VPATH, fixed a few places where $(srcdir) was needed, fixed the install targets to create directories if necessary by calling mkinstalldirs. Fixed man pages install target. Sun Nov 17 00:05:12 1996 Adrian Mariano * units.c: Added numlength() to handle "numbers" with multiple 'e' or '.' characters. Changed number evaluation in addunit() to do something reasonable when multiple '|' characters appear. Now number evaluation is done by sscanf() instead of atof(). Removed handling of numbers with no trailing space from lookupunit() and added it to addunit() with a recursive call. Thu Nov 1 16:18:08 1996 Adrian Mariano * units.c: Fixed up portability for string.h, stdlib.h. Added declarations for string functions and atof(). * units.c: Removed calls to tolower() since they turned out to be unportable. Sun Sep 8 10:19:43 1996 Adrian Mariano * units.c: Added long options, made option flag variables global. * units.c: Added freeunit() function to free units (which was never done), and uncommented two free() calls in cancelunit(). * units.c: Added processargs() function to tidy things up. Thu Sep 5 01:18:52 1996 Adrian Mariano * units.c: Removed all the static char * buffers and added support for readline(). Added growbuffer() and fgetslong() and getuser(). * units.c (readunits): Rewrote parsing to be cleaner and to remove trailing white space in units. Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc units-2.02/install-sh0000775000175000017500000001124510232761037014067 0ustar adrianadrian#! /bin/sh # # install - install a program, script, or datafile # This comes from X11R5. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. # # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 units-2.02/units_cur0000711000175000017500000000456112167113171014014 0ustar adrianadrian#!/usr/bin/python2 # Version 2 # 9 July 2013 # # Modified to use xml format output from timegenie instead of text file import datetime import sys import urllib import xml.etree.ElementTree as ET outfile = 'currency.units' outstr = '# ISO Currency Codes\n\n' if len(sys.argv)==2: outfile = sys.argv[1] elif len(sys.argv)>2: sys.stderr.write('Usage: {0} [filename]\n\n'.format(sys.argv[0])) sys.stderr.write('Update currency information for \'units\' into the specified\n') sys.stderr.write('filename or the default location, \'{0}\'.\n'.format(outfile)) sys.exit(1) try: currencies = ET.parse(urllib.urlopen('http://rss.timegenie.com/forex.xml')).findall('data') except IOError, exc: sys.stderr.write('Error connecting to currency server. {0}\n'.format(exc)) sys.exit(1) # print codes here codes = [x.find('code').text for x in currencies] names = [x.find('description').text for x in currencies] values = [x.find('rate').text for x in currencies] names = [x.lower().replace(' ','') for x in names] outstr += '\n'.join([x + ' '*20 + y for x,y in zip(codes,names)]) usd = codes.index('USD') euro = codes.index('EUR') usdval = values[usd] values = ['1|' + x +' euro' for x in values] values[euro] = usdval + ' US$' del names[usd] del values[usd] # print rates here now = datetime.datetime.now() outstr += '\n\n# Currency exchange rates from Time Genie (www.timegenie.com)\n' outstr += '\n!message Currency exchange rates from ' + now.strftime('%Y-%m-%d') + '\n\n' maxlen = max(map(len,names)) + 2 outstr += '\n'.join([x.ljust(maxlen) + y for x,y in zip(names, values)]) # precious metals prices # Another source for this data might be # http://www.xmlcharts.com/cache/precious-metals.xml outstr += '\n\n# Precious metals prices from http://services.packetizer.com/spotprices/\n\n' try: spotprices = ET.parse(urllib.urlopen('http://services.packetizer.com/spotprices/?f=xml')) except IOError, exc: sys.stderr.write('Error connecting to spotprices server. {0}\n'.format(exc)) sys.exit(1) metals = ['gold','platinum','silver'] for metal in metals: outstr += '{0} {1} US$/troyounce\n'.format((metal+'price').ljust(15), spotprices.find(metal).text) try: if outfile == '-': outfile = sys.stdout else: outfile = open(outfile,'w') except IOError, exc: sys.stderr.write('Unable to write to output file. {0}\n'.format(exc)) sys.exit(1) outfile.write(outstr) units-2.02/units.man0000664000175000017500000026034612167113305013730 0ustar adrianadrian.\"Do not edit this file. It was created from units.texinfo .\"using texi2man version 1.01p on Tue Jul 9 19:03:33 EDT 2013 .\"This manual is for GNU Units (version 2.02), .\"which performs units conversions and units calculations. .\" .\"Copyright \(co 1996, 1997, 1999, 2000, 2001, 2002, 2004, 2005, 2007, .\"2011, 2012, 2013 Free Software Foundation, Inc. .\" .\"Permission is granted to copy, distribute and/or modify this document .\"under the terms of the GNU Free Documentation License, Version 1.3 or .\"any later version published by the Free Software Foundation; with no .\"Invariant Sections, with no Front-Cover Texts, and with no Back-Cover .\"Texts. .TH UNITS 1 "7 June 2013" .\" .\" ensure that ASCII circumflex U+005E (^) is not remapped with groff .if \n(.g .tr ^\(ha .\" ellipsis: space periods with troff but not with nroff .if n .ds El \&... .if t .ds El \&.\ .\ . .\" .\" Extensions to man macros .\" .\" Constant-width font .de CW .hy 0 .if n \{\ .ie \\n(.$>2 \&\\$1'\\$2'\\$3 .el \&'\\$1'\\$2 .\} .if t \{\ .ie \\n(.$>2 \&\\$1\f(CW\\$2\fR\\$3 .el \&\f(CW\\$1\fR\\$2 .\} .hy 14 .. .\" Constant-width oblique font .de CI .hy 0 .if n \{\ .ie \\n(.$>2 \&\\$1'\fI\\$2\fR'\\$3 .el \&'\fI\\$1\fR'\\$2 .\} .if t \{\ .ie \\n(.$>2 \&\\$1\f(CI\\$2\fR\\$3 .el \&\f(CI\\$1\fR\\$2 .\} .hy 14 .. .\" Constant-width font with quotes .de CQ .hy 0 .if n \{\ .ie \\n(.$>2 \&\\$1'\\$2'\\$3 .el \&'\\$1'\\$2 .\} .if t \{\ .ie \\n(.$>2 \&\\$1`\f(CW\\$2\fR'\\$3 .el \&`\f(CW\\$1\fR'\\$2 .\} .hy 14 .. .\" Display start .de DS .hy 0 .if t .in +4n .if n .in +3n .nf .. .\" Display end .de DE .fi .in .hy 14 .. .\" Example start .de ES .DS .if t \{\ .if '\\$1'S' \{\ .nr Ex 1 .ps -1 .\} .el .nr Ex 0 .nr mE \\n(.f .ft CW .\} .. .\" Example end .de EE .if t \{\ .ft \\n(mE .if \\n(Ex=1 .ps .\} .DE .. .SH NAME units \(em unit conversion and calculation program .PP .SH SYNOPSIS .PP .CW units .RI [ options ] .RI [ from-unit .RI [ to-unit ]] .PP .SH DESCRIPTION The .CW "units" program converts quantities expressed in various systems of measurement to their equivalents in other systems of measurement. Like many similar programs, it can handle multiplicative scale changes. It can also handle nonlinear conversions such as Fahrenheit to Celsius. See the examples below. The program can also perform conversions from and to sums of units, such as converting between meters and feet plus inches. .PP Beyond simple unit conversions, .CW "units" can be used as a general-purpose scientific calculator that keeps track of units in its calculations. You can form arbitrary complex mathematical expressions of dimensions including sums, products, quotients, powers, and even roots of dimensions. Thus you can ensure accuracy and dimensional consistency when working with long expressions that involve many different units that may combine in complex ways. .PP The units are defined in an external data file. You can use the extensive data file that comes with this program, or you can provide your own data file to suit your needs. You can also use your own data file to supplement the standard data file. .PP Basic operation is simple: you enter the units that you want to convert \fIfrom\fP and the units that you want to convert \fIto\fP. You can use the program interactively with prompts, or you can use it from the command line. .PP You can change the default behavior of .CW "units" with various options given on the command line. See \fIInvoking Units\fP for a description of the available options. .PP .SH INTERACTING WITH \f(BIUNITS\fP To invoke units for interactive use, type .CI "units" at your shell prompt. The program will print something like this: .PP .ES Currency exchange rates from 04/23/12 2516 units, 85 prefixes, 65 nonlinear units You have: .EE .PP At the .CQ "You have:" prompt, type the quantity and units that you are converting \fIfrom\fP. For example, if you want to convert ten meters to feet, type .CI "10 meters" . Next, .CW "units" will print .CQ "You want:" . You should type the units you want to convert \fIto\fP. To convert to feet, you would type .CI "feet" . If the .CW "readline" library was compiled in then the tab key can be used to complete unit names. See \fIReadline Support\fP for more information about .CW "readline" . To quit the program press Ctrl-C or Ctrl-D under Unix. Under Windows press Ctrl-Z. .PP The answer will be displayed in two ways. The first line of output, which is marked with a .CQ "*" to indicate multiplication, gives the result of the conversion you have asked for. The second line of output, which is marked with a .CQ "/" to indicate division, gives the inverse of the conversion factor. If you convert 10 meters to feet, .CW "units" will print .PP .ES * 32.808399 / 0.03048 .EE .PP which tells you that 10 meters equals about 32.8 feet. The second number gives the conversion in the opposite direction. In this case, it tells you that 1 foot is equal to about 0.03 dekameters since the dekameter is 10 meters. It also tells you that 1/32.8 is about 0.03. .PP The .CW "units" program prints the inverse because sometimes it is a more convenient number. In the example above, for example, the inverse value is an exact conversion: a foot is exactly 0.03048 dekameters. But the number given the other direction is inexact. .PP If you convert grains to pounds, you will see the following: .PP .ES You have: grains You want: pounds * 0.00014285714 / 7000 .EE .PP From the second line of the output you can immediately see that a grain is equal to a seven thousandth of a pound. This is not so obvious from the first line of the output. If you find the output format confusing, try using the .CQ "--verbose" option: .PP .ES You have: grain You want: aeginamina grain = 0.00010416667 aeginamina grain = (1 / 9600) aeginamina .EE .PP If you request a conversion between units that measure reciprocal dimensions, then .CW "units" will display the conversion results with an extra note indicating that reciprocal conversion has been done: .PP .ES You have: 6 ohms You want: siemens reciprocal conversion * 0.16666667 / 6 .EE .PP Reciprocal conversion can be suppressed by using the .CQ "--strict" option. As usual, use the .CQ "--verbose" option to get more comprehensible output: .PP .ES You have: tex You want: typp reciprocal conversion 1 / tex = 496.05465 typp 1 / tex = (1 / 0.0020159069) typp You have: 20 mph You want: sec/mile reciprocal conversion 1 / 20 mph = 180 sec/mile 1 / 20 mph = (1 / 0.0055555556) sec/mile .EE .PP If you enter incompatible unit types, the .CW "units" program will print a message indicating that the units are not conformable and it will display the reduced form for each unit: .PP .ES You have: ergs/hour You want: fathoms kg^2 / day conformability error 2.7777778e-11 kg m^2 / sec^3 2.1166667e-05 kg^2 m / sec .EE .PP If you only want to find the reduced form or definition of a unit, simply press \fIEnter\fP at the .CQ "You want:" prompt. Here is an example: .PP .ES You have: jansky You want: Definition: fluxunit = 1e-26 W/m^2 Hz = 1e-26 kg / s^2 .EE .PP The output from .CW "units" indicates that the jansky is defined to be equal to a fluxunit which in turn is defined to be a certain combination of watts, meters, and hertz. The fully reduced (and in this case somewhat more cryptic) form appears on the far right. .PP Some named units are treated as dimensionless in some situations. These units include the radian and steradian. These units will be treated as equal to 1 in units conversions. Power is equal to torque times angular velocity. This conversion can only be performed if the radian is dimensionless. .PP .ES You have: (14 ft lbf) (12 radians/sec) You want: watts * 227.77742 / 0.0043902509 .EE .PP Named dimensionless units are not treated as dimensionless in other contexts. They cannot be used as exponents so for example, .CQ "meter^radian" is not allowed. .PP If you want a list of options you can type .CI "?" at the .CQ "You want:" prompt. The program will display a list of named units that are conformable with the unit that you entered at the .CQ "You have:" prompt above. Conformable unit \fIcombinations\fP will not appear on this list. .PP Typing .CI "help" at either prompt displays a short help message. You can also type .CI "help" followed by a unit name. This will invoke a pager on the units data base at the point where that unit is defined. You can read the definition and comments that may give more details or historical information about the unit. (You can generally quit out of the page by pressing .CQ "q" .) .PP Typing .CI "search" \fItext\fP will display a list of all of the units whose names contain \fItext\fP as a substring along with their definitions. This may help in the case where you aren't sure of the right unit name. .PP .SH USING \f(BIUNITS\fP NON-INTERACTIVELY The .CW "units" program can perform units conversions non-interactively from the command line. To do this, type the command, type the original unit expression, and type the new units you want. If a units expression contains non-alphanumeric characters, you may need to protect it from interpretation by the shell using single or double quote characters. .PP If you type .PP .ES units "2 liters" quarts .EE .PP then .CW "units" will print .PP .ES * 2.1133764 / 0.47317647 .EE .PP and then exit. The output tells you that 2 liters is about 2.1 quarts, or alternatively that a quart is about 0.47 times 2 liters. .PP If the conversion is successful, then .CW "units" will return success (zero) to the calling environment. If you enter non-conformable units then .CW "units" will print a message giving the reduced form of each unit and it will return failure (nonzero) to the calling environment. .PP When you invoke .CW "units" with only one argument, it will print out the definition of the specified unit. It will return failure if the unit is not defined and success if the unit is defined. .PP .SH UNIT DEFINITIONS The conversion information is read from a units data file that is called .CQ "definitions.units" and is usually located in the .CQ "/usr/share/units" directory. If you invoke .CW "units" with the .CQ "-V" option, it will print the location of this file. The default file includes definitions for all familiar units, abbreviations and metric prefixes. It also includes many obscure or archaic units. .PP Many constants of nature are defined, including these: .PP .ES pi \fRratio of circumference to diameter\fP c \fRspeed of light\fP e \fRcharge on an electron\fP force \fRacceleration of gravity\fP mole \fRAvogadro's number\fP water \fRpressure per unit height of water\fP Hg \fRpressure per unit height of mercury\fP au \fRastronomical unit\fP k \fRBoltzman's constant\fP mu0 \fRpermeability of vacuum\fP epsilon0 \fRpermittivity of vacuum\fP G \fRGravitational constant\fP mach \fRspeed of sound\fP .EE .PP The standard data file includes atomic masses for all of the elements and numerous other constants. Also included are the densities of various ingredients used in baking so that .CQ "2 cups flour_sifted" can be converted to .CQ "grams" . This is not an exhaustive list. Consult the units data file to see the complete list, or to see the definitions that are used. .PP The .CQ "pound" is a unit of mass. To get force, multiply by the force conversion unit .CQ "force" or use the shorthand .CQ "lbf" . (Note that .CQ "g" is already taken as the standard abbreviation for the gram.) The unit .CQ "ounce" is also a unit of mass. The fluid ounce is .CQ "fluidounce" or .CQ "floz" . British capacity units that differ from their US counterparts, such as the British Imperial gallon, are prefixed with .CQ "br" . Currency is prefixed with its country name: .CQ "belgiumfranc" , .CQ "britainpound" . .PP When searching for a unit, if the specified string does not appear exactly as a unit name, then the .CW "units" program will try to remove a trailing .CQ "s" , .CQ "es" . Next units will replace a trailing .CQ "ies" with .CQ "y" . If that fails, .CW "units" will check for a prefix. The database includes all of the standard metric prefixes. Only one prefix is permitted per unit, so .CQ "micromicrofarad" will fail. However, prefixes can appear alone with no unit following them, so .CQ "micro*microfarad" will work, as will .CQ "micro microfarad" . .PP To find out which units and prefixes are available, read the standard units data file, which is extensively annotated. .PP .SS English Customary Units English customary units differ in various ways in different regions. In Britain a complex system of volume measurements featured different gallons for different materials such as a wine gallon and ale gallon that different by twenty percent. This complexity was swept away in 1824 by a reform that created an entirely new gallon, the British Imperial gallon defined as the volume occupied by ten pounds of water. Meanwhile in the USA the gallon is derived from the 1707 Winchester wine gallon, which is 231 cubic inches. These gallons differ by about twenty percent. By default if .CW "units" runs in the .CQ "en_GB" locale you will get the British volume measures. If it runs in the .CQ "en_US" locale you will get the US volume measures. In other locales the default values are the US definitions. If you wish to force different definitions then set the environment variable .CW "UNITS_ENGLISH" to either .CQ "US" or .CQ "GB" to set the desired definitions independent of the locale. .PP Before 1959, the value of a yard (and other units of measure defined in terms of it) differed slightly among English-speaking countries. In 1959, Australia, Canada, New Zealand, the United Kingdom, the United States, and South Africa adopted the Canadian value of 1\ yard = 0.9144\ m (exactly), which was approximately halfway between the values used by the UK and the US; it had the additional advantage of making 1\ inch = 2.54\ cm (exactly). This new standard was termed the \fIInternational Yard\fP. Australia, Canada, and the UK then defined all customary lengths in terms of the International Yard (Australia did not define the furlong or rod); because many US land surveys were in terms of the pre-1959 units, the US continued to define customary surveyors' units (furlong, chain, rod, and link) in terms of the previous value for the foot, which was termed the \fIUS survey foot\fP. The US defined a \fIUS survey mile\fP as 5280 US survey feet, and defined a \fIstatute mile\fP as a US survey mile. The US values for these units differ from the international values by about 2\ ppm. .PP The .CW "units" program uses the international values for these units; the US values can be obtained by using either the .CQ "US" or the .CQ "survey" prefix. In either case, the simple familiar relationships among the units are maintained, e.g., 1 .CQ "furlong" = 660 .CQ "ft" , and 1 .CQ "USfurlong" = 660 .CQ "USft" , though the metric equivalents differ slightly between the two cases. The .CQ "US" prefix or the .CQ "survey" prefix can also be used to obtain the US survey mile and the value of the US yard prior to 1959, e.g., .CQ "USmile" or .CQ "surveymile" (but \fInot\fP .CQ "USsurveymile" ). To get the US value of the statute mile, use either .CQ "USstatutemile" or .CQ "USmile" . .PP Except for distances that extend over hundreds of miles (such as in the US State Plane Coordinate System), the differences in the miles are usually insignificant: .PP .ES You have: 100 surveymile - 100 mile You want: inch * 12.672025 / 0.078913984 .EE .PP The pre-1959 UK values for these units can be obtained with the prefix .CQ "UK" . .PP In the US, the acre is officially defined in terms of the US survey foot, but .CW "units" uses a definition based on the international foot. If you want the official US acre use .CQ "USacre" and similarly use .CQ "USacrefoot" for the official US version of that unit. The difference between these units is about 4 parts per million. .PP .SH UNIT EXPRESSIONS .SS Operators You can enter more complicated units by combining units with operations such as powers, multiplication, division, addition, subtraction, and parentheses for grouping. You can use the customary symbols for these operators when .CW "units" is invoked with its default options. Additionally, .CW "units" supports some extensions, including high priority multiplication using a space, and a high priority numerical division operator .CQ ( "|" ) that can simplify some expressions. .PP Powers of units can be specified using the .CQ "^" character as shown in the following example, or by simple concatenation of a unit and its exponent: .CQ "cm3" is equivalent to .CQ "cm^3" ; if the exponent is more than one digit, the .CQ "^" is required. An exponent like .CQ "2^3^2" is evaluated right to left as usual. The .CQ "^" operator has the second highest precedence. You can also use .CQ "**" as an exponent operator. .PP .ES You have: cm^3 You want: gallons * 0.00026417205 / 3785.4118 You have: arabicfoot * arabictradepound * force You want: ft lbf * 0.7296 / 1.370614 .EE .PP You multiply units using a space or an asterisk .CQ ( "*" ). The example above shows both forms. You can divide units using the slash .CQ ( "/" ) or with .CQ "per" . .PP .ES You have: furlongs per fortnight You want: m/s * 0.00016630986 / 6012.8727 .EE .PP When a unit includes a prefix, exponent operators apply to the combination, so .CQ "centimeter^3" gives cubic centimeters. If you separate the prefix from the unit with any multiplication operator, such as .CQ "centi meter^3" , then the prefix is treated as a separate unit, so the exponent does not apply. The second example would be a hundredth of a cubic meter, not a centimeter. .PP Multiplication using a space has a higher precedence than division using a slash and is evaluated left to right; in effect, the first .CQ "/" character marks the beginning of the denominator of a unit expression. This makes it simple to enter a quotient with several terms in the denominator: .CQ "W / m^2 Hz" . If you multiply with .CQ "*" then you must group the terms in the denominator with parentheses: .CQ "W / (m^2 * Hz)" . .PP The higher precedence of the space operator may not always be advantageous. For example, .CQ "m/s s/day" is equivalent to .CQ "m / s s day" and has dimensions of length per time cubed. Similarly, .CQ "1/2 meter" refers to a unit of reciprocal length equivalent to 0.5/meter, perhaps not what you would intend if you entered that expression. The .CQ "*" operator is convenient for multiplying a sequence of quotients. With the .CQ "*" operator, the example above becomes .CQ "m/s * s/day" , which is equivalent to .CQ "m/day" . Similarly, you could write .CQ "1/2 * meter" to get half a meter. Alternatively, parentheses can be used for grouping: you could write .CQ "(1/2) meter" to get half a meter. See \fIComplicated Unit Expressions\fP for an illustration of the various options. .PP The .CW "units" program supports another option for numerical fractions. You can indicate division of \fInumbers\fP with the vertical bar .CQ ( "|" ), so if you wanted half a meter you could write .CQ "1|2 meter" . This operator has the highest precedence, so you can write the square root of two thirds .CQ "2|3^1|2" . You cannot use the vertical bar to indicate division of non-numerical units (e.g., .CQ "m|s" results in an error message). .PP .ES You have: 1|2 inch You want: cm * 1.27 / 0.78740157 .EE .PP You can use parentheses for grouping: .PP .ES You have: (1/2) kg / (kg/meter) You want: league * 0.00010356166 / 9656.0833 .EE .PP .SS Sums and Differences of Units You may sometimes want to add values of different units that are outside the SI. You may also wish to use .CW "units" as a calculator that keeps track of units. Sums of conformable units are written with the .CQ "+" character, and differences with the .CQ "-" character. .PP .ES You have: 2 hours + 23 minutes + 32 seconds You want: seconds * 8612 / 0.00011611705 You have: 12 ft + 3 in You want: cm * 373.38 / 0.0026782366 You have: 2 btu + 450 ft lbf You want: btu * 2.5782804 / 0.38785542 .EE .PP The expressions that are added or subtracted must reduce to identical expressions in primitive units, or an error message will be displayed: .PP .ES You have: 12 printerspoint - 4 heredium ^ Illegal sum of non-conformable units .EE .PP As usual, the precedence for .CQ "+" and .CQ "-" is lower than that of the other operators. A fractional quantity such as 2\ 1/2 cups can be given as .CQ "(2+1|2) cups" ; the parentheses are necessary because multiplication has higher precedence than addition. If you omit the parentheses, .CW "units" attempts to add .CQ "2" and .CQ "1|2 cups" , and you get an error message: .PP .ES You have: 2+1|2 cups ^ Illegal sum or difference of non-conformable units .EE .PP The expression could also be correctly written as .CQ "(2+1/2) cups" . If you write .CQ "2 1|2 cups" the space is interpreted as \fImultiplication\fP so the result is the same as .CQ "1 cup" . .PP The .CQ "+" and .CQ "-" characters sometimes appears in exponents like .CQ "3.43e+8" . This leads to an ambiguity in an expression like .CQ "3e+2 yC" . The unit .CQ "e" is a small unit of charge, so this can be regarded as equivalent to .CQ "(3e+2) yC" or .CQ "(3 e)+(2 yC)" . This ambiguity is resolved by always interpreting .CQ "+" and .CQ "-" as part of an exponent if possible. .PP .SS Numbers as Units For .CW "units" , numbers are just another kind of unit. They can appear as many times as you like and in any order in a unit expression. For example, to find the volume of a box that is 2 ft by 3 ft by 12 ft in steres, you could do the following: .PP .ES You have: 2 ft 3 ft 12 ft You want: stere * 2.038813 / 0.49048148 You have: $ 5 / yard You want: cents / inch * 13.888889 / 0.072 .EE .PP And the second example shows how the dollar sign in the units conversion can precede the five. Be careful: .CW "units" will interpret .CQ "$5" with no space as equivalent to .CQ "dollar^5" . .PP .SS Built-in Functions Several built-in functions are provided: .CQ "sin" , .CQ "cos" , .CQ "tan" , .CQ "ln" , .CQ "log" , .CQ "log2" , .CQ "exp" , .CQ "acos" , .CQ "atan" and .CQ "asin" . The .CQ "sin" , .CQ "cos" , and .CQ "tan" functions require either a dimensionless argument or an argument with dimensions of angle. .PP .ES You have: sin(30 degrees) You want: Definition: 0.5 You have: sin(pi/2) You want: Definition: 1 You have: sin(3 kg) ^ Unit not dimensionless .EE .PP The other functions on the list require dimensionless arguments. The inverse trigonometric functions return arguments with dimensions of angle. .PP If you wish to take roots of units, you may use the .CQ "sqrt" or .CQ "cuberoot" functions. These functions require that the argument have the appropriate root. You can obtain higher roots by using fractional exponents: .PP .ES You have: sqrt(acre) You want: feet * 208.71074 / 0.0047913202 You have: (400 W/m^2 / stefanboltzmann)^(1/4) You have: Definition: 289.80882 K You have: cuberoot(hectare) ^ Unit not a root .EE .PP .SS Complicated Unit Expressions The .CW "units" program is especially helpful in ensuring accuracy and dimensional consistency when converting lengthy unit expressions. .if t .ig ++ For example, one form of the Darcy-Weisbach fluid-flow equation is .RS 5n .PP Delta \fIP\fP = (8 / pi)^2 (rho \fIfLQ\fP^2) / \fId\fP^5, .RE .PP where Delta \fIP\fP is the pressure drop, rho is the mass density, \fIf\fP is the (dimensionless) friction factor, \fIL\fP is the length of the pipe, \fIQ\fP is the volumetric flow rate, and \fId\fP is the pipe diameter. It might be desired to have the equation in the form .RS 5n .PP Delta \fIP\fP = A1 rho \fIfLQ\fP^2 / \fId\fP^5 .RE .PP .++ .if n .ig ++ .EQ delim $$ .EN For example, one form of the Darcy\-Weisbach fluid-flow equation is .RS 5n .PP .EQ DELTA P = 8 over pi sup 2 rho fL Q sup 2 over d sup 5 , .EN .RE .PP where $DELTA P$ is the pressure drop, $rho$ is the mass density, $f$ is the (dimensionless) friction factor, $L$ is the length of the pipe, $Q$ is the volumetric flow rate, and $d$ is the pipe diameter. It might be desired to have the equation in the form .RS 5n .PP .EQ DELTA P = A sub 1 rho fL Q sup 2 over d sup 5 .EN .RE .PP .EQ delim off .EN .++ .PP that accepted the user's normal units; for typical units used in the US, the required conversion could be something like .PP .ES You have: (8/pi^2)(lbm/ft^3)ft(ft^3/s)^2(1/in^5) You want: psi * 43.533969 / 0.022970568 .EE .PP The parentheses allow individual terms in the expression to be entered naturally, as they might be read from the formula. Alternatively, the multiplication could be done with the .CQ "*" rather than a space; then parentheses are needed only around .CQ "ft^3/s" because of its exponent: .PP .ES You have: 8/pi^2 * lbm/ft^3 * ft * (ft^3/s)^2 /in^5 You want: psi * 43.533969 / 0.022970568 .EE .PP Without parentheses, and using spaces for multiplication, the previous conversion would need to be entered as .PP .ES You have: 8 lb ft ft^3 ft^3 / pi^2 ft^3 s^2 in^5 You want: psi * 43.533969 / 0.022970568 .EE .PP .SS Backwards Compatibility: .CQ "*" and .CQ "-" The original .CW "units" assigned multiplication a higher precedence than division using the slash. This differs from the usual precedence rules, which give multiplication and division equal precedence, and can be confusing for people who think of units as a calculator. .PP The star operator .CQ ( "*" ) included in this .CW "units" program has, by default, the same precedence as division, and hence follows the usual precedence rules. For backwards compatibility you can invoke .CW "units" with the .CQ "--oldstar" option. Then .CQ "*" has a higher precedence than division, and the same precedence as multiplication using the space. .PP Historically, the hyphen .CQ ( "-" ) has been used in technical publications to indicate products of units, and the original .CW "units" program treated it as a multiplication operator. Because .CW "units" provides several other ways to obtain unit products, and because .CQ "-" is a subtraction operator in general algebraic expressions, .CW "units" treats the binary .CQ "-" as a subtraction operator by default. For backwards compatibility use the .CQ "--product" option, which causes .CW "units" to treat the binary .CQ "-" operator as a product operator. When .CQ "-" is a multiplication operator it has the same precedence as multiplication with a space, giving it a higher precedence than division. .PP When .CQ "-" is used as a unary operator it negates its operand. Regardless of the .CW "units" options, if .CQ "-" appears after .CQ "(" or after .CQ "+" then it will act as a negation operator. So you can always compute 20 degrees minus 12 minutes by entering .CQ "20 degrees + -12 arcmin" . You must use this construction when you define new units because you cannot know what options will be in force when your definition is processed. .PP .SH NONLINEAR UNIT CONVERSIONS Nonlinear units are represented using functional notation. They make possible nonlinear unit conversions such as temperature. .PP .SS Temperature Conversions Conversions between temperatures are different from linear conversions between temperature \fIincrements\fP\(emsee the example below. The absolute temperature conversions are handled by units starting with .CQ "temp" , and you must use functional notation. The temperature-increment conversions are done using units starting with .CQ "deg" and they do not require functional notation. .PP .ES You have: tempF(45) You want: tempC 7.2222222 You have: 45 degF You want: degC * 25 / 0.04 .EE .PP Think of .CQ "tempF(\fIx\fP)" not as a function but as a notation that indicates that \fIx\fP should have units of .CQ "tempF" attached to it. See \fIDefining Nonlinear Units\fP. The first conversion shows that if it's 45 degrees Fahrenheit outside, it's 7.2 degrees Celsius. The second conversion indicates that a change of 45 degrees Fahrenheit corresponds to a change of 25 degrees Celsius. The conversion from .CQ "tempF(\fIx\fP)" is to absolute temperature, so that .PP .ES You have: tempF(45) You want: degR * 504.67 / 0.0019814929 .EE .PP gives the same result as .PP .ES You have: tempF(45) You want: tempR * 504.67 / 0.0019814929 .EE .PP But if you convert .CQ "tempF(\fIx\fP)" to .CQ "degC" , the output is probably not what you expect: .PP .ES You have: tempF(45) You want: degC * 280.37222 / 0.0035666871 .EE .PP The result is the temperature in K, because .CQ "degC" is defined as .CQ "K" , the Kelvin. For consistent results, use the .CQ "temp\fIX\fP" units when converting to a temperature rather than converting a temperature increment. .PP .SS Other Nonlinear Units Some other examples of nonlinear units are numerous different ring sizes and wire gauges, the grit sizes used for abrasives, the decibel scale, shoe size, scales for the density of sugar (e.g. baume). The standard data file also supplies units for computing the area of a circle and the volume of a sphere. See the standard units data file for more details. Wire gauges with multiple zeroes are signified using negative numbers where two zeroes is .CQ "-1" . Alternatively, you can use the synonyms .CQ "g00" , .CQ "g000" , and so on that are defined in the standard units data file. .PP .ES You have: wiregauge(11) You want: inches * 0.090742002 / 11.020255 You have: brwiregauge(g00) You want: inches * 0.348 / 2.8735632 You have: 1 mm You want: wiregauge 18.201919 You have: grit_P(600) You want: grit_ansicoated 342.76923 .EE .PP The last example shows the conversion from P graded sand paper, which is the European standard and may be marked ``P600'' on the back, to the USA standard. .PP You can compute the area of a circle using the nonlinear unit, .CQ "circlearea" . You can also do this using the circularinch or circleinch. The next example shows two ways to compute the area of a circle with a five inch radius and one way to compute the volume of a sphere with a radius of one meter. .PP .ES You have: circlearea(5 in) You want: in2 * 78.539816 / 0.012732395 You have: 10^2 circleinch You want: in2 * 78.539816 / 0.012732395 You have: spherevol(meter) You want: ft3 * 147.92573 / 0.0067601492 .EE .PP .SH UNIT LISTS: CONVERSION TO SUMS OF UNITS Outside of the SI, it is sometimes desirable to convert a single unit to a sum of units\(emfor example, feet to feet plus inches. The conversion \fIfrom\fP sums of units was described in \fISums and Differences of Units\fP, and is a simple matter of adding the units with the .CQ "+" sign: .PP .ES You have: 12 ft + 3 in + 3|8 in You want: ft * 12.28125 / 0.081424936 .EE .PP Although you can similarly write a sum of units to convert \fIto\fP, the result will not be the conversion to the units in the sum, but rather the conversion to the particular sum that you have entered: .PP .ES You have: 12.28125 ft You want: ft + in + 1|8 in * 11.228571 / 0.089058524 .EE .PP The unit expression given at the .CQ "You want:" prompt is equivalent to asking for conversion to multiples of .CQ "1 ft + 1 in + 1|8 in" , which is 1.09375 ft, so the conversion in the previous example is equivalent to .PP .ES You have: 12.28125 ft You want: 1.09375 ft * 11.228571 / 0.089058524 .EE .PP In converting to a sum of units like miles, feet and inches, you typically want the largest integral value for the first unit, followed by the largest integral value for the next, and the remainder converted to the last unit. You can do this conversion easily with .CW "units" using a special syntax for lists of units. You must list the desired units in order from largest to smallest, separated by the semicolon .CQ ( ";" ) character: .PP .ES You have: 12.28125 ft You want: ft;in;1|8 in 12 ft + 3 in + 3|8 in .EE .PP The conversion always gives integer coefficients on the units in the list, except possibly the last unit when the conversion is not exact: .PP .ES You have: 12.28126 ft You want: ft;in;1|8 in 12 ft + 3 in + 3.00096 * 1|8 in .EE .PP The order in which you list the units is important: .PP .ES You have: 3 kg You want: oz;lb 105 oz + 0.051367866 lb You have: 3 kg You want: lb;oz 6 lb + 9.8218858 oz .EE .PP Listing ounces before pounds produces a technically correct result, but not a very useful one. You must list the units in descending order of size in order to get the most useful result. .PP Ending a unit list with the separator .CQ ";" has the same effect as repeating the last unit on the list, so .CQ "ft;in;1|8 in;" is equivalent to .CQ "ft;in;1|8 in;1|8 in" . With the example above, this gives .PP .ES You have: 12.28126 ft You want: ft;in;1|8 in; 12 ft + 3 in + 3|8 in + 0.00096 * 1|8 in .EE .PP in effect separating the integer and fractional parts of the coefficient for the last unit. If you instead prefer to round the last coefficient to an integer you can do this with the .CQ "--round" .CQ ( "-r" ) option. With the previous example, the result is .PP .ES You have: 12.28126 ft You want: ft;in;1|8 in 12 ft + 3 in + 3|8 in (rounded down to nearest 1|8 in) .EE .PP When you use the .CQ "-r" option, repeating the last unit on the list has no effect (e.g., .CQ "ft;in;1|8 in;1|8 in" is equivalent to .CQ "ft;in;1|8 in" ), and hence neither does ending a list with a .CQ ";" . With a single unit and the .CQ "-r" option, a terminal .CQ ";" \fIdoes\fP have an effect: it causes .CW "units" to treat the single unit as a list and produce a rounded value for the single unit. Without the extra .CQ ";" , the .CQ "-r" option has no effect on single unit conversions. This example shows the output using the .CQ "-r" option: .PP .ES You have: 12.28126 ft You want: in * 147.37512 / 0.0067854058 You have: 12.28126 ft You want: in; 147 in (rounded down to nearest in) .EE .PP Each unit that appears in the list must be conformable with the first unit on the list, and of course the listed units must also be conformable with the \fIYou have\fP unit that you enter. .PP .ES You have: meter You want: ft;kg ^ conformability error ft = 0.3048 m kg = 1 kg You have: meter You want: lb;oz conformability error 1 m 0.45359237 kg .EE .PP In the first case, .CW "units" reports the disagreement between units appearing on the list. In the second case, .CW "units" reports disagreement between the unit you entered and the desired conversion. This conformability error is based on the first unit on the unit list. .PP Other common candidates for conversion to sums of units are angles and time: .PP .ES You have: 23.437754 deg You want; deg;arcmin;arcsec 23 deg + 26 arcmin + 15.9144 arcsec You have: 7.2319 hr You want: hr;min;sec 7 hr + 13 min + 54.84 sec .EE .PP In North America, recipes for cooking typically measure ingredients by volume, and use units that are not always convenient multiples of each other. Suppose that you have a recipe for 6 and you wish to make a portion for 1. If the recipe calls for 2\ 1/2 cups of an ingredient, you might wish to know the measurements in terms of measuring devices you have available, you could use .CW "units" and enter .PP .ES You have: (2+1|2) cup / 6 You want: cup;1|2 cup;1|3 cup;1|4 cup;tbsp;tsp;1|2 tsp;1|4 tsp 1|3 cup + 1 tbsp + 1 tsp .EE .PP By default, if a unit in a list begins with fraction of the form 1|\fIx\fP and its multiplier is an integer, the fraction is given as the product of the multiplier and the numerator; for example, .PP .ES You have: 12.28125 ft You want: ft;in;1|8 in; 12 ft + 3 in + 3|8 in .EE .PP In many cases, such as the example above, this is what is wanted, but sometimes it is not. For example, a cooking recipe for 6 might call for 5\ 1/4 cup of an ingredient, but you want a portion for 2, and your 1-cup measure is not available; you might try .PP .ES You have: (5+1|4) cup / 3 You want: 1|2 cup;1|3 cup;1|4 cup 3|2 cup + 1|4 cup .EE .PP This result might be fine for a baker who has a 1\ 1/2-cup measure (and recognizes the equivalence), but it may not be as useful to someone with more limited set of measures, who does want to do additional calculations, and only wants to know ``How many 1/2-cup measures to I need to add?'' After all, that's what was actually asked. With the .CQ "--show-factor" option, the factor will not be combined with a unity numerator, so that you get .PP .ES You have: (5+1|4) cup / 3 You want: 1|2 cup;1|3 cup;1|4 cup 3 * 1|2 cup + 1|4 cup .EE .PP A user-specified fractional unit with a numerator other than 1 is never overridden, however\(emif a unit list specifies .CQ "3|4 cup;1|2 cup" , a result equivalent to 1\ 1/2 cups will always be shown as .CQ "2 * 3|4 cup" whether or not the .CQ "--show-factor" option is given. .PP Some applications for unit lists may be less obvious. Suppose that you have a postal scale and wish to ensure that it's accurate at 1\ oz, but have only metric calibration weights. You might try .PP .ES You have: 1 oz You want: 100 g;50 g; 20 g;10 g;5 g;2 g;1 g; 20 g + 5 g + 2 g + 1 g + 0.34952312 * 1 g .EE .PP You might then place one each of the 20\ g, 5\ g, 2\ g, and 1\ g weights on the scale and hope that it indicates close to .PP .ES You have: 20 g + 5 g + 2 g + 1 g You want: oz; 0.98767093 oz .EE .PP Appending .CQ ";" to .CQ "oz" forces a one-line display that includes the unit; here the integer part of the result is zero, so it is not displayed. .PP A unit list such as .PP .ES cup;1|2\ cup;1|3\ cup;1|4\ cup;tbsp;tsp;1|2\ tsp;1|4\ tsp .EE .PP can be tedious to enter. The .CW "units" program provides shorthand names for some common combinations: .PP .ES hms \fRhours, minutes, seconds\fP dms \fRangle: degrees, minutes, seconds\fP time \fRyears, days, hours, minutes and seconds\fP usvol \fRUS cooking volume: cups and smaller\fP .EE .PP Using these shorthands, or \fIunit list aliases\fP, you can do the following conversions: .PP .ES You have: anomalisticyear You want: time 1 year + 25 min + 3.4653216 sec You have: 1|6 cup You want: usvol 2 tbsp + 2 tsp .EE .PP You cannot combine a unit list alias with other units: it must appear alone at the .CQ "You want:" prompt. .PP You can display the definition of a unit list alias by entering it at the .CQ "You have:" prompt: .PP .ES You have: dms Definition: unit list, deg;arcmin;arcsec .EE .PP When you specify compact output with .CQ "--compact" , .CQ "--terse" or .CQ "-t" and perform conversion to a unit list, .CW "units" lists the conversion factors for each unit in the list, separated by semicolons. .PP .ES You have: year You want: day;min;sec 365;348;45.974678 .EE .PP Unlike the case of regular output, zeros \fIare\fP included in this output list: .PP .ES You have: liter You want: cup;1|2 cup;1|4 cup;tbsp 4;0;0;3.6280454 .EE .PP .SH INVOKING \f(BIUNITS\fP You invoke .CW "units" like this: .PP .ES units [\fIoptions\fP] [\fIfrom-unit\fP [\fIto-unit\fP]] .EE .PP If the \fIfrom-unit\fP and \fIto-unit\fP are omitted, the program will use interactive prompts to determine which conversions to perform. See \fIInteractive Use\fP. If both \fIfrom-unit\fP and \fIto-unit\fP are given, .CW "units" will print the result of that single conversion and then exit. If only \fIfrom-unit\fP appears on the command line, .CW "units" will display the definition of that unit and exit. Units specified on the command line may need to be quoted to protect them from shell interpretation and to group them into two arguments. See \fICommand Line Use\fP. .PP The default behavior of .CW "units" can be changed by various options given on the command line. In most cases, the options may be given in either short form (a single .CQ "-" followed by a single character) or long form .CQ ( "--" "" followed by a word or hyphen-separated words). Short-form options are cryptic but require less typing; long-form options require more typing but are more explanatory and may be more mnemonic. With long-form options you need only enter sufficient characters to uniquely identify the option to the program. For example, .CQ "--out\ %f" works, but .CQ "--o\ %f" fails because .CW "units" has other long options beginning with .CQ "o" . However, .CQ "--q" works because .CQ "--quiet" is the only long option beginning with .CQ "q" . .PP Some options require arguments to specify a value (e.g., .CQ "-d\ 12" or .CQ "--digits\ 12" ). Short-form options that do not take arguments may be concatenated (e.g., .CQ "-erS" is equivalent to .CQ "-e\ -r\ -S" ); the last option in such a list may be one that takes an argument (e.g., .CQ "-ed\ 12" ). With short-form options, the space between an option and its argument is optional (e.g., .CQ "-d12" is equivalent to .CQ "-d\ 12" ). Long-form options may not be concatenated, and the space between a long-form option and its argument is required. Short-form and long-form options may be intermixed on the command line. Options may be given in any order, but when incompatible options (e.g., .CQ "--output-format" and .CQ "--exponential" ) are given in combination, behavior is controlled by the last option given. For example, .CQ "-o%.12f\ -e" gives exponential format with the default eight significant digits). .PP The following options are available: .PP .TP .BR "-\^c" ", " "-\^-\^check" Check that all units and prefixes defined in the units data file reduce to primitive units. Print a list of all units that cannot be reduced. Also display some other diagnostics about suspicious definitions in the units data file. Only definitions active in the current locale are checked. You should always run .CW "units" with this option after modifying a units data file. .PP .TP .BR "-\^-\^check-verbose" ", " "-\^-\^verbose-check" Like the .CQ "--check" option, this option prints a list of units that cannot be reduced. But to help find unit definitions that cause endless loops, it lists the units as they are checked. If .CW "units" hangs, then the last unit to be printed has a bad definition. Only definitions active in the current locale are checked. .PP .TP .BR "-\^d \fIndigits\fP" ", " "-\^-\^digits \fIndigits\fP" Set the number of significant digits in the output to the value specified (which must be greater than zero). For example, .CQ "-d\ 12" sets the number of significant digits to 12. With exponential output .CW "units" displays one digit to the left of the decimal point and eleven digits to the right of the decimal point. On most systems, the maximum number of internally meaningful digits is 15; if you specify a greater number than your system's maximum, .CW "units" will print a warning and set the number to the largest meaningful value. To directly set the maximum value, give an argument of .CW "max" (e.g., .CQ "-d\ max" ). Be aware, of course, that ``significant'' here refers only to the \fIdisplay\fP of numbers; if results depend on physical constants not known to this precision, the physically meaningful precision may be less than that shown. The .CQ "--digits" option conflicts with the .CQ "--output-format" option. .PP .TP .BR "-\^e" ", " "-\^-\^exponential" Set the numeric output format to exponential (i.e., scientific notation), like that used in the Unix .CW "units" program. The default precision is eight significant digits (seven digits to the right of the decimal point); this can be changed with the .CQ "--digits" option. The .CQ "--exponential" option conflicts with the .CQ "--output-format" option. .PP .TP .BR "-\^o \fIformat\fP" ", " "-\^-\^output-format \fIformat\fP" This option affords complete control over the numeric output format using the specified \fIformat\fP. The format is a single floating point numeric format for the .CW "printf()" function in the C programming language. All compilers support the format types .CQ "g" and .CQ "G" to specify significant digits, .CQ "e" and .CQ "E" for scientific notation, and .CQ "f" for fixed-point decimal. The ISO C99 standard introduced the .CQ "F" type for fixed-point decimal and the .CQ "a" and .CQ "A" types for hexadecimal floating point; these types are allowed with compilers that support them. The default format is .CQ "%.8g" ; for greater precision, you could specify .CQ "-o\ %.15g" . See \fINumeric Output Format\fP and the documentation for .CW "printf()" for more detailed descriptions of the format specification. The .CQ "--output-format" option affords the greatest control of the output appearance, but requires at least rudimentary knowledge of the .CW "printf()" format syntax. If you don't want to bother with the .CW "printf()" syntax, you can specify greater precision more simply with the .CQ "--digits" option or select exponential format with .CQ "--exponential" . The .CQ "--output-format" option is incompatible with the .CQ "--exponential" and .CQ "--digits" options. .PP .TP .BR "-\^f \fIfilename\fP" ", " "-\^-\^file \fIfilename\fP" Instruct .CW "units" to load the units file .CW "filename" . You can specify up to 25 units files on the command line. When you use this option, .CW "units" will load \fIonly\fP the files you list on the command line; it will not load the standard file or your personal units file unless you explicitly list them. If \fIfilename\fP is the empty string .CQ ( "-f """"" ), the default units file (or that specified by .CW "UNITSFILE" ) will be loaded in addition to any others specified with .CQ "-f" . .PP .TP .BR "-\^h" ", " "-\^-\^help" Print out a summary of the options for .CW "units" . .PP .TP .BR "-\^m" ", " "-\^-\^minus" Causes .CQ "-" to be interpreted as a subtraction operator. This is the default behavior. .PP .TP .BR "-\^p" ", " "-\^-\^product" Causes .CQ "-" to be interpreted as a multiplication operator when it has two operands. It will act as a negation operator when it has only one operand: .CQ "(-3)" . By default .CQ "-" is treated as a subtraction operator. .PP .TP .BR "-\^-\^oldstar" Causes .CQ "*" to have the old-style precedence, higher than the precedence of division so that .CQ "1/2*3" will equal .CQ "1/6" . .PP .TP .BR "-\^-\^newstar" Forces .CQ "*" to have the new (default) precedence that follows the usual rules of algebra: the precedence of .CQ "*" is the same as the precedence of .CQ "/" , so that .CQ "1/2*3" will equal .CQ "3/2" . .PP .TP .BR "-\^-\^compact" Give compact output featuring only the conversion factor. This turns off the .CQ "--verbose" option. .PP .TP .BR "-\^q" ", " "-\^-\^quiet" ", " "-\^-\^silent" Suppress prompting of the user for units and the display of statistics about the number of units loaded. .PP .TP .BR "-\^n" ", " "-\^-\^nolists" Disable conversion to unit lists. .PP .TP .BR "-\^r" ", " "-\^-\^round" When converting to a combination of units given by a unit list, round the value of the last unit in the list to the nearest integer. .PP .TP .BR "-\^S" ", " "-\^-\^show-factor" When converting to a combination of units specified in a list, always show a non-unity factor before a unit that begins with a fraction with a unity denominator. By default, if the unit in a list begins with fraction of the form 1|\fIx\fP and its multiplier is an integer other than 1, the fraction is given as the product of the multiplier and the numerator (e.g., .CQ "3|8 in" rather than .CQ "3 * 1|8 in" ). In some cases, this is not what is wanted; for example, the results for a cooking recipe might show .CQ "3 * 1|2 cup" as .CQ "3|2 cup" . With the .CQ "--show-factor" option, a result equivalent to 1.5 cups will display as .CQ "3 * 1|2 cup" rather than .CQ "3|2 cup" . A user-specified fractional unit with a numerator other than 1 is never overridden, however\(emif a unit list specifies .CQ "3|4 cup;1|2 cup" , a result equivalent to 1\ 1/2 cups will always be shown as .CQ "2 * 3|4 cup" whether or not the .CQ "--show-factor" option is given. .PP .TP .BR "-\^s" ", " "-\^-\^strict" Suppress conversion of units to their reciprocal units. For example, .CW "units" will normally convert hertz to seconds because these units are reciprocals of each other. The strict option requires that units be strictly conformable to perform a conversion, and will give an error if you attempt to convert hertz to seconds. .PP .TP .BR "-\^1" ", " "-\^-\^one-line" Give only one line of output (the forward conversion). Do not print the reverse conversion. If a reciprocal conversion is performed then .CW "units" will still print the ``reciprocal conversion'' line. .PP .TP .BR "-\^t" ", " "-\^-\^terse" Give terse output when converting units. This option can be used when calling .CW "units" from another program so that the output is easy to parse. This option has the combined effect of these options: .CQ "--strict" .CQ "--quiet" .CQ "--one-line" .CQ "--compact" . .PP .TP .BR "-\^v" ", " "-\^-\^verbose" Give slightly more verbose output when converting units. When combined with the .CQ "-c" option this gives the same effect as .CQ "--check-verbose" . .PP .TP .BR "-\^V" ", " "-\^-\^version" Print program version number, tell whether the .CW "readline" library has been included, and give the location of the default units data file. .PP .TP .BR "-\^l \fIlocale\fP" ", " "-\^-\^locale \fIlocale\fP" Force a specified locale such as .CQ "en_GB" to get British definitions by default. This overrides the locale determined from system settings or environment variables. See \fILocale\fP for a description of locale format. .PP .SH ADDING YOUR OWN DEFINITIONS .SS Units Data Files The units and prefixes that .CW "units" can convert are defined in the units data file, typically .CQ "/usr/share/units/definitions.units" . Although you can extend or modify this data file if you have appropriate user privileges, it's usually better to put extensions in separate files so that the definitions will be preserved when you update .CW "units" . .PP You can include additional data files in the units database using the .CQ "!include" command in the standard units data file. For example .PP .ES !include /usr/local/share/units/local.units .EE .PP might be appropriate for a site-wide supplemental data file. The location of the .CQ "!include" statement in the standard units data file is important; later definitions replace earlier ones, so any definitions in an included file will override definitions before the .CQ "!include" statement in the standard units data file. With normal invocation, no warning is given about redefinitions; to ensure that you don't have an unintended redefinition, run .CQ "units\ -c" after making changes to any units data file. .PP If you want to add your own units in addition to or in place of standard or site-wide supplemental units data files, you can include them in the .CQ ".units" file in your home directory. If this file exists it is read after the standard units data file, so that any definitions in this file will replace definitions of the same units in the standard data file or in files included from the standard data file. This file will not be read if any units files are specified on the command line. (Under Windows the personal units file is named .CQ "unitdef.units" .) .PP The .CW "units" program first tries to determine your home directory from the .CW "HOME" environment variable. On systems running Microsoft Windows, if .CW "HOME" does not exist, .CW "units" attempts to find your home directory from .CW "HOMEDRIVE" and .CW "HOMEPATH" . Running .CW "units -V" will display the location and name of your personal units file. .PP You can specify an arbitrary file as your personal units data file with the .CW "MYUNITSFILE" environment variable; if this variable exists, its value is used without searching your home directory. .PP .SS Defining New Units and Prefixes A unit is specified on a single line by giving its name and an equivalence. Comments start with a .CQ "#" character, which can appear anywhere in a line. The backslash character .CQ ( "\e" ) acts as a continuation character if it appears as the last character on a line, making it possible to spread definitions out over several lines if desired. A file can be included by giving the command .CQ "!include" followed by the file's name. The .CQ "!" must be the first character on the line. The file will be sought in the same directory as the parent file unless you give a full path. The name of the file to be included cannot contain the comment character .CQ "#" . .PP Unit names must not contain any of the operator characters .CQ "+" , .CQ "-" , .CQ "*" , .CQ "/" , .CQ "|" , .CQ "^" , .CQ ";" , .CQ "~" , the comment character .CQ "#" , or parentheses. They cannot begin or end with an underscore .CQ ( "_" ), a comma .CQ ( "," ) or a decimal point .CQ ( "." ). The figure dash (U+2012), typographical minus (`\-'; U+2212), and en dash (`\-'; U+2013) are converted to the operator .CQ "-" , so none of these characters can appear in unit names. Names cannot begin with a digit, and if a name ends in a digit other than zero, the digit must be preceded by a string beginning with an underscore, and afterwards consisting only of digits, decimal points, or commas. For example, .CQ "foo_2" , .CQ "foo_2,1" , or .CQ "foo_3.14" would be valid names but .CQ "foo2" or .CQ "foo_a2" would be invalid. You could define nitrous oxide as .PP .ES N2O nitrogen 2 + oxygen .EE .PP but would need to define nitrogen dioxide as .PP .ES NO_2 nitrogen + oxygen 2 .EE .PP Be careful to define new units in terms of old ones so that a reduction leads to the primitive units, which are marked with .CQ "!" characters. Dimensionless units are indicated by using the string .CQ "!dimensionless" for the unit definition. .PP When adding new units, be sure to use the .CQ "-c" option to check that the new units reduce properly. If you create a loop in the units definitions, then .CW "units" will hang when invoked with the .CQ "-c" option. You will need to use the .CQ "--check-verbose" option, which prints out each unit as it is checked. The program will still hang, but the last unit printed will be the unit that caused the infinite loop. .PP If you define any units that contain .CQ "+" characters, carefully check them because the .CQ "-c" option will not catch non-conformable sums. Be careful with the .CQ "-" operator as well. When used as a binary operator, the .CQ "-" character can perform addition or multiplication depending on the options used to invoke .CW "units" . To ensure consistent behavior use .CQ "-" only as a unary negation operator when writing units definitions. To multiply two units leave a space or use the .CQ "*" operator with care, recalling that it has two possible precedence values and may require parentheses to ensure consistent behavior. To compute the difference of .CQ "foo" and .CQ "bar" write .CQ "foo+(-bar)" or even .CQ "foo+-bar" . .PP Here is an example of a short data file that defines some basic units: .PP .ES m ! # The meter is a primitive unit sec ! # The second is a primitive unit rad !dimensionless # A dimensionless primitive unit micro- 1e-6 # Define a prefix minute 60 sec # A minute is 60 seconds hour 60 min # An hour is 60 minutes inch 0.0254 m # Inch defined in terms of meters ft 12 inches # The foot defined in terms of inches mile 5280 ft # And the mile .EE .PP A unit that ends with a .CQ "-" character is a prefix. If a prefix definition contains any .CQ "/" characters, be sure they are protected by parentheses. If you define .CQ "half- 1/2" then .CQ "halfmeter" would be equivalent to .CQ "1 / (2 meter)" . .PP .SS Defining Nonlinear Units Some unit conversions of interest are nonlinear; for example, temperature conversions between the Fahrenheit and Celsius scales cannot be done by simply multiplying by conversion factors. .PP When you give a linear unit definition such as .CQ "inch 2.54 cm" you are providing information that .CW "units" uses to convert values in inches into primitive units of meters. For nonlinear units, you give a functional definition that provides the same information. .PP Nonlinear units are represented using a functional notation. It is best to regard this notation not as a function call but as a way of adding units to a number, much the same way that writing a linear unit name after a number adds units to that number. Internally, nonlinear units are defined by a pair of functions that convert to and from linear units in the data file, so that an eventual conversion to primitive units is possible. .PP Here is an example nonlinear unit definition: .PP .ES tempF(x) units=[1;K] (x+(-32)) degF + stdtemp ; \e (tempF+(-stdtemp))/degF + 32 .EE .PP A nonlinear unit definition comprises a unit name, a dummy parameter name, two functions, and two corresponding units. The functions tell .CW "units" how to convert to and from the new unit. In order to produce valid results, the arguments of these functions need to have the correct dimensions. To facilitate error checking, you may optionally indicate units for these arguments. .PP The definition begins with the unit name followed immediately (with no spaces) by a .CQ "(" character. In parentheses is the name of the parameter. Next is an optional specification of the units required by the functions in this definition. In the example above, the .CQ "tempF" function requires an input argument conformable with .CQ "1" . For normal nonlinear units definitions the forward function will always take a dimensionless argument. The inverse function requires an input argument conformable with .CQ "K" . In general the inverse function will need units that match the quantity measured by your nonlinear unit. The purpose of the expression in brackets to enable .CW "units" to perform error checking on function arguments, and also to assign units to range and domain specifications, which are described later. .PP Next the function definitions appear. In the example above, the .CQ "tempF" function is defined by .PP .ES tempF(x) = (x+(-32)) degF + stdtemp .EE .PP This gives a rule for converting .CQ "x" in the units .CQ "tempF" to linear units of absolute temperature, which makes it possible to convert from tempF to other units. .PP In order to make conversions to Fahrenheit possible, you must give a rule for the inverse conversions. The inverse will be .CQ "x(tempF)" and its definition appears after a .CQ ";" character. In our example, the inverse is .PP .ES x(tempF) = (tempF+(-stdtemp))/degF + 32 .EE .PP This inverse definition takes an absolute temperature as its argument and converts it to the Fahrenheit temperature. The inverse can be omitted by leaving out the .CQ ";" character, but then conversions to the unit will be impossible. If the inverse is omitted then the .CQ "--check" option will display a warning. It is up to you to calculate and enter the correct inverse function to obtain proper conversions. The .CQ "--check" option tests the inverse at one point and prints an error if it is not valid there, but this is not a guarantee that your inverse is correct. .PP If you wish to make synonyms for nonlinear units, you still need to define both the forward and inverse functions. Inverse functions can be obtained using the .CQ "~" operator. So to create a synonym for .CQ "tempF" you could write .PP .ES fahrenheit(x) units=[1;K] tempF(x); ~tempF(fahrenheit) .EE .PP You may define a function whose range and domain do not cover all of the real numbers. In this case .CW "units" can handle errors better if you specify an appropriate range and domain. You specify the range and domain as shown below. .PP .ES baume(d) units=[1;g/cm^3] domain=[0,130.5] range=[1,10] \e (145/(145-d)) g/cm^3 ; (baume+-g/cm^3) 145 / baume .EE .PP In this example the domain is specified after the .CQ "domain=" with the endpoints given in brackets. One of the end points can be omitted to get an interval that goes to infinity. So the range could be specified as nonnegative by writing .CQ "range=[0,]" . Both the range and domain are optional and can appear independently and in any order along with the .CQ "units" specification. The values in the range and domain are attached to the units given in the .CQ "units" specification. If you don't specify the units then the parameter inputs are reduced to primitive units for the numeric comparison to the values you give in the range or domain. In this case you should only use .CQ "range" or .CQ "domain" if the endpoints are zero and infinity. .PP Specifying the range and domain allows .CW "units" to perform better error checking and give more helpful error messages when you invoke nonlinear units conversions outside of their bounds. It also enables the .CQ "-c" option to find a point in the domain to use for its point check of your inverse definition. .PP You may occasionally wish to define a function that operates on units. This can be done using a nonlinear unit definition. For example, the definition below provides conversion between radius and the area of a circle. This definition requires a length as input and produces an area as output, as indicated by the .CQ "units=" specification. Specifying the range as the nonnegative numbers can prevent cryptic error messages. .PP .ES circlearea(r) units=[m;m^2] range=[0,] pi r^2 ; sqrt(circlearea/pi) .EE .PP Sometimes you may be interested in a piecewise linear unit such as many wire gauges. Piecewise linear units can be defined by specifying conversions to linear units on a list of points. Conversion at other points will be done by linear interpolation. A partial definition of zinc gauge is .PP .ES zincgauge[in] 1 0.002, 10 0.02, 15 0.04, 19 0.06, 23 0.1 .EE .PP In this example, .CQ "zincgauge" is the name of the piecewise linear unit. The definition of such a unit is indicated by the embedded .CQ "[" character. After the bracket, you should indicate the units to be attached to the numbers in the table. No spaces can appear before the .CQ "]" character, so a definition like .CQ "foo[kg meters]" is illegal; instead write .CQ "foo[kg*meters]" . The definition of the unit consists of a list of pairs optionally separated by commas. This list defines a function for converting from the piecewise linear unit to linear units. The first item in each pair is the function argument; the second item is the value of the function at that argument (in the units specified in brackets). In this example, we define .CQ "zincgauge" at five points. For example, we set .CQ "zincgauge(1)" equal to .CQ "0.002 in" . Definitions like this may be more readable if written using continuation characters as .PP .ES zincgauge[in] \e 1 0.002 \e 10 0.02 \e 15 0.04 \e 19 0.06 \e 23 0.1 .EE .PP With the preceding definition, the following conversion can be performed: .PP .ES You have: zincgauge(10) You want: in * 0.02 / 50 You have: .01 inch You want: zincgauge 5 .EE .PP If you define a piecewise linear unit that is not strictly monotonic, then the inverse will not be well defined. If the inverse is requested for such a unit, .CW "units" will return the smallest inverse. The .CQ "--check" option will print a warning if a non-monotonic piecewise linear unit is encountered. .PP .SS Defining Unit List Aliases Unit list aliases are treated differently from unit definitions, because they are a data entry shorthand rather than a true definition for a new unit. A unit list alias definition begins with .CQ "!unitlist" and includes the alias and the definition; for example, the aliases included in the standard units data file are .PP .ES !unitlist hms hr;min;sec !unitlist time year;day;hr;min;sec !unitlist dms deg;arcmin;arcsec !unitlist ftin ft;in;1|8 in !unitlist usvol cup;3|4 cup;2|3 cup;1|2 cup;1|3 cup;1|4 cup;\e tbsp;tsp;1|2 tsp;1|4 tsp;1|8 tsp .EE .PP Unit list aliases are only for unit lists, so the definition must include a .CQ ";" . Unit list aliases can never be combined with units or other unit list aliases, so the definition of .CQ "time" shown above could \fInot\fP have been shortened to .CQ "year;day;hms" . As usual, be sure to run .CW "units --check" to ensure that the units listed in unit list aliases are conformable. .PP .SH NUMERIC OUTPUT FORMAT By default, .CW "units" shows results to eight significant digits. You can change this with the .CQ "--exponential" , .CQ "--digits" , and .CQ "--output-format" options. The first sets an exponential format (i.e., scientific notation) like that used in the original Unix .CW "units" program, the second allows you to specify a different number of significant digits, and the last allows you to control the output appearance using the format for the .CW "printf()" function in the C programming language. If you only want to change the number of significant digits or specify exponential format type, use the .CQ "--digits" and .CQ "--exponential" options. The .CQ "--output-format" option affords the greatest control of the output appearance, but requires at least rudimentary knowledge of the .CW "printf()" format syntax. See \fIInvoking Units\fP for descriptions of these options. .PP .SS Format Specification The format specification recognized with the .CQ "--output-format" option is a subset of that for .CW "printf()" . The format specification has the form .\".CW "%\fR[\fP\fIflags\fP\fR][\fP\fIwidth\fP\fR][\fP.\fIprecision\fP\fR]\fP\fItype\fP" ; .CW "%" [\fIflags\fP][\fIwidth\fP][\c .CW "." \fIprecision\fP]\fItype\fP; it must begin with .CQ "%" , and must end with a floating-point type specifier: .CQ "g" or .CQ "G" to specify the number of significant digits, .CQ "e" or .CQ "E" for scientific notation, and .CQ "f" for fixed-point decimal. The ISO C99 standard added the .CQ "F" type for fixed-point decimal and the .CQ "a" and .CQ "A" types for hexadecimal floating point; these types are allowed with compilers that support them. Type length modifiers (e.g., .CQ "L" to indicate a long double) are inapplicable and are not allowed. .PP The default format for .CW "units" is .CQ "%.8g" ; for greater precision, you could specify .CQ "-o\ %.15g" . The .CQ "g" and .CQ "G" format types use exponential format whenever the exponent would be less than \-4, so the value 0.000013 displays as .CQ "1.3e-005" . These types also use exponential notation when the exponent is greater than or equal to the precision, so with the default format, the value .if t .ig ++ 5e7 .++ .if n .ig ++ .EQ 5 times 10 sup 7 .EN .++ displays as .CQ "50000000" and the value .if t .ig ++ 5e8 .++ .if n .ig ++ .EQ 5 times 10 sup 8 .EN .++ displays as .CQ "5e+008" . If you prefer fixed-point display, you might specify .CQ "-o\ %.8f" ; however, small numbers will display very few significant digits, and values less than .if t .ig ++ 0.5e\-8 .++ .if n .ig ++ .EQ 0.5 times 10 sup -8 .EN .++ will show nothing but zeros. .PP The format specification may include one or more optional flags: .CQ "+" , .CQ "\ " (space), .CQ "#" , .CQ "-" , or .CQ "0" (the digit zero). The digit-grouping flag .ie \n(.g .CQ "\(aq" .el .CQ "'" is allowed with compilers that support it. Flags are followed by an optional value for the minimum field width, and an optional precision specification that begins with a period (e.g., .CQ ".6" ). The field width includes the digits, decimal point, the exponent, thousands separators (with the digit-grouping flag), and the sign if any of these are shown. .PP .SS Flags The .CQ "+" flag causes the output to have a sign .CQ ( "+" "" or .CQ "-" ). The space flag .CQ "\ " is similar to the .CQ "+" flag, except that when the value is positive, it is prefixed with a space rather than a plus sign; this flag is ignored if the .CQ "+" flag is also given. The .CQ "+" or .CQ "\ " flag could be useful if conversions might include positive and negative results, and you wanted to align the decimal points in exponential notation. The .CQ "#" flag causes the output value to contain a decimal point in all cases; by default, the output contains a decimal point only if there are digits (which can be trailing zeros) to the right of the point. With the .CQ "g" or .CQ "G" types, the .CQ "#" flag also prevents the suppression of trailing zeros. The digit-grouping flag .ie \n(.g .CQ "\(aq" .el .CQ "'" shows a thousands separator in digits to the left of the decimal point. This can be useful when displaying large numbers in fixed-point decimal; for example, with the format .CQ "%f" , .PP .ES You have: mile You want: microfurlong * 8000000.000000 / 0.000000 .EE .PP the magnitude of the first result may not be immediately obvious without counting the digits to the left of the decimal point. If the thousands separator is the comma .CQ ( "," ), the output with the format .ie \n(.g .CQ "%\(aqf" .el .CQ "%'f" might be .PP .ES You have: mile You want: microfurlong * 8,000,000.000000 / 0.000000 .EE .PP making the magnitude readily apparent. Unfortunately, few compilers support the digit-grouping flag. .PP With the .CQ "-" flag, the output value is left aligned within the specified field width. If a field width greater than needed to show the output value is specified, the .CQ "0" (zero) flag causes the output value to be left padded with zeros until the specified field width is reached; for example, with the format .CQ "%011.6f" , .PP .ES You have: troypound You want: grain * 5760.000000 / 0000.000174 .EE .PP The .CQ "0" flag has no effect if the .CQ "-" (left align) flag is given. .PP .SS Field Width By default, the output value is left aligned and shown with the minimum width necessary for the specified (or default) precision. If a field width greater than this is specified, the value shown is right aligned, and padded on the left with enough spaces to provide the specified field width. A width specification is typically used with fixed-point decimal to have columns of numbers align at the decimal point; this arguably is less useful with .CW "units" than with long columnar output, but it may nonetheless assist in quickly assessing the relative magnitudes of results. For example, with the format .CQ "%12.6f" , .PP .ES You have: km You want: in * 39370.078740 / 0.000025 You have: km You want: rod * 198.838782 / 0.005029 You have: km You want: furlong * 4.970970 / 0.201168 .EE .PP .SS Precision The meaning of ``precision'' depends on the format type. With .CQ "g" or .CQ "G" , it specifies the number of significant digits (like the .CQ "--digits" option); with .CQ "e" , .CQ "E" , .CQ "f" , or .CQ "F" , it specifies the maximum number of digits to be shown after the decimal point. .PP With the .CQ "g" and .CQ "G" format types, trailing zeros are suppressed, so the results may sometimes have fewer digits than the specified precision (as indicated above, the .CQ "#" flag causes trailing zeros to be displayed). .PP The default precision is 6, so .CQ "%g" is equivalent to .CQ "%.6g" , and would show the output to six significant digits. Similarly, .CQ "%e" or .CQ "%f" would show the output with six digits after the decimal point. .PP The C .CW "printf()" function allows a precision of arbitrary size, whether or not all of the digits are meaningful. With most compilers, the maximum internal precision with .CW "units" is 15 decimal digits (or 13 hexadecimal digits). With the .CQ "--digits" option, you are limited to the maximum internal precision; with the .CQ "--output-format" option, you may specify a precision greater than this, but it may not be meaningful. In some cases, specifying excess precision can result in rounding artifacts. For example, a pound is exactly 7000 grains, but with the format .CQ "%.18g" , the output might be .PP .ES You have: pound You want: grain * 6999.9999999999991 / 0.00014285714285714287 .EE .PP With the format .CQ "%.25g" you might get the following: .PP .ES You have: 1/3 You want: Definition: 0.333333333333333314829616256247 .EE .PP In this case the displayed value includes a series of digits that represent the underlying binary floating-point approximation to 1/3 but are not meaningful for the desired computation. In general, the result with excess precision is system dependent. The precision affects only the \fIdisplay\fP of numbers; if a result relies on physical constants that are not known to the specified precision, the number of physically meaningful digits may be less than the number of digits shown. .PP See the documentation for .CW "printf()" for more detailed descriptions of the format specification. .PP The .CQ "--output-format" option is incompatible with the .CQ "--exponential" or .CQ "--digits" options; if the former is given in combination with either of the latter, the format is controlled by the last option given. .PP .SH LOCALIZATION Some units have different values in different locations. The localization feature accommodates this by allowing a units data file to specify definitions that depend on the user's locale. .PP .SS Locale A locale is a subset of a user's environment that indicates the user's language and country, and some attendant preferences, such as the formatting of dates. The .CW "units" program attempts to determine the locale from the POSIX setlocale function; if this cannot be done, .CW "units" examines the environment variables .CW "LC_CTYPE" and .CW "LANG" . On POSIX systems, a locale is of the form .CW \fIlanguage\fP "_" \fIcountry\fP, where \fIlanguage\fP is the two-character code from ISO 639-1 and \fIcountry\fP is the two-character code from ISO 3166-1; \fIlanguage\fP is lower case and \fIcountry\fP is upper case. For example, the POSIX locale for the United Kingdom is .CW "en_GB" . .PP On systems running Microsoft Windows, the value returned by setlocale() is different from that on POSIX systems; .CW "units" attempts to map the Windows value to a POSIX value by means of a table in the file .CQ "locale.map" in the same directory, typically .CQ "/usr/local/share/units" , as the default units data files. The file includes entries for many combinations of language and country, and can be extended to include other combinations. The .CQ "locale.map" comprises two tab-separated columns; each entry is of the form .PP .DS \fIWindows-locale\fP \fIPOSIX-locale\fP .DE .PP where \fIPOSIX-locale\fP is as described above, and \fIWindows-locale\fP typically spells out both the language and country. For example, the entry for the United States is .PP .ES English_United States en_US .EE .PP You can force .CW "units" to run in a desired locale by using the .CQ "-l" option. .PP In order to create unit definitions for a particular locale you begin a block of definitions in a unit datafile with .CQ "!locale" followed by a locale name. The .CQ "!" must be the first character on the line. The .CW "units" program reads the following definitions only if the current locale matches. You end the block of localized units with .CQ "!endlocale" . Here is an example, which defines the British gallon. .PP .ES !locale en_GB gallon 4.54609 liter !endlocale .EE .PP .SS Additional Localization Sometimes the locale isn't sufficient to determine unit preferences. There could be regional preferences, or a company could have specific preferences. Though probably uncommon, such differences could arise with the choice of English customary units outside of English-speaking countries. To address this, .CW "units" allows specifying definitions that depend on environment variable settings. The environment variables can be controled based on the current locale, or the user can set them to force a particular group of definitions. .PP A conditional block of definitions in a units data file begins with either .CQ "!var" or .CQ "!varnot" following by an environment variable name and then a space separated list of values. The leading .CQ "!" must appear in the first column of a units data file, and the conditional block is terminated by .CQ "!endvar" . Definitions in blocks beginning with .CQ "!var" are executed only if the environment variable is exactly equal to one of the listed values. Definitions in blocks beginning with .CQ "!varnot" are executed only if the environment variable does \fInot\fP equal any of the list values. .PP The inch has long been a customary measure of length in many places. The word comes from the latin \fIuncia\fP meaning ``one twelfth,'' referring to its relationship with the foot. By the 20th century, the inch was officially defined in English-speaking countries relative to the yard, but until 1959, the yard differed slightly among those countries. In France the customary inch, which was displaced in 1799 by the meter, had a different length based on a french foot. These customary definitions could be accommodated as follows: .PP .ES !var INCH_UNIT usa yard 3600|3937 m !endvar !var INCH_UNIT canada yard 0.9144 meter !endvar !var INCH_UNIT uk yard 0.91439841 meter !endvar !var INCH_UNIT canada uk usa foot 1|3 yard inch 1|12 foot !endvar !var INCH_UNIT france foot 144|443.296 m inch 1|12 foot line 1|12 inch !endvar !varnot INCH_UNIT usa uk france canada !message Unknown value for INCH_UNIT !endvar .EE .PP When .CW "units" reads the above definitions it will check the environment variable .CW "INCH_UNIT" and load only the definitions for the appropriate section. If .CW "INCH_UNIT" is unset or is not set to one of the four values listed then .CW "units" will run the last block. In this case that block uses the .CQ "!message" command to display a warning message. Alternatively that block could set default values. .PP In order to create default values that are overridden by user settings the data file can use the .CQ "!set" command, which sets an environment variable \fIonly if it is not already set\fP; these settings are only for the current .CW "units" invocation and do not persist. So if the example above were preceded by .CQ "!set INCH_UNIT france" then this would make .CQ "france" the default value for .CW "INCH_UNIT" . If the user had set the variable in the environment before invoking .CW "units" , then .CW "units" would use the user's value. .PP To link these settings to the user's locale you combine the .CQ "!set" command with the .CQ "!locale" command. If you wanted to combine the above example with suitable locales you could do by \fIpreceding\fP the above definition with the following: .PP .ES !locale en_US !set INCH_UNIT usa !endlocale !locale en_GB !set INCH_UNIT uk !endlocale !locale en_CA !set INCH_UNIT canada !endlocale !locale fr_FR !set INCH_UNIT france !endlocale !set INCH_UNIT france .EE .PP These definitions set the overall default for .CW "INCH_UNIT" to .CQ "france" and set default values for four locales appropriately. The overall default setting comes last so that it only applies when .CW "INCH_UNIT" was not set by one of the other commands or by the user. .PP If the variable given after .CQ "!var" or .CQ "!varnot" is undefined then .CW "units" prints an error message and ignores the definitions that follow. Use .CQ "!set" to create defaults to prevent this situation from arising. The .CQ "-c" option only checks the definitions that are active for the current environment and locale, so when adding new definitions take care to check that all cases give rise to a well defined set of definitions. .PP .SH ENVIRONMENT VARIABLES The .CW "units" program uses the following environment variables: .PP .TP .BR "HOME" Specifies the location of your home directory; it is used by .CW "units" to find a personal units data file .CQ ".units" . On systems running Microsoft Windows, .CW "units" tries to determine your home directory from the .CW "HOMEDRIVE" and .CW "HOMEPATH" environment variables if .CW "HOME" does not exist. .PP .TP .BR "LC_CTYPE, LANG" Checked to determine the locale if .CW "units" cannot obtain it from the operating system. Sections of the standard units data file are specific to certain locales. .PP .TP .BR "MYUNITSFILE" Specifies your personal units data file. If this variable exists, .CW "units" uses its value rather than searching your home directory for .CQ ".units" . The personal units file will not be loaded if any data files are given using the .CQ "-f" option. .PP .TP .BR "PAGER" Specifies the pager to use for help and for displaying the conformable units. The help function browses the units database and calls the pager using the .CQ "+n" \fIn\fP syntax for specifying a line number. The default pager is .CW "more" ; .CW "PAGER" can be used to specify alternatives such as .CW "less" , .CW "pg" , .CW "emacs" , or .CW "vi" . .PP .TP .BR "UNITS_ENGLISH" Set to either .CQ "US" or .CQ "GB" to choose United States or British volume definitions, overriding the default from your locale. .PP .TP .BR "UNITSFILE" Specifies the units data file to use (instead of the default). You can only specify a single units data file using this environment variable. If units data files are given using the .CQ "-f" option, the file specified by .CW "UNITSFILE" will be not be loaded unless the .CQ "-f" option is given with the empty string .CQ ( "units\ -f\ """"" ). .PP .SH UNICODE SUPPORT The standard units data file is in Unicode, using UTF-8 encoding. Most definitions use only ASCII characters (i.e., code points U+0000 through U+007F); definitions using non-ASCII characters appear in blocks beginning with .CQ "!utf8" and ending with .CQ "!endutf8" . .PP When .CW "units" starts, it checks the locale to determine the character set. If .CW "units" is compiled with Unicode support and if the character set is UTF-8, .CW "units" reads the UTF-8 definitions; otherwise these definitions are ignored. When Unicode support is active, .CW "units" will check every line of all of the units data files for invalid or non-printing UTF-8 sequences; if such sequences occur, .CW "units" ignores the entire line. In addition to checking validity, .CW "units" determines the display width of non-ASCII characters to ensure proper positioning of the pointer in some error messages and to align columns for the .CQ "search" and .CQ "?" commands. .PP At present, .CW "units" does not support Unicode under Microsoft Windows. The UTF-16 and UTF-32 encodings are not supported on any systems. .PP If definitions that contain non-ASCII characters are added to a units data file, those definitions should be enclosed within .CQ "!utf8" \*(El .CQ "!endutf8" to ensure that they are only loaded when Unicode support is available. As usual, the .CQ "!" must appear as the first character on the line. As discussed in \fIUnits Data Files\fP, it's usually best to put such definitions in supplemental data files linked by an .CQ "!include" command or in a personal units data file. .PP When Unicode support is not active, .CW "units" makes no assumptions about character encoding, except that characters in the range 00\-7F hexadecimal correspond to ASCII encoding. Non-ASCII characters are simply sequences of bytes, and have no special meanings; for definitions in supplementary units data files, you can use any encoding consistent with this assumption. For example, if you wish to use non-ASCII characters in definitions when running .CW "units" under Windows, you can use a character set such as Windows ``ANSI'' (code page 1252 in the US and Western Europe). You can even use UTF-8, though some messages may be improperly aligned, and .CW "units" will not detect invalid UTF-8 sequences. If you use UTF-8 encoding when Unicode support is not active, you should place any definitions with non-ASCII characters \fIoutside\fP .CQ "!utf8" \*(El .CQ "!endutf8" blocks\(emotherwise, they will be ignored. .PP Typeset material other than code examples usually uses the Unicode minus (U+2212) rather than the ASCII hyphen-minus operator (U+002D) used in .CW "units" ; the figure dash (U+2012) and en dash (U+2013) are also occasionally used. To allow such material to be copied and pasted for interactive use or in units data files, .CW "units" converts these characters to U+002D before further processing. Because of this, none of these characters can appear in unit names. .PP .SH READLINE SUPPORT If the .CW "readline" package has been compiled in, then when .CW "units" is used interactively, numerous command line editing features are available. To check if your version of .CW "units" includes .CW "readline" , invoke the program with the .CQ "--version" option. .PP For complete information about .CW "readline" , consult the documentation for the .CW "readline" package. Without any configuration, .CW "units" will allow editing in the style of emacs. Of particular use with .CW "units" are the completion commands. .PP If you type a few characters and then hit \fIESC\fP followed by .CI "?" then .CW "units" will display a list of all the units that start with the characters typed. For example, if you type .CI "metr" and then request completion, you will see something like this: .PP .ES You have: metr metre metriccup metrichorsepower metrictenth metretes metricfifth metricounce metricton metriccarat metricgrain metricquart metricyarncount You have: metr .EE .PP If there is a unique way to complete a unitname, you can hit the \fITAB\fP key and .CW "units" will provide the rest of the unit name. If .CW "units" beeps, it means that there is no unique completion. Pressing the \fITAB\fP key a second time will print the list of all completions. .PP .SH UPDATING CURRENCY EXCHANGE RATES The units program includes currency exchange rates and prices for some precious metals in the database. Of course, these values change over time, sometimes very rapidly, and .CW "units" cannot provide real time values. To update the exchange rates run the .CW "units_cur" , which rewrites the files containing the currency rates, typically .CQ "/usr/local/share/units/currency.units" . This program must be run with suitable permissions to write the file. To keep the rates updated automatically, it could be run by a cron job on a Unix-like system, or a similar scheduling program on a different system. Currency exchange rates are taken from Time Genie (\fRhttp://www.timegenie.com\fP) and precious metals pricing from Packetizer (\fRwww.packetizer.com\fP). These sites update once per day, so there is no benefit in running the update script more often than daily. You can run .CW "units_cur" with a filename specified on the command line and it will write the data to that file. If you give .CQ "-" for the file it will write to standard output. .PP .SH DATABASE COMMAND SYNTAX .TP .BR "\fIunit\fP \fIdefinition\fP" Define a regular unit. .PP .TP .BR "\fIprefix\fP- \fIdefinition\fP" Define a prefix. .PP .TP .BR "\fIfuncname\fP(\fIvar\fP) units=[\fIin-\^units\fP,\fIout-units\fP] domain=[\fIx1\fP,\fIx2\fP] range=[\fIy1\fP,\fIy2\fP] \fIdefinition(var)\fP ; \fIinverse(funcname)\fP" Define a nonlinear unit or unit function. The three optional keywords .CW "units=" , .CW "range=" and .CW "domain=" can appear in any order. The definition of the inverse is optional. .PP .TP .BR "\fItabname\fP[\fIout-\^units\fP] \fIpair-list\fP" Define a piecewise linear unit. The pair list gives the points on the table listed in ascending order. .PP .TP .BR "!endlocale" End a block of definitions beginning with .CQ "!locale" .PP .TP .BR "!endutf8" End a block of definitions begun with .CQ "!utf8" .PP .TP .BR "!endvar" End a block of definitions begun with .CQ "!var" or .CQ "!varnot" .PP .TP .BR "!include \fIfile\fP" Include the specified file. .PP .TP .BR "!locale \fIvalue\fP" Load the following definitions only of the locale is set to \fIvalue\fP. .PP .TP .BR "!message \fItext\fP" Display \fItext\fP when the database is read unless the quiet option .CQ ( "-q" ) is enabled. .PP .TP .BR "!set \fIvariable\fP \fIvalue\fP" Sets the environment variable, \fIvariable\fP, to the specified value \fIonly if\fP it is not already set. .PP .TP .BR "!unitlist \fIalias\fP \fIdefinition\fP" Define a unit list alias. .PP .TP .BR "!utf8" Load the following definitions only if .CW "units" is running with UTF-8 enabled. .PP .TP .BR "!var \fIvariable\fP \fIvalue-\^list\fP" Load the following definitions only if the environment variable, \fIvariable\fP is set to one of the values listed on the space separated value list. If \fIvariable\fP is not set then .CW "units" prints an error message and ignores the following definitions. .PP .TP .BR "!varnot \fIvariable\fP \fIvalue-\^list\fP" Load the following definitions only if the environment variable, \fIvariable\fP is \fInot\fP set to one of the values listed on the space separated value list. If \fIvariable\fP is not set then .CW "units" prints an error message and ignores the following definitions. .PP .SH GNU FREE DOCUMENTATION LICENSE .SH FILES @DATAFILE@ \(em the standard units data file .SH AUTHOR units-2.02/units.pdf0000664000175000017500000146166712167113266013746 0ustar adrianadrian%PDF-1.5 % 1 0 obj << /Length 587 /Filter /FlateDecode >> stream xmTM@+z&?tBL$d4*.<_fW_wիrc;`GUOV&ʮ[v6W7TvbuYt/N.5=S> stream xmTM@+z&?tBL0d4*.<̿~UfW_uvc;Z̫MfG} I]/ޭmޯo⣩0^'^x]fkn{EK{*ʇupg6;ލ$4;gZ8, M[TPRJGeWxmE7 "/7j;{Yʋ"1tm|oirI ɑc׺>[TқEnn#bBSEV嶭mzsg)gR133w xAb;aGL6K&0+}&"?(Ҧa/ c,!-f3*Ix {asIC%hS7}H=ŤIY(jŧ Z4{SO5Z ekxvKǬ@2a> stream xmSn0+$z"aKU^CvF^p=!94gB˥0pދ s#P~k@hZ+vQڦ(A,Rf5Ħq8>K_X NH3$Ǟ{<0*5c~Pʯ5W42^!0^#rqxƘE3x z)cgl1BҰ?Xq!NAWA*d1)iȧΰО 9璆NVfkVaUJ?%͚5ػbTW=ј52f&p2pjV^cHMcVYxLS7E=1j g endstream endobj 6 0 obj << /Length 272 /Filter /FlateDecode >> stream xڍ?O0| w$$P`A*Ҡ $"-|~6-EBy%~*!A=V&]^T+ksE0B՞EW]yȀnHC!WO4wfoyj돆.Q>Mꪷ{[)e@Uh ʖ2Ѷd}!qkCe%aZye{N]~><e $3xgteLM_+A#"JbC%&uE endstream endobj 5 0 obj << /Type /Page /Contents 6 0 R /Resources 4 0 R /MediaBox [0 0 612 792] /Parent 10 0 R >> endobj 4 0 obj << /Font << /F75 7 0 R /F55 8 0 R /F56 9 0 R >> /ProcSet [ /PDF /Text ] >> endobj 13 0 obj << /Length 715 /Filter /FlateDecode >> stream x}TMo0 W;@튖?ڮEatuvja]r'E7)I|$? eJE{v%w|vUB$b:NdXB*OuVO~Llޏr10q厍^|fг3 e8cVW~O~fDޭcjx-8]=A_OXv*쪹+ @*p9<nԏ-Ƃ8d,U?NcJG{ #OU8,/((bΌ֌Ȅ-fbfK(>Ǧi:1 +TLy澶R⶯X(S},l!OyL<> endobj 11 0 obj << /Font << /F55 8 0 R /F64 14 0 R >> /ProcSet [ /PDF /Text ] >> endobj 48 0 obj << /Length 2138 /Filter /FlateDecode >> stream xmo6SLiaCkaLuTcݴ#%:M F&qĻ3?HLG&)(PʓW9"~p|zzӱQS29}?$AN&M?8vthG(x1Ʉ#xtinL}z5cd/Sm#%5c -ٜ*'̐TWh5lEC}nOlƣH(@P(ꎀ(W!nQ|+y<%L7 vdH{"h5@ ACAQA LCPX/."gͺYKtYL7P*=BNx1`6 @ !.=@D9~laVӏW<˨*I拞7!![D{~ϴϒj蔁A MWݳłȼ/#jϛ!BNmv$ cжýMJFi7=^Wbge?{1[j}!T;fYP"7d=~ +:n" $36,[}~ԔHٵPܬKN_ݕӝO]xa46UQ f<a s蹒frq)OVc t[ !:> 268/vgFT5[j7EjD[?l׏@lSCh0 LD}L`U]Q=)F4׺|{,jy<<<0$ #'SCErU ϓ3uOslUYMO;?` ք`#_gxRGzUZ՟g۬e^߱D6$^]FW@hЃ dO W!L'bE.?o}ToNx^1^`hr y1r=TWۦ*gURѓemzG``zx1`i"dϽ☤oڍE^ [ﶗ;Wrym) .Hܚh4#kgX,..j,V[7|'?FRq-!@DBZiA D2ZԧGM2DHyp .>ܛplc ,`$CF}zfy- ȗ_8s7%H>+wYѦl<A$C4F}zD FWڿ.Y6');`x/Vwl6blBNh-d͎'Hԟ KsElYہ(3:h 8#3a+aIE<$bzf6&MhakGt 1@kԡUbau94-%uYx&;ajG`˴ = endstream endobj 47 0 obj << /Type /Page /Contents 48 0 R /Resources 46 0 R /MediaBox [0 0 612 792] /Parent 10 0 R /Annots [ 15 0 R 16 0 R 17 0 R 18 0 R 19 0 R 20 0 R 21 0 R 22 0 R 23 0 R 24 0 R 25 0 R 26 0 R 27 0 R 28 0 R 29 0 R 30 0 R 31 0 R 32 0 R 33 0 R 34 0 R 35 0 R 36 0 R 37 0 R 38 0 R 39 0 R 40 0 R 41 0 R 42 0 R 43 0 R 44 0 R ] >> endobj 15 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [441.93 645.452 450 655.415] /A << /S /GoTo /D (1) >> >> endobj 16 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [441.93 611.353 450 624.105] /A << /S /GoTo /D (1) >> >> endobj 17 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [441.93 580.043 450 592.795] /A << /S /GoTo /D (3) >> >> endobj 18 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [441.93 551.523 450 561.485] /A << /S /GoTo /D (4) >> >> endobj 19 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [444.545 532.963 450 542.66] /A << /S /GoTo /D (5) >> >> endobj 20 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [441.93 504.273 450 517.025] /A << /S /GoTo /D (6) >> >> endobj 21 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [444.545 488.503 450 498.078] /A << /S /GoTo /D (6) >> >> endobj 22 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [444.545 477.473 450 485.049] /A << /S /GoTo /D (7) >> >> endobj 23 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [444.545 464.323 450 471.898] /A << /S /GoTo /D (8) >> >> endobj 24 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [444.545 451.172 450 458.748] /A << /S /GoTo /D (8) >> >> endobj 25 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [444.545 435.9 450 445.597] /A << /S /GoTo /D (9) >> >> endobj 26 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [439.091 422.749 450 432.446] /A << /S /GoTo /D (10) >> >> endobj 27 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [433.861 396.848 450 406.811] /A << /S /GoTo /D (10) >> >> endobj 28 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [439.091 378.289 450 387.864] /A << /S /GoTo /D (11) >> >> endobj 29 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [439.091 367.259 450 374.835] /A << /S /GoTo /D (11) >> >> endobj 30 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [433.861 339.237 450 349.2] /A << /S /GoTo /D (12) >> >> endobj 31 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [433.861 305.138 450 317.89] /A << /S /GoTo /D (16) >> >> endobj 32 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [433.861 273.828 450 286.58] /A << /S /GoTo /D (20) >> >> endobj 33 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [439.091 260.179 450 267.755] /A << /S /GoTo /D (20) >> >> endobj 34 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [439.091 244.907 450 254.604] /A << /S /GoTo /D (21) >> >> endobj 35 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [439.091 231.756 450 241.453] /A << /S /GoTo /D (22) >> >> endobj 36 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [439.091 218.606 450 228.303] /A << /S /GoTo /D (24) >> >> endobj 37 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [433.861 189.915 450 202.667] /A << /S /GoTo /D (25) >> >> endobj 38 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [439.091 174.145 450 183.842] /A << /S /GoTo /D (25) >> >> endobj 39 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [439.091 160.994 450 170.691] /A << /S /GoTo /D (26) >> >> endobj 40 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [439.091 149.965 450 157.541] /A << /S /GoTo /D (26) >> >> endobj 41 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [439.091 136.814 450 144.269] /A << /S /GoTo /D (27) >> >> endobj 42 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [433.861 108.792 450 118.755] /A << /S /GoTo /D (28) >> >> endobj 43 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [439.091 92.354 450 99.929] /A << /S /GoTo /D (28) >> >> endobj 44 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [439.091 79.203 450 86.779] /A << /S /GoTo /D (29) >> >> endobj 49 0 obj << /D [47 0 R /XYZ 90 720 null] >> endobj 46 0 obj << /Font << /F55 8 0 R /F75 7 0 R /F96 50 0 R /F100 51 0 R /F63 52 0 R /F56 9 0 R >> /ProcSet [ /PDF /Text ] >> endobj 82 0 obj << /Length 625 /Filter /FlateDecode >> stream xݖOo0|M2&TL~ٱS V$y'c@A H%jzy3q]KJ,~' 1 [ϴƿ_Fž-̓PmO+HDv'aNoUl7 ,14UuGb k"䥩ȅGggS셧Ԙq @in > ]? M'jvc6>$\t҇8(iHȵڨ;轾ZVJ|va>A7\;s0@ޑ ЋEͷ[jf7Iu1^lU^jû2d|]hM Gs(CzEh+@IhOlg] ŀr2o+e Rb;PID endstream endobj 81 0 obj << /Type /Page /Contents 82 0 R /Resources 80 0 R /MediaBox [0 0 612 792] /Parent 10 0 R /Annots [ 45 0 R 74 0 R 75 0 R 76 0 R 77 0 R 78 0 R 79 0 R ] >> endobj 45 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [433.861 710.037 450 720] /A << /S /GoTo /D (30) >> >> endobj 74 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [433.861 674.869 450 687.621] /A << /S /GoTo /D (31) >> >> endobj 75 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [433.861 642.491 450 655.243] /A << /S /GoTo /D (32) >> >> endobj 76 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [433.861 610.112 450 622.864] /A << /S /GoTo /D (32) >> >> endobj 77 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [433.861 577.734 450 590.486] /A << /S /GoTo /D (33) >> >> endobj 78 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [433.861 548.145 450 558.107] /A << /S /GoTo /D (34) >> >> endobj 79 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [433.861 515.766 450 525.729] /A << /S /GoTo /D (41) >> >> endobj 83 0 obj << /D [81 0 R /XYZ 90 720 null] >> endobj 80 0 obj << /Font << /F55 8 0 R /F75 7 0 R /F100 51 0 R >> /ProcSet [ /PDF /Text ] >> endobj 90 0 obj << /S /GoTo /D (Overview) >> endobj 93 0 obj (Overview of units) endobj 94 0 obj << /S /GoTo /D (Interactive Use) >> endobj 97 0 obj (Interacting with units) endobj 98 0 obj << /S /GoTo /D (Command Line Use) >> endobj 101 0 obj (Using units Non-Interactively) endobj 102 0 obj << /S /GoTo /D (Unit Definitions) >> endobj 105 0 obj (Unit Definitions) endobj 106 0 obj << /S /GoTo /D (5) >> endobj 108 0 obj (English Customary Units) endobj 109 0 obj << /S /GoTo /D (Unit Expressions) >> endobj 112 0 obj (Unit Expressions) endobj 113 0 obj << /S /GoTo /D (Operators) >> endobj 116 0 obj (Operators) endobj 117 0 obj << /S /GoTo /D (Sums and Differences of Units) >> endobj 120 0 obj (Sums and Differences of Units) endobj 121 0 obj << /S /GoTo /D (Numbers as Units) >> endobj 124 0 obj (Numbers as Units) endobj 125 0 obj << /S /GoTo /D (Built-in Functions) >> endobj 128 0 obj (Built-in Functions) endobj 129 0 obj << /S /GoTo /D (Complicated Unit Expressions) >> endobj 132 0 obj (Complicated Unit Expressions) endobj 133 0 obj << /S /GoTo /D (Backwards Compatibility) >> endobj 136 0 obj (Backwards Compatibility: * and -) endobj 137 0 obj << /S /GoTo /D (Nonlinear Conversions) >> endobj 140 0 obj (Nonlinear Unit Conversions) endobj 141 0 obj << /S /GoTo /D (Temperature Conversions) >> endobj 144 0 obj (Temperature Conversions) endobj 145 0 obj << /S /GoTo /D (Other Nonlinear Units) >> endobj 148 0 obj (Other Nonlinear Units) endobj 149 0 obj << /S /GoTo /D (Unit Lists) >> endobj 152 0 obj (Unit Lists: Conversion to Sums of Units) endobj 153 0 obj << /S /GoTo /D (Invoking Units) >> endobj 156 0 obj (Invoking units) endobj 157 0 obj << /S /GoTo /D (Defining Your Own Units) >> endobj 160 0 obj (Adding Your Own Definitions) endobj 161 0 obj << /S /GoTo /D (Units Data Files) >> endobj 164 0 obj (Units Data Files) endobj 165 0 obj << /S /GoTo /D (Defining New Units) >> endobj 168 0 obj (Defining New Units and Prefixes) endobj 169 0 obj << /S /GoTo /D (Defining Nonlinear Units) >> endobj 172 0 obj (Defining Nonlinear Units) endobj 173 0 obj << /S /GoTo /D (Defining Unit List Aliases) >> endobj 176 0 obj (Defining Unit List Aliases) endobj 177 0 obj << /S /GoTo /D (Numeric Output Format) >> endobj 180 0 obj (Numeric Output Format) endobj 181 0 obj << /S /GoTo /D (Format Specification) >> endobj 184 0 obj (Format Specification) endobj 185 0 obj << /S /GoTo /D (Flags) >> endobj 188 0 obj (Flags) endobj 189 0 obj << /S /GoTo /D (Field Width) >> endobj 192 0 obj (Field Width) endobj 193 0 obj << /S /GoTo /D (Precision) >> endobj 196 0 obj (Precision) endobj 197 0 obj << /S /GoTo /D (Localization) >> endobj 200 0 obj (Localization) endobj 201 0 obj << /S /GoTo /D (Locale) >> endobj 204 0 obj (Locale) endobj 205 0 obj << /S /GoTo /D (Additional Localization) >> endobj 208 0 obj (Additional Localization) endobj 209 0 obj << /S /GoTo /D (Environment Vars) >> endobj 212 0 obj (Environment Variables) endobj 213 0 obj << /S /GoTo /D (Unicode Support) >> endobj 216 0 obj (Unicode Support) endobj 217 0 obj << /S /GoTo /D (Readline Support) >> endobj 220 0 obj (Readline Support) endobj 221 0 obj << /S /GoTo /D (Currency) >> endobj 224 0 obj (Updating Currency Exchange Rates) endobj 225 0 obj << /S /GoTo /D (Database Syntax) >> endobj 228 0 obj (Database Command Syntax) endobj 229 0 obj << /S /GoTo /D (GNU Free Documentation License) >> endobj 232 0 obj (GNU Free Documentation License) endobj 233 0 obj << /S /GoTo /D (Index) >> endobj 236 0 obj (Index) endobj 242 0 obj << /Length 3340 /Filter /FlateDecode >> stream xڽَ_fwy,]'d=`] DgSW7I#@`xG*J"VyJ 8[m"ZmV ԄMT&:%3-Q&{L ۽ X79۞ ^7 > T(bɕk~5M;RWn =4O*̍.ҍPrMhn']8 "S4JΚ1^oZxD*PSD& Or]hUJMu_.!GUxE=QxX@ \c_ _+hƏ#59%Gq&k^0 B4Ãw tޜtBpV"oy|ӆBGIhl:sۡ.2NjGNs'mAHeba!&i2h2HTi̊q%@]WeD_ LEW`߸x]p2cro{Jf|9SÔ S\9/޼G)m_ң^B[6 m0뫙}KQPC™}PʹK|ɳR:uU>z=sWqYAr>ILE˴3TC}ʆIغr~>xx0 ,$&sY:6: x='c!EAv, @1wր#73n}޲J >UiUfEr;0u[4s ϼ\P={pК9ϙKbcPPM6k7?f`8({{(@KIv?œA5J.d" gٕ.w3DJx~c3-txGb@ɂ]՝kiaefg xQzj#f$.PoM_[F_4Є7Xt9@)]V!;En"vj#rs]A9bCNF8|n^1c.$S0e*|{ ~GvfA]/I&dDa4Kb+ HNT-\>5=֑ endstream endobj 241 0 obj << /Type /Page /Contents 242 0 R /Resources 240 0 R /MediaBox [0 0 612 792] /Parent 10 0 R /Annots [ 237 0 R 238 0 R 239 0 R ] >> endobj 237 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [173.038 613.899 404.348 625.08] /A << /S /GoTo /D (Temperature Conversions) >> >> endobj 238 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [134.242 391.564 305.243 402.473] /A << /S /GoTo /D (Invoking Units) >> >> endobj 239 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [228.288 192.182 416.602 203.091] /A << /S /GoTo /D (Readline Support) >> >> endobj 53 0 obj << /D [241 0 R /XYZ 90 720 null] >> endobj 91 0 obj << /D [241 0 R /XYZ 90 720 null] >> endobj 95 0 obj << /D [241 0 R /XYZ 90 376.636 null] >> endobj 240 0 obj << /Font << /F55 8 0 R /F75 7 0 R /F96 50 0 R /F56 9 0 R /F4 243 0 R /F58 244 0 R /F62 245 0 R /F2 246 0 R /F8 247 0 R >> /ProcSet [ /PDF /Text ] >> endobj 250 0 obj << /Length 1734 /Filter /FlateDecode >> stream xڭXKo6WVyRHz[tqn*2m $Wd;/ْ#7Al4$Ù73蕂* 骨nͶ?ps1VZ~;uYZ}0~lIǵI=v% PGit:(2!KJ Q*NmCz[ M42$: t,̢*"å~Ē}Y}Y{.Ih~3>Ҋ-L|ܖ?} :3u@$:W4*2\ oakݟyC]RxdMMٺ- Ӹg};TĽ'< ܈(1vͥ#\t Wʤ<,EQ0FJ[ ;'< aT@QPAul]WpMaP0qLAGȤȇqk?ed;؄qΟih&rQnMDq$HhlĤhGWǃѻig2-RnBϚb도 xhRfR9NO Q ! x0t NYPўY >@)P!e ˚O[fp( j^LPo A]F9Oe[pm 33CXBcuz~^-q(Hu2w&m$K!Km%6ID4;A 2"A8<>p ʪr2< w\v!!) !0iG3($7,7Cכ ɀX܎DJBHX04 F:Tm"%-y)|kj;COC5LH{Xs/\[p;@I349F==\* $?hdN<d*]hᔻ]YR4d~]8E1EEJ3)J^$PDj Qm#P;xYxOI){ +yG\ X}OB zewGP~Zx}Ꮜ+s뭿n+ԼoEÍsăO7/< tܨ.(;F 1/z 6L 6H-]ĔtF:;a,hclf((5SV> endobj 251 0 obj << /D [249 0 R /XYZ 90 720 null] >> endobj 248 0 obj << /Font << /F55 8 0 R /F56 9 0 R >> /ProcSet [ /PDF /Text ] >> endobj 254 0 obj << /Length 2458 /Filter /FlateDecode >> stream xڥko #_*,g @ۤI>AV{)q:g^K2 gn"U7Etq~9oЭp=oFEa~7euWk]jm +V:\ە6*}ûoǍ(R>)T7i,oͰIpܗ vEaZP%Wg[B9vqA3tǏ}QhԻ=ڇ*'qq*aF?[+7jm>uT ?[Gɵkڪ,S $4)~˃'4(*_zbh[ߞ1}#[YSە Gu 떟[G ^<$ @<@un &SaXԽk`@Ql9|G&'i?ۅ\ȱ08رv0N]3m>\8 s;Dib}p|kŝt).kAJ6j&ⷯZ ntxǀ[Xߊ嚡? d4؁FԔ0֣f˾uOTBB&~9ZaƄH8Jx5+~> ށS4%T@( >'AQ|ظem9<O}"G#l-:fs!r7Tn;@R=J"bGq!ÚIll'a5GwfpڴO+E@dO'$pvMĶ/m?P IPC. Hı j{R>$Vu[B`;FnˣV7~ tߴ@vj7 7ՀX(DtTH{Ak%IqO~}g88ABiPqEÎ ZqbRR>B+/R[E'8|˜ٸƻT,x֘8WR*JJINR+' e )6B6 I46vZ]ZqI˚%&(_%|⎟Q΂P)xO3=ŮL;@'K|gե|-AU[S3 ~#6ǡ6/i7%V=;̫K'Pǻز+BX;?lX\hb$t/8~3 eyʐf% Ih0 /h8Tdh ~]]B"^ΜqY<$cq7=$a{Z,J`jXRa,ѯ60)Fq|붎 RZ@T C G+}GCLGnٟXK,4۳*kGeWCByK-8ޭ ;iH6o伇bo szw\6}[ gM\1')#LvYOO,":ptPwx-_Y4_!r"J6w-ߒх'n#Ì-g p/)}{u3* َbfx$k^4c͚j<5a\*1 |!U/m#qBQ/vqdBF&=O/ endstream endobj 253 0 obj << /Type /Page /Contents 254 0 R /Resources 252 0 R /MediaBox [0 0 612 792] /Parent 256 0 R >> endobj 54 0 obj << /D [253 0 R /XYZ 90 720 null] >> endobj 99 0 obj << /D [253 0 R /XYZ 90 209.543 null] >> endobj 252 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F62 245 0 R /F58 244 0 R /F59 255 0 R /F75 7 0 R /F96 50 0 R >> /ProcSet [ /PDF /Text ] >> endobj 259 0 obj << /Length 2540 /Filter /FlateDecode >> stream xڵ]۸=bߢČHQ_vI4{h7C2ms"K.% HYJt w12˓Nob;:6`~xxizcV%{OI=}iLo$>ͽȣ{QDv7 O,|?6'.%椘TLBDE[zlfڷ&ck`䷨Fj;uR#]X̳bfVJ[&> ZUHO()`N襃Wp/ = Z%L2.C Gh5w;>3b:tyY**чy": a~ /@Z?vaNs P0"=᎖ ˲$'nP|^A9[t+S[{J[sD.]76u ap耺g۽noPWI-~?ާnx+k}L6a0O4`ߦhU{+.<1);W-5=UVztV:T8u@NiFqe)<>u)AaȲi]F"NI: VTb/bdp>F17p3#w0R=6.6~۪TD[',6RdLc(BNy!Ρݪ3{ȗ>O: ׻ӎ0\?.QͳRvZavh(!-&騆.lV>eMH\k!pg]eci=1~OZ7 m/e<{PЕֻKYxˠrqF "U >2_-aܠA'k+&C$bo}pjli;9gu@.J}WbgYdE8tւ\zP,[o^x! %pcۏl1r&HbIDZ.bpY)1bH/? c1 ~4\,ĞHR%ޡ- XQi⋅o|+W RYBHr..AئX:32cB׃٭ʝF/\.xqbdSV&|~#-{*uVեY.kLu 2uY؅6寞"\/N0I6CC>BOgT4٠uI,(R^;z='8Tz[Lԝ/!FYmwsh냁aݪQ%g7.4Eʯ/XyM ʒ; Aătw^ ^_[O-v&_:sOhD|f*Dqh2P$Hæ?$d1\FS(}.#N9|2|ZI]Խ^YWֿ,/P*8Q?$?x wkYI endstream endobj 258 0 obj << /Type /Page /Contents 259 0 R /Resources 257 0 R /MediaBox [0 0 612 792] /Parent 256 0 R >> endobj 55 0 obj << /D [258 0 R /XYZ 90 720 null] >> endobj 103 0 obj << /D [258 0 R /XYZ 90 539.492 null] >> endobj 257 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F75 7 0 R >> /ProcSet [ /PDF /Text ] >> endobj 262 0 obj << /Length 3474 /Filter /FlateDecode >> stream xڕn}Bo;xw7N 8qf8R᱒>ul)Y;꺫[,H2cg㛄%xx`z՟;SI\$::gj/19Y\QL/ry\͇y#+9Bg)me6LGGC竺jn_Ȥ!FY2P5ޡJ${J]K0wuW2|;Įgʉ(]=A6O"{\ERA?f=ώUsU;^1PDoM$+hL}/.0{X0T-'s(>ȶvL=V- y`@֦ki:Em<7}>'>; YwၿNu۔h8BQ<#5o^B(L(dv[*6g%/_LԤg3Y(BrhOO6(vx計u;8L)H"@!}u#HveEoJEk#@y SiYV a-QGxjhfbaEa!]ֲM%d]_~#*2MG@? <@ZSʒ G&'(\;vmG]&Q2cw(&oXo3QS,[GY"`4K@5 >N\&Z|ޗ?B:lePr`xMe9B>Yn;K"霦mm bvGHyr4nغ|^a* `GJc1"BL /_'D|< J E{1 pw.jMJ+E P=Cx#<["?B[3!sյqɠHajMm;Pc1O.xÖֳ,γW"z\ y:w (/Q*$ٸn'8Lt54 l@S(*u%cur=?Xϧ;Lְ@+ k'yaY[r͆`?dT%TDRT֋o1Q9t'ܐ[а3`w) 7ڢBu!MWX|*9H\,}d)Og?㭁Cp m]*t)x [4MFr)̨LО՜IUO#. U4"I088$PCLiǻ%it#L(yo~#˝kg#Ϩߚ-F+LrN83wߕyFF=o$YwIu$F֬= _"pٽzP,G`j>q/Db > f Grk9PX]!쨔NQ'4VK%M2@n]72g \AWw5HfIb},.:n1Xs=pc5M9'lQYx1U`r2B0%<Dbe1Ȯb]q <`}7ȝAXDVqmc)Eiر\q u968_|'npo] fyedvma}s,e)1|gIB ]Xz e:Y֛f|pQ{7htS-HTテT @l]Tbk_E.ophcY;dy-ϸF;|e씚qQ_4yl~1<8PEOC&w=݁&S#_Z,s'!EabAm,CheIlSM⥔I~˜iƩUx^fa7 0N3[*cA- [nG:׳Xhp͓A^rێwL\r0Xoi@F8b4.$dsCJw؝^4c)t  #xO=y׃˵e02"r/+kJdS@hqkd(oxw,?{nn_5Kz`\=ÆM>F~o_ m_6Hb qVxﴃs5U _|->fU#\\K 8w[4b^Poe endstream endobj 261 0 obj << /Type /Page /Contents 262 0 R /Resources 260 0 R /MediaBox [0 0 612 792] /Parent 256 0 R >> endobj 56 0 obj << /D [261 0 R /XYZ 90 720 null] >> endobj 260 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F75 7 0 R /F59 255 0 R /F58 244 0 R >> /ProcSet [ /PDF /Text ] >> endobj 265 0 obj << /Length 2481 /Filter /FlateDecode >> stream xڕko } mɧH4Z$64EYQ,I騳pvvޏ'7YqZ̤&qC_F2 ̿ܽy$Xdq&7w%}S Vkmn>ݨ4*V$?p7](JeljԆX;Щ+2K2ܙ'~Ilc|va8=T&*`7[6ÐWMS5{XG,g|%ڤ€(1k'F:NJ186Fd6lIl^) ׷JU=AZU^a&{1q#?|zÍqXUEr &EZ )gdrRHVj!Bby1C{bWya5$$7[fqOgnG"ޟ `6FP"ƺ8-Ŀ՟_Sif ֒$:Vuy/HT--VVd9c߶/ʩ%/@b7$3JWۇ0'3*ˮl p H-RTFuX)|vho8.`ה@5!HKܠcZ HbutOrqD?|ңX`"$P?ѫN&H>j`i 8~jk h2^PS]@ 1eAp)G2 Hr2%RAw>V?HQr>t"36ި5qx?Ty4|&KN0ty816Evezkȋj҅vi:rK'D)eTΫRE] k=W&t lN*<)UL[bױY!+9؂"$K37eEkUjWRӯ($P(TzNCט,cIP6>Alzy@SW]5#Ļ;:o9ıP"8S^xb!p!f0gDzjM>wg>B?$^BPdM6I_8妜$+^2 2&)Ӊ3HYLs&$4ݐ#,&H髇2Pq}zyv!$T`!1dףּ>:)9ڠ/+!LA9H"fjl`5a0 r˷X2ǗgZLlް"JAHE V :@XZ 'oS63eqԫ=2g-$NJ[r>zoj]8_W)\N~y.f]e3+Y@8db~z`J]X XqqPalȨnLF1iU]Æ{uEk%^^W:N {e|Aq5b3,҇ڱ"Ţ(:͒M/$+,_3t\]Pp =lmX :}Q|xBwXдIwS_>497vhY| _(+ho*bz> :x'ÛHPX,4i&|^RNgbGzǁj-Z3O;zFiN Q#JJH'C4h%}xG_F09S+p@4$Y ݵ ]G^G//skG#z9O/"F61>o`jҏw3$Po{7;W]po68ƅmBМ{wgaHox> endobj 57 0 obj << /D [264 0 R /XYZ 90 720 null] >> endobj 110 0 obj << /D [264 0 R /XYZ 90 610.378 null] >> endobj 114 0 obj << /D [264 0 R /XYZ 90 565.029 null] >> endobj 263 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F75 7 0 R >> /ProcSet [ /PDF /Text ] >> endobj 269 0 obj << /Length 2274 /Filter /FlateDecode >> stream xڝXY~_P Hܷı1;.G#QkEQcǓ Ej9\zظr'i0J4u.tzNu+,\VIHT.6_E,WJ긌Le +%?ᄏ.JʗY6RRqq"M~☵UaMA` ?(~4M?lGCGIݡ-NG<Fܿ,ogx:w4?;ڐat#};ly1<,2(z[,FssNejpܧ}Ф\ T>:4>Jqn+CV6J.=8 UК+7nMÉ(<*gQ*)^eV<JX-DJ fԕSʸnW3 |ݺʝ8LDƒ_:k9 -4vhn~]ή^J*-0#P:}#WFgdi^=¢kEbUE(/gRog_M;SчMٱ֥[',Ƴ< cM)feГs{v 5'$jƨy:PIBO;=q?F4(L0@=S\4?lx﮻~-[w#!vmSlr^S]g[4{B.:{Yj%TTL33b$t% 'ɯGzOFѭ}Mo,:mPrpCsٍ rPK'ϗ6*o^0KX@gTsѻˍ a}P;׌!tc(1}x<@龜^hP_ǮͧsjrrӼ˟weXI- H FϤ#J稙KZMg@j#w*|^m7}TfOH gER$U?Ҙ! endstream endobj 268 0 obj << /Type /Page /Contents 269 0 R /Resources 267 0 R /MediaBox [0 0 612 792] /Parent 256 0 R /Annots [ 266 0 R 270 0 R ] >> endobj 266 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [373.43 557.792 522 568.702] /A << /S /GoTo /D (Complicated Unit Expressions) >> >> endobj 270 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [90 544.642 186.424 555.551] /A << /S /GoTo /D (Complicated Unit Expressions) >> >> endobj 58 0 obj << /D [268 0 R /XYZ 90 720 null] >> endobj 118 0 obj << /D [268 0 R /XYZ 90 325.956 null] >> endobj 267 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F58 244 0 R /F75 7 0 R >> /ProcSet [ /PDF /Text ] >> endobj 273 0 obj << /Length 2284 /Filter /FlateDecode >> stream xڭYKW@I$mCvr,‘(Y[U|NsFfuWW_Ufb6RAfyiCy>L'3?ݿ% 7b$DlSQͿyl}*2nW"4g? R޸#"4m;v lkiKӅف}_Piiݞj+Y|oWXX4p󋏦U}yѮ@{z{s%=.]`Qc^zC\?5?ԦfKB?n s5B)[p'uMʻUV8YS#|HOEИ(!QYVcU_҇"΢aGڥX #N>]V* P;; q?$,-/H-'ĿUhzjk[J Ӷ`k8"o#q2so]q,2nogF4}w} wp)baTޅ;y'/!&9LEhh 6@#9k2Q 4J@f07"HL49O2 &ͯEN#-* F{g=YWN/r&ӑp o|.yx޻l+J2mvI(l/DxfDl@2 ]QY;%m=IIþ TKSE15 `ϽL[aښx> & [ LW]qh*BU ho'{Dl 9/z@Ł4fȈJؐcmй G4B`"F[jnQ5ssY *c_̒R ^۰g%T3XJlK6ett'ڏÉ׬Ք;vRUeQM :DI)4ujmKL꒵&"\;jP!gG)Nj׾]5Tnx:3N͠jcŀ~,=p\&A(2!?ubU6JkyE^Hh|Ldf hRM$F»}ʒ)5`p5KrRi)$),AF@ "3\15H9e^4Hnk P"@qme!)0-,slw^7+~PXT p,2::/O/qVt@o eC5dI(I1CA(Cyв1,#IuR|,$ dPC1)oP( e82ִ8+ 2X&=eq7U2r :0 uY;Bpc@&t|J>˯uAuس4FfO4N R rlhB'4=0֥SOsSTxx謀F鸱0hnuavԁQ)8ft67 f!/t-a* [~LyWL#Cwj}H0!ĉ!ʳgv>* ݱ*ڵKg z*G_8 1-[gzv#/1B9> ,vm, j:@, c)YUܟ_ K\V4ë E^<}K/ע<0x | 4pXSIs- :x&acc=$mmpާ㩳cW8kv0U_0}OH_w&BRB,{ڞInY-^c:tVMJ ZP5~qb̏:J Λq75O`./ZRmE%e.S( Ҧ7f\c5? ITzM<p#w5ku lY'o7DmZ~yPA\u<'AM>$߰A? ߮@ŶRd6o}XJ6[4جՐ Ƌ/*i d- 9k4k ByX t-HH4(F$YNE-1PM&NPDǸb1CA4˃щO:<H= endstream endobj 272 0 obj << /Type /Page /Contents 273 0 R /Resources 271 0 R /MediaBox [0 0 612 792] /Parent 256 0 R >> endobj 59 0 obj << /D [272 0 R /XYZ 90 720 null] >> endobj 122 0 obj << /D [272 0 R /XYZ 90 386.611 null] >> endobj 126 0 obj << /D [272 0 R /XYZ 90 138.452 null] >> endobj 271 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F58 244 0 R /F75 7 0 R >> /ProcSet [ /PDF /Text ] >> endobj 276 0 obj << /Length 1745 /Filter /FlateDecode >> stream xڵXKs6WVAx$Nmt4d2I<)HD">łhSダrwo?{L?~PlRi&G7xCS UUlgiR9UI;EtY*׳68($Gp>sW%P+>ʰXF+鑮sLit tmz9vu8Jq9'FfGPQ׫YB~0 3`T@(qR.k> endobj 60 0 obj << /D [275 0 R /XYZ 90 720 null] >> endobj 130 0 obj << /D [275 0 R /XYZ 90 312.84 null] >> endobj 274 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F75 7 0 R /F63 52 0 R /F4 243 0 R >> /ProcSet [ /PDF /Text ] >> endobj 280 0 obj << /Length 2509 /Filter /FlateDecode >> stream xڥYYo~[]>x9OqMUL,˚=ffi8z.C 3Zn׍[?;eB]aVO-܁msIM{FC]l/PNӲ3 U_^rs@7Cu`xԟԲO7Q|ߑK3ad`"MA&,N?Z,Zn'G1}1f#@ٷ/@JbSddjn^a$9}t[064YBtwCW{> pg,d)G=Z }: ah^k3!TNR~?o (R~oi~^8_ZJ6/L cc$DauFqm}0gr =ZH pkuP8)b+Ǒ<]`!O `+X[" !acsWIoneAvMu 3ݲ266\(75JZ4G6٥Is]cV\N}{KJ$- e[ʒ0NRr(bKl"@i$G.$щyP"J( U>LxP rʚ'-T㉙t:Y/:e\OaN }Sͦ |3^+Bd$OcfO ʞde! Q;A$$#\euy]ZH"7y0FَlJfSJzG"J5SCM(W8V<-`Y)t|n['9QQg[#|E-b] sTՀn" x'QW<4-!.@ڛ)&(ہ.&e1$j\/x Yfҁ+/PЗZ0J6GGye(?Gֲ]]< _x7MgZSst_ݲk60zM VZ.*8rC8U XE *>ܗBj5uUUkRKRhMH]M6fHx1A c~F[` sPF1!<9 +x-Fg'%UTP$\A[Em0Vf8Oqbhы{p endstream endobj 279 0 obj << /Type /Page /Contents 280 0 R /Resources 278 0 R /MediaBox [0 0 612 792] /Parent 277 0 R >> endobj 61 0 obj << /D [279 0 R /XYZ 90 720 null] >> endobj 134 0 obj << /D [279 0 R /XYZ 90 475.492 null] >> endobj 138 0 obj << /D [279 0 R /XYZ 90 147.825 null] >> endobj 278 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F75 7 0 R /F96 50 0 R >> /ProcSet [ /PDF /Text ] >> endobj 284 0 obj << /Length 2040 /Filter /FlateDecode >> stream x]4~E.EW$Nx8 E oiRm.Įxf<_J៯td*VCoz7o}*VrNqQY6j|*YPz:.\gߚh1H9J2}E Fk#`өM6 =8vN%'<9~BmY.3G[@x8aՐ{ď;5Z1W+@s9gF`t 08v}U `n\8׺2?K7O>ţ'&}ld|8l u,< fB-]n6@QŹϼY̾3uH> endobj 281 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [265.76 469.004 493.585 479.913] /A << /S /GoTo /D (Defining Nonlinear Units) >> >> endobj 62 0 obj << /D [283 0 R /XYZ 90 720 null] >> endobj 142 0 obj << /D [283 0 R /XYZ 90 720 null] >> endobj 146 0 obj << /D [283 0 R /XYZ 90 164.753 null] >> endobj 282 0 obj << /Font << /F55 8 0 R /F75 7 0 R /F58 244 0 R /F56 9 0 R /F62 245 0 R /F59 255 0 R >> /ProcSet [ /PDF /Text ] >> endobj 288 0 obj << /Length 1418 /Filter /FlateDecode >> stream xڭWn6}W,mexE)oi 4"M[Z %~|g8v Xrx+?J(Œ0^wv"τۀ˳?i%<l>[oRM&q]%xB?\={s9ͤBHh4(P!az]y[۾ (:Vz(CQI^j '4` 0utl/NPa=tzͅq=*H\_@fz~xaFN)bWW? endstream endobj 287 0 obj << /Type /Page /Contents 288 0 R /Resources 286 0 R /MediaBox [0 0 612 792] /Parent 277 0 R /Annots [ 285 0 R ] >> endobj 285 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [90 89.626 337.167 100.535] /A << /S /GoTo /D (Sums and Differences of Units) >> >> endobj 63 0 obj << /D [287 0 R /XYZ 90 720 null] >> endobj 150 0 obj << /D [287 0 R /XYZ 90 161.056 null] >> endobj 286 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F75 7 0 R /F58 244 0 R >> /ProcSet [ /PDF /Text ] >> endobj 291 0 obj << /Length 1797 /Filter /FlateDecode >> stream xXYD~_7x݇'@@vfVxje` ruw*Z*5&m_DmVL %rL$y8^(̣\nSU7uw1&: ޮu+a1*ʒ@7߽f)P򯘒)&0[% u388o+&g0(9lvQ&T_jQaRV,LxPD^HF&AsoR&=UhX;OG4?Ŷ@iЕDz*m;& ~tÑf_ koa7}y1bԹ$:r yzcj]7T,zAP:D*`ߙYx9&md<6]1Y,"_yg=޶gjߩhr;Oٟ,{r+dڡxJ48ڶw-U2Ecp%4BLS,YFe'*:S7GqkD99)pxZ뻒*BzoKVU M~ĦY@gªOms<~e'~P YZc˂ݛczߴL,!%Us&Ґ{r7C1u\ caXRuȁF\!GV1:8 EuKU{اpjp䄴^H)v=/tB4Uՠ6v,pK@Tx<ҭlg(݃ߘM&/uǢwLzzr'jISn!DQbk0'95pĮOli Wt%9 dK e0cW5:Lq : IJy!̬@|H%9@TeG $s"0+/LD* ;&r-Y$K۵e! +wT,9;BF׶6<*;ۦ"O(eJ+o%a?.x80**I8lT]e}C.*2,7:8#;bbti W-;5+Jøu<`taF50Rj'X*"Y0^c6rPlWܠI܄QűةiJ1d S[iYT(T"/>[{wřHE&X$1x%: qV׀B`| ;߃Bh{2ی})`O}ܜ͒WXX/lo+Т[axB+ endstream endobj 290 0 obj << /Type /Page /Contents 291 0 R /Resources 289 0 R /MediaBox [0 0 612 792] /Parent 277 0 R >> endobj 292 0 obj << /D [290 0 R /XYZ 90 720 null] >> endobj 289 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F58 244 0 R >> /ProcSet [ /PDF /Text ] >> endobj 295 0 obj << /Length 1800 /Filter /FlateDecode >> stream xڵXݏ5"olq_koO */HPUQn\V$ٰ=xrx)ĹevYŸT֛]T{H.\dmP'Xc%lڃ;6/:x t4ٜsWnw8OYy˨?w(e436*br |rkxy"`wm 8id,KY؆uI& my8rEW8֍wĘLNߢH7%UpX Z *#`G 6eXQP43~XZaag>iyE0 ˲ oSήe0_[sQ" FHpiu!F'!Hl?hgL\hN,(h()%m\ 0D=l`ٯ Bڑ%EƙԒ)FoJ+f3ix; ns|ǯϥנS& m @8<W2*B2jP9d{#8iC\9zlF^>zwab2yRP\IY)v2l^Zl@j i;2 rC$QD\9˒ȁZj"z|qțv^'}>Fݾ4J9 1 SDKYGLYT'$8#.xkQ դ{Ȱ؉6lQuC=ĪOA_ C]p𯃱nGG;XYi zWb|ϊ 0B[S6$0}bNCJ̄̊rA2@Ύ FCA2S<Z0 PHMDvZ:)yGKKFlQ'Eʝ U#O1@gw4G>Ί'Xđ:Y2!`8 ;wGu%e U퉎@y1:tȑuI԰ p ۈg%aQfi ݅4ib7a J?6+62͡xÃOqxW&"in`/$WUY]u2U?sjOǶHDݖ1_Mdng41΅4-=)_a] |jлv6[dKfREԔcꦨ}ax?k4]t9Ctt BQ>E6ptrӳ$= _>$XBd%@=3NuO+ Li|=.G=H91}ܽI^-g:_K!sr1^ЂQ´)6Qm3u;5ËXXR:4R15]=17(~ C[ ^%*gunX~& *L- {U0$d2Z\~> endobj 296 0 obj << /D [294 0 R /XYZ 90 720 null] >> endobj 293 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F58 244 0 R >> /ProcSet [ /PDF /Text ] >> endobj 299 0 obj << /Length 2232 /Filter /FlateDecode >> stream xڭَ}Bȋf7/CxxEQRc)R1,S/ g3Ƈ?IMdm7J\ tg?yCn~6*۵[WkAƝ xJH\h2ʋd%Sڰb?C=1{V pTxtͪlȉ!p_R"iy>4^bƋT ^8H1N ?ͳ;i@{ٺ E4a 8'[K=]@BY>1\dm<¦ۢBN툉az8Ym^ŘNYPFP䌶&5غ*dgcxlw*oƩr~/u UW²< ґ7@  Q8N=1y{wEHàڣ.,Akg{<T|P|j\F>dEw"9,q/m^۠ ϪqFNflW#~:=bk)#of+/ʹț52C`\D[%@1 ޗw1Ӥ۵ČNPh.sV$YC=1cN b1c3B3F meaǮuUˈ С0Q`,uZ6!['º93^Zp7b"_&ӄ^$/kå:{=m"Y pHYފF+ rUD(Yh<\վ;ЅIXlp yLA#!9ɺ\R[|Ag_y ^g <9QAȳCZ:tPd/ O~®QNUU?ڢ09Ie#m/Q=RO@n[&"JY\X^w}|m}.:{..C'ah'wuS$JP+!fAqD4N)&YD2#7%`X)c\'PF0CIRE]Uk< Bk弦_Y.zƾLL7ܯrSFUnd >T|8_~T3 P#n h K) D٬O#IaBdqXI!P0Jl!u!) [; Сԅ6BH~o!:}!#q]R̝[4 g3b?B#XAL-W|7 CLCUe0Mr:2(Xx'I N߈0ŗ$h( zDDֹXpujz(n\=W[͚ہי `]cb T ,૥InꬰOdgb?pt'2Ċrlbc܇RǞIQHK_J?J(ee*caJF-O|/\*VtV"!~ɀ>Mbt U )Nlei4v/8'qr\yDذTy"YTjS߹9pdċU]S;4_DA'u'aw‹0'}u%}@>I$nX#sT{!ѶrռWay0[fU*z*JPWbz*2w(` sRnlɸfv˸W|Mx9g1Fro-M3Kn9K7)Gjh뾅tE>aGt0@z2ށWU/57񴅼\ A2|Cy"XK9qYAcO۩410;"+YhwMG P,]ϯ}}8B<\M4k#Ku(g} !I@זC˖~ARfy ղkn}ySxv1fsfqb"<74hpxT,X_'m:tCۦ߼$&_e endstream endobj 298 0 obj << /Type /Page /Contents 299 0 R /Resources 297 0 R /MediaBox [0 0 612 792] /Parent 301 0 R >> endobj 300 0 obj << /D [298 0 R /XYZ 90 720 null] >> endobj 297 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F59 255 0 R >> /ProcSet [ /PDF /Text ] >> endobj 306 0 obj << /Length 1974 /Filter /FlateDecode >> stream xڕX[۶~ϯ[et#^tNH "'Ql-D ]6ؠ?3,9],"ͅbOlx):7jB.Fx?&FQbsuؼu8lCT2 2~5T"@~^)Fp:Kȣ|:JZi ST>V?PS<{z$NBE"Zsٍ#u"ƃyfqXzm0Qj&{yC+$y)i|( 2b9+-Dg-aRtU]o:8[h'TԪ}3TQcykmA9VǪsُ`" djj/}^j:z87%rŅ#룽ld4BiOlw8zy'a0ӋZqa1^ED歖,I|$ Pi/bYu#XCLۗ!jǣhꆝ{s˖V`B*@]ZtrXbZ޴-4 T;0wC; Nf;:jp ;xQ[,cӂ:ռܵz]"LٻuD#W6ɂ wb[4d y]wh7ffj d_鄊eӀk"TY& \gӳ';4ܹM]bГělG+`q} k r+׮΀`' `4cJ8M@-UDIHp+N}[U 8 ܗ<=\ك֢Mx*(AV3G[ѷx<ƣ_"K-0'IMa4\h_:0_Y8q$L{# #:#`cR/b3i%=":Odil~\ce#xl R4Mf#l챐. h*)"Q?W5QZ[h;Pwe*){ #:U Mڠ3&}H/f?#'5( ڜ񄡓EK}x`$).R 7 8ݸeF8VT maz \% \ss]f&Ji xpK 1p^d:^F;h\BZ85hN)%x9_)ZwWb|-%νdprmG9zoCMmXYFViS:oLYZA?mXr.*ڰV;NMuR\*&'X"[+ȵa.2Y7WͬdL'PQzM=V7軪l{FqzS(3y!j1+Qju~{ʯ|r7QY9/H|16>glYեhu?%D ٚȞJ4˞u~K<$<-wTڛ$PӴ~ICENPkw!ԏT4mA++b"t sQr ĩvAD s_m,eFDl ) -F |W]^{{TG4*x%lB$n>`)eyNq1dn˪_5ը{Ambr^f_x1_R1.ux##Ic\I 1+(."ms`@|ZpKkGzӫB9k Ӏ- endstream endobj 305 0 obj << /Type /Page /Contents 306 0 R /Resources 304 0 R /MediaBox [0 0 612 792] /Parent 301 0 R /Annots [ 302 0 R ] >> endobj 302 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [304.835 89.626 477.128 100.535] /A << /S /GoTo /D (Interactive Use) >> >> endobj 64 0 obj << /D [305 0 R /XYZ 90 720 null] >> endobj 154 0 obj << /D [305 0 R /XYZ 90 181.897 null] >> endobj 304 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F59 255 0 R /F58 244 0 R /F75 7 0 R /F96 50 0 R /F62 245 0 R >> /ProcSet [ /PDF /Text ] >> endobj 309 0 obj << /Length 3541 /Filter /FlateDecode >> stream xڝkP \qvPI#,2I;%:*}qfv3{j?)3&.lNZϯmpyER}nsSی;w:~h`5*ɳH_'L/$ O~,2ikD~lnkMuK]{|BjH)"%;m/p59@g9폖o\@Ni6 *&< 1vQqCs<2]3%2 ~ةIx(8unU&V)CAg#C$SPNAXP5X`"x4  ?]tDD WH Gk}Ma"#PQ`=#/|#$+AC]אq ej>3 "zWvanŹ1dq {q"&#YV, }y5( I`? ~__<<2W:8ߟW.t JʼnRc_^#ODI#?7]`k)3]Weœ ޗw&p.MA2=gN_5h',ɒ8C-@,:urp@P(ă<[?dLB T#<^0ċ$iR~5Ϛ0L 0 iO|̀MJ'KLl2=UF(AߡK *\FO9 tN %S#.hW/ 1P˶OK,4]Q[($ѿx_|@6uDK<&iD>S/qU,R[ap St4̒Ք г p '&C_θz*!~,O#'E_81It.NZ fasɣJT6Ve6 1+|9RgP!sId:zrw:vH .N0?4m|d:"?er3Q!eKCܯNa04O~Zu.VK~89Y6\s/M^$o,63^c*i$0f2O k nBr4Lu'4PWJb]>LYD sOQT HY<^Ʒ:> Tyy:~V !kB4kTƁkwJUni&q`2Rf0doX~Gƥ9d.`Rum +nX/-eU.Є*y˄r+9̀!77ҳtj˶w7=['X} NPk3h/{;{O`.MP`ԃTi(YDPt =j"QjoU0-K|#O9zcR!%2 fx\V2>2Wr"jn)kJt4dL]euΗ%Vn ԉ ^4l!F.Sg5 *bAVyӧs%Xl)ntjti@չTj` ōiLn[/r5 㺎NġoUI H۱^@Yӥ ARZքFaoPvid탇?:Vjj K]I7f 7\  I ^/WBW{j^bSeNA ݺ!g ;_KS#4ɨm44zU9:|B9XXOsIQӠSSٺ&*5Xaq[eNb Zv[|8T~6NHqE풩ڹ&c=\zԐst[˱]({^Z<Ԍk^ƬpϮd7 #$#Թ|:/3gB0RB)m7M%nɨ:.]4\sSqỈ,5-ʛlj8b&#ѐ53x+ate_ifQuڳE$掕Rk$&g]nA w<.vG'S7ES5Tب3ԜUtķA1j(bÚUEM'yCw?têo,}/ްXn99+$D󬽀Bee.O;k1XxPKE 2U<#C a-.7X\K" ry|~ P|~͞F2P GRD}ُ?_A%.S:_NN]9Bƹ{|lxg~-1| R\UaqB]~t1r-jgАZ_0}m7BT< )s.Y6ˉ^h?\jQfI[Aw/Ƥg9˩[W@eU$~bo}CiP endstream endobj 308 0 obj << /Type /Page /Contents 309 0 R /Resources 307 0 R /MediaBox [0 0 612 792] /Parent 301 0 R /Annots [ 303 0 R 311 0 R ] >> endobj 303 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [474.004 655.712 522 665.409] /A << /S /GoTo /D (Command Line Use) >> >> endobj 311 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [90 641.955 228.091 652.864] /A << /S /GoTo /D (Command Line Use) >> >> endobj 310 0 obj << /D [308 0 R /XYZ 90 720 null] >> endobj 307 0 obj << /Font << /F55 8 0 R /F59 255 0 R /F56 9 0 R /F62 245 0 R /F4 243 0 R /F2 246 0 R /F35 312 0 R /F31 313 0 R >> /ProcSet [ /PDF /Text ] >> endobj 317 0 obj << /Length 2996 /Filter /FlateDecode >> stream xڵiFրU:%O%Y6%ܭVKڙ9ՙq |K7 7yrj-rNZ7<?xqW{gLD~ nkKS m޶ͭJϷ*ʮ`kd.owU(gp&eFHmS2ܫz^yT#Xj!-#@ pJ?˻W 1ѡ+µ 1{~Y癧<o![rSey x0[q]+!^5?wSJADP ksO\! EEA_< H5h7';?ZxltwCW]POPX # -% mt>#K%owʉC, j;^ A%¦n\AjSatAKѢ=^".>d֘ 1D;RN$ 3$nv\C9XŻ7q^aoG#+GKO)x3{4}60_i5$[y<'TWdF -CKۂ%aom&<Ӯ>)nї v/UڎqDoy􉉁ѥ8Po[*M jBUs ٓ 3d2U )Bq7PJޕ Ɓz'Yj̴Baaf?(E@1LZy{`*T&e, 4%j ӫԃ$doF(i6AuE) Z"#D[=1G1Hd6y+ΣZQ<wKM(N%+{ ke9 _#l'}`)b29kL&ퟢб|(F }^drFm2&E> woKPgpb'Ш1 ScIip*I#}yϙ1sh1e抡CwEtid9Ϭ_5ܵzu**!0%_݇엄w7P\jo rx U\$Qg j9Zet/g\lB&S=hmX;ucG`o 1^>DڭHO?C(DȌ|jRDpYZ{:ᤚkRȼ#Ԣh_~MHf\S`0w'dɕ%H˄&<[.uԮW c}:`jiӷb&0 ohvԘLto*]KաYA.ˢ\դ#j0C)Q*jUe?6N-!L&(pȸ-Lmz!ݧ#*~dt(J_dLe>L~x r]*2/>$v LpWP>CEd6{y#r"й+ٌ"Mԗ5:"AN!]R@8c[pLQ}9m[nxh=Wn-^~YzjឍVnz6/@LiS]+@Em6o삍##S%YzUOz4@xK%axG oMl\A2D 7M?IxQ> endobj 314 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [168.314 326.339 400.136 337.248] /A << /S /GoTo /D (Numeric Output Format) >> >> endobj 318 0 obj << /D [316 0 R /XYZ 90 720 null] >> endobj 315 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F58 244 0 R /F62 245 0 R /F59 255 0 R >> /ProcSet [ /PDF /Text ] >> endobj 321 0 obj << /Length 2130 /Filter /FlateDecode >> stream xڭێ=_ohH#O}l8Z[ʒ˺%k-DcY?EVka}x9h{o?bx?Deq{Iq?uwPk|+eJJjI })VNLL$5BjC2dCzpg~؊p!cW .FH{Qd!p9H>a0)&+V-rgo本rڛDgѵ 2ND)` aSm>oud(7JI]WZݯУd̛{H5zT1Bb Kl[԰Xxi\r/ZBy=!j¦|.C#XO5э6>ͨ^Ջ>D'3B&!^gW#dB¯EXD[tO]'WBa+Kbb6,n `ufwpmq[3tNl;K,NBګvS 0!GRz%!'eIAb.̼[X)\:avo20)S֑Y_!bȟR7BH&u6 us87 a$<5ǁ[(C[;rOe-ρ{\@=׍%CtVwIPvYd5T>Sw㙱#V+ZJHOq8E$rveUp\S`iʗꌆ2 XBB#쎕K`!eחkٛ9.ʙxp 7-sK?7ޖ^ToT ew_COlp%{lm6wJY7hic{m,4 1: .WPzj(A6ޅ˻~M H^V]nwY޾9vs2Eq?h3np [u )θ16reblP'K6܆f&]|K&*$6s\h ]Ys ~*<,mJɝҍhx+%r^&̼`%W3'9H.V.X8^%D(I1h2)<{ i*T@C Z\Աei8 wk_`T=cq;.NvaUbhVQNǬ`#6qb}+3h v-%5:<F͞-xf~P; E-1H[CiqxآNr UU1fn\̄yEACsBxC_Nc0?x& Nf1EMgF\ӴZ?U҄'+ܔJNlxD2N:cWD _KoU-k21DHiAPSIؠB<=R&Jg hŏo9i+q+炷%E8TMġJJ _8:ܴrzia CXՅ ع ]B>cZQU2چYCoC?5$*ˀěLj F3Eܖ(hmgWq3יY YKJ4p^(ڌni=ef؏ =u|v]ۺtc"?+#q `N̺N a9mYM'sYV UT}Y ؜+231;,@1K hSl4t\7 endstream endobj 320 0 obj << /Type /Page /Contents 321 0 R /Resources 319 0 R /MediaBox [0 0 612 792] /Parent 301 0 R >> endobj 322 0 obj << /D [320 0 R /XYZ 90 720 null] >> endobj 319 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F59 255 0 R >> /ProcSet [ /PDF /Text ] >> endobj 326 0 obj << /Length 2290 /Filter /FlateDecode >> stream xڝY[o~_qҗVH]>eA",>Bu$U u|A\Ÿ8EQP߅vv; _P~~w)I" Tv:x(ԵGyG{zkG"SO_xD7OeJ72y(&?. .mJ rK=ZDr)u~gNG/zAu?20)qh'G^;7 6 9yI"H9iU#նE<*(mhj j hVPʻ-eqUK}nt@Vl8hF"&.J) IS(0{]ouK=8qSahtua6z(}6ixy=pu' .U>B`KKaeGw5ѯ,0od݅u,;vPCα0ttFBdoŗawϦ2g5CpXk-BJ&֌cI2^g uU؇({BO(kT&:Llxx;黟OqdɄҺ=)e-=q;mhqM=H :a^2}.AiC]Y,) V&JCtB ̀8] 27`{Z=tY1;P=QہH@Y¾ J!a=|Qp1,N9'|sN[0B8nO L ;~ K Ð^@" 1`$_g.S.(Fx{hi*C@`^ $hr>G{نQ[%#TwBX+WiNM^GW|*qn+K7VsfWNใo^6f"D_}!oWqO = f*/ 3,'w9u3^\2j L3gU>҂ˇ*F)dU!`& jDV[ͷ0H6CWHK/iR:o mT  &#Q OD҅*^~U/o-|)}(1[ ;zX'ѫa t V*.9eNP%W^@ jȊSH9 kn(Ytag&8ru3"+曧v6k~kM 6DSw<>f6Cۊ< /#]UD,~& }h첄nǷ͇P@ "{=fNQ@s=ގ0jsB{Iea<0t ÜLY GM5rlt%q"(rF. endstream endobj 325 0 obj << /Type /Page /Contents 326 0 R /Resources 324 0 R /MediaBox [0 0 612 792] /Parent 301 0 R /Annots [ 323 0 R ] >> endobj 323 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [166.994 291.654 308.055 302.563] /A << /S /GoTo /D (Locale) >> >> endobj 65 0 obj << /D [325 0 R /XYZ 90 720 null] >> endobj 158 0 obj << /D [325 0 R /XYZ 90 274.791 null] >> endobj 162 0 obj << /D [325 0 R /XYZ 90 227.974 null] >> endobj 324 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F62 245 0 R /F75 7 0 R >> /ProcSet [ /PDF /Text ] >> endobj 329 0 obj << /Length 3552 /Filter /FlateDecode >> stream xڭk`^k1.ȧܸh ='6ԉD*$E{R|J`pggf罫"SWytqjhwwōDɺ,\y+yskTQn6>Ums΂kbeI?nq'(qJ20N} g6(D;IPV?GWu3zw,{|Wnǣ-x=Ip{fTV 4$> աR#&E56TV>eP _< #sRq,WċBv(i)#r{e19^laMI@BxX@٘ɄhI]+뺪(yeZȗq2p„qmR6}&6M͵__06#)u GEp f<πn+蔡;9X!b F?F?=H F g Nd/_~|4IFg.F`o3 X6fe1IgG8A`#alwEV<1bLUtkfǤ3~JtX-X3#IyA8 m ^Vp9~jE&]GUfCHW]k7M GDvfui`IkD /Vk>]լ94H/!d!p Ezlj?gP-Lu5U&SoQ9UE\E'qpu(OhHe3mA2`I^JtQR<È;;n8?:3>DDk9H|v9kO`po8\c=kF~ N?H 4"6 Oe%] ǺN{ %z;Ћyp4f)nϧrMA{Է$~4ֹ^,xwZ(NKlKӞ{hPH RlkËI,Q#abjF)b˨ȑ >!~s^B[+Io7)lL٣?&6]kU[/lz1ǿ :ĩ[wNJ y;&ZQ~u灬w]qk@b(ar ;*yE!9{?GQX;mLe&rHdI΄gL>7i6Xd,ϸ q:DwIy6]p>e.5J~kna6n͈B/Dh̲aAccáNp- @S2_r FG#ݹ$|^Pw4s9L:pYᖒLdK@:D Zݨ|3>3ȱy<űa?QZN720G 3H' fVK.lE"g8ΆaXO2x)L"L"x;㍢9^ܵ)+83E,6m^,Yga'|},fZ0OA=ik2j.J)=v%wDc 9i->:B<<@g_)ɒp/I}Qu{"RT`V/pEMFF<twUQsTBzp"_9mkv|$ݛ d]Kd Y+;RI_Րsk7lIbݔ ['/s;zBp|mx' / Udxɾw55ҤT%> endobj 66 0 obj << /D [328 0 R /XYZ 90 720 null] >> endobj 166 0 obj << /D [328 0 R /XYZ 90 448.546 null] >> endobj 327 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F75 7 0 R /F64 14 0 R >> /ProcSet [ /PDF /Text ] >> endobj 333 0 obj << /Length 2870 /Filter /FlateDecode >> stream xڝrH}fFJW00xݍ@nU0:{V:3+̶OܘwML%Bv~}ީ8:Gup^_Px1}wyc Ш??p;x*=#m^3hu7{gVL|Dzw#EPw X0|]yb`j%Wqkg*]r-d;z6=}bnWhT$'u0SPLx؎K[;YTI}=BLgϕ[\r%*ũkgd*qE[:{P{| y-:JLJ 1ͷb\ U:A~'.a KY[/#𼯩RShJ^Wz7`~K֡1 !8[Ei*h9>klmn470@C~%ْ.aGz]$>f+>rek!o YFymdS@fq[4yVlJ B r 't)Gټc1YF^`;sd|gI ?>b tlƊCT] *6{Mr w[_*V{} Ų+8D{ی<` E75G*KP@ޛѺ uEb{A ]3a@Z6v 9Kt*8w\O߄qv -M::6# h(v,Q|)HISsoy8ԻLڽ0/ x%w(YB3ēȨ;6q+x \vdWYL]=Th YgQM]C %:͡'3S6 ʁ%hwIx]:B:0ڥM{Gǜ>xY? anTa╚[\+TiR'49s 'Ym vtt`Dn57Ro3ŅpV -9&ʐP9.*BӀ:LhHNvjR;֪E -dk+"np\9Իhӭov'Y-w e=ŖzuB2@0-,TZ(x|[}nfy 1[^\6;6֕{mSj~9m7^Z|GKd ~W~Tgu1}z[) r^_Wjx-Qrq* ,!`FrE\SPq9R7t v+Y`yn L BK]4hq[ϻ=-g+1f|iƨi>eH&N7Pyawcg5)Vu|'V.^#>boa)(]A> endobj 67 0 obj << /D [332 0 R /XYZ 90 720 null] >> endobj 170 0 obj << /D [332 0 R /XYZ 90 366.179 null] >> endobj 331 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F75 7 0 R >> /ProcSet [ /PDF /Text ] >> endobj 336 0 obj << /Length 3266 /Filter /FlateDecode >> stream xڝZKWm9f& _6g:A(Kv<9oOIj({z~U=.Hqa*!j?Jɸ \MF՛YvH uq7]SϦ:Sܧ6>uQ5|J\׏}a,M_x$3@˝6|~6V$1@HYq_7=Ϻl)OB۵c{+nZNն.~Id\i?>kȌIA.Lb̠k2lƃ,i[Ņ[){6Pu*]dMt.~`B_Pm=wcvw @ߪ/ԲZ)[gFy(MI$rvŇ u&꜄3~֨OY4\uklUcUD 3p)tKy:eu yrCIAkEvCu:_03D,ls;W)Ժ9_!u sǦmvmw*xI$Rck"q[jjQ nyX7U)],nwtlSCb#0jQv[)Ep YФ&C?D[C{9Acǘ }50O=f+mL'tv@YЙH!;]$X^O1|Ɨk+o4mj_ëW6'yr!&%.s6ܘG8=ppOXi=aOKr/N8dP7J-L4Nn\#hyًZo.=] ^H114pCRbd)yZiBsb.(2j̢c0 DTևB;zd|I"-%w),A=e\0 endstream endobj 335 0 obj << /Type /Page /Contents 336 0 R /Resources 334 0 R /MediaBox [0 0 612 792] /Parent 330 0 R >> endobj 337 0 obj << /D [335 0 R /XYZ 90 720 null] >> endobj 334 0 obj << /Font << /F55 8 0 R /F56 9 0 R >> /ProcSet [ /PDF /Text ] >> endobj 340 0 obj << /Length 2534 /Filter /FlateDecode >> stream xڝkoVmp$Rõi+"h+x%q;걖{F`"Ùɍv].v:I\f~#;h𯿽o޼Q]$\~I4Ii}/8 lW0=$ O7כW_)d%d@vl>R%s[;۞?('O#)H4`QJ%=ΟZ{H Ȃ~lJ@jPqJMuEk-ێ |"g (LAq~i%o[K(uǩcIPak>#RAO4iɋ U0(SKpChcSݦ>vf@S;#2΃Sūer!K~B<`D9!PO6窱)Z_-uScroa[T#TpKUYhWFx &5%Zd3e5468 98(}+ EAn@r3wʑްa!TJBvjVq|=p2e pO w_C.-,dӈ&]wlzOr<=pLn XY߫sF& WnvncKBo$&RHzP>Rʼn}5X.1KHK!W:n&, 3=X[\QRRdVϟMm &Q okCuYS[%Upq7]Uj4$,e)d7ŞF(lY|-iUsPٲbtә<R\(Ͳ.&]DԎr}kM>_i⥸oۇߔ\gȗ)[hIPW&cW Z #$E ס $_+!qQ #|=T-Eʆ^C.F\`2|U-,MU7En< Pn wl"a٫t.!ί}Z{Mˣ:+Fn;qjmfzC;!kkh,>…vDI0AR:tCJ/*u0zLo7.QI RO?TNzJ^N@Gq`jq4N)w9> endobj 68 0 obj << /D [339 0 R /XYZ 90 720 null] >> endobj 174 0 obj << /D [339 0 R /XYZ 90 127.422 null] >> endobj 338 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F75 7 0 R >> /ProcSet [ /PDF /Text ] >> endobj 344 0 obj << /Length 3467 /Filter /FlateDecode >> stream xڵَ]_A` k:lzl1+-!gg8<Ԯld}VUW#oB'o&Z$ϯB7_In w_y﬽HD޼9LAn~ s)v.*~U.릀NEoշoLV+)rFHm=T ^XMXtphZtJa~@K((.S"mK,9P{`(y.ez-X< 8f',.|]k4-Pw}eir I*WkX FcHaUߝ]Г')0x.K> B6`]Zq/|wZ?wS~p u9][UcG}cG~PlfgcB,3s}sk 4i 5I&u$ak<97K-\ltk0h*cITy䌶yHA/VUW*4W=%)6NyOQB .7nܽOsg_aK7CJנּ+8-& [(4!N(g$x+$7HVX66 p J"a&'eF:fplվ#rSD4R^ w|J=s%@g|Z凔nJhw%[ʒMUØKKyAu'PXZ&M&`۟5JA'Z0œ=AL\ [ЖA{򪃾b00ޗ`"%8]i O%,&Ze\tev-MtW 50hԕCڕ5[''_B֠&0:oC-wx)Peє^?GףּuR·Rilt4z *5W<} 4Tbеs߾h6(']}-| 8X2e,0]KdpN.lphӪ>{,J|P'E9<,'hSW ų*g8Vh`dWxpiVa!"Aj|4 yTaQvN>jV@Bj|&I1}E]ɲ7~H豊݋N!yH=SyӸuph1iz :P qR}:F0> 4Ll>JLƃBk_E~B|_m?ʃԛUC  LsE`2o2Ű"G(mˤ1N/Nw߬PӔz*a:2*\P2ޗ9/t x 3 MVx_Ĥ؉50+l2T0|\3᎛,.<ƉdqFȜ"g Qi 'yj9&.Nt?=̖Q U3B* \%z֕ ᠂Bq5a_qOV=rzkPjR=)yeW7$ ix WMN10H& d3-ιۭh绐ßLJV4ג=In&dC/wah_&[&| ybyg'eoRGfO.yWJ#azPWޔ@~zLDLJ'A" N5Ji_sgX2Ck2#ZBVpo`,YWkWKV/}#^0=Y& Ioe61`l/"L|"V`ؕ8g7P<0\Ů =7Ou0I|!=[º P >>3=;Y(hx>ryڤ] O2Eqmxs; (~y(J3=: x/{+, dC46d?ByHar!X BFYe 2h -]Ti68 }Zo׍cșYk*S&O[Dί@ayPO~D`\bUݏP1ِt-?Vb1&īo{ ,N̮͐=LR߄^$zMCM2Xc]Yj?B(%D2jOk-s64_IMp endstream endobj 343 0 obj << /Type /Page /Contents 344 0 R /Resources 342 0 R /MediaBox [0 0 612 792] /Parent 330 0 R /Annots [ 341 0 R 345 0 R ] >> endobj 341 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [473.069 365.695 522 375.695] /A << /S /GoTo /D (Invoking Units) >> >> endobj 345 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [90 352.242 209.455 363.151] /A << /S /GoTo /D (Invoking Units) >> >> endobj 69 0 obj << /D [343 0 R /XYZ 90 720 null] >> endobj 178 0 obj << /D [343 0 R /XYZ 90 519.352 null] >> endobj 182 0 obj << /D [343 0 R /XYZ 90 340.685 null] >> endobj 342 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F58 244 0 R /F75 7 0 R /F64 14 0 R /F4 243 0 R /F63 52 0 R /F16 346 0 R >> /ProcSet [ /PDF /Text ] >> endobj 349 0 obj << /Length 2502 /Filter /FlateDecode >> stream x]~E]+HQR},6&@TȒ!ɷ/J-g}Ao=#z*\4!n?o w/eO*ˤTO/9ӿ?:k۬O0҆yհZ\GtZ4CZDj^9Fߵu^[.mOܯUEU}t ZE~?%ʸzH~;QRpұ>UYoauƳqaoa<&p509F2η?%Y} 2~A~A!v)2[AКRFBդ*z!ѻX<(؀FS$2-tM}:La{`l&r$oP`Ϲ'P۸bt3fNUW m'kȲ`kT'=|gfw s;7 ]A{zE+;~l=x&fe kcSTI4jJ67YP^U*qtKlQA^9 X" oЅ3HGCxo{NA6[ͣCW'YȲ*8/wyίxFW,<~xSq 4c6ȋ|zuՍr!WJ3]$KҪ;keZ ڳ|&%z=& K~W]B\F , E{yjDHy\\#ԩ> }>e3(xmG ;`TU_${oeh/R(΍P{AR/ &y٦=" IDuHu^psxׂOY6GZ.:ןk ("F\Lg^Pxp@1IkR[zˬoR1%%kځ=ɠ:AixșS=E7Eؓ k ðG[fӌ_CM™' rMS&X1]E2ϰ= |tL鷸rT.UFZ;:TQN68A877X!\CWXumYMP *T9"Ҙ9Xt[lu F9߱8c!f%6.r{]׸Q&HR I($9@BtKpBBÌFj9`o+F, #C"TBBpsu[*{Ykd^3/$:2n`D2?e%K^Da1ҭO5oc^ kzqPXcZ[Ƥ:jiIj0XVozi%BP A*A$daÔ~>or)ȍU3ݝm(V<,.3  g)~͈sB5TD1X?@K43 aR <hcǣjp>G[liq8Pn ;ARʤBRw0옲-cѲʓ׏}܆M~ [zdw-VIҸ>,sKfKwқR9£/a\V|bۢm nC:<)\+DH>i?.͞uC+-jA17ewInNj*ʀ dx tųK걑 endstream endobj 348 0 obj << /Type /Page /Contents 349 0 R /Resources 347 0 R /MediaBox [0 0 612 792] /Parent 330 0 R >> endobj 70 0 obj << /D [348 0 R /XYZ 90 720 null] >> endobj 186 0 obj << /D [348 0 R /XYZ 90 629.492 null] >> endobj 190 0 obj << /D [348 0 R /XYZ 90 150.996 null] >> endobj 347 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F75 7 0 R >> /ProcSet [ /PDF /Text ] >> endobj 352 0 obj << /Length 2272 /Filter /FlateDecode >> stream xڥYm۸_hD.bE|[Snq(),z;!7n7Xh8>a )8OrXU=} !zóȴVD6}ۛǙw߷)2fBMM ;DFNuGg m~l/MojSQQ 騱NUg\/ڠ= Su^L[CgzK狓E*nm7- [&bH? R-UM}1Jx3\EOCO2?OΧڀCh!:ۅ/R@|"% *GV325U1BXa\!Z UŠQFëD̷t{$` iO. y8-/E[3 : !6ȟF$6CdBqptIȒqf/t$lQ,aw%su_"Z%yPz:*G.+z(>YBNq@xliϺǒ+ЙYB Ϟ`y)2_ݫ멵kNg[s@Àik!wt;ޒ<}y :Pb! z\ E(/$IuvSnw^MT`ʚ|L"]4߉njwmiZ/E9K#WP&ͱ&~؍+nZel>5̋/h`gZM  \`|fBR\@,A)-T+؄)KJ# T ,ݴc "4@=wWУ3 CH$HHC!q3_ Y,Hh^nw<5E%{[)0.P Upr _c'H#!Jbtmm):HsM%avIXއJa1-g|ףkq{DJ|zsgR cJIftSWO/ endstream endobj 351 0 obj << /Type /Page /Contents 352 0 R /Resources 350 0 R /MediaBox [0 0 612 792] /Parent 353 0 R >> endobj 71 0 obj << /D [351 0 R /XYZ 90 720 null] >> endobj 194 0 obj << /D [351 0 R /XYZ 90 482.074 null] >> endobj 350 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F75 7 0 R >> /ProcSet [ /PDF /Text ] >> endobj 356 0 obj << /Length 2791 /Filter /FlateDecode >> stream xڝY[~}2]5Okq]l%[ٔ=C.'>" BrnwʣT0WUy|Qpwō}&= /Fy$QG9,5iegA=RDl??{swJ"ˤ3 X`X&PjXT9ŃZNan`-@՚vg_JAc3fjGl'np?~Oȃiʢ垲X<]u]sףv8n &KCՄ_œX#I:Q+Z^-eyZ,uhX]V+h T^Ukh Ȫf3yy?$Nz^翽Z AӍ`JD"s@̓SF64`(W`/)$g|mEWeE+O䆆*lO[%`ROgtܫC{6 Xۇ]o J& b>b"ʏtv)9 {Ƃb(ʑ.٠l$ԙX^ M ڴ`PO47Ʃm@<ʤJq@CCz/^n Ci$e9ym*ڊd"L25?͇i1(bkךN'_s {S* ~!~S[_%m*&sOk\L /L*2ӹ6Df>mݧ6#=cG`yU-C"~&M9?W:JڄI~v@?,~pU"!k4ԑ7W-GP%[įA&HH\GrX3UOzzxi Tsca>y=Xg|V[VG|`  G8#~ԋT{=Rt+!BƋBr;)vêrIDz _'{bU@sv7@/&3 y_E (g(F<6P>زlHZk!޸؆εa>4F@G`Q|FJy?QJp/Sd"4%=h%G7e IkF+&Doc3@|@D\J%l]d塚`$$& @ZitidhZN.sQJ{tBO $6-AG[>_$#Mw6['HoNwhrBΖW,x=@N ,,}wm X Wm Ea'BR @,p3_Y%>^:.e"e%卞@ch*n2a4 $rj }V` pG[,ݞŸVÖ i*ZnVbM;Ylm;Cda<IßoUFŽqe(耟` e(o35- _+ɌN"f#@3 Ʋ_uYq_mQYp{rJ:S,M諅p_&a2@B㤦Oh9I\QNYiV9XMi`!&hF,|M{n83ѷ>! f)^x{_3cenګ{҇BؑЂk0!όqtѯr3#9*j?{~s%GTJ2h=c"^CQats endstream endobj 355 0 obj << /Type /Page /Contents 356 0 R /Resources 354 0 R /MediaBox [0 0 612 792] /Parent 353 0 R >> endobj 72 0 obj << /D [355 0 R /XYZ 90 720 null] >> endobj 198 0 obj << /D [355 0 R /XYZ 90 565.746 null] >> endobj 202 0 obj << /D [355 0 R /XYZ 90 478.885 null] >> endobj 354 0 obj << /Font << /F55 8 0 R /F58 244 0 R /F56 9 0 R /F75 7 0 R /F59 255 0 R >> /ProcSet [ /PDF /Text ] >> endobj 359 0 obj << /Length 2192 /Filter /FlateDecode >> stream xڭr``lkJUq*C%`HV}|z.3BMbGT0٦8}h;lnÇ?~y~N3TC)of+y+v}˝Q2/{^|'KyS ,`n+U#2NٽlSrnwZ%hǺdGb1 0*1r=vK?E{:bo#ļӟݢqu7$3׎Ghcx6w vۏ>U,Q6oyh TBDV[{~wt[{*ׯVw1OUsaBv#*xf*hܔegñ&s ) WG'G35x,_,-Z0?+i`78~6;)0ҳ?W]ۜ0:P,vrDHU,֩mM`:mc]r,pGS {co;>"~p N|FvmWOΦb#| yPH|C:̵F3d! $XG# b8#!e^!3ё%{#0ВD]P5#,B0֜[qG{ϠߖAc`F s?FjRk(D}Q rs 1?2/dzp9Y>3hX?¡ p`W(Aetr#e8t*AmMIbUi"Ś0L_HBgǎ7;xFЯ:^xr ɤwJ)e\!.8eG!]jg4@#q3Wlw־Jz@8Y2irNN7ͤe+͌͜+ݓ;X̚mLE2yʹ E">;(:Y#+L TFIp X*B{ڟM1x#Em!|3]b+b_]l圝Y$ӳ$Xpk 8Nl>EWfǶ܅Z/<(Ub%3^$ 9$]CbT I$IPr0(:%E 31.1Dj3ɚ~I pj!^s ` t4˭pF!'V,]OCYqY3ERj/ KRDoW۸wH[p[4tEPenٚXȅdׯ>GaNj,CH! .?He1cӬȤsb`a '[~IBU}l3!^u"ץxwpma;sj T3_y!s*[Ʃn"el6CcčtI驋\hFg*&^41Xt֕ED!ig ǃmw~=-Ô!aF*/Lw#@`j@x{5d Ba/[ };v "\O3zHPtyP抛Pb:1~,LoY\ә7 endstream endobj 358 0 obj << /Type /Page /Contents 359 0 R /Resources 357 0 R /MediaBox [0 0 612 792] /Parent 353 0 R >> endobj 73 0 obj << /D [358 0 R /XYZ 90 720 null] >> endobj 206 0 obj << /D [358 0 R /XYZ 90 720 null] >> endobj 357 0 obj << /Font << /F55 8 0 R /F75 7 0 R /F56 9 0 R /F58 244 0 R >> /ProcSet [ /PDF /Text ] >> endobj 362 0 obj << /Length 2418 /Filter /FlateDecode >> stream xڥYmo6_T-剤$JO&.ڴH!%-X+6pzޠCyf+7>Eě·vCo^H_0H_$~"7Rc]v.zybh;-8/.BT g>SBt:vbw6'*E-6ۂgvBϚ!sڠoHC h %#Ҷ.[n۝`G`U_uڗdɝ!i 71^fwJUDD&2$Mɋ}zl' #/E'2A`+xM-6#{Dem <Cl&;P΀-hf& 'EԂ`5sۧ}J2x,"F0ļ1'!Epr@;B)lN` 3,^.xW뺣`5sÁ?mSٰ-ӛa2mvojNuP翸i{uÂj r)oFߒmİm% MѼAN.,u7-ً@Ivl[g+I(d"GK<+"U,% -3{Q! \d:*4P*RsS H(``=EVEN ~#wA~xﮮmZg&e$Ֆ1kZqjZCz?ڥM>`XG×)9!2 4C]Ԋ2I"LyV ME^|jO:0-A.ͩA֟Nbʺ X 6=ƕYOr(55I>VB69 iaϒn_Ih'V0P4'0qrPO.uѱ{Sl`* D<2;eG\A>ƪZUcO9&6 Q:;fd鹹cx ƭX>]ڞݱ}P>ƝFD`%CGh10:hc6r 5;4p7 f愠S`C2̤1}7Ue|({w&*xJ 83p$f`إlΗEPbtj4ܷ~x:Զc,\*>:`1g;jH_A8h™s]LۦUEc0n ZP=YTo &9"99 ?!W/D!XD_j@ȭ<òrh0}xI<@Jcqf Bs42'Obuh ^J;7\r).puH-px" =e,g?Nې`xvS3c6 6jI%> #$Lu ?D/S6r-^t[5Si/FrDi{^k7eѐs\?Hxj8HsD1`R>n) {"̣9ܫ. d~䕷5$I)4bv$"1R[EQ}uFD>K%t/!uSrCR(ZevdוT[ȧl فHB rG,)DFowz!(0=cF9EoEg}%E-QAKDСz&SG_ڻPՒBm8\%\P _IǪ*EyeYmP2v*r.WJ0Qֳ0>F@ i/W#Nht"L27&%ye[d}>}} /ym0GNY37G⳸Y&TIi_VsْF.Sl -[h/"Nk>Q$/TS:'y\fm5OY焥zf i!.$o š,Lq=Ns8.m+zj-!!vM !YtBrܯ߮f#Ɗ@ҎݓiƊ:4̴r?*n!1)_X_gzJ 2"8 j湟.>]\%?ݛ$1=1ѷ0a&K%+9aJXQ4`Jc2}q@R>cH4Hslz^G Bя62wh=rlo s -=.mϦK\`jh endstream endobj 361 0 obj << /Type /Page /Contents 362 0 R /Resources 360 0 R /MediaBox [0 0 612 792] /Parent 353 0 R >> endobj 84 0 obj << /D [361 0 R /XYZ 90 720 null] >> endobj 210 0 obj << /D [361 0 R /XYZ 90 235.304 null] >> endobj 360 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F58 244 0 R /F75 7 0 R >> /ProcSet [ /PDF /Text ] >> endobj 366 0 obj << /Length 3262 /Filter /FlateDecode >> stream xڝZo6ɗh'J pH{q·68- ٕc?^۶@Cr8 /\__$E*1EvxƏ^hoo_*.7)SUv}绺"K/v-sk7__vo;sK8Ş(?x}{su{\wy RFJQ~qIs+f^)טaQSmrgjUwܸcӼyle<=v3[Y#m}P1oIv2ۇ[K"{vM>Z++fW;0@tGU̿}xIkqO z?>LMvvc*_e{ܧ$[ѵdub5/N]5F`bU֑K¯UN֨{FYȀvn;79CSLVy$$#q~[5Gx[$/[4?b0BqH^l~ǠH/UDX;aӎz)T^28ÓkO yy\fo؊SH]Ti'/>ّʘU)8Tؔm?i›u):'uʜϥ8v0##A5-|^O8@$NLL?2 eb0.9 Wdɧ} .4ߞ͵N mW2mDDhMvnmʮlwL$u=Ft \'l#ɟ k\ cn=A`K{[:$nK۰Dhdͽ׸3p˪4gB @-K{F#O ]5z P8nLT<Х - GpقCL ,`#q\o6 ۷¾a-A'u{BeF'd4 8.9 1%-1[sۀRdY_WKPe()ʀF?\\SlipC'8BKA }p !k 6E@3 Q pڶ'`L< t jif|' x|f&7 EL Ǵ: ݃vI*l< L꽽,'^r4n;Yle+,Igż8¿$M{71?U(x+B3%;VoRp ߬!@vMx?̣@zw4Po 2֍BoUW2CtaOVͤؓН8s;K˪lZډ emkJ[TTm5h~%= TIb;6(<0@]QM|H&`ec)BLhzA& ..@9l척DQ4cv=߇ M?yRj<`֧6rO5+Li6S=BfQH7״t"<Jp V?I@mLYCBxPSff\зGd#Wn{c-4φH沾z~@cNɅp8VpTR腕zN>^qʛb)Ksn/zJ^ 2^[s2~|ʓC~~ ^ʇ Lv6:'O]wܘ<" h/5+aҞJ9YoTx!,lyNJBSV<Ү^B_'+ܽ|>81I @INح/qhHZHkt=4lgƋZm6V"e3=hiY /Yq,#NYʜi^/b;+|;,X-t lz&"ɮFANj C-Gzu4wOJ"N?cO>̭ȂEʡH/299jc4aL]lf374oU[h"f  J nx1RzʃR/D1ڹ4|IA|N C]γRE“Oԓn. \jmg̑?1F%f<2vs/l,KNH|\O7pG?'q-ޣ endstream endobj 365 0 obj << /Type /Page /Contents 366 0 R /Resources 364 0 R /MediaBox [0 0 612 792] /Parent 353 0 R /Annots [ 363 0 R ] >> endobj 363 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [254.266 185.782 439.324 196.692] /A << /S /GoTo /D (Units Data Files) >> >> endobj 85 0 obj << /D [365 0 R /XYZ 90 720 null] >> endobj 214 0 obj << /D [365 0 R /XYZ 90 445.708 null] >> endobj 364 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F59 255 0 R /F75 7 0 R >> /ProcSet [ /PDF /Text ] >> endobj 371 0 obj << /Length 3184 /Filter /FlateDecode >> stream xڕkoܸ{~d4+~(riC8E+jlҞ(qyQ w88yu?uUDWYɯWa+>Jɺ ,Vp$RQXDϷ]=]o8޶͵΂/:YnbiH),yJs0Oy(h6#>}dDu뫮U0tzGzFY+ll[<}%y:?n) _S= A17*U‡qpNXhyplOlyjYTv@^g9ҹTVY]"8FyḆ =.{uDg`,AjK(b'HReH$ 귡j{?IAX(V*HE $$!$mp Y 'WD޲=Fow r+ApQD U^i͛oOŭeKV@-Ep5ef~,!q? >_Ga||&ig?JCaZDfwI\s: uHrׂ?w֑~` }7)lKYFJ/\ |]H+Hc`>%kPq.Wtb˚G cB3a 7sabKطuYbu۞l^(S ]{:DY)X:[IAjKDk^Go[bsL OSX,EB‹"Ye{x;`?-p|* 1Sr(-Ă!Tvu f1YǏ)d3j2JUb鉤՘*z,d1d  b05Rl*ՖLXS}"O,|LAr[ u;OhMM*ThES5c*ơt q `m{<=G'1$ Z\Y 2~.0.xO|8kk(v2viXu-8/GE AF! UC/ʎkW]]aٯ,ftȖPvϿR"v6rT[wS9+K2PxiݢU Kлuf^Vm?@ ʫxdWZH+(|^e61􋥘ͥPLN".B8PEzKC9Y\b-X߂ۏ} RiNA٩Exe\8(m81z⮖!fXn{?az겓滋0a4UId*\F vxX^7/Ē͔u0M JW b"Q]z([jǷ%1;eߎ:D}ka\AkʎRJBKgW:h}N|faK˩ٯ24\F%"ʞK O2891&N+@4 Nd8%ñUMt#wIaƆeYjmywxCZؾYnW _[6{u߯Wa_ {Id\vA C۹>` S$j8xctݓ߶E0=ijKAa _w}9^cK Mw.G##:-{\ ]y;l] iR\ )^G?PYOoA 1aM'A,\Pe9q7b[^ , e= ?)0+1.w)kM-S䷛ϊЉFc&ҩ\`F1~:lu{*NCg*tf7+j;#¥]L.>O rEA1lQ0L-G`1qvAQ.$"Zl &Xa1.^`Fe<+52% '笄51ÀMeatGW[؋Oձ}O;S6ejq5/0-( = endstream endobj 370 0 obj << /Type /Page /Contents 371 0 R /Resources 369 0 R /MediaBox [0 0 612 792] /Parent 353 0 R /Annots [ 367 0 R 368 0 R ] >> endobj 367 0 obj << /Type /Annot /Border [0 0 0] /Rect [354.469 102.777 495.796 113.686] /Subtype /Link /A << /S /URI /URI (http://www.timegenie.com) >> >> endobj 368 0 obj << /Type /Annot /Border [0 0 0] /Rect [288.411 89.626 392.986 100.535] /Subtype /Link /A << /S /URI /URI (www.packetizer.com) >> >> endobj 86 0 obj << /D [370 0 R /XYZ 90 720 null] >> endobj 218 0 obj << /D [370 0 R /XYZ 90 533.539 null] >> endobj 222 0 obj << /D [370 0 R /XYZ 90 243.617 null] >> endobj 369 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F58 244 0 R /F75 7 0 R /F62 245 0 R >> /ProcSet [ /PDF /Text ] >> endobj 374 0 obj << /Length 1921 /Filter /FlateDecode >> stream xYK6"1+>DI(ri-zj6$hh%G Ilj9E+klfd" ~#lN?`}D7n$fI'*ۖ>gI Ydҹ ˰u!ʪ(ЂX+b"&FX  6T.WksVqR/ŒjlЃ!ɢ`^DP P83TvmUv u + Pm V2ZfAQ4l-hDLijrP "ӻ j'1 C9飯|>#N:%Ob՘&r5ۣM eOB:v ;`7^h lDph_ :FЂƦO+;M' ݌-ֶӐ)OI ],n"6[KCY]5j =V/Ald0ZG]՞ e{&K +;}mqJAwR CA28`l z.vnt<˼\gnxcƘΑƧ5n $EL ! \o  $M Cl ?uHsFZ|sh0Bs Ǔ AwPұޢlK<$̚XF]VڏbIdWԮ 0f孺8;{,͉2Kz==0v*[jw9k_:8~T>؃g|ab  y$K㓬߫vWdQOͥCaȎ>`XCS ?q Čac *~=06Y)#>E+~|}ƙ?`_g 5j/U vv;f&AQIδrB9жc& )ΣŀvUY+35v0^Msҗ^*R)jq5&|K8F ms%H5ykX4h,E0[)pmцpX<%)wt_dTsulfF_*݅p _3yh[˖7 K;U߽]%vY2Nsٷo$cnN2:g%OۉyF6r1k.(T[v;[˩:wp2![wUY/5hKYyDD}CMPI 7k)בC5! }UUڍf=&h+J'Í_?]!ϗYG!сHg)G!4+SHP|7Ic:0%:k67"`ʛ!53[w c{G<aG<8ofЂ*> endobj 87 0 obj << /D [373 0 R /XYZ 90 720 null] >> endobj 226 0 obj << /D [373 0 R /XYZ 90 654.848 null] >> endobj 372 0 obj << /Font << /F55 8 0 R /F56 9 0 R /F75 7 0 R /F62 245 0 R /F59 255 0 R /F58 244 0 R >> /ProcSet [ /PDF /Text ] >> endobj 379 0 obj << /Length 2838 /Filter /FlateDecode >> stream xڍYY8~ϯ02VDݚ}E&Lzf0Zmnd+JuQbрEdXWl Om`E_:6 %|;`-8_߿x>I6*PrzO v{ӵ0چ{kT^ou0?EBg2e S*E4},ʶ$ ~ {-"ך{o;˫Ɠnʁeҭ(UAمL< :P~tí?CuNNݑ~+ 7JW_/;㔧50 7Wiw JO'q&.)S7|h35YOy,*ޗn?SߣI][֡T4 >F\Rówlř/ӫW{Z0,f븟!Pw@OZѨ';0iC %W2\;aB&?-F[2.*U"t{^#Kw$\*lRe{0큇 _YP6M7ٌ}v0<]_;tb?q{quY! !y?SǽO%{,8yޠ⨚@ˮQ~l+!;ޏ *I3#U4\ʝ?+W>P9.Ñ6e%Fh;=)ώLlHAO(qW`i8^l 1V.XJ3Nst豥.l Ydyf82 /DÑBĶ\+,(A@ƛN %ۮݭ ` |誃`Vr9bk{֖i߬#j<>4 p=ՔIE4jCL mzv=Y ǣi43d?V0AԺPp3 t,'(\-T<E@I<;XACz~pQ%=L ~-_*}02[@$=eLE&a.;yPS]]Lrq ą? 0k+8=\Fz%Wq-\G,-( e)t+vF@hx9-GbB[I>jd|"j"MF\9Dz-OO4D!'fZ67˿VA=Aœ OL)iB9 ĨL"v B=q%Ӥ=di̳?|9C0PjF+5 gu0@аb2Vzf(1Ӏly⥝]K?ā>6VMoP5LH$?tP XSLpؾ@ASO{ W1'!s6+C\@\ "p-H˥ Fzӡ= Q\(b\"*|yD،< "~Leo$/ғ(%+Y;͕ T UfepW{rsq#ueEr73niS]pp!cCכ9|0. и*x}{ [)pn'"KND'A!ljA=%dQ @i̕(F]a5=3E!e[)]a %wKA`خ&6q0ܓj mݚBG> endobj 376 0 obj << /Type /Annot /Border [0 0 0] /Rect [118.8 628.168 204.708 638.168] /Subtype /Link /A << /S /URI /URI (http://fsf.org/) >> >> endobj 88 0 obj << /D [378 0 R /XYZ 90 720 null] >> endobj 230 0 obj << /D [378 0 R /XYZ 90 720 null] >> endobj 377 0 obj << /Font << /F55 8 0 R /F75 7 0 R /F64 14 0 R /F56 9 0 R /F59 255 0 R >> /ProcSet [ /PDF /Text ] >> endobj 382 0 obj << /Length 2909 /Filter /FlateDecode >> stream xڍYms8_ɗSfj^rڦvlsݻFmNm'J~x@ZNۛD$ <"b_,lWE,n{Ư_$7#وE:݌EV]Ͳ,޴UJWQ9KYīEW۰RJ':%I2_\,Vp'.,^xΆaPOM#<x1"!u[ vjMMy9ad|UY*cAI&d3;,ȍ5C 50/4~ svg]m*s@f׎]T"9 >;-Itk] ;Xe/8`~QJ@b3{tޖB{, ?"զ6Xg-JסF$W;c;{$1ߡ%ReWqlO.Ww=&bVmX"]$~%5da\iǮv0.HDߠ T=j$׵{[ռ}nO%G"6%+r*`-nr$")BO з!'8KYT;=PQb]ē:M֝Ǡ;SNK caoOhuj$Ccm nnLm8rfpTTt̙E;8@ـH-4N[X5 +;ue;t .}v'|:[}` c" D-Yb=_q)-b/KHn?}Z4sf,*O[HÝL\^낀ijUh:Ìeg=hЙƮߡtE`8FbMH31/(J:yx?Y +aB>Ý߿/ɛw."fb-lpg*&bTeN 1[5Vq foj56Fq+Dq¥3hwg^פ0[-:QYrE ] l  tb_>u SOF|Yw@+B ?j%7 )?rn@ēGu!9@Ƨ!ܹ{t3L,Phm0&=~Z,}3Xarg_Axي ?{>vWoHd(Y ɞCGMAkRxp8/lKRT'ҭ4ӘՋ&?m/r'غ2X6{$ă;;s Ihmv@MMmJђQ$+` bP:[@3ЂC =Ua^Ѐtw{;z'Ìḍ",=Ols1;ۋbp_5G[&{~!捙`6 ]˷oiW,+nS,_NNEx[(CO43[hTM Q$C妷z%Fξs9XeL05W>8әQ0hq 1jgO:;;]m 5S0R֟5}/nvfD.TIΕg6KG86lszKf¿xl_ irQ'm Fk 7\,tjjU<;ډϞ(I3:3tґ`_2ƓgLNIPwg,?uD1ю>z3{(J&ɓ`)YsWp_MX qɪm[-ylEp;OB9:Gk[ү})ILը~33>x ϮH3a͎XΎRBxm%}9k~g/'NX<k τIc >?ּ=Jy]ayC@ݵK` 2cZo$x5c5.Æ9ut?HŇ}~)[sXM98s[t3:}dȕ eҔzɔ3⎸*&"/&!ft@ɯH 5nmde1σv#ch3 rqUy*{$ƞKKAh6 SiB$a$l=L@u&2-EhTJJt/$9iXQ;(F_>yj33TbB5n1kA 4  [ᡤ<%G$m m41lX^Tt3t pt׉v <;::bԜ׾ M(JXd5!KEP_6[ҡj̼@J1›H=(4q4m>s&8ۃ{^n HDysamL_)"g+^C^Û0L? , lI1 Ul#95t$EEں;₹uNxf˄_S*fʦ[+fs]J2 P,}c"Ǥs tvMYE:q鵌|Je!N/RodWm'8g=tVu/T;oҭ[2R(51.l[\K6{XE|4qrSdr3ќmƘ1fdx1I8sn-"B)@h iaӽժx g:^HF)9@dwo"O|3  r(W&_gBVe[@H/ܣ6xGedgq.7"$c#o9\^l-v~yۇ7u<>gYSo0wf,| -,LhnPrZ_R; yYIi|B0طG,nCTh7D9R?i`ZF&cwhFS~jNyܲ>+c^vn٩BO(8&BH%ή I0%^*7_dӠm*-- |YT!,twI K(ݞqn 1Zv$ nxj)gJAZI6]Ct3 ^zRIf[/aʓ5hDorC]]+:}&GmW=8_R *h7f^_vcJAkvuZvX걾G&/X-J6VQvDwIZEpxbsK4S<@eR@(rIVICdaL>y endstream endobj 385 0 obj << /Type /Page /Contents 386 0 R /Resources 384 0 R /MediaBox [0 0 612 792] /Parent 375 0 R >> endobj 387 0 obj << /D [385 0 R /XYZ 90 720 null] >> endobj 384 0 obj << /Font << /F55 8 0 R >> /ProcSet [ /PDF /Text ] >> endobj 390 0 obj << /Length 2507 /Filter /FlateDecode >> stream xڍYYܶ~ׯK8U1֮l9r6N<`"cVR@q7݄nHC7MH M$qw& UXE7?}}yn$I~wq<2У5P'QXAR}y,-aZ㛼LQv{l MIXNӳl:iRZ@/ӗ0}Zd?we )l~Q汪dvRSG!${.JlcͣU+/:̽ʄE9vbmt*+Ҥ 0zűYSfpp)G2ѾssHao7z5;vGnLFK˨-v/`>k癏iwq2JN/ DmQzTh=[V]=]R`X,D<`'8̀V++E =P(XEhh"(rUs?pP2[, WY,JLuR2v컨Պʉ3z;KjkgwxҨQS8f3#J3Nƺ_̨݁ɗ(ߋDbb128pn]sn*uBUxB6,hRL%Q<@7qo帿7I. GP3A! Msbq?L樭F2腱f[|_ +nu>_!F1o 4Hu||W%֦)lss&8Nx>h&20lkM˚2ba j,g>yy۾u{I:/I0T/[@"kG$,cT*űO8TF 8$˃t[cO[ϗd+S}}&17@YVW7Y;/Gi,w i4Bck H*Zp]\crh,Y,(;ttOcH'̀1<⧵G(ջZ *Q^4=if:q0OBё0$_ |1 PR 8RC9z\ȍx%n\ ,gM%^D1b$ 5R6OscnQ";  %b7|R F_PttB=>6sQzPv?1HF:3~TZjw] yA:9't42I}I6TT _6ja? >81.s*g˥ѺZh 9F*BЄvϑ N_0(;IƠ_a(z™WiroȌ Sp*i=Lc[G1(9L#e``pg= 8FpOQF>JӍOkҩ+dx6fy bfAzJKG Æ厄KIe`=" f'meM|(XOL&k.3|,\}vk 't{1 \5$Ǽ.V.()dS0 [FdKjq)(܀1'*iMGVw0b45ZƮڏn8T)mPtIɯ[IJLYzol$eѣKCn[=$=5Y(p +w WP홒BRbq-_o߱\ܑO(0;^e`d8'*#=.QES,vB Ӻe eA hN!ZĠ({maZISaA᣼"{5-N5ꚻj83J2O_ĐO y`Os~A p  Pza^! _k9 !I @9,\L8Y_/rYhbx4$w} dn1}8Y_̗YZ0` /b9Un>V&I#>F4 R"H6Md?L`p'y`Qbz/|%&-E'7`xPf_Zn=tp%<eT"%EK̷u]> endobj 391 0 obj << /D [389 0 R /XYZ 90 720 null] >> endobj 388 0 obj << /Font << /F55 8 0 R >> /ProcSet [ /PDF /Text ] >> endobj 394 0 obj << /Length 2550 /Filter /FlateDecode >> stream xڍY[sۺ~ϯ􌥒}8Ω;IܿJpG'n{b/ d ~)ypݻ?_kw׫0 ۦޤޏM橶\%^]sww[R*)urd:#V}P,3*L5{Qq.h2뙬/ Dd_PLάSu'ꦇz=*}` \l `*4z%7J،wҵoRWЖ^݀-Cў묭V️f^EI ,OD"6hi+ci;uR۽(R2?| N0K]mvA. ;9]\3hg@gڨKg D\' h%Vh@:Dxf)D~⡾TKT \, nufaPPQI':,K\0 Mz8]ot=2O+L}{+tlޮr E0T#엉q"#42B'1."򆿱 ~SB?p8rhۢ>LpOE遌 ɰ E#8W{n fE[(_vŤJ<": !OYzp Ԭ }]qR̚L]-$*C?4PJ) `fXؒ,frzaՅ Ԕ( jcZgO.a-B&9Nr,tT]Ѐ&)5?C"KcXU؉7[O1Qt-)FIwRS-\g,S\ 5aL`Jp[(L2Af*$̶].(%a,BȪM,:.!(4zd=68O.摑/ 3B1,?ä%/ X{$E ̐gA#нR-8n| ۆVˆl*"PJH,]GI9HWlh~\`%:|U1 貘FLsY;1Ӡ&KO\)jh^_lec!O~{NȹbCۂb>0\: y}Y {DQ)E 3rX->T3{E/†t.8_X`X`i^Ǎq#;%i L09 k8Tv!cg#ȐtW&wst endstream endobj 393 0 obj << /Type /Page /Contents 394 0 R /Resources 392 0 R /MediaBox [0 0 612 792] /Parent 375 0 R >> endobj 395 0 obj << /D [393 0 R /XYZ 90 720 null] >> endobj 392 0 obj << /Font << /F55 8 0 R >> /ProcSet [ /PDF /Text ] >> endobj 399 0 obj << /Length 2760 /Filter /FlateDecode >> stream xڍYYs~PeU2ĊkoLR<@Dy8C sH#h4BEWUxU$uW㛐vōo"[z͛=ˮ jW ՚ޭIU\ u$ j=tYؒ@5,@#Te'eUy@Hkk}555=|%QFjT$X)\+X+^i9]r6ix_v}g^E<|@9ڜ~EhFK{P8- jzx4/{:>Y?x/jwnzg(DZ&umz6* X<}4]\0Ks{/ZǣJD>@A^fĆy4ٯ|e= CǂIbǯwGd%d19h j? )HyQludV-2$tjGҠʂChsSdCi'N<~9-8Ȩ6q?꬏N7\*J.ge &&.ɸv:5(B9C$ijYEא̤ >gNw6VdgN8Fb4tvf-KvL!8[Q3% ׻1`^FY*h瘯1?i]+sqV恘Xac'#Yynh~$;*BܑĕkVK3ҋ@V[2&=&};wUQ { DZHuRG{3)lF@2/ӗ&>Ôl,u* f8#F`v5NrœMeIU8YpOh/t/]2ˡkX'Zs|=篟F0huJK1|] T&*I3 GvEm~tK>A15gaW' ~?jb,2ac!|8cpX9n<$ )X ^cAw-$-kt<]Z:ZPc8OmSynW; "m hB5XeW17[c>4"(.0b _jNNӼ gM Y G/k-C-GCFxXCy-5*=\BdѸ:PqKX$BG.)P#nRɿYw8RY6Ő'4:q2x~Aoi?|Q^=!TzX|R-D鈜xXvS;?4c}ŏ w 7/$[}r +)߄\:'›D{j7CU!xӍ(t%tV)VA*XTn(.Uo:\45n6<dwrO⊠H;BfIR jDT#0[wn#l #2L)Xa .-~JFm5W|4x4P3E"Yt֧%c&y(7Z$X08$oN :]*mRV/1ǢF`wP, q7_} T؆ĉhNd<pK޷T+ y0R8_nfa]CGoCv^P+8T"d= A G"_fB7᫗ T:ѻ7^s5>(Z(q[ۙ"40ub~y ~!AT'+]oLd}rLϵχƬ8z0 wH)2"Ӭ %y /xxl!<1y,&G$PgGdGd(15Ha|'gr;4$TW/VITQG0RQ| &C;{I4}GTQUTMU-c2oqT7H[z'Foq)`)GEẹ̄XVSj}y._NrlA2# 4I#=WF^"U8 endstream endobj 398 0 obj << /Type /Page /Contents 399 0 R /Resources 397 0 R /MediaBox [0 0 612 792] /Parent 401 0 R >> endobj 400 0 obj << /D [398 0 R /XYZ 90 720 null] >> endobj 397 0 obj << /Font << /F55 8 0 R >> /ProcSet [ /PDF /Text ] >> endobj 404 0 obj << /Length 2244 /Filter /FlateDecode >> stream xڍX[o~_a2;.Է7M.nh%Wxs~}g8C8EÙo.'f?KpE,?| y˧p8{p1g_f~&f/;WK1];_aj$~}F >?7,KbB3WE4ef ux]6.[W1vN;V*uQ7ݪxsXh|zz^\)¥)zIyPX0:WUp"]SQ=RQy>G1{Zip.RN,Ih"[}ХlhE"Q7;S7 $|gE!q>)PG##!euCQ6{)HPd,`[=:NCbMKPN5Lk[DF*y7d=E˲'QhlYyJ{s.X}s Kph4XMmd 4BKvbPEӿ_ռ)AXYFI˜ \@xk` k <MƆ(\0y 8m{'$g5[!N a2l,GɄMqB\U8\e2sR9\Ό_Ui.3_ 14((žuv?|`>P9?iˊl,^o/62>SI쁉9$^I0qB_XQN)8taTI()#I( +e`<|Ew(nGl¢I@e8.N !C6G6 Q|*hu{/?>lƒ$ۖ({tIƓM yuc`XNn ˈZ;<`zP4~]f) Z7LmjL @t IxKh̉~S - -IɲY! ki (]u XC[eJNKDUPqL $ =məK,lBc6p,Yݎψ|`ǡQWCⓋ=$s13QpM>^NA$z PFR_wOC)z8~M:  &`qdTBXY?L #4C@;׋ܣIenNcujR7JwvSMRpK0OrvSִ h(8>PF4ine*TD]GԜ$c^B Fc\e9X+mvш3~7T6oY{YjЯҒ w4(|݈r^e]ͮz_krFu- Wx9J 8Z> endobj 396 0 obj << /Type /Annot /Border [0 0 0] /Rect [130.994 626.119 291.356 636.119] /Subtype /Link /A << /S /URI /URI (http://www.gnu.org/copyleft/) >> >> endobj 405 0 obj << /D [403 0 R /XYZ 90 720 null] >> endobj 402 0 obj << /Font << /F55 8 0 R /F56 9 0 R >> /ProcSet [ /PDF /Text ] >> endobj 498 0 obj << /Length 3545 /Filter /FlateDecode >> stream xY+6y1ǘdKTr%r^T"IAIsa ,RcMOWWytrNr]-"u5pZ~ٗF$rzzMًzskfW(Kf^ߞ}36$ȦlLʅ/O 5wz~WwNoZ537s:#fRFoBg4'WLύ,F9\mBJ}U6Z}^n{{oeJ}]Smy{9~iŢz6'ת׫. XĶz[JPgoժU[}NX:na/nZ} tsƶjWfs[ܖ_qzدj+Й}g%}VL)˞ò,lmC ͒XD}"v7mS,zz)PV1nUpV gd>z//>yn>_ܕ_== [wfދoy1IqѺ4E1>`M<|b:=8|#Gü [| ,fx-7򵊣,FF&9 LLgPč[G GDđ-c"|q UgĻ-$}Tq0XCQd p8a8ph2#807},[oaGK)}2wC7N' cu"} ['$!|Qp:f"@R2\^łqлS0dȈÞ愹I>L&o\@1. G- 2d(=MS .Kܕq1g}ęD"~Kw~}(3 8$@^1e__8#,c;젏`rхq:N@}Ȏ!>z|Ģ+Kf{]^ngt4ޜNx(Av Q |k&ד\v3G+cF? FiF- jyd Ƒq€hAv RMȦ/"å&a8' v 6>ڲqeFRb9' L Yd%=~J ?nFK:ćt "OT,Upy!|DO' >"OTͅe\]`:Lir8Wy؎!zDqF>\_:QӉrD}b;i>/D(D9apxscF?Qj{!|DO' QȎ!zDEIR{' Q#x~:QN@(QȎ!zDe9ɹu6'q±WȈz,|^X:K?X:vO N}yO$ endstream endobj 497 0 obj << /Type /Page /Contents 498 0 R /Resources 496 0 R /MediaBox [0 0 612 792] /Parent 401 0 R /Annots [ 406 0 R 407 0 R 408 0 R 409 0 R 410 0 R 411 0 R 412 0 R 413 0 R 414 0 R 415 0 R 416 0 R 417 0 R 418 0 R 419 0 R 420 0 R 421 0 R 422 0 R 423 0 R 424 0 R 425 0 R 426 0 R 427 0 R 428 0 R 429 0 R 430 0 R 431 0 R 432 0 R 433 0 R 434 0 R 435 0 R 436 0 R 437 0 R 438 0 R 439 0 R 440 0 R 441 0 R 442 0 R 443 0 R 444 0 R 445 0 R 446 0 R 447 0 R 448 0 R 449 0 R 450 0 R 451 0 R ] >> endobj 406 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 353.211 297.029 361.181] /A << /S /GoTo /D (21) >> >> endobj 407 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 344.422 297.029 350.648] /A << /S /GoTo /D (28) >> >> endobj 408 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 333.888 297.029 340.115] /A << /S /GoTo /D (31) >> >> endobj 409 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 323.355 297.029 329.582] /A << /S /GoTo /D (20) >> >> endobj 410 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 312.822 297.029 319.049] /A << /S /GoTo /D (28) >> >> endobj 411 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 302.289 297.029 308.515] /A << /S /GoTo /D (24) >> >> endobj 412 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 291.755 297.029 297.982] /A << /S /GoTo /D (31) >> >> endobj 413 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 246.469 297.029 254.44] /A << /S /GoTo /D (6) >> >> endobj 414 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 235.936 297.029 243.906] /A << /S /GoTo /D (6) >> >> endobj 415 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 193.564 297.029 201.534] /A << /S /GoTo /D (7) >> >> endobj 416 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 151.192 297.029 159.162] /A << /S /GoTo /D (10) >> >> endobj 417 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 140.659 297.029 148.629] /A << /S /GoTo /D (7) >> >> endobj 418 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 129.628 297.029 138.594] /A << /S /GoTo /D (17) >> >> endobj 419 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 119.094 297.029 128.061] /A << /S /GoTo /D (17) >> >> endobj 420 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 108.561 297.029 117.527] /A << /S /GoTo /D (19) >> >> endobj 421 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 98.028 297.029 106.994] /A << /S /GoTo /D (17) >> >> endobj 422 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 87.495 297.029 96.461] /A << /S /GoTo /D (18) >> >> endobj 423 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 76.961 297.029 85.928] /A << /S /GoTo /D (18) >> >> endobj 424 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 366.775 522 375.741] /A << /S /GoTo /D (18) >> >> endobj 425 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 356.041 522 365.007] /A << /S /GoTo /D (20) >> >> endobj 426 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 345.307 522 354.273] /A << /S /GoTo /D (19) >> >> endobj 427 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 334.573 522 343.54] /A << /S /GoTo /D (19) >> >> endobj 428 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 323.839 522 332.806] /A << /S /GoTo /D (19) >> >> endobj 429 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 313.106 522 322.072] /A << /S /GoTo /D (20) >> >> endobj 430 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 302.372 522 311.338] /A << /S /GoTo /D (18) >> >> endobj 431 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 291.638 522 300.604] /A << /S /GoTo /D (19) >> >> endobj 432 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 280.904 522 289.87] /A << /S /GoTo /D (19) >> >> endobj 433 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 270.17 522 279.137] /A << /S /GoTo /D (19) >> >> endobj 434 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 259.436 522 268.403] /A << /S /GoTo /D (20) >> >> endobj 435 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 248.703 522 257.669] /A << /S /GoTo /D (20) >> >> endobj 436 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 237.969 522 246.935] /A << /S /GoTo /D (20) >> >> endobj 437 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 227.235 522 236.201] /A << /S /GoTo /D (17) >> >> endobj 438 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 216.501 522 225.467] /A << /S /GoTo /D (20) >> >> endobj 439 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 205.767 522 214.734] /A << /S /GoTo /D (20) >> >> endobj 440 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 195.033 522 204] /A << /S /GoTo /D (17) >> >> endobj 441 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 184.3 522 193.266] /A << /S /GoTo /D (17) >> >> endobj 442 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 173.566 522 182.532] /A << /S /GoTo /D (18) >> >> endobj 443 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 162.832 522 171.798] /A << /S /GoTo /D (18) >> >> endobj 444 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 152.098 522 161.065] /A << /S /GoTo /D (18) >> >> endobj 445 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 141.364 522 150.331] /A << /S /GoTo /D (20) >> >> endobj 446 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 130.631 522 139.597] /A << /S /GoTo /D (19) >> >> endobj 447 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 119.897 522 128.863] /A << /S /GoTo /D (18) >> >> endobj 448 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 109.163 522 118.129] /A << /S /GoTo /D (19) >> >> endobj 449 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 98.429 522 107.395] /A << /S /GoTo /D (19) >> >> endobj 450 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 87.695 522 96.662] /A << /S /GoTo /D (20) >> >> endobj 451 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 76.961 522 85.928] /A << /S /GoTo /D (20) >> >> endobj 89 0 obj << /D [497 0 R /XYZ 90 720 null] >> endobj 234 0 obj << /D [497 0 R /XYZ 90 423.184 null] >> endobj 496 0 obj << /Font << /F55 8 0 R /F75 7 0 R /F31 313 0 R /F62 245 0 R /F2 246 0 R /F8 247 0 R /F96 50 0 R >> /ProcSet [ /PDF /Text ] >> endobj 542 0 obj << /Length 4652 /Filter /FlateDecode >> stream x]m4_f’,˾/W8]Q@93fyY%!?$[/U٢dFn%ZzYIIg僬tsyPB5-?y'BьTYEϞ~|ɣsVNvziV;M&G6qzV(rcRQ3PFP?f"[_: s>yt"=8 ]$JoT7:݇x9VJRR\#B}GJ'Obꁒs,;$cUI#6INԿMgӟ&t6y8 6[ư@T2'))ME@51rc0RD.d`jQ7O؀t`mZRt`!MD SAH[Bfs?X@ ,ϥ/#<SP"XSB(~x1wu3/ SUvyz^z_@[@|hº2'T?3z3_jP߼ ᯝ$nC@hˬ]d%@i`te b5 D}Uף.Y6viBSi҉Dt2]-o  v|3]4;k7 jRpDL`\Tpa -chѬI)Q*/a7V$*4XZzIj6;.̗*:J$-Ii Oxz8еx[ѬPKD8l֋&RX xF`CF!VAEYa{YKR2BN^!ƙp@84-cXѬi"t70R aRz'UCөTE e U"5U N"u(Atx8M bx22&͚&D`S(ơTp@"2*͚*9#2gTY6m}yQ,ƙ4p@"4ID,u&mv2.i2Zƞq0F \&>9wmb Gѕ"`nWuƍpv@IGD&Oxܯ$ T$cU8ƽp@ #f`D4kd2H$Np|?&89>^NddXOD2ֻ5uh2U*=p@[FP%YSEV~kP墭 zIE U~bݐ }M ``#5Eu E+aOewtgW2ˈbH[ 7:}2 Z"/o*ǘN^-W9%e ʼퟁ¨*T%D{jx/^ ^dmËf ^* mn7y>*uЂ?@hApР"[ƀѬAcuec=C)oK|"^jQȮy0HR "?G@|zx>}Y ?I{8 e ~*TD6@/sBg0SæheS4/A\q2 Ś YM=/]Hp,$wS #-c8pWfmɪOY̷m|9#/z^eYu L#e%҃ۦuR21~|&Kdv8e-sӬ> xy e J2}+ݱw~7s0jqSbWO AЖ1F4kP9YMWj֬&Zi^t ŧ^+Ap:jC[ƀѬAVk:j~kb! ۩ c\p.@XЖ1\h\OrBU:`:77-cѬe>F/KVҲTӈU ZCe  \o?PA񓨮0.䵝]AH#HѪ/H|>i6_6+k_4mt`m~s:d(tzD+Z}fUƄ𶫼Y+ +  tE1Da =ߺsz嬚8cwF;^c)ZTT螿T+ G r  c$c2KSÁ~1 Yf>FS$%VjYMh3kumvA) 'XWkaT i7;0htR}b9s!'fk?|*}ˈmApKy1bDQ-ʸ\gYhUY ytDRD`DVUL6%e^u)~f/gxYi.Ǩg>ױyj5ADU{[yɤPR|&c1jՕg z'O(rԳְ>s@ $lܴj>j~. t1S GZҍs@KFGB}_s_ڌu`7b q GCۻ`2EUb:]]!=ٳ~8(ÍcNc:ydRވ!qu$YFQF'5—޸!j^=Q/G !D#BϊM' eO2$@C<=Ph{"bb_u؏,?QtM"r|GU`"xF;w1 u0'T:Yz4h B3p;l=kY\1"rqd2 + hʈ-Clr$%ݱbm҂6cm̧BfIrVBhz8з c͈Ff!gF+s'tQMYm&Qm~_-ݚީe* )%)rSyt¢Jc ,\RQ$Z@sޏafS\ , $a Qr(pF (0 ALR<[yVNSr0#?СW*4i3M;EE*JODC82^NV0C3QQTDCzj:0'8ݳ.K' f !Av(O,=+^J!D:%ǂvXfvoPNdi}<9d(v Q@c8{jUA{KǍu cYNƁn&v h";pRκP;9%y~;(fJt FPnc1i6=hP.vowkʷn<s^pLf QВb Z#XߕqP:^;D! ;0cB{HUd M`U'BobqRz ׵@;ht F=ͿX8_{ "}BbYs:}>Ў!D4:z{S]IpCBdY_nn$16~yd꼞%ڗ(j4fXK977ϣZG6 P%^{#e]:Tf:B}:Z&vP=v endstream endobj 541 0 obj << /Type /Page /Contents 542 0 R /Resources 540 0 R /MediaBox [0 0 612 792] /Parent 401 0 R /Annots [ 452 0 R 453 0 R 454 0 R 455 0 R 456 0 R 457 0 R 458 0 R 459 0 R 460 0 R 461 0 R 462 0 R 463 0 R 464 0 R 465 0 R 466 0 R 467 0 R 468 0 R 469 0 R 470 0 R 471 0 R 472 0 R 473 0 R 474 0 R 475 0 R 476 0 R 477 0 R 478 0 R 479 0 R 480 0 R 481 0 R 482 0 R 483 0 R 484 0 R 485 0 R 486 0 R 487 0 R 488 0 R 489 0 R 490 0 R 491 0 R 492 0 R 493 0 R 494 0 R 495 0 R 499 0 R 500 0 R 501 0 R 502 0 R 503 0 R 504 0 R 505 0 R 506 0 R 507 0 R 508 0 R 509 0 R 510 0 R 511 0 R 512 0 R 513 0 R 514 0 R 515 0 R 516 0 R 517 0 R 518 0 R 519 0 R 520 0 R 521 0 R 522 0 R 523 0 R 524 0 R 525 0 R 526 0 R 527 0 R 528 0 R 529 0 R 530 0 R 531 0 R 532 0 R 533 0 R 534 0 R 535 0 R 536 0 R ] >> endobj 452 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 681.893 297.029 690.859] /A << /S /GoTo /D (20) >> >> endobj 453 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 671.431 297.029 680.398] /A << /S /GoTo /D (20) >> >> endobj 454 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 627.466 297.029 635.436] /A << /S /GoTo /D (32) >> >> endobj 455 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 618.747 297.029 624.974] /A << /S /GoTo /D (3) >> >> endobj 456 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 575.155 297.029 583.125] /A << /S /GoTo /D (7) >> >> endobj 457 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 531.309 297.029 539.279] /A << /S /GoTo /D (12) >> >> endobj 458 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 522.591 297.029 528.818] /A << /S /GoTo /D (7) >> >> endobj 459 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 512.129 297.029 518.356] /A << /S /GoTo /D (20) >> >> endobj 460 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 468.537 297.029 476.507] /A << /S /GoTo /D (10) >> >> endobj 461 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 458.076 297.029 466.046] /A << /S /GoTo /D (4) >> >> endobj 462 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 414.229 297.029 422.199] /A << /S /GoTo /D (12) >> >> endobj 463 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 403.768 297.029 411.738] /A << /S /GoTo /D (21) >> >> endobj 464 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 393.306 297.029 401.276] /A << /S /GoTo /D (28) >> >> endobj 465 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 382.845 297.029 390.815] /A << /S /GoTo /D (31) >> >> endobj 466 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 372.383 297.029 380.353] /A << /S /GoTo /D (28) >> >> endobj 467 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 361.922 297.029 369.892] /A << /S /GoTo /D (20) >> >> endobj 468 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 351.46 297.029 359.43] /A << /S /GoTo /D (28) >> >> endobj 469 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 340.749 297.029 348.969] /A << /S /GoTo /D (28) >> >> endobj 470 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 330.537 297.029 338.507] /A << /S /GoTo /D (28) >> >> endobj 471 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 320.075 297.029 328.045] /A << /S /GoTo /D (24) >> >> endobj 472 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 309.614 297.029 317.584] /A << /S /GoTo /D (31) >> >> endobj 473 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 299.152 297.029 307.122] /A << /S /GoTo /D (28) >> >> endobj 474 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 288.691 297.029 296.661] /A << /S /GoTo /D (28) >> >> endobj 475 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 278.229 297.029 286.199] /A << /S /GoTo /D (16) >> >> endobj 476 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 269.511 297.029 275.738] /A << /S /GoTo /D (3) >> >> endobj 477 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 259.049 297.029 265.276] /A << /S /GoTo /D (33) >> >> endobj 478 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 246.844 297.029 254.815] /A << /S /GoTo /D (10) >> >> endobj 479 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 236.383 297.029 244.353] /A << /S /GoTo /D (10) >> >> endobj 480 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 225.423 297.029 234.39] /A << /S /GoTo /D (32) >> >> endobj 481 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 215.46 297.029 223.43] /A << /S /GoTo /D (3) >> >> endobj 482 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 204.998 297.029 212.968] /A << /S /GoTo /D (32) >> >> endobj 483 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 161.152 297.029 169.122] /A << /S /GoTo /D (9) >> >> endobj 484 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 150.69 297.029 158.661] /A << /S /GoTo /D (20) >> >> endobj 485 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 140.229 297.029 148.199] /A << /S /GoTo /D (33) >> >> endobj 486 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 129.767 297.029 137.737] /A << /S /GoTo /D (22) >> >> endobj 487 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 119.306 297.029 127.276] /A << /S /GoTo /D (21) >> >> endobj 488 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 108.844 297.029 116.814] /A << /S /GoTo /D (21) >> >> endobj 489 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 98.383 297.029 106.353] /A << /S /GoTo /D (10) >> >> endobj 490 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 89.665 297.029 95.891] /A << /S /GoTo /D (7) >> >> endobj 491 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 79.203 297.029 85.43] /A << /S /GoTo /D (3) >> >> endobj 492 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 682.391 522 690.361] /A << /S /GoTo /D (21) >> >> endobj 493 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 673.665 522 679.892] /A << /S /GoTo /D (7) >> >> endobj 494 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 663.195 522 669.422] /A << /S /GoTo /D (6) >> >> endobj 495 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 619.544 522 627.514] /A << /S /GoTo /D (28) >> >> endobj 499 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 609.075 522 617.045] /A << /S /GoTo /D (30) >> >> endobj 500 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 598.605 522 606.575] /A << /S /GoTo /D (30) >> >> endobj 501 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 588.136 522 596.106] /A << /S /GoTo /D (30) >> >> endobj 502 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [497.938 577.666 507.153 585.636] /A << /S /GoTo /D (21) >> >> endobj 503 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 577.666 522 585.636] /A << /S /GoTo /D (31) >> >> endobj 504 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 567.196 522 575.166] /A << /S /GoTo /D (31) >> >> endobj 505 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 556.727 522 564.697] /A << /S /GoTo /D (31) >> >> endobj 506 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 546.257 522 554.227] /A << /S /GoTo /D (31) >> >> endobj 507 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 537.531 522 543.758] /A << /S /GoTo /D (30) >> >> endobj 508 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 525.318 522 533.288] /A << /S /GoTo /D (32) >> >> endobj 509 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 514.848 522 522.37] /A << /S /GoTo /D (6) >> >> endobj 510 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 470.943 522 478.914] /A << /S /GoTo /D (26) >> >> endobj 511 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 460.474 522 468.444] /A << /S /GoTo /D (25) >> >> endobj 512 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 450.004 522 457.974] /A << /S /GoTo /D (7) >> >> endobj 513 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 441.278 522 447.505] /A << /S /GoTo /D (24) >> >> endobj 514 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 429.065 522 437.035] /A << /S /GoTo /D (8) >> >> endobj 515 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [502.545 385.16 507.153 393.13] /A << /S /GoTo /D (3) >> >> endobj 516 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 385.16 522 393.13] /A << /S /GoTo /D (31) >> >> endobj 517 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 376.434 522 382.661] /A << /S /GoTo /D (30) >> >> endobj 518 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 364.221 522 372.191] /A << /S /GoTo /D (10) >> >> endobj 519 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 320.316 522 328.286] /A << /S /GoTo /D (4) >> >> endobj 520 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 311.59 522 317.816] /A << /S /GoTo /D (21) >> >> endobj 521 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 299.377 522 307.347] /A << /S /GoTo /D (20) >> >> endobj 522 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 288.907 522 296.877] /A << /S /GoTo /D (2) >> >> endobj 523 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 280.181 522 286.18] /A << /S /GoTo /D (1) >> >> endobj 524 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 269.711 522 275.938] /A << /S /GoTo /D (5) >> >> endobj 525 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 257.498 522 265.468] /A << /S /GoTo /D (5) >> >> endobj 526 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 247.029 522 254.999] /A << /S /GoTo /D (16) >> >> endobj 527 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 204.867 522 211.094] /A << /S /GoTo /D (30) >> >> endobj 528 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 194.398 522 200.624] /A << /S /GoTo /D (30) >> >> endobj 529 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 182.185 522 190.155] /A << /S /GoTo /D (5) >> >> endobj 530 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 171.715 522 179.685] /A << /S /GoTo /D (5) >> >> endobj 531 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 161.245 522 169.216] /A << /S /GoTo /D (24) >> >> endobj 532 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 152.519 522 158.746] /A << /S /GoTo /D (28) >> >> endobj 533 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 140.057 522 148.276] /A << /S /GoTo /D (28) >> >> endobj 534 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 131.58 522 137.807] /A << /S /GoTo /D (28) >> >> endobj 535 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 87.929 522 95.899] /A << /S /GoTo /D (4) >> >> endobj 536 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 77.46 522 85.43] /A << /S /GoTo /D (5) >> >> endobj 543 0 obj << /D [541 0 R /XYZ 90 720 null] >> endobj 540 0 obj << /Font << /F55 8 0 R /F31 313 0 R /F2 246 0 R /F8 247 0 R /F75 7 0 R /F96 50 0 R >> /ProcSet [ /PDF /Text ] >> endobj 642 0 obj << /Length 5222 /Filter /FlateDecode >> stream x]ms_o!c%u|>Ǥ>\eḘ,Ҳ0]4fq*K"=<@7/CO=i9i9}t?]xo^Qܹ}<^6mZzr>b9;真nug̜כ9QO\FM&'lb'J o2P.zn֌Y%éSJl4:FP bh/{nuÇzvu 2@e5 wgT6F߉#MkGY'CcWIzML).*v4МHE= :,jdqbV7{$_S@^P WFcy~f3|׽FCytȣρ}wt. 5e jiifwJ/{wyݷolϋvmgR֋ه|}*%i${o{}s `;J:kg#԰-˚wDvFWH)C%)H=pX Ĵ~|n?am@XݭίVַFUuMPO:Iu3}@L…bi~H8)v}ǡFLտᵫP<Д x;<"m#j>[#ɴ #iu 5pg&=2!H5,j' U6eЁi" k2y*VՏXԒV?P}Pn ]@2݂fDH:f"(HxÝpCS4ㄶL-1ϲ֭=|fχ3z.5%4&4% ALBbG ag& Pc^\B7fFyNR? $($ 5e jΉfԳeG_wX?>I!hE2{EHhhѡ[h쓞v=G|uncP{ 4A!ZJ'!R{r14DڗĨXf}ZDP1\ga-7xc<$T 0`4;p>Ѻn}kǑܮ'J3zb$81 Fn)hb4;b3:ڌçT~2P:QHp @4 ce  (%(i…U~Zme&8ͅ lmAöiHbh[W$q8>mHLaPކH?|?!3NM;yv ȝ# 3D (ᙑ÷Ж 4;Ѕ$Ylao-4Q=.B#Uρ}tw 9I )pe;"{>GL*A!>OD|`#Oo?bP rElH>OD|5Z1e3NNA8ZT#|q/2T2rqh_F{.HKn\AgL`_6tuAu@!4e K'}YO֛;wx2,H<;AvjdZIzFF$ G{)4;)'Z b~59 j]bMϸdRw = 7e .>&\ᷓL&.cZI1 h2QŖQVqfБYl%Jee]ͣ;HT8dS&R_QW2!:1Gai^LoEW-Q;xx?׏I>|@0ѥh;?_|Z&1v`O=I<);eC8Ǜ̵kpqnC5?yLpN}HЖ)4;ykA@}q.l%٪kopΫgElSD2d %p]XJu*Qv;‹C)S(xo=5DI?.p]`gaM{1'QOْ!S{wC ][UIŵ%^$OGBe"l=-E=1FgW_RfgD)7~?~ڟ{Uo`/@;FR9#[ҨHE>݆#8̍j[xρ JwfQ0R@eߜT/8x{3)ljpm-&GGʑ0¡H!N*Ζ<ꮄI,r!a=IpAH fQ0rN ӥ|=OGm|5WQWu4h4f_h # 9槇ڣ& KJ2G cwhhD-B3hRPi6tz &qgLMZ ?a#_O$D7|ct*(tM\bζ~~9[l|}Xu/>o[_d3u4`xoVWl'`%ưµE8(l׋hYLi;:-06x!  1FFJЖpRGpq?ۮZ^x1 QJӻIN1FH.<չvιQIK܌_$8*0c Ԃh5ipR٩?ET;&RG?I!A |`JCzaZ0'.0'JcO0 jϾFV&\ .;[&Y=N0 &1j"3"1079M'Y'8<c ((PvrNŲr22x/s# s1ƍ ) /6X'xf6l;0diž4 K;Ӄ$O9Ϣ CyGc~_0ʯkЇPcu%iдU'$8 3w;;h1Oż4xZ\ͩȹyZ֙srX_Nw.OY(g3ȅO ЎΔ4FƸ_U"v]ֆh!5{#~ͷz^ߎ°N: gY<@D0@Ac@Ts`>l?N9=ǎ}TC 1|Aa@R|w[t.LVaZvhU~ڣ>#F.HFd+-~^nuUxz6$8 >Q1Fwetp+|Jf%󺹫ru Vfa[PUPJR9iRQWCk-Ў1R4FR}vwAOQHngvɵ sN>uޞPnc՟3Z&0Cow9_zon:how߾yUؿw_28>[:т1lP]ŸYw7 FԿ蛷X> endobj 537 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 681.893 297.029 690.859] /A << /S /GoTo /D (7) >> >> endobj 538 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 671.817 297.029 679.787] /A << /S /GoTo /D (6) >> >> endobj 539 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 661.243 297.029 669.213] /A << /S /GoTo /D (10) >> >> endobj 544 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [272.966 650.669 282.182 658.639] /A << /S /GoTo /D (21) >> >> endobj 545 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 650.669 297.029 658.639] /A << /S /GoTo /D (31) >> >> endobj 546 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 607.746 297.029 613.973] /A << /S /GoTo /D (2) >> >> endobj 547 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 597.172 297.029 603.172] /A << /S /GoTo /D (3) >> >> endobj 548 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [272.966 584.855 282.182 592.825] /A << /S /GoTo /D (10) >> >> endobj 549 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 584.855 297.029 592.825] /A << /S /GoTo /D (22) >> >> endobj 550 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 574.281 297.029 582.251] /A << /S /GoTo /D (22) >> >> endobj 551 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 563.707 297.029 571.677] /A << /S /GoTo /D (11) >> >> endobj 552 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 554.877 297.029 561.104] /A << /S /GoTo /D (8) >> >> endobj 553 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 542.559 297.029 550.53] /A << /S /GoTo /D (25) >> >> endobj 554 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 533.729 297.029 539.956] /A << /S /GoTo /D (7) >> >> endobj 555 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 489.317 297.029 497.287] /A << /S /GoTo /D (6) >> >> endobj 556 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 478.245 297.029 487.211] /A << /S /GoTo /D (6) >> >> endobj 557 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 467.671 297.029 476.637] /A << /S /GoTo /D (6) >> >> endobj 558 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 457.097 297.029 466.063] /A << /S /GoTo /D (10) >> >> endobj 559 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 446.523 297.029 455.489] /A << /S /GoTo /D (7) >> >> endobj 560 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 435.949 297.029 444.915] /A << /S /GoTo /D (7) >> >> endobj 561 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 425.624 297.029 433.843] /A << /S /GoTo /D (6) >> >> endobj 562 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 414.801 297.029 423.768] /A << /S /GoTo /D (7) >> >> endobj 563 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 404.227 297.029 413.194] /A << /S /GoTo /D (6) >> >> endobj 564 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 393.653 297.029 402.62] /A << /S /GoTo /D (6) >> >> endobj 565 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 383.578 297.029 391.099] /A << /S /GoTo /D (6) >> >> endobj 566 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 372.506 297.029 381.472] /A << /S /GoTo /D (6) >> >> endobj 567 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 361.932 297.029 370.898] /A << /S /GoTo /D (7) >> >> endobj 568 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 351.856 297.029 359.378] /A << /S /GoTo /D (6) >> >> endobj 569 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 341.282 297.029 349.252] /A << /S /GoTo /D (26) >> >> endobj 570 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 330.708 297.029 338.678] /A << /S /GoTo /D (25) >> >> endobj 571 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 320.134 297.029 328.104] /A << /S /GoTo /D (26) >> >> endobj 572 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 309.56 297.029 317.53] /A << /S /GoTo /D (25) >> >> endobj 573 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 298.986 297.029 306.729] /A << /S /GoTo /D (27) >> >> endobj 574 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 256.063 297.029 262.29] /A << /S /GoTo /D (31) >> >> endobj 575 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [246.856 243.746 251.464 251.716] /A << /S /GoTo /D (6) >> >> endobj 576 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [257.095 243.746 261.703 251.716] /A << /S /GoTo /D (7) >> >> endobj 577 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [267.335 243.746 271.942 251.716] /A << /S /GoTo /D (8) >> >> endobj 578 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [277.574 243.746 282.182 251.716] /A << /S /GoTo /D (9) >> >> endobj 579 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 243.746 297.029 251.716] /A << /S /GoTo /D (22) >> >> endobj 580 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 232.923 297.029 241.142] /A << /S /GoTo /D (6) >> >> endobj 581 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 222.598 297.029 230.568] /A << /S /GoTo /D (21) >> >> endobj 582 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 212.024 297.029 219.994] /A << /S /GoTo /D (24) >> >> endobj 583 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 200.952 297.029 209.919] /A << /S /GoTo /D (7) >> >> endobj 584 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 190.877 297.029 198.398] /A << /S /GoTo /D (6) >> >> endobj 585 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 180.303 297.029 188.045] /A << /S /GoTo /D (27) >> >> endobj 586 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 169.729 297.029 177.699] /A << /S /GoTo /D (5) >> >> endobj 587 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 159.155 297.029 167.125] /A << /S /GoTo /D (6) >> >> endobj 588 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 148.581 297.029 156.551] /A << /S /GoTo /D (21) >> >> endobj 589 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [287.813 138.007 297.029 145.75] /A << /S /GoTo /D (21) >> >> endobj 590 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 127.433 297.029 135.403] /A << /S /GoTo /D (6) >> >> endobj 591 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 82.767 297.029 90.737] /A << /S /GoTo /D (6) >> >> endobj 592 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 668.012 522 675.983] /A << /S /GoTo /D (32) >> >> endobj 593 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 657.324 522 665.295] /A << /S /GoTo /D (2) >> >> endobj 594 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 648.38 522 654.158] /A << /S /GoTo /D (9) >> >> endobj 595 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 604.878 522 611.105] /A << /S /GoTo /D (28) >> >> endobj 596 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 591.949 522 600.915] /A << /S /GoTo /D (6) >> >> endobj 597 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 581.261 522 590.227] /A << /S /GoTo /D (6) >> >> endobj 598 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 571.071 522 579.041] /A << /S /GoTo /D (12) >> >> endobj 599 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 560.383 522 567.904] /A << /S /GoTo /D (9) >> >> endobj 600 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 549.197 522 558.163] /A << /S /GoTo /D (6) >> >> endobj 601 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 539.007 522 546.977] /A << /S /GoTo /D (5) >> >> endobj 602 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 530.062 522 536.062] /A << /S /GoTo /D (2) >> >> endobj 603 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 519.374 522 525.601] /A << /S /GoTo /D (7) >> >> endobj 604 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 508.686 522 514.913] /A << /S /GoTo /D (7) >> >> endobj 605 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [502.545 496.255 507.153 504.225] /A << /S /GoTo /D (7) >> >> endobj 606 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 496.255 522 504.225] /A << /S /GoTo /D (12) >> >> endobj 607 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 485.567 522 493.537] /A << /S /GoTo /D (5) >> >> endobj 608 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 474.879 522 482.749] /A << /S /GoTo /D (5) >> >> endobj 609 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 464.191 522 472.161] /A << /S /GoTo /D (5) >> >> endobj 610 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 453.503 522 461.473] /A << /S /GoTo /D (33) >> >> endobj 611 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 408.004 522 415.746] /A << /S /GoTo /D (11) >> >> endobj 612 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 362.504 522 370.475] /A << /S /GoTo /D (31) >> >> endobj 613 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 351.318 522 360.285] /A << /S /GoTo /D (32) >> >> endobj 614 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 342.872 522 349.099] /A << /S /GoTo /D (4) >> >> endobj 615 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 330.44 522 338.183] /A << /S /GoTo /D (6) >> >> endobj 616 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 319.753 522 327.723] /A << /S /GoTo /D (9) >> >> endobj 617 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 309.065 522 317.035] /A << /S /GoTo /D (24) >> >> endobj 618 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 300.12 522 306.347] /A << /S /GoTo /D (12) >> >> endobj 619 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 287.689 522 295.659] /A << /S /GoTo /D (32) >> >> endobj 620 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 277.001 522 284.971] /A << /S /GoTo /D (21) >> >> endobj 621 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 266.313 522 274.283] /A << /S /GoTo /D (20) >> >> endobj 622 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 255.625 522 263.595] /A << /S /GoTo /D (21) >> >> endobj 623 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 244.937 522 252.907] /A << /S /GoTo /D (21) >> >> endobj 624 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 235.992 522 242.219] /A << /S /GoTo /D (24) >> >> endobj 625 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 223.561 522 231.303] /A << /S /GoTo /D (6) >> >> endobj 626 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 212.873 522 220.843] /A << /S /GoTo /D (21) >> >> endobj 627 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 202.185 522 210.155] /A << /S /GoTo /D (4) >> >> endobj 628 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 191.497 522 199.467] /A << /S /GoTo /D (24) >> >> endobj 629 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 180.809 522 188.551] /A << /S /GoTo /D (21) >> >> endobj 630 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 170.121 522 178.091] /A << /S /GoTo /D (7) >> >> endobj 631 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 159.433 522 167.403] /A << /S /GoTo /D (12) >> >> endobj 632 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 150.488 522 156.715] /A << /S /GoTo /D (31) >> >> endobj 633 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 139.8 522 146.027] /A << /S /GoTo /D (31) >> >> endobj 634 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 127.369 522 135.339] /A << /S /GoTo /D (5) >> >> endobj 635 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 116.681 522 124.651] /A << /S /GoTo /D (5) >> >> endobj 636 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 105.993 522 113.863] /A << /S /GoTo /D (5) >> >> endobj 637 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 95.305 522 103.275] /A << /S /GoTo /D (5) >> >> endobj 638 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 86.36 522 92.487] /A << /S /GoTo /D (31) >> >> endobj 643 0 obj << /D [641 0 R /XYZ 90 720 null] >> endobj 640 0 obj << /Font << /F55 8 0 R /F2 246 0 R /F31 313 0 R /F8 247 0 R /F75 7 0 R >> /ProcSet [ /PDF /Text ] >> endobj 650 0 obj << /Length 598 /Filter /FlateDecode >> stream x]o0+rG"-%hC$.Hm3%)h?c;ݜYI\ T)xqlH( 4ќ+LXϨ,p (|v~)eXj!KͯMյY9O_כgLZ6m9jT*Duvv1$;QiҨI.5)#p4}p/YbUJ|/ Ѣƫ,-Qi2HoMY\g"a-f pDxމ=Qcl~?l,E@4<;|&{ptբX0&|~ tpJHI8;>~D;~^`葻At)c'=&&vOOI9;b"Fꈘz]uYۦ)39S$np}xx}>Ge]&&'?'͂/c4ҢQRM m3bG'X(ܨQn~hqkq6kͦp 1O"6"Fn)|1!?  fG>U endstream endobj 649 0 obj << /Type /Page /Contents 650 0 R /Resources 648 0 R /MediaBox [0 0 612 792] /Parent 401 0 R /Annots [ 639 0 R 644 0 R 645 0 R 646 0 R 647 0 R ] >> endobj 639 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 667.242 297.029 675.212] /A << /S /GoTo /D (2) >> >> endobj 644 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 655.68 297.029 664.646] /A << /S /GoTo /D (7) >> >> endobj 645 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [292.421 645.114 297.029 653.084] /A << /S /GoTo /D (5) >> >> endobj 646 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [512.785 668.42 522 676.163] /A << /S /GoTo /D (12) >> >> endobj 647 0 obj << /Type /Annot /Subtype /Link /Border [0 0 0] /Rect [517.392 624.371 522 632.341] /A << /S /GoTo /D (5) >> >> endobj 651 0 obj << /D [649 0 R /XYZ 90 720 null] >> endobj 648 0 obj << /Font << /F55 8 0 R /F75 7 0 R /F2 246 0 R /F8 247 0 R /F31 313 0 R >> /ProcSet [ /PDF /Text ] >> endobj 652 0 obj [892.9] endobj 653 0 obj [525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525] endobj 654 0 obj [513.9 571 456.8 571 457.2 314 513.9 571 285.5 314 542.4 285.5 856.5 571 513.9 571 542.4 402 405.4 399.7 571 542.4 742.3 542.4] endobj 655 0 obj [555.6 555.6 833.3 833.3 277.8 305.6 500 500 500 500 500 808.6 444.4 500 722.2 777.8 500 902.8 1013.9 777.8 277.8 277.8 500 833.3 500 833.3 777.8 277.8 388.9 388.9 500 777.8 277.8 333.3 277.8 500 500 500 500 500 500 500 500 500 500 500 277.8 277.8 277.8 777.8 472.2 472.2 777.8 750 708.3 722.2 763.9 680.6 652.8 784.7 750 361.1 513.9 777.8 625 916.7 750 777.8 680.6 777.8 736.1 555.6 722.2 750 750 1027.8 750 750 611.1 277.8 500 277.8 500 277.8 277.8 500 555.6 444.4 555.6 444.4 305.6 500 555.6 277.8 305.6 527.8 277.8 833.3 555.6 500 555.6 527.8 391.7 394.4 388.9 555.6 527.8 722.2 527.8 527.8] endobj 656 0 obj [285.5 285.5 799.4 513.9 799.4 513.9 543.7 770.7 777.7 733.6 847.5 756.3 656.2 804.8 850.1 449.3 566.3 870.4 699.4 992.9 821.6 782.1 656.2 810.6 777.6 627.8 599.6 699.1 599.4 970.5 849 596.5 699.2 399.7 399.7 399.7 1027.8 1027.8 424.4 544.5 440.4 444.9 532.5 477.8 498.8 490.1 592.2 351.7 420.1 535.1 306.7 905.5 620 497.5 515.9 459.2 463.7 478.8 371.1 591.4 499.2 736.6 582.6 506.2] endobj 657 0 obj [599.5 571 571 856.5 856.5 285.5 314 513.9 513.9 513.9 513.9 513.9 770.7 456.8 513.9 742.3 799.4 513.9 927.8 1042 799.4 285.5 285.5 513.9 856.5 513.9 856.5 799.4 285.5 399.7 399.7 513.9 799.4 285.5 342.6 285.5 513.9 513.9 513.9 513.9 513.9 513.9 513.9 513.9 513.9 513.9 513.9 285.5 285.5 285.5 799.4 485.3 485.3 799.4 770.7 727.9 742.3 785 699.4 670.8 806.5 770.7 371 528.1 799.2 642.3 942 770.7 799.4 699.4 799.4 756.5 571 742.3 770.7 770.7 1056.2 770.7 770.7 628.1 285.5 513.9 285.5 513.9 285.5 285.5 513.9 571 456.8 571 457.2 314 513.9 571 285.5 314 542.4 285.5 856.5 571 513.9 571 542.4 402 405.4 399.7 571 542.4 742.3 542.4 542.4 456.8 513.9] endobj 658 0 obj [525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525] endobj 659 0 obj [587.8 881.7 894.4 306.7 332.2 511.1 511.1 511.1 511.1 511.1 831.3 460 536.7 715.6 715.6 511.1 882.8 985 766.7 255.6 306.7 514.4 817.8 769.1 817.8 766.7 306.7 408.9 408.9 511.1 766.7 306.7 357.8 306.7 511.1 511.1 511.1 511.1 511.1 511.1 511.1 511.1 511.1 511.1 511.1 306.7 306.7 306.7 766.7 511.1 511.1 766.7 743.3 703.9 715.6 755 678.3 652.8 773.6 743.3 385.6 525 768.9 627.2 896.7 743.3 766.7 678.3 766.7 729.4 562.2 715.6 743.3 743.3 998.9 743.3 743.3 613.3 306.7 514.4 306.7 511.1 306.7 306.7 511.1 460 460 511.1 460 306.7 460 511.1 306.7 306.7 460 255.6 817.8 562.2 511.1 511.1 460 421.7 408.9 332.2 536.7 460 664.4 463.9 485.6] endobj 660 0 obj [569.5 569.5 569.5 569.5 569.5 569.5 569.5 569.5] endobj 661 0 obj [570 517 571.4 437.2 540.3 595.8 625.7 651.4 622.5 466.3 591.4 828.1 517 362.8 654.2 1000 1000 1000 1000 277.8 277.8 500 500 500 500 500 500 500 500 500 500 500 500 277.8 277.8 777.8 500 777.8 500 530.9 750 758.5 714.7 827.9 738.2 643.1 786.2 831.3 439.6 554.5 849.3 680.6 970.1 803.5 762.8 642 790.6 759.3 613.2 584.4 682.8 583.3 944.4 828.5 580.6 682.6 388.9 388.9 388.9 1000 1000 416.7 528.6 429.2 432.8 520.5 465.6 489.6] endobj 662 0 obj [272] endobj 663 0 obj [514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6 514.6] endobj 664 0 obj [777.8 277.8 777.8 500 777.8 500 777.8 777.8 777.8 777.8 777.8 777.8 777.8 1000] endobj 665 0 obj [525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525 525] endobj 666 0 obj [833.3 777.8 694.4 666.7 750 722.2 777.8 722.2 777.8 722.2 583.3 555.6 555.6 833.3 833.3 277.8 305.6 500 500 500 500 500 750 444.4 500 722.2 777.8 500 902.8 1013.9 777.8 277.8 277.8 500 833.3 500 833.3 777.8 277.8 388.9 388.9 500 777.8 277.8 333.3 277.8 500 500 500 500 500 500 500 500 500 500 500 277.8 277.8 277.8 777.8 472.2 472.2 777.8 750 708.3 722.2 763.9 680.6 652.8 784.7 750 361.1 513.9 777.8 625 916.7 750 777.8 680.6 777.8 736.1 555.6 722.2 750 750 1027.8 750 750 611.1 277.8 500 277.8 500 277.8 277.8 500 555.6 444.4 555.6 444.4 305.6 500 555.6 277.8 305.6 527.8 277.8 833.3 555.6 500 555.6 527.8 391.7 394.4 388.9 555.6 527.8 722.2 527.8 527.8 444.4 500 1000] endobj 667 0 obj [656.3 625 625 937.5 937.5 312.5 343.7 562.5 562.5 562.5 562.5 562.5 849.5 500 574.1 812.5 875 562.5 1018.5 1143.5 875 312.5 342.6 581 937.5 562.5 937.5 875 312.5 437.5 437.5 562.5 875 312.5 375 312.5 562.5 562.5 562.5 562.5 562.5 562.5 562.5 562.5 562.5 562.5 562.5 312.5 312.5 342.6 875 531.3 531.3 875 849.5 799.8 812.5 862.3 738.4 707.2 884.3 879.6 419 581 880.8 675.9 1067.1 879.6 844.9 768.5 844.9 839.1 625 782.4 864.6 849.5 1162 849.5 849.5 687.5 312.5 581 312.5 562.5 312.5 312.5 546.9 625 500 625 513.3 343.7 562.5 625 312.5 343.7 593.7 312.5 937.5 625 562.5 625 593.7 459.5 443.8 437.5 625 593.7 812.5 593.7 593.7 500] endobj 668 0 obj << /Length1 2404 /Length2 17612 /Length3 0 /Length 19008 /Filter /FlateDecode >> stream xڌT%z gۜvɶ5qg۶k '{ddnz9<[}WkUo% Pޕ `aagbaaCTrG@ tvr3$7v*8dlV.>Vn>  Vf&=R?hLi DVcWK(-@ ?!h,]]=<<\-hVU h2@ojLuK+)]=hrq7:@j2%GewsL oYllj`hleeo0$\=]fۺ8ݍlM@n Q _ jĭ{1{6>AVf0ssdְrrʈ$B#8YXXx@'Ԓ^A| @?+s ;++`G$ l c+寯f03{[?YIBLKZߔu0r8YnNooտcQ/7gC }h> ')#uoEnie7h\AkA:ؚ_1BD-lF+I+O忖?S*;XYYXts6G4U@IoJ {Sn `lZ06NN+H̀6;8#5Q.N_!. `x/Y⿈, 6`@ P>?OS/S@T P>?O0A ?Tʮ_ q x?n_ ҙ:؂&_g6D 4S[c0ARZtGn25eP,-Yzdlj?jgjZAld9;T5]i8i( s;@[?ZotԀO!? 2w@̮LW8j? Ldl^x(7_-1usv}ڃ?ԁ@O)Ҽ)u]hC V:-ϒs l*m ;ԡh;4I^}[`#Z?=&N!,NO1}u lsrAQ.|+_ U٫C|)fӈ*7ɞ#qe$øDȝx'MG;c/d^TgsƧ#=H])-N )6'4C؉;iג@ޡaX9Tx6СZn'F^=w+7Wٯ!6lm?tD-p-OS7$|LZd3w1D>~ѻQ9R#"7f$1:x',!K14DxG$']Er=T|5l=Ԉs49ZA^q_ hxChwMqaZT5AsMɽ21xTt$YYLY'H 9kvoQL]L8\ ճ C'dBx49iH!YB?t{, 5WHyxA o1Laz|sRN@!+͵)2Y>C.ՑNS9okȴG,[Fs.z~7O%K+o/n)ChĠ`}pEpS<|}Wsy,gy w嵱nTpH~Pa=/=C_L ?裖c@.MweP8^`~&$#^歏Ur^}]M4?ie 52vmtorcQ,h2֤Tgj-˥96 47]+׳b'U>gQqsCNw2ҏkJ׎!ZBضa%ng6S@/ˠ5㛴2Şϰ~{V`m4\-p w}fUiƂ|f&9Qda]^:fjS:.vbo ,)# :>Ap tuZ(^4\F,P/lvV{٬`SNnt+Fׅ'xua7S\I)݆4^4%fm HbY0d+:/hcᵦ}hzYk%!jd"rKmo}nX}h3`-czX2` t壨_k:SUl珥HI *.eRDaﭙ'疿+rԚ+9jF8Tu),=;H.9E0S<,M٭$BPNSU(g^ $8|0zUQۂJ e?Y~._Q79e(cʞcq#('>*]a`$稧X/n)L$~ӂhq2bH@4!Z,2"-.&WS`q'8EJ>pIR:w!f84lYB^aH o >f]/"H|Gp`#j* ^5 &V7M"\4*䳚caߎ?y\!:]qN)at;Y\=#/ҋN.JJ8]] '}#U;:!7yqA15YW`a"hDu$oS?7y4N2Dȳk<^JB'gD*Β;^D->oOD -U  jh\C$*ibA{Ǔ;풋ݘ:Z0r|q(uȭ7ƤTW*9@Z^LdkgYvL87^ STx)lOiGUQ_kLICEjWr\n*~emi_;-i ٪qaY;ϑp4J ,}HcÌM21[kOXT|:|ʧ>=NihYQpxF[~c)?5ƾH[H M6nYh5_$C5}j'Cހ+*6!%d8o;~A(kӴţ CY$I1A h9ԧJd_c|po@&#Ass_F-]1  ]rp]K_N:P6\IXP(- Z: m\[vEa#8HNe*f<5y4j_7v*8=;zkt;KIDLuڒ6[QMV~͋SNo@2q#xb?iII9]H'e`Ye!m_E=۟B;i;"9 -!(XaXW-܅9깃pI߮o^{ 8K;:Mw []%wo/}=Tue [>"3lX+K !Jh@U5|P --Gh[(JZއ((}O tg#<.IjCP};)]Uf>/O4ɪ"zQ&k 4PUc(>qnIBNyFtz )-̐Mvf+5ï b d3+}[-ӝo̶ySXa{y_1Lۜ&1âpc~j2SWvSb)4OD7s >[/B3Υ@Jvdͣ{>7DѠn릹M_ KJ GzH[Yf~q;7{͝ o;e౫-w!bmwdk=Ch_&L"f2ӽ*Ƅ^gyp ND?HGD ;Uɥ~hD!w6ϳnm@xߘƭ N%YTU|6ԨCL"?d|Rr疳jʬl< g=vzSoE?vۤ-G-V3A6a[Ҏ~fIcۮ mDx1`JCt^K̦"OkfZ$~IMc7x} CB=4Тj)}e>G#'mC RGwك5Z-,޲{k7zp .O)2+?e l\m71AgBepʟE+eig)[y.:r뎛I ;=8}]ʹXaM*`9夊{ϸqВ8Ed0aRHGVu'yx^ㄐbK9OEbK =FaĽeN_'iZ̦zs1nW0%&ll S=TI3gVDC_['sh蕈KobC3nh \b8ӡQiMl2>b7%2 E׏yoEvvL4&Iu/].eAM #b yS"/;<ʆSK{Eȉ#S{ !=]"?SdAK=?UCٰ |Y%0>V1я->v}׹*@f2a*y>Qmܚ92AX/ A$Ns6S )zt@/F0zcedKXͻ " Rl4OԃD]}Wo%Qvcg4Pʜ =U [._YiUG`;<½ JbOQffx[XZ1^Mp˯edpllQIK~rl<,|Z' v2'q,E4 gʧD|Lk]~qޠik^-6m9/ʛ@ꙓ;iNha%#SLɫ'0A:/0vةWix;AVџ2*e9ki,{K\\L3(WsUnۄmO.vj0?eEa'[\:;/(6g44G@٬=R& yiͻV3.4nΘ,+Ƣ֦$-qZWd9-QO}'4ZED3x2XH%J0߻4!í}Xr2 #pO\l^ԂTT)/rKD!"DġEvDySHy߯ـxRs-o*k7ۆ |eZ:6)-2[DK}()֩2@U*eY[ 3 kZfءM~1AݥbÍDILz$jİyZDuC}jeE=qX9z`d|ݘ7¤Ujqsp: Ӆ/IVo(|3|o6>"6s&LJudK"NM9m(JLo -Í5jv[f/0dOTuE.]$=ڋS(8N-1y8EL1⍶s>q^"/3 SQ:YhDIMSԣVВDD+m7j uxMFR?JϮ~]a$Pe7v-$I'U(Fˈ6s 54~'2I|;[ǫ1.;'F٘ZE]D#8e:'CϞKuf&py>EwG*z !0<]^ߵm:[NB֤`0͒]FI #ɏн8f ?c2zHŅ  i^#}Q~*n,)HeBԖg&A'hǍfygbЅ. ଈ%7bI"%7nV.ҵ'?u}`inH!Bmrfdgr}G2>i6#*YUROW GhSD)j%_λ!FRc,d#v{᜙fh*> ;ֽ8"n;ݠΫp\;xmcsM'@]_"w Z%O[ͫ?%-(m¸0K^jye>k[9<k3x'ɺ@pFQ|3(ZV֜&$J } TJHfxQ2=wgɴY<2F@O#5<ƭ}![8ˬU:F\:O<| !ȾфZ'5;t &>R=e#ݺԼ7xQ;Cjޘ3!27dh( +^IJHv_?ibqHfa7޳mH;)0}1Y}ީ?Vx:te_N(\Bӧ1ֶ ZCW!S<_->T(+n&#Xp„7YYCv/M=(?J՞3vX-K>VNum]sR|Wg##̏4c49j!Fc-"·PoH<ܳqhkA0߰+zmE`EE5dVPY bg[44 jƳa'ro2jNM?OhNֱ="#2dOO:#D ^dnB"ؼB_^Q DA8 'maJB.aUjj'RO͠y쫔ڧ χfdڗt2XxŹSې~誶u{ҁ~o\;!.dgDP-zi0*<.ֆ͵K*T]UțS"$9t#uU}q8Xm߯TF̳+1jC.#.=HӔmq-KZ+{dVD@S}r>($ԣ,0M~R;ojVRŗ\.roZط'N7))߇15/|SC<EG`MGU VGʼnep艮0-\USSjQ%<"#|txHGR)\+{$:1O(Xt+{(,v¢&OAvxI ֔Ļ(<;[Saɂ` 5&ZaVL  >g5{^C z_5\ hz7ɄtɯF[Bh ƚ|ezۡ>DÌzmqK;6 T呱qa#T3xzI،]X[pڍT2ʹ` XmB-0.Σ(q[ 'Mpy[rIz;cA@C;ݝܖ Q1~cƙAd+sV,f:d^WEERehRHCIu 04 Tqwߪ3Z&ÿw{nT`wd3(LlpOwڍҙO93%(dK1CȜ0JJ!;^ABv'`i7r.=gA0 {Rqk ʉ̓̊ibWbrgKVU(N"+0dҏ=J :[96Ef|Pֆ̘ M@#nwEX]Z/+j.?FX?,Z9e)w{#|$߷&jPП\4Z--4lͰdI>]p%Ra>q.@Ԅc|>mapU8h)޽|:|jG֪WFa҂^Z=XZMW_ -@ʅReoXVƸ _A,^wL9Z9A{9UyJ*zZ12iJOMGTBdid( / !}m\/CN%=ifVJq }li2Xj# >EdOz3B١O!j_,3>AP@=! gt??~5-_;\o^nϖ]ո*!8(.^"+΂mͯ;&Km*mRpPuK_ W i HDbk0BWP:._A%6]f(1_mñYh0r0zsr[WN,RRdC,fĶSHTCk4}NMCrKS0VLz9h7vNDO9H- n>GjNr]!gD9Mmn5OWj9+7PaPx'g%֫z>ǽX 7͚-`_Щk]3zVK v8x27|+^hÕ$&mN⁍2r[G1 ՎڙXm"qQcMD(O- Zt@ۖ6sp+NK]-~_h}"Rg7׻U䔱/Wİgzb.18\k1ÙReQS*Ӊ*#NH+vEQ3p^+1`]6d&ydoGGM8/tY9E>ɤV15{RPɋ QYw9l%j2FmTj|%C+.eԝgz$R =&rz2@UQsAŹD8+Sޚ~؍Ű%ݭQge0dnq*kWt)UOrRٟ?Ȁ,KHcs*SӤQ+ AJ D[d'[\9yRd4sH.!9!R2<\f[4ށS! \3urԯl#FCJ OfcS@=:WɏI P3sklbȮMju/_> 5弊mn{z,) 'vON?@e'kGLJbxXdؼ9ˑ*_V-BIpTAKÂ_"[S\J߷@~mL0t 4NuިŽa2&GZ5sjs3Ѐ)pULA ߨd 9[UZ̋> Gv1Y hfxJ܅8IrӷRCK?(^y`G4AY8m6؅t}U}Yu;˙+7u NfW_#ji)~g"D܀:5d)52&HW,~\(nO#% [Jʕ_0ExƖ}0/N4oHMVV1l-ᨼh=)=aLjZp;_gy'|0_ BO3QT%ĥS;yetfLXD8GMa7u!rܒ"P5 J hգT}t/33!B1(4]?8p4q|k}JX[y2 SVERk8⎃U6MI6 k 1=QʟDۅ*[+wk{:MBg˹np;l>[ m!jRnr٦ onbX ׁE\Weq:j\eJYǺnK㘵Ƈyw7" =+V6=>f 7Zb2*$.Ǫ0~,0H2/Nj ΰIWw~E!Ӡ@1Ο K*zku+#Gd;.\ | 튋+1@3 :!A!RP"xV},Lի pR<+p6j,CHIRJMh!_/EdhA׼#/]H{B)[i/Z쑗Wi)ەߗ:Ů[ȑ3>?y0`5Q3)OC4LUܶ}ӣQJIh:Di:R2ܾ頡8)~;fd5Md"/bHY sM/vȞ$^ 2'y^Y+ւW˷Xwdm5XNH5?kCʨ^{V1`r+7ǰcSDAG\CBE" Q8S2vP h Px~!).i 1!ʽ"Mz;BY+\\2M+]<745Xͺa-:~9Wmd)cQP|{Z( u9WT1\)O0W;B#MRoY[.st3JV Rf>A'E[k| =㚵$:(d- bbl/f6MHF <-A:_XH>6gXi0,zFQG?u$}\3{Z bQkX6L q2RB8ǵˢ5Ŧҙf\lx!^{X,MR]iψ%Ozz#d'm\sl]~"-JmuuS,-v!$ZKFΓC=|O%ugDuЁ|' řZntwJP :zfmmU `Y"UIZvkZՉWU VD]nrF7G!Ư͹cLd7t'ܟ5T+Z^̭ў.=5_6 eCUyr7):6 "`j$*BQ60V9lp@7EoPݕ:x ~ 2dX4]γVs@)FSiwKqP{D^&?r]AuO.6"T@"ƬA.3a^IHEJKyZYX#) 7Tu/x$NXrͷzg!.Ad kIbKޣWK g%J%9r<\+=/˖zu_.+Ǝ?90:Kl sǨoc!Eikh#BEFIW`{3in]nMNZЯ8}/$ڙD2tBYʑWoPSĞ>Lև֤JEpb/FPVq~+t"7?X"ЂɔP4NA!8Qo"!yi<#dO9Ky, \"WXJ3*b&  endstream endobj 669 0 obj << /Type /FontDescriptor /FontName /OECWHG+CMBX12 /Flags 4 /FontBBox [-53 -251 1139 750] /Ascent 694 /CapHeight 686 /Descent -194 /ItalicAngle 0 /StemV 109 /XHeight 444 /CharSet (/A/B/C/D/E/F/G/H/I/L/M/N/O/P/Q/R/S/T/U/V/W/Y/a/asterisk/b/c/colon/d/e/eight/exclam/f/ff/fi/five/four/g/h/hyphen/i/k/l/m/n/nine/o/one/p/period/question/quoteleft/quoteright/r/s/seven/six/t/three/two/u/v/w/x/y/z/zero) /FontFile 668 0 R >> endobj 670 0 obj << /Length1 1537 /Length2 7596 /Length3 0 /Length 8617 /Filter /FlateDecode >> stream xڍwTm6RR"H H ݡ0C03tH7ҝ]( Ҡ}{_5k{?kfm=N+X44Tx cfև  p$rp0Ƀ(C @@_P(@ hpTN`"Qy:X-<""BO~dp% BڂQ-A=%WVq[$&rDpA6lOn-@]V_ GԸ =5 P% rqq=u O^pz q :@N'5 RTB#@NV A( 8,PKet ?!,8+ 䠎`'$W}8u6 8YYa6p8UAـ [rJV8x05b Fy!@`Oſ bXm NxDG`Tws jx_O :9xc *FR[)+ uxq8y 0@uwo/ ȟGD'k(W_,P?GϽa;&5`?oZx[7)88ֳaA?-PD-"Nmjc5V֪ A%qA :'?9q[iC _@p8ȯ /j,Qg@""Vu(8YB~$ Z?Wܲ=3uF8}Q,h1M6 WʦOڞ/ n,%Bm]%4"߾"[,)|u \2 OLgT8Njw"^'Wu X?` A( ߭2#)vM'P"޵+[bKYyhvk%dkh6O. ߈hL8CA-V|W V_rQKQy>D#^|Os{uzd5L~&S)#©mE"A~$||J"́OOGѺF*B qYH\ӒgI60\g0p;>&Mf%'mz;A[?țc>GD;o-nfdi .61B_kx :܆>SDhű%0[EiT<99ˊ{DYeM v'EGKj)ۼ6%[},@ăZc4!6xdTzMy,X/}Ha7;/i3>j~O-'ݣNZhtU;wr\Id@Zlޫ%XL}Q-8 `~3Y2, }Y;5eC֟.ӛ+vۥFrs\⯭QSf{nW.KXWސqP^Ò?Z~A螮[(^(]e7u{3OPn(rc8/Ql}E1V";iT<Qkm% 5xKr*;ꍜ#ti8\6j˖_24 7iαQ/btŲtg'FS/"C 8>!gP0;z(`!k~?|Q7F͔f0J*}'JD=(Ti܋筥 U5 \g82/pTs7Z9?اO{1We[Ymp7|Oz#\|J ET0 IO}b1 )FFݝ.Ƈ8I/U~]ݏJN㷦ɔaAi/k ڶ+hͲ_Ӥ:寘?O;^a0)e-!4Yl}#&fQ|w|{^$5J Gjv\|dZ h#jIN9p,.ڞ;JDyç/5KO Z|7~>tTe0Rhz 4cpL34q 6�B`gF@GMUikԞ- ,I>H7pq SLd*3­Zy9ͧ&@Yb">ic]^{~^{*GlíF*slAj{Pps ?Ҕ* ϭ$5H)&٘~$Np.lb4|EEڃF9m8Oi-9*`OLB-OFB*h'yfRq C4*74N?A?J&􏝅clȨ'K~Gx+p0I1bih$zK<+dU䞧_()uUSZOc *D D48.H߈@iES٥5czv4e&V CX | " pW)O.@={utlMg-:|HNo'D[%1J{;LͲ',~J<.@S?^qwzkk R1l5'}ۖd•˷jt ҋf27>w=k"y¤ uQ ><6Ov9Ĵc\K/-oS*"KSw[ vwOKflj|Nڳ"f Aj/G+ qC;QL0 md0dRYZ:t5h7(>@l=mͲ 3yT۹?tNƍ'x;a~bY*?bN*fg70&bPz&xEhG4|X%uHݞZ.MOd{l󭏽wJ/lWe@p-&~J#^'4%/<wykOn{.8zDH$FOyo&Ze..nR,9O" {fKب2#/ V*',_m߷:bAEHg;1uW^\ήwbiFeAN׸t)SoASo ²w3+daUܫr+[ qCL V^Ӆ4M0uV"T'C"$ھzj R j,uGp&^\矣ݧa|h_.wj`G7υޜW$AcasBSb i'1ݸ(p^*F[j_  ?\N)v eeS(X'HlO4fu_ߎu皵-y*L3DlnP-$X i/uƤP[Qz1ʷi wXy]D_/k6_Py L"64L7u8KbYs/{ᭊv{lIM$q@J^o8yߴ `/A|m$ XhML[*+hMr$cc! F y[I9-wVs(8$30^&҃XBjO>H4F4%? 4T L=JOT yMthѱ-9\'VLB&kKaE~)2蓸M HY|m w21]KpBdgW6F<u!8yѨQE$6ۍD|^E#9Ta|2,)Npccw%COcN8F(؅~S"ZH2F\$+ 7 ;{NЭKsfa^)T?mL:dp4^b-WOO^5|s>*]sGQGGb=ffrE2n4q kFPqlCfM|V^Jx-.XI|ٍYmNt\I;HByK~0DhBYplTRDD3;ˈPGI77۪^6uEZSHx#XN$IM↭nh<gcS8KzI^zB 1^&\|/.RK XiuV\-@^@Q,nQ!k'FZ!4\ZL$?^4n-VS"71OC=F!Fm)jumWnoΡٝCQmiqU҂u+ɨPtҗ|L4E_S<.Z1Zd[ҵ`F5nIFj㕽0v8mV b\T-Po^N8Φj@{pJ^N|moVp6?`3&EGgqeR݋Šr*h-]EO#6v`]ֳKN7h< Z⾫>Whvƭjd~L6$`7{p_e_KnQн;0Hƭm)kŞіwZL#pEK"IЂ(W34S.hY_NyMY+i0]h'LuB?վ'}hsqBK'cn*a&s"7M/L Y¹? !j(,qpu_l3ŀ4ezڮKL:pkYN֛5}&IuE