NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/42940: units(1) parsing glitch



The following reply was made to PR bin/42940; it has been noted by GNATS.

From: Dave Huang <khym%azeotrope.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/42940: units(1) parsing glitch
Date: Wed, 10 Mar 2010 03:46:19 -0600

 On 3/10/2010 3:35 AM, Alan Barrett wrote:
 > The following reply was made to PR bin/42940; it has been noted by GNATS.
 >
 > From: Alan Barrett<apb%cequrux.com@localhost>
 > To: gnats-bugs%NetBSD.org@localhost
 > Cc:
 > Subject: Re: bin/42940: units(1) parsing glitch
 > Date: Wed, 10 Mar 2010 11:34:00 +0200
 >
 >   On Tue, 09 Mar 2010, dholland%eecs.harvard.edu@localhost wrote:
 >   >  You have: km/h
 >   >  You want: kilometer/hour
 >   >  conformability error
 >   >          10 m
 >   >          0.27777778 m / sec
 >
 >   Similarly:
 >
 >   You have: 3600 s
 >   You want: h
 >   conformability error
 >           3600 sec
 >           100
 
 /usr/share/misc/units.lib doesn't define "h" as a synonym for "hour". Simply 
 adding it seems to do the right thing:
 
 --- /usr/share/misc/units.lib   2007-02-17 03:12:59.000000000 -0600
 +++ /tmp/units.lib      2010-03-10 03:43:01.000000000 -0600
 @@ -98,6 +98,7 @@
   min                    minute
   hour                   60 min
   hr                     hour
 +h                      hour
   day                    24 hr
   da                     day
   week                   7 day
 
 $ units -f /tmp/units.lib
 525 units, 41 prefixes
 
 You have: km/h
 You want: kilometer/hour
          * 1
          / 1
 You have: 3600 s
 You want: h
          * 1
          / 1
 You have: hm^2
 You want: m^2
          * 10000
          / 0.0001
 


Home | Main Index | Thread Index | Old Index