From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.devel Subject: Re: Darwin support for lisp/battery.el. Date: Mon, 4 Jul 2005 05:40:16 -0400 Message-ID: References: <8764vtxusp.fsf@xs4all.nl> <85mzp3a8am.fsf@lola.goethe.zz> <87d5pz8qoq.fsf@xs4all.nl> <851x6fa4pa.fsf@lola.goethe.zz> <87y88nvx36.fsf@xs4all.nl> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v622) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1120472318 2067 80.91.229.2 (4 Jul 2005 10:18:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 4 Jul 2005 10:18:38 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 04 12:18:32 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DpO1H-0004Zk-Mu for ged-emacs-devel@m.gmane.org; Mon, 04 Jul 2005 12:17:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DpO2T-00031X-TJ for ged-emacs-devel@m.gmane.org; Mon, 04 Jul 2005 06:18:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DpNVb-0003CA-As for emacs-devel@gnu.org; Mon, 04 Jul 2005 05:44:59 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DpNVX-0003Ad-Kd for emacs-devel@gnu.org; Mon, 04 Jul 2005 05:44:57 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DpNVW-00032w-Br for emacs-devel@gnu.org; Mon, 04 Jul 2005 05:44:54 -0400 Original-Received: from [207.172.4.63] (helo=smtp04.mrf.mail.rcn.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DpNWs-0003bl-3P for emacs-devel@gnu.org; Mon, 04 Jul 2005 05:46:18 -0400 Original-Received: from 65-78-24-4.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com (HELO raeburn.org) (65.78.24.4) by smtp04.mrf.mail.rcn.net with ESMTP; 04 Jul 2005 05:40:21 -0400 X-IronPort-AV: i="3.93,255,1115006400"; d="scan'208"; a="54763088:sNHT22486710" Original-Received: from [18.101.0.226] (laptop.raeburn.org [18.101.0.226]) by raeburn.org (8.12.11/8.12.11) with ESMTP id j649eKQM027100; Mon, 4 Jul 2005 05:40:20 -0400 (EDT) In-Reply-To: Original-To: Lute Kamstra X-Mailer: Apple Mail (2.622) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:40322 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:40322 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