emacs-devel
[Top][All Lists]
Advanced

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

Re: Darwin support for lisp/battery.el.


From: Ken Raeburn
Subject: Re: Darwin support for lisp/battery.el.
Date: Mon, 4 Jul 2005 05:40:16 -0400

On Jul 4, 2005, at 05:31, Ken Raeburn wrote:
I'm running 10.3.9, and at http://www.mitt-eget.com/software/macosx/#battery it says that the ioreg output format changed in 10.3.8, and again in 10.4, so parsing this may be a little annoying. However, there's also a link to a script which can parse the output, and comments describing what the author thinks many of the flags are; following its logic shouldn't be too hard. The tough part may be dealing with the amperage when it's nonzero -- apparently it's a 64-bit value which can be negative, but is displayed as unsigned. The emacs I've got on my system parses "18446744073709549763" and comes up with "-1", when what we want is "-1853".

Actually, that script didn't have a license in it, but perhaps the author will let us just distribute it under suitable terms, for use on OS versions where pmset doesn't give the info. That'll push the big number parsing off onto awk...

Ken




reply via email to

[Prev in Thread] Current Thread [Next in Thread]