Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KUht8-0006YZ-EE for mharc-grub-devel@gnu.org; Sun, 17 Aug 2008 09:01:42 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KUht6-0006Wu-2m for grub-devel@gnu.org; Sun, 17 Aug 2008 09:01:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KUht4-0006VL-SI for grub-devel@gnu.org; Sun, 17 Aug 2008 09:01:39 -0400 Received: from [199.232.76.173] (port=33132 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KUht4-0006V7-1b for grub-devel@gnu.org; Sun, 17 Aug 2008 09:01:38 -0400 Received: from 197.red-80-32-81.staticip.rima-tde.net ([80.32.81.197]:49895 helo=mail.pina.cat) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KUht3-0007wH-8p for grub-devel@gnu.org; Sun, 17 Aug 2008 09:01:37 -0400 Received: from pinux (unknown [77.210.61.21]) by mail.pina.cat (Postfix) with ESMTP id A9A412894B24E for ; Sun, 17 Aug 2008 15:01:34 +0200 (CEST) Received: by pinux (Postfix, from userid 1000) id BD7AE77AC; Sun, 17 Aug 2008 15:01:19 +0200 (CEST) Date: Sun, 17 Aug 2008 15:01:19 +0200 From: Carles Pina i Estany To: grub-devel@gnu.org Message-ID: <20080817130119.GA22343@pina.cat> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="2fHTh5uZTiUOsy+g" Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) Subject: [PATCH] Replace magic numbers by constants 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: Sun, 17 Aug 2008 13:01:40 -0000 --2fHTh5uZTiUOsy+g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, When I did the Home/End keys patch I noticied that in normal/menu.c there was some magic numbers (and some constants was already defined, in include/grub/term.h (actually, reading the ChangeLog was committed by Robert Millan on 2008-02-05) I'm sending a patch to change the magic numbers by constants. ChangeLog: -------- 2008-08-17 Carles Pina i Estany * menu/normal.c (run_menu): Change magic numbers by constants. -------- Thanks, PS: thanks Felix for committing the previous patch -- Carles Pina i Estany GPG id: 0x17756391 http://pinux.info --2fHTh5uZTiUOsy+g Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="key_contants.patch" Index: normal/menu.c =================================================================== --- normal/menu.c (revision 1815) +++ normal/menu.c (working copy) @@ -421,7 +421,7 @@ print_entries (menu, first, offset); break; - case 16: + case GRUB_TERM_UP: case '^': if (offset > 0) { @@ -438,7 +438,7 @@ } break; - case 14: + case GRUB_TERM_DOWN: case 'v': if (menu->size > first + offset + 1) { --2fHTh5uZTiUOsy+g--