diff -Nru units-2.14/configure units-2.16/configure --- units-2.14/configure 2017-02-25 05:19:17.000000000 +0000 +++ units-2.16/configure 2017-10-31 09:49:14.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for GNU units 2.14. +# Generated by GNU Autoconf 2.69 for GNU units 2.16. # # Report bugs to . # @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='GNU units' PACKAGE_TARNAME='units' -PACKAGE_VERSION='2.14' -PACKAGE_STRING='GNU units 2.14' +PACKAGE_VERSION='2.16' +PACKAGE_STRING='GNU units 2.16' PACKAGE_BUGREPORT='adrianm@gnu.org' PACKAGE_URL='http://www.gnu.org/software/units/' @@ -1251,7 +1251,7 @@ # 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.14 to adapt to many kinds of systems. +\`configure' configures GNU units 2.16 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1318,7 +1318,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GNU units 2.14:";; + short | recursive ) echo "Configuration of GNU units 2.16:";; esac cat <<\_ACEOF @@ -1407,7 +1407,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GNU units configure 2.14 +GNU units configure 2.16 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1822,7 +1822,7 @@ 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.14, which was +It was created by GNU units $as_me 2.16, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -4590,7 +4590,7 @@ # 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.14, which was +This file was extended by GNU units $as_me 2.16, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4645,7 +4645,7 @@ 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.14 +GNU units config.status 2.16 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru units-2.14/configure.ac units-2.16/configure.ac --- units-2.14/configure.ac 2017-02-25 05:16:17.000000000 +0000 +++ units-2.16/configure.ac 2017-10-31 09:49:03.000000000 +0000 @@ -1,7 +1,7 @@ dnl Copyright (C) 2006, 2014, 2017 Free Software Foundation, Inc dnl Process this file with autoconf to produce a configure script. -AC_INIT(GNU units,2.14,adrianm@gnu.org) +AC_INIT(GNU units,2.16,adrianm@gnu.org) AC_PREREQ(2.59) AC_ARG_PROGRAM diff -Nru units-2.14/currency.units units-2.16/currency.units --- units-2.14/currency.units 2017-03-08 23:19:00.000000000 +0000 +++ units-2.16/currency.units 2017-11-01 02:16:31.000000000 +0000 @@ -1,15 +1,31 @@ -# Unicode Currency Names - -!utf8 -icelandkróna icelandkrona -polandzłoty polandzloty -tongapa’anga tongapa'anga -venezuelabolívar venezuelabolivar -vietnamđồng vietnamdong -!endutf8 - # ISO Currency Codes +ATS austriaschilling +BEF belgiumfranc +CYP cypruspound +EEK estoniakroon +FIM finlandmarkka +FRF francefranc +DEM germanymark +GRD greecedrachma +IEP irelandpunt +ITL italylira +LVL latvialat +LTL lithuanialita +LUF luxembourgfranc +MTL maltalira +SKK slovakiakornua +SIT sloveniatolar +ESP spainpeseta +NLG netherlandsguilder +PTE portugalescudo +CVE capeverdeescudo +BGN bulgarialev +BAM bosniaconvertiblemark +KMF comorosfranc +XOF westafricanfranc +XPF cfpfranc +XAF centralafricancfafranc AED uaedirham AFN afghanafghani ALL albanialek @@ -19,10 +35,8 @@ AUD australiadollar AWG arubaflorin AZN azerbaijanmanat -BAM bosniaconvertiblemark BBD barbadosdollar BDT bangladeshtaka -BGN bulgarialev BHD bahraindinar BIF burundifranc BMD bermudadollar @@ -32,18 +46,17 @@ BSD bahamasdollar BTN bhutanngultrum BWP botswanapula -BYR belarusruble +BYN belarusruble +BYR oldbelarusruble BZD belizedollar CAD canadadollar CDF drcfranccongolais CHF swissfranc CLP chilepeso -CMG sintmaartencaribbeanguilder CNY chinayuan COP colombiapeso CRC costaricacolon CUP cubapeso -CVE capeverdeescudo CZK czechkoruna DJF djiboutifranc DKK denmarkkrona @@ -57,7 +70,6 @@ FKP falklandislandspound GBP ukpound GEL georgialari -GGP guernseypound GHS ghanacedi GIP gibraltarpound GMD gambiadalasi @@ -71,19 +83,16 @@ HUF hungariaforint IDR indonesiarupiah ILS israelnewshekel -IMP manxpound INR indiarupee IQD iraqdinar IRR iranrial ISK icelandkrona -JEP jerseypound JMD jamaicadollar JOD jordandinar JPY japanyen KES kenyaschilling KGS kyrgyzstansom KHR cambodiariel -KMF comorosfranc KPW northkoreawon KRW southkoreawon KWD kuwaitdinar @@ -93,8 +102,6 @@ LBP lebanonpound LKR srilankanrupee LRD liberiadollar -LTL lithuanialita -LVL latvialat LYD libyadinar MAD moroccodirham MDL moldovaleu @@ -127,7 +134,7 @@ QAR qatarrial RON romanianewlei RSD serbiadinar -RUB russiarouble +RUB russiaruble RWF rwandafranc SAR saudiarabiariyal SBD solomonislandsdollar @@ -150,195 +157,210 @@ TOP tongapa'anga TRY turkeylira TTD trinidadandtobagodollar -TVD tuvaludollar TWD taiwandollar TZS tanzaniashilling UAH ukrainehryvnia UGX ugandaschilling -USD usdollar +USD unitedstatesdollar UYU uruguaypeso UZS uzbekistansum VEF venezuelabolivar +VEB venezuelaoldbolivar VND vietnamdong VUV vanuatuvatu WST samoatala -XAF centralafricancfafranc XCD eastcaribbeandollar XDR specialdrawingrights -XOF westafricanfranc -XPF cfpfranc YER yemenrial ZAR southafricarand ZMW zambiakwacha ZWL zimbabwedollar -# Currency exchange rates from Time Genie (www.timegenie.com) +# Currency exchange rates from Yahoo Finance (finance.yahoo.com) + +!message Currency exchange rates from finance.yahoo.com on 2017-10-31 + +austriaschilling 1|13.7603 euro +belgiumfranc 1|40.3399 euro +cypruspound 1|0.585274 euro +estoniakroon 1|15.6466 euro # Equal to 1|8 germanymark +finlandmarkka 1|5.94573 euro +francefranc 1|6.55957 euro +germanymark 1|1.95583 euro +greecedrachma 1|340.75 euro +irelandpunt 1|0.787564 euro +italylira 1|1936.27 euro +latvialat 1|0.620550 US$ +lithuanialita 1|3.048700 US$ +luxembourgfranc 1|40.3399 euro +maltalira 1|0.4293 euro +slovakiakornua 1|30.1260 euro +sloveniatolar 1|239.640 euro +spainpeseta 1|166.386 euro +netherlandsguilder 1|2.20371 euro +portugalescudo 1|200.482 euro +capeverdeescudo 1|94.809998 US$ +bulgarialev 1|1.680600 US$ +bosniaconvertiblemark 1|1.683500 US$ +comorosfranc 1|423.399994 US$ +westafricanfranc 1|655.957 euro +cfpfranc 1|119.33 euro +centralafricancfafranc 1|563.330017 US$ +uaedirham 1|3.672500 US$ +afghanafghani 1|68.290001 US$ +albanialek 1|114.349998 US$ +armeniadram 1|482.369995 US$ +angolakwanza 1|165.097000 US$ +argentinapeso 1|17.629000 US$ +australiadollar 1|1.305600 US$ +arubaflorin 1|1.780000 US$ +azerbaijanmanat 1|1.699700 US$ +barbadosdollar 1|2.000000 US$ +bangladeshtaka 1|82.779999 US$ +bahraindinar 1|0.376800 US$ +burundifranc 1|1740.550049 US$ +bermudadollar 1|1.000000 US$ +bruneidollar 1|1.362700 US$ +boliviaboliviano 1|6.860000 US$ +brazilreal 1|3.270700 US$ +bahamasdollar 1|1.000000 US$ +bhutanngultrum 1|64.775002 US$ +botswanapula 1|10.499200 US$ +belarusruble 1|1.950000 US$ +oldbelarusruble 10000 BYN +belizedollar 1|1.997800 US$ +canadadollar 1|1.290260 US$ +drcfranccongolais 1|1565.500000 US$ +swissfranc 1|0.999300 US$ +chilepeso 1|635.950012 US$ +chinayuan 1|6.634500 US$ +colombiapeso 1|3039.800049 US$ +costaricacolon 1|565.630005 US$ +cubapeso 1|1.000000 US$ +czechkoruna 1|22.050900 US$ +djiboutifranc 1|176.830002 US$ +denmarkkrona 1|6.396780 US$ +dominicanrepublicpeso 1|47.029999 US$ +algeriadinar 1|114.959999 US$ +egyptpound 1|17.600000 US$ +eritreanakfa 1|15.280000 US$ +ethiopianbirr 1|27.049999 US$ +euro 1|0.859400 US$ +fijidollar 1|2.075000 US$ +falklandislandspound 1|0.752200 US$ +ukpound 1|0.753260 US$ +georgialari 1|2.601200 US$ +ghanacedi 1|4.388500 US$ +gibraltarpound 1|0.752500 US$ +gambiadalasi 1|47.099998 US$ +guineafranc 1|8897.000000 US$ +guatemalaquetzal 1|7.343000 US$ +guyanadollar 1|204.289993 US$ +hongkongdollar 1|7.801500 US$ +honduraslempira 1|23.452000 US$ +croatiakuna 1|6.460700 US$ +haitigourde 1|61.610001 US$ +hungariaforint 1|267.369995 US$ +indonesiarupiah 1|13590.000000 US$ +israelnewshekel 1|3.516900 US$ +indiarupee 1|64.738998 US$ +iraqdinar 1|1166.000000 US$ +iranrial 1|34954.000000 US$ +icelandkrona 1|105.250000 US$ +jamaicadollar 1|125.879997 US$ +jordandinar 1|0.707500 US$ +japanyen 1|113.870003 US$ +kenyaschilling 1|103.449997 US$ +kyrgyzstansom 1|68.721001 US$ +cambodiariel 1|4042.000000 US$ +northkoreawon 1|900.000000 US$ +southkoreawon 1|1117.000000 US$ +kuwaitdinar 1|0.302100 US$ +caymanislandsdollar 1|0.820000 US$ +kazakhstantenge 1|334.820007 US$ +laokip 1|8295.000000 US$ +lebanonpound 1|1505.699951 US$ +srilankanrupee 1|153.550003 US$ +liberiadollar 1|118.900002 US$ +libyadinar 1|1.371700 US$ +moroccodirham 1|9.500000 US$ +moldovaleu 1|17.264999 US$ +madagascarariary 1|3145.000000 US$ +macedoniadenar 1|52.639999 US$ +myanmarkyat 1|1363.000000 US$ +mongoliatugrik 1|2448.000000 US$ +macaupataca 1|8.035300 US$ +mauritaniaouguiya 1|351.320007 US$ +mauritiusrupee 1|34.150002 US$ +maldiverufiyaa 1|15.570000 US$ +malawikwacha 1|716.150024 US$ +mexicopeso 1|19.164801 US$ +malaysiaringgit 1|4.232000 US$ +mozambicanmetical 1|60.200001 US$ +namibiadollar 1|14.134000 US$ +nigerianaira 1|356.000000 US$ +nicaraguacordobaoro 1|30.330000 US$ +norwaykrone 1|8.175880 US$ +nepalrupee 1|103.550003 US$ +newzealanddollar 1|1.449700 US$ +omanrial 1|0.384800 US$ +panamabalboa 1|1.000000 US$ +perunuevosol 1|3.248500 US$ +papuanewguineakina 1|3.207800 US$ +philippinepeso 1|51.619999 US$ +pakistanrupee 1|105.099998 US$ +polandzloty 1|3.643900 US$ +paraguayguarani 1|5623.000000 US$ +qatarrial 1|3.775600 US$ +romanianewlei 1|3.955400 US$ +serbiadinar 1|102.204498 US$ +russiaruble 1|58.318001 US$ +rwandafranc 1|831.270020 US$ +saudiarabiariyal 1|3.750000 US$ +solomonislandsdollar 1|7.810000 US$ +seychellesrupee 1|13.503000 US$ +sudanpound 1|6.659700 US$ +swedenkrona 1|8.379910 US$ +singaporedollar 1|1.363340 US$ +sainthelenapound 1|0.752500 US$ +sierraleoneleone 1|7620.000000 US$ +somaliaschilling 1|559.000000 US$ +surinamedollar 1|7.380000 US$ +saotome&principedobra 1|21066.199219 US$ +elsalvadorcolon 1|8.750000 US$ +syriapound 1|514.979980 US$ +swazilandlilangeni 1|14.138000 US$ +thailandbaht 1|33.160000 US$ +tajikistansomoni 1|8.803300 US$ +turkmenistanmanat 1|3.410000 US$ +tunisiadinar 1|2.495700 US$ +tongapa'anga 1|2.289000 US$ +turkeylira 1|3.790800 US$ +trinidadandtobagodollar 1|6.724700 US$ +taiwandollar 1|30.163000 US$ +tanzaniashilling 1|2239.000000 US$ +ukrainehryvnia 1|26.870001 US$ +ugandaschilling 1|3644.000000 US$ +unitedstatesdollar US$ +uruguaypeso 1|29.200001 US$ +uzbekistansum 1|8061.000000 US$ +venezuelabolivar 1|9.974500 US$ +venezuelaoldbolivar 1000 VEF +vietnamdong 1|22699.000000 US$ +vanuatuvatu 1|106.190002 US$ +samoatala 1|2.572200 US$ +eastcaribbeandollar 1|2.700000 US$ +specialdrawingrights 1|0.711903 US$ +yemenrial 1|249.949997 US$ +southafricarand 1|14.135100 US$ +zambiakwacha 1|10.000000 US$ +zimbabwedollar 1|322.355011 US$ +bitcoin 6370.11 US$ # From services.packetizer.com/btc -!message Currency exchange rates from www.timegenie.com on 2017-03-08 -uaedirham 1|3.8864644150469 euro -afghanafghani 1|70.791 euro -albanialek 1|135.12 euro -armeniadram 1|515.06121449559 euro -angolakwanza 1|174.93 euro -argentinapeso 1|16.469361751419 euro -australiadollar 1|1.3968 euro -arubaflorin 1|1.889524 euro -azerbaijanmanat 1|1.8778656620483 euro -bosniaconvertiblemark 1|1.95583 euro -barbadosdollar 1|2.1112 euro -bangladeshtaka 1|84.108 euro -bulgarialev 1|1.9558 euro -bahraindinar 1|0.3969056 euro -burundifranc 1|1807.3 euro -bermudadollar 1|1.0556 euro -bruneidollar 1|1.4835 euro -boliviaboliviano 1|7.3447 euro -brazilreal 1|3.3151 euro -bahamasdollar 1|1.0556 euro -bhutanngultrum 1|70.4960 euro -botswanapula 1|11.027 euro -belarusruble 1|2.0139496586786 euro -belizedollar 1|2.1112 euro -canadadollar 1|1.4193 euro -drcfranccongolais 1|1388.2 euro -swissfranc 1|1.0702 euro -chilepeso 1|700.04923682915 euro -sintmaartencaribbeanguilder 1|1.889524 euro -chinayuan 1|7.2953 euro -colombiapeso 1|3152.5498891353 euro -costaricacolon 1|596.19 euro -cubapeso 1|1.0597 euro -capeverdeescudo 1|110.265 euro -czechkoruna 1|27.021 euro -djiboutifranc 1|187.6022876 euro -denmarkkrona 1|7.4335 euro -dominicanrepublicpeso 1|50.044 euro -algeriadinar 1|116.68 euro -egyptpound 1|18.747830279653 euro -eritreanakfa 1|15.834 euro -ethiopianbirr 1|24.225 euro -euro 1.0556 US$ -fijidollar 1|2.1806274748705 euro -falklandislandspound 1|0.86753 euro -ukpound 1|0.86753 euro -georgialari 1|2.6138676607642 euro -guernseypound 1|0.86753 euro -ghanacedi 1|4.9044498102794 euro -gibraltarpound 1|0.86753 euro -gambiadalasi 1|47.13 euro -guineafranc 1|9770.4 euro -guatemalaquetzal 1|8.115296803653 euro -guyanadollar 1|219.57 euro -hongkongdollar 1|8.1982 euro -honduraslempira 1|24.787308228731 euro -croatiakuna 1|7.4213 euro -haitigourde 1|70.728 euro -hungariaforint 1|310.70 euro -indonesiarupiah 1|14144.80 euro -israelnewshekel 1|3.8879 euro -manxpound 1|0.86753 euro -indiarupee 1|70.4960 euro -iraqdinar 1|1268.6 euro -iranrial 1|0.0214 euro -icelandkrona 1|113.04331470335 euro -jerseypound 1|0.86753 euro -jamaicadollar 1|135.6679389313 euro -jordandinar 1|0.7484204 euro -japanyen 1|120.65 euro -kenyaschilling 1|109.04 euro -kyrgyzstansom 1|73.244541940875 euro -cambodiariel 1|4243 euro -comorosfranc 1|491.96775 euro -northkoreawon 1|137.61 euro -southkoreawon 1|1216.36 euro -kuwaitdinar 1|0.32337911505078 euro -caymanislandsdollar 1|0.87966666666667 euro -kazakhstantenge 1|333.51989852545 euro -laokip 1|8692.2 euro -lebanonpound 1|1591.317 euro -srilankanrupee 1|159.2956137679 euro -liberiadollar 1|96.32 euro -lithuanialita 1|3.45280 euro -latvialat 1|0.702804 euro -libyadinar 1|1.5083 euro -moroccodirham 1|10.674174174174 euro -moldovaleu 1|10.51755 euro -madagascarariary 1|3155.8 euro -macedoniadenar 1|61.507 euro -myanmarkyat 1|1436.1616161616 euro -mongoliatugrik 1|0.0280 euro -macaupataca 1|8.444146 euro -mauritaniaouguiya 1|377.88 euro -mauritiusrupee 1|37.651 euro -maldiverufiyaa 1|16.33 euro -malawikwacha 1|767.65 euro -mexicopeso 1|20.7130 euro -malaysiaringgit 1|4.7082 euro -mozambicanmetical 1|74.338 euro -namibiadollar 1|13.7908 euro -nigerianaira 1|334.07 euro -nicaraguacordobaoro 1|31.321 euro -norwaykrone 1|8.9513 euro -nepalrupee 1|112.7936 euro -newzealanddollar 1|1.5219 euro -omanrial 1|0.40587511534912 euro -panamabalboa 1|1.0556 euro -perunuevosol 1|3.4762836185819 euro -papuanewguineakina 1|3.3390191897655 euro -philippinepeso 1|53.198 euro -pakistanrupee 1|110.22829728906 euro -polandzloty 1|4.3130 euro -paraguayguarani 1|5801.9 euro -qatarrial 1|3.842384 euro -romanianewlei 1|4.5503 euro -serbiadinar 1|123.60210125511 euro -russiarouble 1|61.7573 euro -rwandafranc 1|868.69 euro -saudiarabiariyal 1|3.9585 euro -solomonislandsdollar 1|8.2287541882425 euro -seychellesrupee 1|14.135 euro -sudanpound 1|6.77 euro -swedenkrona 1|9.5223 euro -singaporedollar 1|1.4947 euro -sainthelenapound 1|0.86753 euro -sierraleoneleone 1|7762.7 euro -somaliaschilling 1|613.04 euro -surinamedollar 1|7.9933 euro -saotome&principedobra 1|24541 euro -elsalvadorcolon 1|9.2482 euro -syriapound 1|545.13 euro -swazilandlilangeni 1|13.7908 euro -thailandbaht 1|37.236 euro -tajikistansomoni 1|8.4641477547079 euro -turkmenistanmanat 1|3.7038843499084 euro -tunisiadinar 1|2.4400205937875 euro -tongapa'anga 1|2.2717027109351 euro -turkeylira 1|3.9434 euro -trinidadandtobagodollar 1|6.5980278 euro -tuvaludollar 1|1.3968 euro -taiwandollar 1|32.655029857602 euro -tanzaniashilling 1|2368.4 euro -ukrainehryvnia 1|19.241014210086 euro -ugandaschilling 1|3804.3 euro -uruguaypeso 1|29.912 euro -uzbekistansum 1|3602.5175543757 euro -venezuelabolivar 1|10.547477744807 euro -vietnamdong 1|24098.305084746 euro -vanuatuvatu 1|113.69326835212 euro -samoatala 1|2.6460554371002 euro -centralafricancfafranc 1|655.957 euro -eastcaribbeandollar 1|2.85012 euro -specialdrawingrights 1|1.9241014210086 euro -westafricanfranc 1|655.957 euro -cfpfranc 1|119.33 euro -yemenrial 1|265.08 euro -southafricarand 1|13.7908 euro -zambiakwacha 1|10.067 euro -zimbabwedollar 1|353.62 euro +# Precious metals prices from Packetizer (services.packetizer.com/spotprices) -# Precious metals prices from http://services.packetizer.com/spotprices/ +platinumprice 920.00 US$/troyounce +silverprice 16.72 US$/troyounce +goldprice 1271.05 US$/troyounce -goldprice 1216.05 US$/troyounce -platinumprice 961.75 US$/troyounce -silverprice 17.51 US$/troyounce diff -Nru units-2.14/debian/changelog units-2.16/debian/changelog --- units-2.14/debian/changelog 2017-06-19 20:52:17.000000000 +0000 +++ units-2.16/debian/changelog 2017-11-02 21:55:45.000000000 +0000 @@ -1,3 +1,19 @@ +units (2.16-1) unstable; urgency=medium + + * New upstream release. + + -- Stephen Kitt Thu, 02 Nov 2017 22:55:45 +0100 + +units (2.15-1) unstable; urgency=medium + + * New upstream release, using python3-requests instead of + python3-unidecode. + * Switch to a secured URL in debian/watch. + * Standards-Version 4.1.1, no further change required. + * Clean up debian/changelog whitespace. + + -- Stephen Kitt Sun, 29 Oct 2017 20:29:18 +0100 + units (2.14-1) unstable; urgency=medium * New upstream release. @@ -134,12 +150,12 @@ units (1.88-1) unstable; urgency=low * New upstream release - + Closes: #629926: Temperature units are not correctly converted Closes: #642973: currency exchange rates should be updated - + -- John G. Hasler Tue, 19 Jun 2012 20:16:52 -0500 - + units (1.87-2) unstable; urgency=low * Deleted debian/prerm, fixed debian/postinst and postrm. @@ -149,61 +165,60 @@ * Replaced "more" with "/usr/bin/pager" at line 55 in units.c Closes: #548597: Please use /usr/bin/pager as default pager - + -- John G. Hasler Wed, 07 Oct 2009 21:34:00 -0500 units (1.87-1) unstable; urgency=low * New upstream release - + Upstream made "*" and "/" the same precedence. - Closes: #359658: units: precedence of '/' is bad - + Closes: #359658: units: precedence of '/' is bad + Units reads ~/.units.dat if it exists before reading the standard units database. - Closes: #456544: units: $UNITSFILE doesn't override default anymore - + Closes: #456544: units: $UNITSFILE doesn't override default anymore + -- John Hasler Sun, 20 Jul 2008 21:54:50 -0500 units (1.86a-1) unstable; urgency=low * New upstream release - + Upstream has changed this section: we now have usbillion and - brbillion. Elsewhere billion is defined as usbillion. Perhaps + brbillion. Elsewhere billion is defined as usbillion. Perhaps in the future this could be made to depend on locale. Closes: #165946: units: Confusing information in units.dat - + Upstream added a "help" command that searches the database. Closes: #375255: units: wishlist (finding the "unit") - + Closes: #370224: crochet is spelled crotchet - + * 'install -s' now only used if 'nostrip' is not in DEB_BUILD_OPTIONS. Closes: #438233: units: not handling nostrip build option (policy 10.1) * Fixed menu entry. - + * Fixed parallel build problem by consolidating all "install -d" commands in debian/rules into one line. - - + -- John Hasler Sun, 2 Dec 2007 21:46:50 -0600 units (1.85-3) unstable; urgency=low * Fixed typo in control file - + * Added missing build-depends on texinfo Closes: #340850: FTBFS: makeinfo: Command not found - + -- John Hasler Wed, 21 Dec 2005 21:10:54 -0600 units (1.85-2) unstable; urgency=low * Fixed calling of configure script in rules. Closes: #340850: FTBFS: makeinfo: Command not found - + * Upstream changed handling of imperial units (didn't notice earlier). Closes: #259411: Mile incorrectly related to other imperial units @@ -217,18 +232,18 @@ Closes: #266752 -V: doubled slash Closes: #233472 suggest cdromspeed and dvdspeed units Closes: #204473 "nmi" should be "nauticalmile", not "nanomile" [patch] - + * Fixed build dependencies. Closes: #326284 please rebuild with libreadline5-dev as build dependency Closes: #322941 switch to libreadline5 - + * Fixed typos. Closes: #302822 'man units' typos: "Fahrehneit" and "accomodates" - + * Corrected FSF address. - + * Put missing quotes in menu, moved menu to /usr/share. - + -- John Hasler Tue, 22 Nov 2005 21:33:27 -0600 units (1.81-4) unstable; urgency=low @@ -360,7 +375,7 @@ * New upstream version. * Uses pristine upstream source. * Compile with -g, strip on install. - * Minor update to postinst. prerm removed and replaced by a more + * Minor update to postinst. prerm removed and replaced by a more intelligent postrm. * Minor fixes to copyright file. * Added a menu entry. @@ -370,7 +385,7 @@ units (1.53-3) unstable; urgency=low - * Rebuilt with libc6. + * Rebuilt with libc6. -- James Troup Wed, 25 Jun 1997 18:54:32 +0100 @@ -380,7 +395,7 @@ arguments. Patch from Mark Baker . * Extended units.dat, patch from Mark Baker :- eushot, thou, ecu, unitedkingdompound, unitedstatesdollar, - British currency (shilling, oldpence, quid, fiver, tenner), + British currency (shilling, oldpence, quid, fiver, tenner), English spellings of aluminum and sulfur, ISO currency codes (+ UKP). * Correct Section: in debian/control (misc -> utils). diff -Nru units-2.14/debian/control units-2.16/debian/control --- units-2.14/debian/control 2017-06-19 20:51:14.000000000 +0000 +++ units-2.16/debian/control 2017-10-26 17:06:40.000000000 +0000 @@ -7,7 +7,7 @@ libreadline-dev, python3, texinfo -Standards-Version: 3.9.8 +Standards-Version: 4.1.1 Vcs-Browser: https://anonscm.debian.org/cgit/collab-maint/units.git Vcs-Git: https://anonscm.debian.org/git/collab-maint/units.git Homepage: https://www.gnu.org/software/units/ @@ -16,7 +16,7 @@ Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} -Recommends: python3-unidecode +Recommends: python3-requests Description: converts between different systems of units GNU 'units' program converts quantities expressed in various scales to their equivalents in other scales. The 'units' program can only @@ -25,4 +25,5 @@ temperature to Celsius temperature. . This package includes the units_cur script to update currency - conversion information; this script requires a Python 3 interpreter. + conversion information; this script requires a Python 3 interpreter + and the python3-requests library. diff -Nru units-2.14/debian/copyright units-2.16/debian/copyright --- units-2.14/debian/copyright 2015-10-18 17:59:11.000000000 +0000 +++ units-2.16/debian/copyright 2017-10-25 20:54:10.000000000 +0000 @@ -1,9 +1,9 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: units -Source: http://www.gnu.org/software/units/ +Source: https://www.gnu.org/software/units/ Files: * -Copyright: 1984-2015 Free Software Foundation, Inc. +Copyright: 1984-2017 Free Software Foundation, Inc. License: GPL-3+ Files: getopt.h @@ -11,13 +11,13 @@ License: GPL-2+ Files: units.info units.pdf units.texinfo units.txt -Copyright: 1996-2015 Free Software Foundation, Inc. +Copyright: 1996-2017 Free Software Foundation, Inc. License: GFDL-1.3+ Files: debian/* Copyright: 1997-1998 James Troup 1999-2012 John G. Hasler - 2013-2015 Stephen Kitt + 2013-2017 Stephen Kitt License: GPL-2+ License: GPL-2+ diff -Nru units-2.14/debian/patches/manpage-typos.patch units-2.16/debian/patches/manpage-typos.patch --- units-2.14/debian/patches/manpage-typos.patch 2017-06-19 20:50:03.000000000 +0000 +++ units-2.16/debian/patches/manpage-typos.patch 2017-10-26 09:39:52.000000000 +0000 @@ -1,4 +1,4 @@ -Description: Correct the documentation for -H +Description: Correct the documentation for -H, and other typos Author: Stephen Kitt Bug-Debian: https://bugs.debian.org/803679 @@ -15,3 +15,12 @@ Instruct @command{units} to save history to @var{filename}, so that a record of your commands is available for retrieval across different @command{units} invocations. To prevent the history from being saved +@@ -3274,7 +3274,7 @@ + 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, ++The environment variables can be controlled 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 diff -Nru units-2.14/debian/patches/series units-2.16/debian/patches/series --- units-2.14/debian/patches/series 2016-06-26 13:26:09.000000000 +0000 +++ units-2.16/debian/patches/series 2017-10-26 09:35:35.000000000 +0000 @@ -2,4 +2,4 @@ reproducible.patch no-currency-update.patch manpage-typos.patch -units_cur3-python3.patch +units_cur-python3.patch diff -Nru units-2.14/debian/patches/units_cur3-python3.patch units-2.16/debian/patches/units_cur3-python3.patch --- units-2.14/debian/patches/units_cur3-python3.patch 2017-06-19 20:50:08.000000000 +0000 +++ units-2.16/debian/patches/units_cur3-python3.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,14 +0,0 @@ -Description: Use /usr/bin/python3 for units_cur3 -Author: Stephen Kitt - ---- a/configure.ac -+++ b/configure.ac -@@ -157,7 +157,7 @@ - fi - - --AC_PATH_PROG(PYTHON, python, no) -+AC_PATH_PROG(PYTHON, python3, no) - - if test $PYTHON = no; then - HAVE_PYTHON=no diff -Nru units-2.14/debian/patches/units_cur-python3.patch units-2.16/debian/patches/units_cur-python3.patch --- units-2.14/debian/patches/units_cur-python3.patch 1970-01-01 00:00:00.000000000 +0000 +++ units-2.16/debian/patches/units_cur-python3.patch 2017-10-26 09:37:03.000000000 +0000 @@ -0,0 +1,14 @@ +Description: Use /usr/bin/python3 for units_cur +Author: Stephen Kitt + +--- a/configure.ac ++++ b/configure.ac +@@ -157,7 +157,7 @@ + fi + + +-AC_PATH_PROG(PYTHON, python, no) ++AC_PATH_PROG(PYTHON, python3, no) + + if test $PYTHON = no; then + HAVE_PYTHON=no diff -Nru units-2.14/debian/watch units-2.16/debian/watch --- units-2.14/debian/watch 2015-10-18 17:53:09.000000000 +0000 +++ units-2.16/debian/watch 2017-10-25 19:10:56.000000000 +0000 @@ -1,3 +1,3 @@ version=3 opts=uversionmangle=s/(\d)[_\.\-\+]?((RC|rc|pre|dev|beta|alpha|b|a)[\-\.]?\d*)$/$1~$2/,dversionmangle=s/\+(debian|dfsg|ds|deb)\d*$//,pgpsigurlmangle=s/$/.sig/ \ -ftp://ftp.gnu.org/gnu/units/ (?:.*/)?units[_\-\.]?(\d\S*)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz)) +https://ftp.gnu.org/gnu/units/ (?:.*/)?units[_\-\.]?(\d\S*)\.(?:tgz|tbz2|txz|tar\.(?:gz|bz2|xz)) diff -Nru units-2.14/definitions.units units-2.16/definitions.units --- units-2.14/definitions.units 2017-03-08 23:14:16.000000000 +0000 +++ units-2.16/definitions.units 2017-10-31 00:03:42.000000000 +0000 @@ -2,7 +2,7 @@ # This file is the units database for use with GNU units, a units conversion # program by Adrian Mariano adrianm@gnu.org # -# March 2017 Version 2.16 +# October 2017 Version 2.19 # # Copyright (C) 1996-2002, 2004-2017 # Free Software Foundation, Inc @@ -607,9 +607,13 @@ katal mol/sec # Measure of the amount of a catalyst. One kat katal # katal of catalyst enables the reaction # to consume or produce on mol/sec. -solarluminosity 384.6e24 W # A common yardstick for comparing the +solarluminosity 382.8e24 W # A common yardstick for comparing the # output of different stars. # http://nssdc.gsfc.nasa.gov/planetary/factsheet/sunfact.html +# at mean earth-sun distance +solarirradiance solarluminosity / (4 pi sundist^2) +solarconstant solarirradiance +TSI solarirradiance # total solar irradiance # # time @@ -1791,6 +1795,11 @@ moondist 3.844e8 m # mean earth-moon distance sundist_near 1.471e11 m # earth-sun distance at perihelion sundist_far 1.521e11 m # earth-sun distance at aphelion +moondist_min 3.564e8 m # approximate least distance at + # perigee 1901-2300 +moondist_max 4.067e8 m # approximate greatest distance at + # apogee 1901-2300 + # The following are masses for planetary systems, not just the planet itself. # The comments give the uncertainty in the denominators. As noted above, @@ -1810,7 +1819,7 @@ neptunemass solarmass / 19412.24 # 0.04 plutomass solarmass / 1.35e8 # 0.07e8 -moonearthmassratio 0.012300034 # uncertainty 3 x 10-9 +moonearthmassratio 0.012300034 # uncertainty 3e-9 earthmass earthmoonmass / ( 1 + moonearthmassratio) moonmass moonearthmassratio earthmass @@ -1841,6 +1850,211 @@ moongravity 1.62 m/s^2 +# The Hubble constant gives the speed at which distance galaxies are moving +# away from the earth according to v = H0*d, where H0 is the hubble constant +# and d is the distance to the galaxy. + +hubble 70 km/s/Mpc # approximate +H0 hubble + +# Parallax is the angular difference between the topocentric (on Earth's +# surface) and geocentric (at Earth's center) direction toward a celestial body +# when the body is at a given altitude. When the body is on the horizon, the +# parallax is the horizontal parallax; when the body is on the horizon and the +# observer is on the equator, the parallax is the equatorial horizontal +# parallax. When the body is at zenith, the parallax is zero. + +lunarparallax asin(earthradius_equatorial / moondist) # Moon equatorial +moonhp lunarparallax # horizontal parallax + # at mean distance + +# Light from celestial objects is attenuated by passage through Earth's +# atmosphere. A body near the horizon passes through much more air than an +# object at zenith, and is consequently less bright. Air mass is the ratio of +# the length of the optical path at a given altitude (angle above the horizon) +# to the length at zenith. Air mass at zenith is by definition unity; at the +# horizon, air mass is approximately 38, though the latter value can vary +# considerably with atmospheric conditions. The general formula is # E = E0 +# exp(-c X), where E0 is the value outside Earth's atmosphere, E is the value +# seen by an observer, X is the air mass and c is the extinction coefficient. +# A common value for c in reasonably clear air is 0.21, but values can be +# considerably greater in urban areas. Apparent altitude is that perceived by +# an observer; it includes the effect of atmospheric refraction. There is no +# shortage of formulas for air mass +# (https://en.wikipedia.org/wiki/Air_mass_(astronomy)); all are subject to +# variations in local atmospheric conditions. The formula used here is simple +# and is in good agreement with rigorously calculated values under standard +# conditions. +# +# Extraterrestrial illuminance or luminance of an object at a given altitude +# determined with vmag() or SB_xxx() below can be multiplied by +# atm_transmission() or atm_transmissionz() to estimate the terrestrial value. +# +# Kasten and Young (1989) air mass formula. alt is apparent altitude +# Reference: +# Kasten, F., and A.T. Young. 1989. "Revised Optical Air Mass Tables +# and Approximation Formula." Applied Optics. Vol. 28, 4735–4738. +# Bibcode:1989ApOpt..28.4735K. doi:10.1364/AO.28.004735. + +airmass(alt) units=[degree;1] domain=[0,90] noerror \ + 1 / (sin(alt) + 0.50572 (alt / degree + 6.07995)^-1.6364) + +# zenith is apparent zenith angle (zenith = 90 deg - alt) +airmassz(zenith) units=[degree;1] domain=[0,90] noerror \ + 1 / (cos(zenith) + 0.50572 (96.07995 - zenith / degree)^-1.6364) + +# For reasonably clear air at sea level; values may need adjustment for +# elevation and local atmospheric conditions +# for scotopic vision (510 nm), appropriate for the dark-adapted eye +# extinction_coeff 0.26 +# for photopic vision, appropriate for observing brighter objects such +# as the full moon +extinction_coeff 0.21 + +atm_transmission(alt) units=[degree;1] domain=[0,90] noerror \ + exp(-extinction_coeff airmass(alt)) + +# in terms of zenith angle (zenith = 90 deg - alt) +atm_transmissionz(zenith) units=[degree;1] domain=[0,90] noerror \ + exp(-extinction_coeff airmassz(zenith)) + +# Moon and Sun data at mean distances +moonvmag -12.74 # Moon apparent visual magnitude at mean distance +sunvmag -26.74 # Sun apparent visual magnitude at mean distance +moonsd asin(moonradius / moondist) # Moon angular semidiameter at mean distance +sunsd asin(sunradius / sundist) # Sun angular semidiameter at mean distance + +# Visual magnitude of star or other celestial object. The system of stellar +# magnitudes, developed in ancient Greece, assigned magnitudes from 1 +# (brightest) to 6 (faintest visible to the naked eye). In 1856, British +# astronomer Norman Pogson made the system precise, with a magnitude 1 object +# 100 times as bright as a magnitude 6 object, and each magnitude differing +# from the next by a constant ratio; the ratio, sometimes known as Pogson's +# ratio, is thus 100^0.2, or approximately 2.5119. The logarithm of 100^0.2 is +# 0.4, hence the common use of powers of 10 and base-10 logarithms. +# +# Reference: +# Allen, C.W. 1976. Astrophysical Quantities, 3rd ed. 1973, reprinted +# with corrections, 1976. London: Athlone. +# +# The function argument is the (dimensionless) visual magnitude; reference +# illuminance of 2.54e-6 lx is from Allen (2000, 21), and is for outside +# Earth's atmosphere. Illuminance values can be adjusted to terrestrial values +# by multiplying by one of the atm_transmission functions above. + +# Illuminance from apparent visual magnitude +vmag(mag) units=[1;lx] domain=[,] range=(0,] \ + 2.54e-6 lx 10^(-0.4 mag); -2.5 log(vmag / (2.54e-6 lx)) + +# Surface brightness of a celestial object of a given visual magnitude +# is a logarithmic measure of the luminance the object would have if its +# light were emitted by an object of specified solid angle; it is +# expressed in magnitudes per solid angle. Surface brightness can be +# obtained from the visual magnitude by +# S = m + 2.5 log(pi pi k a b), +# where k is the phase (fraction illuminated), a is the equatorial +# radius, and b is the polar radius. For 100% illumination (e.g., full +# moon), this is often simplified to +# S = m + 2.5 log(pi k s^2), +# where s is the object's angular semidiameter; the units of s determine +# the units of solid angle. The visual magnitude and semidiameter must +# be appropriate for the object's distance; for other than 100% +# illumination, the visual magnitude must be appropriate for the phase. +# Luminance values are for outside Earth's atmosphere; they can be +# adjusted to terrestrial values by multiplying by one of the atm_transmission +# functions above. + +# luminance from surface brightness in magnitudes per square degree +SB_degree(sb) units=[1;cd/m^2] domain=[,] range=(0,] \ + vmag(sb) / squaredegree ; \ + ~vmag(SB_degree squaredegree) + +# luminance from surface brightness in magnitudes per square minute +SB_minute(sb) units=[1;cd/m^2] domain=[,] range=(0,] \ + vmag(sb) / squareminute ; \ + ~vmag(SB_minute squareminute) + +# luminance from surface brightness in magnitudes per square second +SB_second(sb) units=[1;cd/m^2] domain=[,] range=(0,] \ + vmag(sb) / squaresecond ; \ + ~vmag(SB_second squaresecond) + +# luminance from surface brightness in magnitudes per steradian +SB_sr(sb) units=[1;cd/m^2] domain=[,] range=(0,] \ + vmag(sb) / sr ; \ + ~vmag(SB_sr sr) + +SB() SB_second +SB_sec() SB_second +SB_min() SB_minute +SB_deg() SB_degree + +# The brightness of one tenth-magnitude star per square degree outside +# Earth's atmosphere; often used for night sky brightness. +S10 SB_degree(10) + +# Examples for magnitude and surface brightness functions +# Sun illuminance from visual magnitude +# You have: sunvmag +# You want: +# Definition: -26.74 = -26.74 +# You have: vmag(sunvmag) +# You want: lx +# * 126134.45 +# / 7.9280482e-06 +# +# Moon surface brightness from visual magnitude and semidiameter at 100% +# illumination (full moon): +# You have: moonvmag +# You want: +# Definition: -12.74 = -12.74 +# You have: moonsd +# You want: arcsec +# * 932.59484 +# / 0.001072277 +# You have: moonvmag + 2.5 log(pi 932.59484^2) +# You want: +# Definition: 3.3513397 +# +# Similar example with specific data obtained from another source (JPL +# Horizons, https://ssd.jpl.nasa.gov/horizons.cgi); semidiameter is in +# arcseconds +# +# You have: -12.9 + 2.5 log(pi 2023.201|2^2) +# You want: +# Definition: 3.3679199 +# You have: SB_second(-12.9 + 2.5 log(pi 2023.201|2^2)) +# You want: +# Definition: 4858.6547 cd / m^2 +# +# If surface brightness is provided by another source (e.g., Horizons), +# it can simply be used directly: +# You have: SB_second(3.3679199) +# You want: cd/m^2 +# * 4858.6546 +# / 0.0002058183 +# The illuminance and luminance values are extraterrestrial (outside +# Earth's atmosphere). The values at Earth's surface are less than these +# because of atmospheric extinction. For example, in the last example +# above, if the Moon were at an altitude of 55 degrees, the terrestrial +# luminance could be calculated with +# You have: SB_second(3.3679199) +# You want: cd/m^2 +# * 4858.6546 +# / 0.0002058183 +# You have: _ atm_transmission(55 deg) +# You want: cd/m^2 +# * 3760.6356 +# / 0.0002659125 +# If desired, photographic exposure can be determined with EV100(), +# leading to acceptable combinations of aperture and exposure time. +# For the example above, but with the Moon at 10 degrees, +# You have: SB_second(3.3679199) atm_transmission(10 deg) +# You want: EV100 +# 13.553962 + + + # # The Hartree system of atomic units, derived from fundamental units # of mass (of electron), action (planck's constant), charge, and @@ -3887,7 +4101,6 @@ # generally given in US$. # -unitedstatesdollar US$ usdollar US$ $ dollar mark germanymark @@ -3913,31 +4126,20 @@ poundsterling britainpound yuan chinayuan -# Some European currencies have permanent fixed exchange rates with -# the Euro. These rates were taken from the EC's web site: -# http://ec.europa.eu/economy_finance/euro/adoption/conversion/index_en.htm - -austriaschilling 1|13.7603 euro -belgiumfranc 1|40.3399 euro -estoniakroon 1|15.6466 euro # Equal to 1|8 germanymark -finlandmarkka 1|5.94573 euro -francefranc 1|6.55957 euro -germanymark 1|1.95583 euro -greecedrachma 1|340.75 euro -irelandpunt 1|0.787564 euro -italylira 1|1936.27 euro -luxembourgfranc 1|40.3399 euro -netherlandsguilder 1|2.20371 euro -portugalescudo 1|200.482 euro -spainpeseta 1|166.386 euro -cypruspound 1|0.585274 euro -maltalira 1|0.429300 euro -sloveniatolar 1|239.640 euro -slovakiakoruna 1|30.1260 euro +# Unicode Currency Names + +!utf8 +icelandkróna icelandkrona +polandzłoty polandzloty +tongapa’anga tongapa'anga +venezuelabolívar venezuelabolivar +vietnamđồng vietnamdong +mongoliatögrög mongoliatugrik +sãotomé&príncipedobra saotome&principedobra +!endutf8 UKP GBP # Not an ISO code, but looks like one, and # sometimes used on usenet. -VEB 1|1000 VEF # old venezuelan bolivar !include currency.units @@ -3947,7 +4149,10 @@ olddollargold 23.22 grains goldprice # Used until 1934 newdollargold 96|7 grains goldprice # After Jan 31, 1934 dollargold newdollargold -poundgold 113 grains goldprice +poundgold 113 grains goldprice # British pound + +# Precious metals + goldounce goldprice troyounce silverounce silverprice troyounce platinumounce platinumprice troyounce @@ -3963,7 +4168,8 @@ USdimeweight US$ 0.10 / (20 US$ / lb) # Since 1965 USquarterweight US$ 0.25 / (20 US$ / lb) # Since 1965 UShalfdollarweight US$ 0.50 / (20 US$ / lb) # Since 1971 -USdollarmass 8.1 grams +USdollarweight 8.1 grams # Weight of Susan B. Anthony and + # Sacagawea dollar coins # British currency @@ -4005,6 +4211,11 @@ loony 1 canadadollar # This coin depicts a loon toony 2 canadadollar +# Cryptocurrency + +satoshi 1e-8 bitcoin +XBT bitcoin # nonstandard code + # # Units used for measuring volume of wood # @@ -4278,6 +4489,13 @@ psig(x) units=[1;Pa] domain=[-14.6959487755135,) range=[0,) \ gaugepressure(x psi) ; ~gaugepressure(psig) / psi + +# Pressure for underwater diving + +seawater 0.1 bar / meter +msw meter seawater +fsw foot seawater + # # Wire Gauge # @@ -4505,8 +4723,9 @@ # # Screw sizes # -# In the USA, screw diameters are reported using a gauge number. -# Metric screws are reported as Mxx where xx is the diameter in mm. +# In the USA, screw diameters for both wood screws and machine screws +# are reported using a gauge number. Metric machine screws are +# reported as Mxx where xx is the diameter in mm. # screwgauge(g) units=[1;m] range=[0,) \ @@ -5537,6 +5756,19 @@ pfund 500 g # +# Swedish (Sweden) pre-metric units of 1739. +# The metric system was adopted in 1878. +# https://sv.wikipedia.org/wiki/Verkm%C3%A5tt +# + +verklinje 2.0618125 mm +verktum 12 verklinje +kvarter 6 verktum +fot 2 kvarter +aln 2 fot +famn 3 aln + +# # Some traditional Russian measures # # If you would like to help expand this section and understand @@ -6126,7 +6358,6 @@ # U+2151- 1|9 flagged as invalid UTF8. # U+2152- 1|10 ℯ exp(1) # U+212F, base of natural log - µ- micro # micro sign U+00B5 μ- micro # small mu U+03BC ångström angstrom @@ -6142,15 +6373,6 @@ ℉ degF K K # Kelvin symbol, U+212A ℓ liter # unofficial abbreviation used in some places -¢ cent -£ britainpound -¥ japanyen -€ euro -₩ southkoreawon -₪ israelnewshekel -₤ lira -₨ rupee - Ω ohm # Ohm symbol U+2126 Ω ohm # Greek capital omega U+03A9 ℧ mho @@ -6166,6 +6388,45 @@ ″ " # U+2033 # +# Unicode currency symbols +# + +¢ cent +£ britainpound +¥ japanyen +€ euro +₩ southkoreawon +₪ israelnewshekel +₤ lira +₺ turkeylira +₨ rupee # unofficial legacy rupee sign +₹ indiarupee # official rupee sign +؋ afghanafghani +฿ thailandbaht +₡ elsalvadorcolon # Also costaricacolon +₣ francefranc +₦ nigerianaira +₧ spainpeseta +₫ vietnamdong +₭ laokip +₮ mongoliatugrik +₯ greecedrachma +₱ philippinepeso +₲ paraguayguarani +₴ ukrainehryvnia +₵ ghanacedi +₸ kazakhstantenge +₼ azerbaijanmanat +₽ russiaruble +₾ georgialari +﷼ iranrial +﹩ $ +¢ ¢ +£ £ +¥ ¥ +₩ ₩ + +# # Square unicode symbols starting at U+3371 # diff -Nru units-2.14/Makefile.in units-2.16/Makefile.in --- units-2.14/Makefile.in 2017-02-25 05:16:17.000000000 +0000 +++ units-2.16/Makefile.in 2017-10-03 21:30:43.000000000 +0000 @@ -79,7 +79,7 @@ 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 install-sh \ - units.man NEWS texi2man INSTALL units.pdf units_cur2 units_cur3 \ + units.man NEWS texi2man INSTALL units.pdf units_cur \ parse.tab.c parse.y units.h locale_map.txt fdl-1.3.texi currency.units \ unitsfile.ico unitsprog.ico units.rc icon_ms.png \ Makefile.OS2 makeobjs.cmd README.OS2 \ @@ -98,37 +98,8 @@ units@EXEEXT@: $(OBJECTS) @MKS_RES@ $(CC) $(CFLAGS) $(LDFLAGS) -o units@EXEEXT@ $(OBJECTS) @MKS_RES@ $(LIBS) -units_cur: units_cur2 units_cur3 - @if test $(HAVE_PYTHON) = no; then \ - $(MAKE) units_cur_dummy; \ - else \ - version=`$(PYTHON) --version 2>&1`; \ - if echo $$version | grep 'Python 2' >/dev/null; then \ - cp $(srcdir)/units_cur2 units_cur; \ - echo Creating units_cur for Python 2; \ - elif echo $$version | grep 'Python 3'>/dev/null; then \ - cp $(srcdir)/units_cur3 units_cur; \ - echo Creating units_cur for Python 3; \ - else \ - echo Unrecognized Python version: $$version; \ - echo Unable to create correct units_cur; \ - exit 1; \ - fi; \ - fi - -units_cur_dummy: - echo '\#!/bin/sh' > units_cur - echo 'echo Units_cur requires python, which was not found when units was configured' >> units_cur - chmod +x units_cur - -units_cur3: units_cur2 - -mkdir python3_tempdir - 2to3 --no-diffs -n -o python3_tempdir -w units_cur2 - mv python3_tempdir/units_cur2 units_cur3 - rm -rf python3_tempdir - units_cur_inst: units_cur - sed -e "s@outfile = 'currency.units'@outfile='@UDAT@currency.units'@"\ + sed -e "s@outfile_name = 'currency.units'@outfile_name='@UDAT@currency.units'@"\ -e "s@/usr/bin/python@$(PYTHON)@" \ units_cur > units_cur_inst @@ -216,7 +187,7 @@ else true; fi clean mostlyclean: texclean - -rm -f *.@OBJEXT@ *.res units@EXEEXT@ units.dvi units.1 distname .chk units_cur_inst units_cur + -rm -f *.@OBJEXT@ *.res units@EXEEXT@ units.dvi units.1 distname .chk units_cur_inst -rm -rf wwwold wwwnew distclean: clean @@ -247,7 +218,7 @@ -rm -f `cat distname`.directive distname -dist: $(DISTFILES) units_cur +dist: $(DISTFILES) @./units_cur @echo Updated currencies, running check: ./units -f definitions.units -c diff -Nru units-2.14/Makefile.Win units-2.16/Makefile.Win --- units-2.14/Makefile.Win 2016-06-07 01:26:06.000000000 +0000 +++ units-2.16/Makefile.Win 2017-10-20 00:22:08.000000000 +0000 @@ -1,7 +1,7 @@ # Makefile for units, a program for units conversion # created for Microsoft Visual C/C++ under Microsoft Windows(R) # -# Copyright (C) 1996, 1997, 1999, 2005, 2006, 2012, 2013, 2014 +# Copyright (C) 1996, 1997, 1999, 2005, 2006, 2012, 2013, 2014, 2017 # Free Software Foundation, Inc # # This program is free software; you can redistribute it and/or modify @@ -28,8 +28,8 @@ # Change these to suit the system configuration # Normal location on 32-bit system -# Normal location for 32-bit executable on 64-bit system # ProgFilesDir = %ProgramFiles% +# Normal location for 32-bit executable on 64-bit system ProgFilesDir = %ProgramFiles(x86)% bindir = "$(ProgFilesDir)\GNU\units" @@ -53,6 +53,8 @@ UDEFS = /DUNITSFILE=\"definitions.units\" /DLOCALEMAP=\"locale_map.txt\" RES = units.res +all: units.exe units_cur.py + units.exe: $(OBJS) $(RES) $(CC) $(CFLAGS) $(CDEFS) $(UDEFS) $(OBJS) $(RES) $(LIBS) @@ -72,17 +74,14 @@ del /f/q parse.obj rename parse.tab.obj parse.obj +units_cur.py: units_cur + copy units_cur units_cur.py + showdest: @echo datadir=$(datadir) & echo bindir=$(bindir) @if not exist "$(ProgFilesDir)" \ echo '$(ProgFilesDir)' does not exist and will be created -currency2: - copy /y units_cur2 units_cur.py - -currency3: - copy /y units_cur3 units_cur.py - install: units.exe $(srcdir)\winmkdirs $(bindir) $(datadir) copy /y units.exe $(bindir) @@ -95,11 +94,9 @@ cacls $(datadir)\definitions.units /e /g "Power Users":c cacls $(datadir)\currency.units /e /g Users:c cacls $(datadir)\currency.units /e /g "Power Users":c - if exist units_cur.py ( \ - copy /y units_cur.py $(datadir) & \ - cacls $(datadir)\units_cur.py /e /g Users:c & \ - cacls $(datadir)\units_cur.py /e /g "Power Users":c \ - ) + copy /y units_cur.py $(datadir) + cacls $(datadir)\units_cur.py /e /g Users:c + cacls $(datadir)\units_cur.py /e /g "Power Users":c assoc .units=Units.DataFile # change this if you want a different editor for units data files for %%i in (notepad.exe) do \ @@ -108,4 +105,4 @@ reg add "HKCR\Units.DataFile\DefaultIcon" /f /ve /d $(datadir)\unitsfile.ico /t REG_SZ clean: - del /f/q $(OBJS) + del /f/q $(OBJS) units_cur.py diff -Nru units-2.14/NEWS units-2.16/NEWS --- units-2.14/NEWS 2017-03-08 23:14:27.000000000 +0000 +++ units-2.16/NEWS 2017-10-31 09:48:47.000000000 +0000 @@ -1,6 +1,19 @@ GNU units NEWS - User visible changes. Copyright (C) 1996, 1997, 1999-2007, 2010-2017 Free Software Foundation, Inc. +Version 2.16 - 30 October 2017 +* Fixed missing USD currency code (update to units_cur and + definitions.units only). + +Version 2.15 - 16 October 2017 +* The old timegenie service has vanished. A new units_cur script uses + yahoo.com server. The new script works directly in Python 2 or + Python 3 and no longer depends on unidecode. +* Some currency definitions (e.g. currencies pegged to the euro) have + moved out of definitions.units into currency.units. +* Added bitcoin to currency.units +* Fixed a memory leak bug for invalid exponent operations + Version 2.14 - 7 March 2017 * Eliminated parser memory management limitation affecting long input expressions (e.g. a sum of more than 100 units) diff -Nru units-2.14/parse.tab.c units-2.16/parse.tab.c --- units-2.14/parse.tab.c 2017-02-24 23:33:11.000000000 +0000 +++ units-2.16/parse.tab.c 2017-09-29 20:11:22.000000000 +0000 @@ -586,10 +586,10 @@ /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 199, 199, 200, 201, 204, 205, 208, 209, 210, - 211, 213, 216, 218, 220, 224, 225, 228, 234, 235, - 236, 238, 240, 242, 243, 244, 245, 246, 247, 248, - 251, 254, 255, 256, 257, 258 + 0, 199, 199, 201, 202, 205, 206, 209, 210, 211, + 212, 214, 217, 219, 221, 225, 226, 229, 235, 236, + 237, 239, 241, 243, 244, 245, 246, 247, 248, 249, + 252, 255, 256, 257, 258, 259 }; #endif @@ -1457,221 +1457,222 @@ { case 2: #line 199 "parse.y" /* yacc.c:1646 */ - { comm->result = makenumunit(1,&err); CHECK(0); YYACCEPT; } -#line 1462 "parse.tab.c" /* yacc.c:1646 */ + { comm->result = makenumunit(1,&err); CHECK(0); + comm->errorcode = 0; YYACCEPT; } +#line 1463 "parse.tab.c" /* yacc.c:1646 */ break; case 3: -#line 200 "parse.y" /* yacc.c:1646 */ - { comm->result = (yyvsp[-1].unit); YYACCEPT; } -#line 1468 "parse.tab.c" /* yacc.c:1646 */ +#line 201 "parse.y" /* yacc.c:1646 */ + { comm->result = (yyvsp[-1].unit); comm->errorcode = 0; YYACCEPT; } +#line 1469 "parse.tab.c" /* yacc.c:1646 */ break; case 4: -#line 201 "parse.y" /* yacc.c:1646 */ +#line 202 "parse.y" /* yacc.c:1646 */ { YYABORT; } -#line 1474 "parse.tab.c" /* yacc.c:1646 */ +#line 1475 "parse.tab.c" /* yacc.c:1646 */ break; case 5: -#line 204 "parse.y" /* yacc.c:1646 */ +#line 205 "parse.y" /* yacc.c:1646 */ { (yyval.unit) = (yyvsp[0].unit);} -#line 1480 "parse.tab.c" /* yacc.c:1646 */ +#line 1481 "parse.tab.c" /* yacc.c:1646 */ break; case 6: -#line 205 "parse.y" /* yacc.c:1646 */ +#line 206 "parse.y" /* yacc.c:1646 */ { invertunit((yyvsp[0].unit)); (yyval.unit)=(yyvsp[0].unit);} -#line 1486 "parse.tab.c" /* yacc.c:1646 */ +#line 1487 "parse.tab.c" /* yacc.c:1646 */ break; case 7: -#line 208 "parse.y" /* yacc.c:1646 */ +#line 209 "parse.y" /* yacc.c:1646 */ { (yyval.unit) = (yyvsp[0].unit); } -#line 1492 "parse.tab.c" /* yacc.c:1646 */ +#line 1493 "parse.tab.c" /* yacc.c:1646 */ break; case 8: -#line 209 "parse.y" /* yacc.c:1646 */ +#line 210 "parse.y" /* yacc.c:1646 */ { (yyval.unit) = (yyvsp[0].unit); (yyval.unit)->factor *= -1; } -#line 1498 "parse.tab.c" /* yacc.c:1646 */ +#line 1499 "parse.tab.c" /* yacc.c:1646 */ break; case 9: -#line 210 "parse.y" /* yacc.c:1646 */ +#line 211 "parse.y" /* yacc.c:1646 */ { (yyval.unit) = (yyvsp[0].unit); (yyval.unit)->factor *= -1; } -#line 1504 "parse.tab.c" /* yacc.c:1646 */ +#line 1505 "parse.tab.c" /* yacc.c:1646 */ break; case 10: -#line 211 "parse.y" /* yacc.c:1646 */ +#line 212 "parse.y" /* yacc.c:1646 */ { err = addunit((yyvsp[-2].unit),(yyvsp[0].unit)); destroyunit((yyvsp[0].unit)); CHECK((yyvsp[-2].unit));(yyval.unit)=(yyvsp[-2].unit);} -#line 1511 "parse.tab.c" /* yacc.c:1646 */ +#line 1512 "parse.tab.c" /* yacc.c:1646 */ break; case 11: -#line 213 "parse.y" /* yacc.c:1646 */ +#line 214 "parse.y" /* yacc.c:1646 */ { (yyvsp[0].unit)->factor *= -1; err = addunit((yyvsp[-2].unit),(yyvsp[0].unit)); destroyunit((yyvsp[0].unit)); CHECK((yyvsp[-2].unit));(yyval.unit)=(yyvsp[-2].unit);} -#line 1519 "parse.tab.c" /* yacc.c:1646 */ +#line 1520 "parse.tab.c" /* yacc.c:1646 */ break; case 12: -#line 216 "parse.y" /* yacc.c:1646 */ +#line 217 "parse.y" /* yacc.c:1646 */ { err = divunit((yyvsp[-2].unit), (yyvsp[0].unit)); destroyunit((yyvsp[0].unit)); CHECK((yyvsp[-2].unit));(yyval.unit)=(yyvsp[-2].unit);} -#line 1526 "parse.tab.c" /* yacc.c:1646 */ +#line 1527 "parse.tab.c" /* yacc.c:1646 */ break; case 13: -#line 218 "parse.y" /* yacc.c:1646 */ +#line 219 "parse.y" /* yacc.c:1646 */ { err = multunit((yyvsp[-2].unit),(yyvsp[0].unit)); destroyunit((yyvsp[0].unit)); CHECK((yyvsp[-2].unit));(yyval.unit)=(yyvsp[-2].unit);} -#line 1533 "parse.tab.c" /* yacc.c:1646 */ +#line 1534 "parse.tab.c" /* yacc.c:1646 */ break; case 14: -#line 220 "parse.y" /* yacc.c:1646 */ +#line 221 "parse.y" /* yacc.c:1646 */ { err = multunit((yyvsp[-2].unit),(yyvsp[0].unit)); destroyunit((yyvsp[0].unit)); CHECK((yyvsp[-2].unit));(yyval.unit)=(yyvsp[-2].unit);} -#line 1540 "parse.tab.c" /* yacc.c:1646 */ +#line 1541 "parse.tab.c" /* yacc.c:1646 */ break; case 15: -#line 224 "parse.y" /* yacc.c:1646 */ +#line 225 "parse.y" /* yacc.c:1646 */ { (yyval.number) = (yyvsp[0].number); } -#line 1546 "parse.tab.c" /* yacc.c:1646 */ +#line 1547 "parse.tab.c" /* yacc.c:1646 */ break; case 16: -#line 225 "parse.y" /* yacc.c:1646 */ +#line 226 "parse.y" /* yacc.c:1646 */ { (yyval.number) = (yyvsp[-2].number) / (yyvsp[0].number); } -#line 1552 "parse.tab.c" /* yacc.c:1646 */ +#line 1553 "parse.tab.c" /* yacc.c:1646 */ break; case 17: -#line 228 "parse.y" /* yacc.c:1646 */ +#line 229 "parse.y" /* yacc.c:1646 */ { (yyval.unit) = (yyvsp[-1].unit); } -#line 1558 "parse.tab.c" /* yacc.c:1646 */ +#line 1559 "parse.tab.c" /* yacc.c:1646 */ break; case 18: -#line 234 "parse.y" /* yacc.c:1646 */ +#line 235 "parse.y" /* yacc.c:1646 */ { (yyval.unit) = makenumunit((yyvsp[0].number),&err); CHECK(0);} -#line 1564 "parse.tab.c" /* yacc.c:1646 */ +#line 1565 "parse.tab.c" /* yacc.c:1646 */ break; case 19: -#line 235 "parse.y" /* yacc.c:1646 */ +#line 236 "parse.y" /* yacc.c:1646 */ { (yyval.unit) = (yyvsp[0].unit); } -#line 1570 "parse.tab.c" /* yacc.c:1646 */ +#line 1571 "parse.tab.c" /* yacc.c:1646 */ break; case 20: -#line 236 "parse.y" /* yacc.c:1646 */ +#line 237 "parse.y" /* yacc.c:1646 */ { err = unitpower((yyvsp[-2].unit),(yyvsp[0].unit));destroyunit((yyvsp[0].unit)); CHECK((yyvsp[-2].unit));(yyval.unit)=(yyvsp[-2].unit);} -#line 1577 "parse.tab.c" /* yacc.c:1646 */ +#line 1578 "parse.tab.c" /* yacc.c:1646 */ break; case 21: -#line 238 "parse.y" /* yacc.c:1646 */ +#line 239 "parse.y" /* yacc.c:1646 */ { err = multunit((yyvsp[-2].unit),(yyvsp[0].unit)); destroyunit((yyvsp[0].unit)); CHECK((yyvsp[-2].unit));(yyval.unit)=(yyvsp[-2].unit);} -#line 1584 "parse.tab.c" /* yacc.c:1646 */ +#line 1585 "parse.tab.c" /* yacc.c:1646 */ break; case 22: -#line 240 "parse.y" /* yacc.c:1646 */ +#line 241 "parse.y" /* yacc.c:1646 */ { err = multunit((yyvsp[-1].unit),(yyvsp[0].unit)); destroyunit((yyvsp[0].unit)); CHECK((yyvsp[-1].unit));(yyval.unit)=(yyvsp[-1].unit);} -#line 1591 "parse.tab.c" /* yacc.c:1646 */ +#line 1592 "parse.tab.c" /* yacc.c:1646 */ break; case 23: -#line 242 "parse.y" /* yacc.c:1646 */ +#line 243 "parse.y" /* yacc.c:1646 */ { (yyval.unit)=(yyvsp[0].unit); } -#line 1597 "parse.tab.c" /* yacc.c:1646 */ +#line 1598 "parse.tab.c" /* yacc.c:1646 */ break; case 24: -#line 243 "parse.y" /* yacc.c:1646 */ +#line 244 "parse.y" /* yacc.c:1646 */ { err = rootunit((yyvsp[0].unit),2); CHECK((yyvsp[0].unit)); (yyval.unit)=(yyvsp[0].unit);} -#line 1603 "parse.tab.c" /* yacc.c:1646 */ +#line 1604 "parse.tab.c" /* yacc.c:1646 */ break; case 25: -#line 244 "parse.y" /* yacc.c:1646 */ +#line 245 "parse.y" /* yacc.c:1646 */ { err = rootunit((yyvsp[0].unit),3); CHECK((yyvsp[0].unit)); (yyval.unit)=(yyvsp[0].unit);} -#line 1609 "parse.tab.c" /* yacc.c:1646 */ +#line 1610 "parse.tab.c" /* yacc.c:1646 */ break; case 26: -#line 245 "parse.y" /* yacc.c:1646 */ +#line 246 "parse.y" /* yacc.c:1646 */ { err = funcunit((yyvsp[0].unit),(yyvsp[-1].realfunc));CHECK((yyvsp[0].unit)); (yyval.unit)=(yyvsp[0].unit);} -#line 1615 "parse.tab.c" /* yacc.c:1646 */ +#line 1616 "parse.tab.c" /* yacc.c:1646 */ break; case 27: -#line 246 "parse.y" /* yacc.c:1646 */ - { err = evalfunc((yyvsp[0].unit),(yyvsp[-1].unitfunc),0,0); CHECK((yyvsp[0].unit)); (yyval.unit)=(yyvsp[0].unit);} -#line 1621 "parse.tab.c" /* yacc.c:1646 */ +#line 247 "parse.y" /* yacc.c:1646 */ + { err = evalfunc((yyvsp[0].unit),(yyvsp[-1].unitfunc),0,0); CHECK((yyvsp[0].unit));(yyval.unit)=(yyvsp[0].unit);} +#line 1622 "parse.tab.c" /* yacc.c:1646 */ break; case 28: -#line 247 "parse.y" /* yacc.c:1646 */ - { err = evalfunc((yyvsp[0].unit),(yyvsp[-1].unitfunc),1,0); CHECK((yyvsp[0].unit)); (yyval.unit)=(yyvsp[0].unit);} -#line 1627 "parse.tab.c" /* yacc.c:1646 */ +#line 248 "parse.y" /* yacc.c:1646 */ + { err = evalfunc((yyvsp[0].unit),(yyvsp[-1].unitfunc),1,0); CHECK((yyvsp[0].unit));(yyval.unit)=(yyvsp[0].unit);} +#line 1628 "parse.tab.c" /* yacc.c:1646 */ break; case 29: -#line 249 "parse.y" /* yacc.c:1646 */ +#line 250 "parse.y" /* yacc.c:1646 */ { (yyvsp[0].unit)->factor *= -1; err = unitpower((yyvsp[-3].unit),(yyvsp[0].unit)); destroyunit((yyvsp[0].unit));CHECK((yyvsp[-3].unit));(yyval.unit)=(yyvsp[-3].unit);} -#line 1634 "parse.tab.c" /* yacc.c:1646 */ +#line 1635 "parse.tab.c" /* yacc.c:1646 */ break; case 30: -#line 252 "parse.y" /* yacc.c:1646 */ +#line 253 "parse.y" /* yacc.c:1646 */ { (yyvsp[0].unit)->factor *= -1; err = unitpower((yyvsp[-3].unit),(yyvsp[0].unit)); destroyunit((yyvsp[0].unit));CHECK((yyvsp[-3].unit));(yyval.unit)=(yyvsp[-3].unit);} -#line 1641 "parse.tab.c" /* yacc.c:1646 */ +#line 1642 "parse.tab.c" /* yacc.c:1646 */ break; case 31: -#line 254 "parse.y" /* yacc.c:1646 */ +#line 255 "parse.y" /* yacc.c:1646 */ { err = E_BADNUM; CHECK(0); } -#line 1647 "parse.tab.c" /* yacc.c:1646 */ +#line 1648 "parse.tab.c" /* yacc.c:1646 */ break; case 32: -#line 255 "parse.y" /* yacc.c:1646 */ +#line 256 "parse.y" /* yacc.c:1646 */ { err = E_PARSEMEM; CHECK(0); } -#line 1653 "parse.tab.c" /* yacc.c:1646 */ +#line 1654 "parse.tab.c" /* yacc.c:1646 */ break; case 33: -#line 256 "parse.y" /* yacc.c:1646 */ +#line 257 "parse.y" /* yacc.c:1646 */ { err = E_UNITEND; CHECK(0); } -#line 1659 "parse.tab.c" /* yacc.c:1646 */ +#line 1660 "parse.tab.c" /* yacc.c:1646 */ break; case 34: -#line 257 "parse.y" /* yacc.c:1646 */ +#line 258 "parse.y" /* yacc.c:1646 */ { err = E_LASTUNSET;CHECK(0); } -#line 1665 "parse.tab.c" /* yacc.c:1646 */ +#line 1666 "parse.tab.c" /* yacc.c:1646 */ break; case 35: -#line 258 "parse.y" /* yacc.c:1646 */ +#line 259 "parse.y" /* yacc.c:1646 */ { err = E_NOTAFUNC; CHECK((yyvsp[0].unit));} -#line 1671 "parse.tab.c" /* yacc.c:1646 */ +#line 1672 "parse.tab.c" /* yacc.c:1646 */ break; -#line 1675 "parse.tab.c" /* yacc.c:1646 */ +#line 1676 "parse.tab.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -1899,7 +1900,7 @@ #endif return yyresult; } -#line 261 "parse.y" /* yacc.c:1906 */ +#line 262 "parse.y" /* yacc.c:1906 */ struct function diff -Nru units-2.14/parse.y units-2.16/parse.y --- units-2.14/parse.y 2017-02-24 23:26:55.000000000 +0000 +++ units-2.16/parse.y 2017-09-29 20:11:18.000000000 +0000 @@ -196,8 +196,9 @@ %% -input: EOL { comm->result = makenumunit(1,&err); CHECK(0); YYACCEPT; } - | unitexpr EOL { comm->result = $1; YYACCEPT; } + input: EOL { comm->result = makenumunit(1,&err); CHECK(0); + comm->errorcode = 0; YYACCEPT; } + | unitexpr EOL { comm->result = $1; comm->errorcode = 0; YYACCEPT; } | error { YYABORT; } ; @@ -243,8 +244,8 @@ | SQRT pexpr { err = rootunit($2,2); CHECK($2); $$=$2;} | CUBEROOT pexpr { err = rootunit($2,3); CHECK($2); $$=$2;} | REALFUNC pexpr { err = funcunit($2,$1);CHECK($2); $$=$2;} - | UNITFUNC pexpr { err = evalfunc($2,$1,0,0); CHECK($2); $$=$2;} - | FUNCINV UNITFUNC pexpr { err = evalfunc($3,$2,1,0); CHECK($3); $$=$3;} + | UNITFUNC pexpr { err = evalfunc($2,$1,0,0); CHECK($2);$$=$2;} + | FUNCINV UNITFUNC pexpr { err = evalfunc($3,$2,1,0); CHECK($3);$$=$3;} | list EXPONENT MULTMINUS list %prec EXPONENT { $4->factor *= -1; err = unitpower($1,$4); destroyunit($4);CHECK($1);$$=$1;} diff -Nru units-2.14/README units-2.16/README --- units-2.14/README 2016-06-12 12:59:58.000000000 +0000 +++ units-2.16/README 2017-10-16 00:55:39.000000000 +0000 @@ -119,6 +119,10 @@ database to supply a units-aware programming language. https://futureboy.us/frinkdocs/ +Jillian England has created a units definition file that changes +energy to mass and seconds to meters: +https://github.com/NinerXrayBravoTwoTwo/MassEnergyUnits + ----------------------------------------------------------------------------- Ideas the future (may or may not happen): diff -Nru units-2.14/units.c units-2.16/units.c --- units-2.14/units.c 2017-02-25 05:15:31.000000000 +0000 +++ units-2.16/units.c 2017-10-31 09:48:11.000000000 +0000 @@ -1,4 +1,4 @@ -#define VERSION "2.14" +#define VERSION "2.16" /* * units, a program for units conversion @@ -2524,12 +2524,18 @@ if (errcode) return errcode; errcode = unit2num(base); - if (!errcode) /* Exponent base is dimensionless */ + if (!errcode){ /* Exponent base is dimensionless */ base->factor = pow(base->factor,exponent->factor); + if (errno) + return E_FUNC; + } else if (errcode==E_NOTANUMBER) { /* Base not dimensionless */ if (!float2rat(exponent->factor,&p,&q)){ /* Exponent must be rational */ - if (unitdimless(base)) + if (unitdimless(base)){ base->factor = pow(base->factor,exponent->factor); + if (errno) + return E_FUNC; + } else return E_IRRATIONAL_EXPONENT; } else { diff -Nru units-2.14/units_cur units-2.16/units_cur --- units-2.14/units_cur 1970-01-01 00:00:00.000000000 +0000 +++ units-2.16/units_cur 2017-11-01 01:41:59.000000000 +0000 @@ -0,0 +1,352 @@ +#!/usr/bin/python +# +# For Python 2 & 3 compatibility +from __future__ import absolute_import, division, print_function +# +# + +version = '4.1' + +# 30 October 2017 +# +# Fixed to include USD in the list of currency codes. +# +# Version 4 +# 2 October 2017 +# +# Complete rewrite to use Yahoo YQL API due to removal of TimeGenie RSS feed. +# Switched to requests library using JSON. One program now runs under +# Python 2 or Python 3. Thanks to Ray Hamel for some help with this update. + +# Normal imports +import requests +import codecs +from argparse import ArgumentParser +from collections import OrderedDict +from datetime import date +from os import linesep +from sys import exit, stderr, stdout + +outfile_name = 'currency.units' + +# This exchange rate table lists the currency ISO 4217 codes, their +# long text names, and any fixed definitions. If the definition is +# empty then units_cur will query the server for a value. + +currency = OrderedDict([ + ('ATS', ['austriaschilling', '1|13.7603 euro']), + ('BEF', ['belgiumfranc', '1|40.3399 euro']), + ('CYP', ['cypruspound', '1|0.585274 euro']), + ('EEK', ['estoniakroon', '1|15.6466 euro # Equal to 1|8 germanymark']), + ('FIM', ['finlandmarkka', '1|5.94573 euro']), + ('FRF', ['francefranc', '1|6.55957 euro']), + ('DEM', ['germanymark', '1|1.95583 euro']), + ('GRD', ['greecedrachma', '1|340.75 euro']), + ('IEP', ['irelandpunt', '1|0.787564 euro']), + ('ITL', ['italylira', '1|1936.27 euro']), + ('LVL', ['latvialats', '1|0.702804 euro']), + ('LTL', ['lithuanialitas', '1|3.4528 euro']), + ('LUF', ['luxembourgfranc', '1|40.3399 euro']), + ('MTL', ['maltalira', '1|0.4293 euro']), + ('SKK', ['slovakiakornua', '1|30.1260 euro']), + ('SIT', ['sloveniatolar', '1|239.640 euro']), + ('ESP', ['spainpeseta', '1|166.386 euro']), + ('NLG', ['netherlandsguilder','1|2.20371 euro']), + ('PTE', ['portugalescudo', '1|200.482 euro']), + ('CVE', ['capeverdeescudo', '1|110.265 euro']), + ('BGN', ['bulgarialev', '1|1.9558 euro']), + ('BAM', ['bosniaconvertiblemark','germanymark']), + ('KMF', ['comorosfranc', '1|491.96775 euro']), + ('XOF', ['westafricanfranc', '1|655.957 euro']), + ('XPF', ['cfpfranc', '1|119.33 euro']), + ('XAF', ['centralafricancfafranc','1|655.957 euro']), + ('AED', ['uaedirham','']), + ('AFN', ['afghanafghani','']), + ('ALL', ['albanialek','']), + ('AMD', ['armeniadram','']), + ('AOA', ['angolakwanza','']), + ('ARS', ['argentinapeso','']), + ('AUD', ['australiadollar','']), + ('AWG', ['arubaflorin','']), + ('AZN', ['azerbaijanmanat','']), + ('BAM', ['bosniaconvertiblemark','']), + ('BBD', ['barbadosdollar','']), + ('BDT', ['bangladeshtaka','']), + ('BGN', ['bulgarialev','']), + ('BHD', ['bahraindinar','']), + ('BIF', ['burundifranc','']), + ('BMD', ['bermudadollar','']), + ('BND', ['bruneidollar','']), + ('BOB', ['boliviaboliviano','']), + ('BRL', ['brazilreal','']), + ('BSD', ['bahamasdollar','']), + ('BTN', ['bhutanngultrum','']), + ('BWP', ['botswanapula','']), + ('BYN', ['belarusruble','']), + ('BYR', ['oldbelarusruble','10000 BYN']), + ('BZD', ['belizedollar','']), + ('CAD', ['canadadollar','']), + ('CDF', ['drcfranccongolais','']), + ('CHF', ['swissfranc','']), + ('CLP', ['chilepeso','']), + ('CNY', ['chinayuan','']), + ('COP', ['colombiapeso','']), + ('CRC', ['costaricacolon','']), + ('CUP', ['cubapeso','']), + ('CVE', ['capeverdeescudo','']), + ('CZK', ['czechkoruna','']), + ('DJF', ['djiboutifranc','']), + ('DKK', ['denmarkkrona','']), + ('DOP', ['dominicanrepublicpeso','']), + ('DZD', ['algeriadinar','']), + ('EGP', ['egyptpound','']), + ('ERN', ['eritreanakfa','']), + ('ETB', ['ethiopianbirr','']), + ('EUR', ['euro','']), + ('FJD', ['fijidollar','']), + ('FKP', ['falklandislandspound','']), + ('GBP', ['ukpound','']), + ('GEL', ['georgialari','']), + ('GHS', ['ghanacedi','']), + ('GIP', ['gibraltarpound','']), + ('GMD', ['gambiadalasi','']), + ('GNF', ['guineafranc','']), + ('GTQ', ['guatemalaquetzal','']), + ('GYD', ['guyanadollar','']), + ('HKD', ['hongkongdollar','']), + ('HNL', ['honduraslempira','']), + ('HRK', ['croatiakuna','']), + ('HTG', ['haitigourde','']), + ('HUF', ['hungariaforint','']), + ('IDR', ['indonesiarupiah','']), + ('ILS', ['israelnewshekel','']), + ('INR', ['indiarupee','']), + ('IQD', ['iraqdinar','']), + ('IRR', ['iranrial','']), + ('ISK', ['icelandkrona','']), + ('JMD', ['jamaicadollar','']), + ('JOD', ['jordandinar','']), + ('JPY', ['japanyen','']), + ('KES', ['kenyaschilling','']), + ('KGS', ['kyrgyzstansom','']), + ('KHR', ['cambodiariel','']), + ('KMF', ['comorosfranc','']), + ('KPW', ['northkoreawon','']), + ('KRW', ['southkoreawon','']), + ('KWD', ['kuwaitdinar','']), + ('KYD', ['caymanislandsdollar','']), + ('KZT', ['kazakhstantenge','']), + ('LAK', ['laokip','']), + ('LBP', ['lebanonpound','']), + ('LKR', ['srilankanrupee','']), + ('LRD', ['liberiadollar','']), + ('LTL', ['lithuanialita','']), + ('LVL', ['latvialat','']), + ('LYD', ['libyadinar','']), + ('MAD', ['moroccodirham','']), + ('MDL', ['moldovaleu','']), + ('MGA', ['madagascarariary','']), + ('MKD', ['macedoniadenar','']), + ('MMK', ['myanmarkyat','']), + ('MNT', ['mongoliatugrik','']), + ('MOP', ['macaupataca','']), + ('MRO', ['mauritaniaouguiya','']), + ('MUR', ['mauritiusrupee','']), + ('MVR', ['maldiverufiyaa','']), + ('MWK', ['malawikwacha','']), + ('MXN', ['mexicopeso','']), + ('MYR', ['malaysiaringgit','']), + ('MZN', ['mozambicanmetical','']), + ('NAD', ['namibiadollar','']), + ('NGN', ['nigerianaira','']), + ('NIO', ['nicaraguacordobaoro','']), + ('NOK', ['norwaykrone','']), + ('NPR', ['nepalrupee','']), + ('NZD', ['newzealanddollar','']), + ('OMR', ['omanrial','']), + ('PAB', ['panamabalboa','']), + ('PEN', ['perunuevosol','']), + ('PGK', ['papuanewguineakina','']), + ('PHP', ['philippinepeso','']), + ('PKR', ['pakistanrupee','']), + ('PLN', ['polandzloty','']), + ('PYG', ['paraguayguarani','']), + ('QAR', ['qatarrial','']), + ('RON', ['romanianewlei','']), + ('RSD', ['serbiadinar','']), + ('RUB', ['russiaruble','']), + ('RWF', ['rwandafranc','']), + ('SAR', ['saudiarabiariyal','']), + ('SBD', ['solomonislandsdollar','']), + ('SCR', ['seychellesrupee','']), + ('SDG', ['sudanpound','']), + ('SEK', ['swedenkrona','']), + ('SGD', ['singaporedollar','']), + ('SHP', ['sainthelenapound','']), + ('SLL', ['sierraleoneleone','']), + ('SOS', ['somaliaschilling','']), + ('SRD', ['surinamedollar','']), + ('STD', ['saotome&principedobra','']), + ('SVC', ['elsalvadorcolon','']), + ('SYP', ['syriapound','']), + ('SZL', ['swazilandlilangeni','']), + ('THB', ['thailandbaht','']), + ('TJS', ['tajikistansomoni','']), + ('TMT', ['turkmenistanmanat','']), + ('TND', ['tunisiadinar','']), + ('TOP', ["tongapa'anga",'']), + ('TRY', ['turkeylira','']), + ('TTD', ['trinidadandtobagodollar','']), + ('TWD', ['taiwandollar','']), + ('TZS', ['tanzaniashilling','']), + ('UAH', ['ukrainehryvnia','']), + ('UGX', ['ugandaschilling','']), + ('USD', ['unitedstatesdollar', 'US$']), + ('UYU', ['uruguaypeso','']), + ('UZS', ['uzbekistansum','']), + ('VEF', ['venezuelabolivar','']), + ('VEB', ['venezuelaoldbolivar', '1000 VEF']), + ('VND', ['vietnamdong','']), + ('VUV', ['vanuatuvatu','']), + ('WST', ['samoatala','']), + ('XAF', ['centralafricancfafranc','']), + ('XCD', ['eastcaribbeandollar','']), + ('XDR', ['specialdrawingrights','']), + ('YER', ['yemenrial','']), + ('ZAR', ['southafricarand','']), + ('ZMW', ['zambiakwacha','']), + ('ZWL', ['zimbabwedollar','']), +]) + +ap = ArgumentParser( + description="Update currency information for 'units' " + "into the specified filename or if no filename is " + "given, the default: '{}'. The special filename '-' " + "will send the currency data to stdout.".format(outfile_name), +) + +ap.add_argument( + 'output_file', + default=outfile_name, + help='the file to update', + metavar='filename', + nargs='?', + type=str, +) + +ap.add_argument('-V','--version', + action='version', + version='%(prog)s version ' + version, + help='display units_cur version', +) + +ap.add_argument('-v','--verbose', + action='store_true', + help='display details when fetching currency data', +) + +outfile_name = ap.parse_args().output_file +verbose = ap.parse_args().verbose + +try: + res = requests.get('http://finance.yahoo.com/webservice/v1/symbols' + '/allcurrencies/quote?format=json') + res.raise_for_status() + webdata = res.json()['list']['resources'] +except requests.exceptions.RequestException as e: + stderr.write('Error connecting to currency server:\n{}.\n'. + format(e)) + exit(1) + +rates = [ data['resource']['fields']['price'] for data in webdata] +codes = [ data['resource']['fields']['symbol'][0:3] for data in webdata] + +rate_index = 1 + +for (code,rate) in zip(codes,rates): + if code not in currency.keys(): + if (verbose): + stderr.write('Got unknown currency with code {}\n'.format(code)) + else: + if not currency[code][rate_index]: + currency[code][rate_index] = '1|{} US$'.format(rate) + elif verbose: + stderr.write('Got value "{}" for currency "{}" but ' + 'it is already defined\n'.format(rate, code)) + +# Delete currencies where we have no rate data +for code in currency.keys(): + if not currency[code][rate_index]: + if verbose: + stderr.write('No data for {}'.format(code)) + del currency[code] + +try: + req = requests.get('http://services.packetizer.com/spotprices/?f=json') + req.raise_for_status() + metals = req.json() +except requests.exceptions.RequestException as e: + stderr.write('Error connecting to spotprices server:\n{}\n'.format(e)) + exit(1) + +del metals['date'] + +try: + req = requests.get('http://services.packetizer.com/btc/?f=json') + req.raise_for_status() + bitcoin = req.json() +except requests.exceptions.RequestException as e: + stderr.write('Error connecting to bitcoin server:\n{}\n'.format(e)) + exit(1) + +cnames = [currency[code][0] for code in currency.keys()] +crates = [currency[code][1] for code in currency.keys()] + +codestr = '\n'.join('{:23}{}'. + format(code, name) for (code,name) in zip(currency.keys(), cnames)) + +datestr = date.today().isoformat() + +maxlen = max(len(name) for name in cnames) + 2 + +ratestr = '\n'.join( + '{:{}}{}'.format(name, maxlen, rate) for (name, rate) in zip(cnames, crates) + ) + +ozzystr = '\n'.join('{:19}{} US$/troyounce'.format( + metal + 'price', + price, + ) for metal, price in metals.items()) + +bitcoinstr = '{:{}}{} US$ # From services.packetizer.com/btc\n'.format( + 'bitcoin',maxlen,bitcoin['usd']) + +outstr = ( +"""# ISO Currency Codes + +{codestr} + +# Currency exchange rates from Yahoo Finance (finance.yahoo.com) + +!message Currency exchange rates from finance.yahoo.com on {datestr} + +{ratestr} +{bitcoinstr} + +# Precious metals prices from Packetizer (services.packetizer.com/spotprices) + +{ozzystr} + +""".format(codestr=codestr, datestr=datestr, ratestr=ratestr, ozzystr=ozzystr, + bitcoinstr=bitcoinstr) +).replace('\n', linesep) + +try: + if outfile_name == '-': + codecs.StreamReader(stdout, codecs.getreader('utf8')).write(outstr) + else: + with codecs.open(outfile_name, 'w', 'utf8') as of: + of.write(outstr) +except IOError as e: + stderr.write('Unable to write to output file:\n{}\n'.format(e)) + exit(1) diff -Nru units-2.14/units_cur2 units-2.16/units_cur2 --- units-2.14/units_cur2 2017-01-13 00:26:59.000000000 +0000 +++ units-2.16/units_cur2 1970-01-01 00:00:00.000000000 +0000 @@ -1,148 +0,0 @@ -#!/usr/bin/python -# -# Version 2 -# 9 July 2013 -# -# Modified to use xml format output from timegenie instead of text file -# -# Version 3 -# 7 March 2014 -# -# Added checks for unicode currency names -# -# Version 3.1 -# 23 June 2014 -# -# Added test for non-unicode strings to prevent a runtime warning -# - -import sys -import urllib -import os -import xml.etree.ElementTree as ET -import codecs -from datetime import datetime -from unidecode import unidecode - -outstr = '' - -outfile = 'currency.units' - -if len(sys.argv)==2 and sys.argv[1] != '--help' and sys.argv[1] != '-h': - outfile = sys.argv[1] -elif len(sys.argv) != 1: - sys.stderr.write('\nUsage: {0} [filename]\n\n'.format(sys.argv[0])) - sys.stderr.write('Update currency information for \'units\' into the specified filename or if no\n') - sys.stderr.write('filename is given, the default: \'{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] - -# Sometimes currency rates are missing from the xml file -# Delete such currencies - -while True: - try: - none = values.index(None) - sys.stderr.write('no rate for "%s" (%s)\n' % (names[none], codes[none])) - del codes[none] - del names[none] - del values[none] - except ValueError: - break - -# Precious metals are showing up with weird prices (per gram?) -# Delete them - -metalcodes = ['XAG','XAU','XPD','XPT'] -for i in xrange(len(metalcodes)): - try: - badind = codes.index(metalcodes[i]) - del codes[badind] - del names[badind] - del values[badind] - except ValueError: - break - -names = [x.lower().replace(' ','') for x in names] - -foundunicode=False -for i in xrange(len(names)): - if names[i] == 'anguilla(ecd)': - names[i] = 'eastcaribbeandollar' - if isinstance(names[i],unicode): # this test needed only for python2 - ascii = unidecode(names[i]) - else: - ascii = names[i] - if names[i] != ascii: - if not foundunicode: - foundunicode = True - outstr += '# Unicode Currency Names\n\n!utf8\n' - outstr += names[i] + ' ' *(23-len(names[i])) + ascii + '\n' - names[i] = ascii -if foundunicode: - outstr += '!endutf8\n\n' - -outstr += '# ISO Currency Codes\n\n' - -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.now() -outstr += '\n\n# Currency exchange rates from Time Genie (www.timegenie.com)\n' -outstr += '\n!message Currency exchange rates from www.timegenie.com on '+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 - -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 == '-': - info = codecs.lookup('utf8') - outfile = codecs.StreamReaderWriter(sys.stdout, info.streamreader, info.streamwriter) - else: - outfile = codecs.open(outfile,'w','utf8') -except IOError, exc: - sys.stderr.write('Unable to write to output file. {0}\n'.format(exc)) - sys.exit(1) - -outfile.write(outstr.replace('\n',os.linesep)) - -# In python3, open(outfile,mode='w',encoding='utf8') should work -# and then the explicit newline handling won't be needed diff -Nru units-2.14/units_cur3 units-2.16/units_cur3 --- units-2.14/units_cur3 2017-02-01 21:22:19.000000000 +0000 +++ units-2.16/units_cur3 1970-01-01 00:00:00.000000000 +0000 @@ -1,148 +0,0 @@ -#!/usr/bin/python -# -# Version 2 -# 9 July 2013 -# -# Modified to use xml format output from timegenie instead of text file -# -# Version 3 -# 7 March 2014 -# -# Added checks for unicode currency names -# -# Version 3.1 -# 23 June 2014 -# -# Added test for non-unicode strings to prevent a runtime warning -# - -import sys -import urllib.request, urllib.parse, urllib.error -import os -import xml.etree.ElementTree as ET -import codecs -from datetime import datetime -from unidecode import unidecode - -outstr = '' - -outfile = 'currency.units' - -if len(sys.argv)==2 and sys.argv[1] != '--help' and sys.argv[1] != '-h': - outfile = sys.argv[1] -elif len(sys.argv) != 1: - sys.stderr.write('\nUsage: {0} [filename]\n\n'.format(sys.argv[0])) - sys.stderr.write('Update currency information for \'units\' into the specified filename or if no\n') - sys.stderr.write('filename is given, the default: \'{0}\'.\n'.format(outfile)) - sys.exit(1) - -try: - currencies = ET.parse(urllib.request.urlopen('http://rss.timegenie.com/forex.xml')).findall('data') -except IOError as 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] - -# Sometimes currency rates are missing from the xml file -# Delete such currencies - -while True: - try: - none = values.index(None) - sys.stderr.write('no rate for "%s" (%s)\n' % (names[none], codes[none])) - del codes[none] - del names[none] - del values[none] - except ValueError: - break - -# Precious metals are showing up with weird prices (per gram?) -# Delete them - -metalcodes = ['XAG','XAU','XPD','XPT'] -for i in range(len(metalcodes)): - try: - badind = codes.index(metalcodes[i]) - del codes[badind] - del names[badind] - del values[badind] - except ValueError: - break - -names = [x.lower().replace(' ','') for x in names] - -foundunicode=False -for i in range(len(names)): - if names[i] == 'anguilla(ecd)': - names[i] = 'eastcaribbeandollar' - if isinstance(names[i],str): # this test needed only for python2 - ascii = unidecode(names[i]) - else: - ascii = names[i] - if names[i] != ascii: - if not foundunicode: - foundunicode = True - outstr += '# Unicode Currency Names\n\n!utf8\n' - outstr += names[i] + ' ' *(23-len(names[i])) + ascii + '\n' - names[i] = ascii -if foundunicode: - outstr += '!endutf8\n\n' - -outstr += '# ISO Currency Codes\n\n' - -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.now() -outstr += '\n\n# Currency exchange rates from Time Genie (www.timegenie.com)\n' -outstr += '\n!message Currency exchange rates from www.timegenie.com on '+now.strftime('%Y-%m-%d')+'\n\n' - -maxlen = max(list(map(len,names))) + 2 -outstr += '\n'.join([x.ljust(maxlen) + y for x,y in zip(names, values)]) - - -# precious metals prices - -outstr += '\n\n# Precious metals prices from http://services.packetizer.com/spotprices/\n\n' - -try: - spotprices = ET.parse(urllib.request.urlopen('http://services.packetizer.com/spotprices/?f=xml')) -except IOError as 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 == '-': - info = codecs.lookup('utf8') - outfile = codecs.StreamReaderWriter(sys.stdout, info.streamreader, info.streamwriter) - else: - outfile = codecs.open(outfile,'w','utf8') -except IOError as exc: - sys.stderr.write('Unable to write to output file. {0}\n'.format(exc)) - sys.exit(1) - -outfile.write(outstr.replace('\n',os.linesep)) - -# In python3, open(outfile,mode='w',encoding='utf8') should work -# and then the explicit newline handling won't be needed Binary files /tmp/tmplsQoi2/JvlhG1D9T7/units-2.14/units.dvi and /tmp/tmplsQoi2/CsXi1J42uR/units-2.16/units.dvi differ diff -Nru units-2.14/units.info units-2.16/units.info --- units-2.14/units.info 2017-03-07 23:27:03.000000000 +0000 +++ units-2.16/units.info 2017-11-01 02:16:28.000000000 +0000 @@ -1,6 +1,7 @@ -This is units.info, produced by makeinfo version 6.1 from units.texinfo. +This is units.info, produced by makeinfo version 6.4.90 from +units.texinfo. -This manual is for GNU Units (version 2.14), which performs units +This manual is for GNU Units (version 2.16), which performs units conversions and units calculations. Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2004, 2005, 2007, @@ -25,8 +26,8 @@ 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.13 of 'The Units Conversion Manual' for -'units' Version 2.14. +units. This is Edition 2.14 of 'The Units Conversion Manual' for +'units' Version 2.16. * Menu: @@ -2582,17 +2583,16 @@ 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/share/units/currency.units'. This program requires 'python' and -the 'unidecode' package, and must be run with suitable permissions to -write the file. To keep the rates updated automatically, run it using 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 -() and precious metals pricing from Packetizer -(). 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. +'/usr/share/units/currency.units'. This program requires 'python', and +must be run with suitable permissions to write the file. To keep the +rates updated automatically, run it using a cron job on a Unix-like +system, or a similar scheduling program on a different system. Currency +exchange rates are taken from Yahoo () and +precious metals pricing from Packetizer (). 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 @@ -3465,48 +3465,48 @@  Tag Table: -Node: Top842 -Node: Overview2324 -Ref: Overview-Footnote-14088 -Node: Interactive Use4282 -Node: Command Line Use10178 -Node: Unit Definitions11424 -Node: Unit Expressions17634 -Node: Operators18247 -Node: Sums and Differences of Units23614 -Node: Numbers as Units25656 -Node: Built-in Functions26461 -Node: Previous Result27744 -Node: Complicated Unit Expressions30070 -Node: Backwards Compatibility31705 -Node: Nonlinear Conversions33606 -Node: Temperature Conversions34045 -Node: Other Nonlinear Units36110 -Node: Unit Lists39247 -Node: Logging Calculations48019 -Node: Invoking Units50679 -Ref: Invoking Units-Footnote-163405 -Node: Defining Your Own Units63659 -Node: Units Data Files64197 -Node: Defining New Units66685 -Node: Defining Nonlinear Units70588 -Node: Piecewise Linear Units78765 -Node: Defining Unit List Aliases82522 -Node: Numeric Output Format83682 -Node: Format Specification84955 -Node: Flags86917 -Node: Field Width89000 -Node: Precision90035 -Node: Localization92492 -Node: Locale92935 -Node: Additional Localization94948 -Node: Environment Vars99401 -Node: Data Files101960 -Node: Unicode Support103747 -Node: Readline Support106707 -Node: Currency108851 -Node: Database Syntax110088 -Node: GNU Free Documentation License112151 -Node: Index137283 +Node: Top845 +Node: Overview2327 +Ref: Overview-Footnote-14091 +Node: Interactive Use4285 +Node: Command Line Use10181 +Node: Unit Definitions11427 +Node: Unit Expressions17637 +Node: Operators18250 +Node: Sums and Differences of Units23617 +Node: Numbers as Units25659 +Node: Built-in Functions26464 +Node: Previous Result27747 +Node: Complicated Unit Expressions30073 +Node: Backwards Compatibility31708 +Node: Nonlinear Conversions33609 +Node: Temperature Conversions34048 +Node: Other Nonlinear Units36113 +Node: Unit Lists39250 +Node: Logging Calculations48022 +Node: Invoking Units50682 +Ref: Invoking Units-Footnote-163408 +Node: Defining Your Own Units63662 +Node: Units Data Files64200 +Node: Defining New Units66688 +Node: Defining Nonlinear Units70591 +Node: Piecewise Linear Units78768 +Node: Defining Unit List Aliases82525 +Node: Numeric Output Format83685 +Node: Format Specification84958 +Node: Flags86920 +Node: Field Width89003 +Node: Precision90038 +Node: Localization92495 +Node: Locale92938 +Node: Additional Localization94951 +Node: Environment Vars99404 +Node: Data Files101963 +Node: Unicode Support103750 +Node: Readline Support106710 +Node: Currency108854 +Node: Database Syntax110057 +Node: GNU Free Documentation License112120 +Node: Index137252  End Tag Table diff -Nru units-2.14/units.man units-2.16/units.man --- units-2.14/units.man 2017-03-07 23:27:02.000000000 +0000 +++ units-2.16/units.man 2017-11-01 02:16:28.000000000 +0000 @@ -1,6 +1,6 @@ .\"Do not edit this file. It was created from units.texinfo -.\"using texi2man version 1.01s on Tue Mar 7 18:27:02 EST 2017 -.\"This manual is for GNU Units (version 2.14), +.\"using texi2man version 1.01s on Tue Oct 31 22:16:28 EDT 2017 +.\"This manual is for GNU Units (version 2.16), .\"which performs units conversions and units calculations. .\" .\"Copyright \(co 1996, 1997, 1999, 2000, 2001, 2002, 2004, 2005, 2007, @@ -11,7 +11,7 @@ .\"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 March 2017" +.TH UNITS 1 "16 October 2017" .\" .\" ensure that ASCII circumflex U+005E (^) is not remapped with groff .if \n(.g .tr ^\(ha @@ -4060,14 +4060,12 @@ .CQ "/usr/share/units/currency.units" . This program requires -.CW "python" -and the -.CW "unidecode" -package, and must +.CW "python" , +and must be run with suitable permissions to write the file. To keep the rates updated automatically, run it using 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 +rates are taken from Yahoo (\fRhttp://finance.yahoo.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 Binary files /tmp/tmplsQoi2/JvlhG1D9T7/units-2.14/UnitsMKS.pdf and /tmp/tmplsQoi2/CsXi1J42uR/units-2.16/UnitsMKS.pdf differ diff -Nru units-2.14/UnitsMKS.texinfo units-2.16/UnitsMKS.texinfo --- units-2.14/UnitsMKS.texinfo 2017-03-07 23:22:50.000000000 +0000 +++ units-2.16/UnitsMKS.texinfo 2017-11-01 01:44:28.000000000 +0000 @@ -4,19 +4,19 @@ @finalout @setchapternewpage off @firstparagraphindent none -@set EDITION 1 -@set VERSION 2.14 +@set EDITION 2 +@set VERSION 2.16 @set TKVERSION 10.0 @set OSVERSION 10 @set VSVERSION 2015 -@set BUILDDATE @w{7 March} 2017 +@set BUILDDATE @w{19 October} 2017 @c %**end of header @copying This manual is for building and installing GNU @command{units} (version @value{VERSION}) on Microsoft Windows with the PTC MKS Toolkit. -Copyright @copyright{} 2016 Free Software Foundation, Inc. +Copyright @copyright{} 2016--2017 Free Software Foundation, Inc. @end copying @@ -487,43 +487,64 @@ change @env{PATH} so that GNU @command{units} is found first, or create an alias for GNU @command{units}. -@node Updating Currency Definitions -@unnumbered Updating Currency Definitions +@node Currency Definitions Updater +@unnumbered Currency Definitions Updater The script @command{units_cur} is used to update currency definitions; it requires Python (available from -@url{http://www.python.org/}) and the unidecode package (available at -@url{http://pypi.python.org/}). +@url{https://www.python.org/}). @node Installing Python @unnumberedsec Installing Python -If you want to use the currency updater, install Python and then install -the unidecode package---@emph{before} running @command{configure}. Unless you -have (or anticipate having) applications that depend on @w{Python 2}, -the best choice is probably to install @w{Python 3}. - -To install the unidecode package, follow the instructions in the -@file{PKG-INFO} file included with the package. +If you want to use the currency updater, install Python if it is not +already installed; ensure that Python is installed @emph{before} running +@command{configure}. If you need to install Python, unless you have (or +anticipate having) applications that depend on @w{Python 2}, the best +choice is probably to install @w{Python 3}. Python's location must be included in @env{PATH} so the shell can find it; the Python installer usually offers to do this. +When you first run @command{units_cur}, you may get a complaint about +a missing module; for example, + +@codequoteundirected on +@example +ModuleNotFoundError: No module named 'requests' +@end example +@codequoteundirected off + +@noindent +If so, you will need to install the missing module. The easiest way to +do this is with the @command{pip} command; for example, + +@example +pip install requests +@end example + +@noindent +If you have @w{Python 2.7.9} or later or @w{Python 3.4} or later, you +should have @command{pip}, though you may need to upgrade to the latest +version. If you do not have @command{pip}, you will need to install it +manually; see the Python documentation or the Python website for +instructions on how to do this. + @node Python and @command{configure} @unnumberedsec Python and @command{configure} The complete pathname in @file{Makefile} may contain backslashes; for example, @example -PYTHON = C:\usr\bin/python.exe +PYTHON = C:\Progra~1\Python\Python36/python.exe @end example @noindent The build will fail unless the backslashes are changed to forward -slashes: +slashes; for example, @example -PYTHON = C:/usr/bin/python.exe +PYTHON = C:/Progra~1/Python/Python36/python.exe @end example @noindent @@ -532,7 +553,7 @@ backslashes, e.g., @example -PYTHON = C:\Program Files (x86)\Python33/python.exe +PYTHON = C:\Program Files (x86)\Python\Python36/python.exe @end example @noindent @@ -543,7 +564,7 @@ in @env{PATH}, e.g., @example -C:/Progra~2/Python33 +C:/Progra~2/Python/Python36/python.exe @end example @noindent @@ -555,20 +576,38 @@ @file{config.site}, e.g., @example -PYTHON=C:/Progra~2/Python33 +PYTHON=C:/Progra~2/Python/Python36/python.exe @end example +@noindent A disadvantage is that if the installation directory changes with a future version of Python, @file{config.site} will need to be manually -updated. +updated. A better approach is to give the normal Unix/Linux pathname: + +@example +PYTHON=/usr/bin/python +@end example + +@noindent +This file need not exist; it simply tells the shell to use Python. Do +not include the volume specifier (e.g., @code{C:}) or the @code{.exe} +extension; if you do, the shell will assume that the path @emph{does} +exist, and will complain that it cannot find it. -@unnumberedsec Running the Updater +@node Running the Updater +@unnumbered Running the Updater + +@node Updating from the Command Line +@unnumberedsec Updating from the Command Line If the location of @command{units_cur} is on your @env{PATH}, you can update the definitions by entering @samp{units_cur} from the command line; you will need elevated permission if you lack write permission on the file. +@node Automatic Updates +@unnumberedsec Automatic Updates + The easiest way to keep definitions updated is to create an entry in the Windows Task Scheduler. The Task Scheduler is fussy about the format for the action, which must be an executable file; an entry might look Binary files /tmp/tmplsQoi2/JvlhG1D9T7/units-2.14/units.pdf and /tmp/tmplsQoi2/CsXi1J42uR/units-2.16/units.pdf differ diff -Nru units-2.14/units.texinfo units-2.16/units.texinfo --- units-2.14/units.texinfo 2017-03-07 23:26:59.000000000 +0000 +++ units-2.16/units.texinfo 2017-11-01 01:44:27.000000000 +0000 @@ -5,8 +5,8 @@ @finalout @setchapternewpage off @firstparagraphindent none -@set EDITION 2.13 -@set VERSION 2.14 +@set EDITION 2.14 +@set VERSION 2.16 @c %**end of header @c ifman .\" @@ -41,7 +41,7 @@ @end direntry @c end noman -@c man .TH UNITS 1 "7 March 2017" +@c man .TH UNITS 1 "16 October 2017" @c man .SH NAME @c man units \(em unit conversion and calculation program @titlepage @@ -3636,11 +3636,11 @@ time values. To update the exchange rates run the @command{units_cur}, which rewrites the files containing the currency rates, typically @file{/usr/share/units/currency.units}. This program -requires @command{python} and the @command{unidecode} package, and must +requires @command{python}, and must be run with suitable permissions to write the file. To keep the rates updated automatically, run it using 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 +rates are taken from Yahoo (@uref{http://finance.yahoo.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} diff -Nru units-2.14/units.txt units-2.16/units.txt --- units-2.14/units.txt 2017-03-07 23:27:06.000000000 +0000 +++ units-2.16/units.txt 2017-11-01 02:16:28.000000000 +0000 @@ -2291,17 +2291,17 @@ 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/share/units/currency.units'. This program requires 'python' and - the 'unidecode' package, and must be run with suitable permissions to - write the file. To keep the rates updated automatically, run it using - 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. + '/usr/share/units/currency.units'. This program requires 'python', and + must be run with suitable permissions to write the file. To keep the + rates updated automatically, run it using a cron job on a Unix-like + system, or a similar scheduling program on a different system. Cur- + rency exchange rates are taken from Yahoo (http://finance.yahoo.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 out- + put. DATABASE COMMAND SYNTAX unit definition @@ -2369,4 +2369,4 @@ file AUTHOR - 7 March 2017 UNITS(1) + 16 October 2017 UNITS(1) Binary files /tmp/tmplsQoi2/JvlhG1D9T7/units-2.14/UnitsWin.pdf and /tmp/tmplsQoi2/CsXi1J42uR/units-2.16/UnitsWin.pdf differ diff -Nru units-2.14/UnitsWin.texinfo units-2.16/UnitsWin.texinfo --- units-2.14/UnitsWin.texinfo 2017-03-07 23:22:52.000000000 +0000 +++ units-2.16/UnitsWin.texinfo 2017-11-01 01:44:28.000000000 +0000 @@ -4,19 +4,19 @@ @finalout @setchapternewpage off @firstparagraphindent none -@set EDITION 1 -@set VERSION 2.14 +@set EDITION 2 +@set VERSION 2.16 @set OSVERSION 10 @set TKVERSION 10.0 @set VSVERSION 2015 -@set BUILDDATE @w{7 March} 2017 +@set BUILDDATE @w{19 October} 2017 @c %**end of header @copying This manual is for building GNU @command{units} (version @value{VERSION}) with Microsoft Visual Studio on Microsoft Windows. -Copyright @copyright{} 2016 Free Software Foundation, Inc. +Copyright @copyright{} 2016--2017 Free Software Foundation, Inc. @end copying @@ -130,49 +130,92 @@ The script @command{units_cur.py} can be used to update currency definitions (if your system hides file extensions, this script will display as @command{units_cur}). The script requires Python (available from -@url{http://www.python.org/}) and the unidecode package (available at -@url{http://pypi.python.org/}). +@url{https://www.python.org/}). @node Installing Python @unnumberedsec Installing Python -If you want to use the currency updater, install Python and then install -the unidecode package. Unless you have (or anticipate having) -applications that depend on @w{Python 2}, the best choice is probably to -install @w{Python 3}. +If you want to use the currency updater, install Python if it is not +already installed. If you need to install Python, unless you have (or +anticipate having) applications that depend on @w{Python 2}, the best +choice is probably to install @w{Python 3}. -To install the unidecode package, follow the instructions in the -@file{PKG-INFO} file included with the package. You then should be able to run +After installing Python, you should be able to run @command{units_cur.py} using the shortcut on the Start Menu, or if you have added the units installation directory to your @env{PATH}, from a command-prompt window. -@node Installing @command{units_cur.py} -@unnumberedsec Installing @command{units_cur.py} +When you first run @command{units_cur.py}, you may get a complaint about +a missing module; for example -To create the appropriate script for the version of Python that you will -be using, use either +@codequoteundirected on +@example +ModuleNotFoundError: No module named 'requests' +@end example +@codequoteundirected off + +@noindent +If so, you will need to install the missing module. The easiest way to +do this is with the @command{pip} command; for example + +@example +pip install requests +@end example + +@noindent +If you have @w{Python 2.7.9} or later or @w{Python 3.4} or later, you +should have @command{pip}, though you may need to upgrade to the latest +version. If you do not have @command{pip}, you will need to install it +manually; see the Python documentation or the Python website for +instructions on how to do this. + +@node Configuring @command{units_cur.py} +@unnumberedsec Configuring @command{units_cur.py} + +If you want to run the currency-update script from the command prompt +without changing to the program installation directory, you will need to +modify @file{units_cur.py} to give the full pathname of the output file +currency.units, i.e., change +@codequoteundirected on @example -nmake /f Makefile.Win currency2 (for Python 2) +outfile = 'currency.units' +@end example +@codequoteundirected off + +@noindent +to + +@codequoteundirected on +@example +outfile = '@var{installation_directory}/currency.units' @end example +@codequoteundirected off @noindent -or +For the default installation directory on a 64-bit system, this would be +@codequoteundirected on @example -nmake /f Makefile.Win currency3 (for Python 3) +outfile = 'C:/Program Files (x86)/GNU/units/currency.units' @end example +@codequoteundirected off @noindent -The script will then be installed when using the @code{install} target. +The safest approach is to run -@node Setting @env{PATHEXT} -@unnumberedsec Setting @env{PATHEXT} +@example +nmake /f Makefile.Win showdest +@end example + +@noindent +to get the destination directory. Be sure to use forward slashes in the +pathname to avoid confusing Python. The best approach is to modify +@file{units_cur.py} before installation. If you add @code{.py} to the @env{PATHEXT} environment variable, you can -simply type @command{units_cur} to run the updater from a command -window. You can do this from a command-prompt window by typing +simply type @command{units_cur} to run the updater from a command-prompt +window. You can do this from the command prompt by typing @example set PATHEXT=%PATHEXT%;.py @@ -186,66 +229,12 @@ list of System variables; click the `Edit' button, make the change, and click `OK'. -@node Python Version -@unnumberedsec Python Version -By default, the currency updater is configured to use @w{Python 3}. If you -have older programs that depend on @w{Python 2} and do not wish to install -@w{Python 3}, rename @command{units_cur} to @command{units_cur3} and -rename @command{units_cur2} to ``@command{units_cur}''. If your system -is configured to not hide filename extensions, these files will show a -@code{.py} extension; if that's the case, be sure to retain the -@code{.py} when renaming, because the extension is needed for Windows to -know how to process the script. - -If you have both @w{Python 2} and @w{Python 3} installed, the Python -launcher will use the latest installed version of @w{Python 2} by default, -and the default @command{units_cur} will fail. The easiest approach here is to -run nmake using the @code{currency2} target as shown above before installing -to let @w{Python 2} handle the script---the result from either script is -the same. If you want to use @w{Python 3}, you can do it several ways, -including - -@itemize @bullet -@item -Changing the first line of the default units_cur from -@code{#!/usr/bin/python} to @code{#!python3}. The default directive -is for compatibility with Unix-like systems; the Python launcher for -Windows simply interprets it to mean ``use Python'', and doesn't -actually expect to find the program in @file{/usr/bin}. The -@code{#!python3} form tells the Python launcher to find and use -@w{Python 3}. - -This should work fine for double clicking the script's icon or -running it from a command-prompt window, but it may fail if the script is -run from a Unix-like shell that interprets the @code{#!} directive -literally. - -@item -Confirming that the Python launcher @command{py.exe} is in the Windows -directory (usually @file{C:\Windows}) and changing the first line of the -default @command{units_cur} from @code{#!/usr/bin/python} to -@code{#!C:\Windows\py.exe - 3}"; this will cause the Python launcher -to use the latest installed version of @w{Python 3}. A fully qualified -pathname is interpreted literally by the Python launcher, so if the -Python launcher is located elsewhere, the first line should give -that location. - -This approach should work for a Unix-like shell as well as the -Windows command interpreter. - -@item -Setting the environment variable @env{PY_PYTHON} to @code{3}; the best -way to do this is from the Advanced tab of the System dialog. This also -should work for both Windows and Unix-like command interpreters, but it -will affect all Python scripts. - -@end itemize - @node Example @unnumberedsec Example -If you are using @w{Python 3} and installing units in the default location -of @file{C:/Program Files/GNU/units}, the process would be to +If you are installing units in the default location +of @file{C:/Program Files (x86)/GNU/units} on a 64-bit system, the +process would be to @enumerate @item @@ -256,34 +245,36 @@ @end example @item -Create the currency updater script by running +Confirm the installation location by running @example -nmake /f Makefile.Win currency3 +nmake /f Makefile.Win showdest @end example +It is assumed that the program will be installed in a subdirectory of +the standard location for executables (typically, +@w{@file{C:\Program Files (x86)}} on a 64-bit system or +@w{@file{C:\Program Files}} on a 32-bit system), and a warning is given +if this directory does not exist. Ignore the warning if you are +intentionally installing in another location. + @item If necessary, modify @command{units_cur.py} so that the output file is given by @codequoteundirected on @example -outfile = 'C:/Program Files/GNU/units/currency.units' +outfile = '@var{installation_directory}/currency.units' @end example @codequoteundirected off -@item -Confirm the installation location by running +@noindent +By default, this will usually be +@codequoteundirected on @example -nmake /f Makefile.Win showdest +outfile = 'C:/Program Files (x86)/GNU/units/currency.units' @end example - -It is assumed that the program will be installed in a subdirectory of -the standard location for executables (typically, -@w{@file{C:\Program Files (x86)}} on a 64-bit system or -@w{@file{C:\Program Files}} on a 32- bit system), and a warning is given -if this directory does not exist. Ignore the warning if you are -intentionally installing in another location. +@codequoteundirected off @item Install the files by running @@ -306,38 +297,10 @@ @node Updating from a Command Prompt @unnumberedsec Updating from a Command Prompt -Unless you run the currency-update script from the program installation -directory, you will need to modify @file{units_cur.py} to give the full -pathname of the output file currency.units, i.e., change - -@codequoteundirected on -@example -outfile = 'currency.units' -@end example -@codequoteundirected off - -@noindent -to - -@codequoteundirected on -@example -outfile = '@var{installation_directory}/currency.units' -@end example -@codequoteundirected off - -@noindent -For the default installation directory on a 64-bit system, this would be - -@codequoteundirected on -@example -outfile = 'C:/Program Files (x86)/GNU/units/currency.units' -@end example -@codequoteundirected off - -@noindent -Be sure to use forward slashes to avoid confusing Python. The best -approach is to modify this file before installation after creating it -with the @code{currency}@var{?} target in @file{Makefile.Win}. +If you have modified the currency-update script to give the full +pathname of the output file @file{currency.units}, you can update the +file by running @command{units_cur.py} from any instance of the Windows +command prompt. @node Automatic Updates @unnumberedsec Automatic Updates