All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Replace magic numbers by constants
@ 2008-08-17 13:01 Carles Pina i Estany
  2008-08-17 14:12 ` Marco Gerards
  0 siblings, 1 reply; 8+ messages in thread
From: Carles Pina i Estany @ 2008-08-17 13:01 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 585 bytes --]


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  <carles@pina.cat>

	* 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

[-- Attachment #2: key_contants.patch --]
[-- Type: text/x-diff, Size: 475 bytes --]

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)
 		{

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-08-20 10:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-17 13:01 [PATCH] Replace magic numbers by constants Carles Pina i Estany
2008-08-17 14:12 ` Marco Gerards
2008-08-17 14:29   ` Carles Pina i Estany
2008-08-17 15:37     ` Robert Millan
2008-08-17 19:11       ` Carles Pina i Estany
2008-08-20  9:26         ` Carles Pina i Estany
2008-08-20 10:08         ` Robert Millan
2008-08-20 10:51           ` Carles Pina i Estany

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.