From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LVtBF-00042j-9G for mharc-grub-devel@gnu.org; Sat, 07 Feb 2009 14:49:33 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LVtBD-0003yg-BB for grub-devel@gnu.org; Sat, 07 Feb 2009 14:49:31 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LVtBC-0003vw-6N for grub-devel@gnu.org; Sat, 07 Feb 2009 14:49:30 -0500 Received: from [199.232.76.173] (port=45981 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LVtBC-0003vX-1I for grub-devel@gnu.org; Sat, 07 Feb 2009 14:49:30 -0500 Received: from aybabtu.com ([69.60.117.155]:57385) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LVtBB-00069q-LT for grub-devel@gnu.org; Sat, 07 Feb 2009 14:49:29 -0500 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1LVt5z-0005rB-Es; Sat, 07 Feb 2009 20:44:07 +0100 Received: from rmh by thorin with local (Exim 4.63) (envelope-from ) id 1LVtAh-0000RT-0k; Sat, 07 Feb 2009 20:48:59 +0100 Date: Sat, 7 Feb 2009 20:48:59 +0100 From: Robert Millan To: The development of GRUB 2 Message-ID: <20090207194859.GC988@thorin> References: <1233040781.5108.98.camel@thor.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1233040781.5108.98.camel@thor.local> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.13 (2006-08-11) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: Michel =?utf-8?Q?D=C3=A4nzer?= Subject: hfs patch (Re: State of GRUB on PowerPC) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 Feb 2009 19:49:31 -0000 On Tue, Jan 27, 2009 at 08:19:41AM +0100, Michel Dänzer wrote: > +/* > + * unsigned char caseorder[] > + * > + * Defines the lexical ordering of characters on the Macintosh > + * > + * Composition of the 'casefold' and 'order' tables from ARDI's code > + * with the entry for 0x20 changed to match that for 0xCA to remove > + * special case for those two characters. > + */ > +static unsigned char caseorder[256] = { > + 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E,0x0F, Could you be more specific about what the table contents mean? > + for (i = 0; i < k1->strlen && i < k2->strlen; i++) { > + cmp = caseorder[k1->str[i]] - caseorder[k2->str[i]]; I think "a = (b != c)" would be more efficient (and also work). Also please add a newline before operning braces ({). Thanks! -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."