From: Robert Millan <rmh@aybabtu.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] Menu control for NPAGE and PPAGE
Date: Wed, 24 Sep 2008 12:34:24 +0200 [thread overview]
Message-ID: <20080924103424.GK6973@thorin> (raw)
In-Reply-To: <20080920203745.GA27562@pina.cat>
On Sat, Sep 20, 2008 at 10:37:45PM +0200, Carles Pina i Estany wrote:
>
> Hello,
>
> (This patch includes the changes for GRUB_TERM_NPAGE/PPAGE macros, that
> I sent in a previous mail)
>
> ChangeLog:
> --------
> 2008-09-20 Carles Pina i Estany <carles@pina.cat>
> * normal/menu.c (run_menu): Add Previous and Next Page keys in
> grub-menu.
>
> * include/grub/powerpc/ieee1275/console.h (GRUB_TERM_NPAGE):
> Changed to 0x5100.
> (GRUB_TERM_PPAGE): Changed to 0x4900.
>
> * include/grub/sparc64/ieee1275/console.h: Likewise.
>
> * include/grub/i386/pc/console.h: Likewise.
>
> * include/grub/efi/console.h: Likewise.
> --------
The scancode part is merged already, please update/resync.
> + else
> + {
> + first = first - GRUB_TERM_NUM_ENTRIES;
> +
> + if (first < 0)
> + {
> + offset = offset + first;
I'd suggest using '+=' and '-=' on these to make it more readable and
avoid redundancy.
> + case GRUB_TERM_NPAGE:
> + if (offset==0)
> + {
> + offset = offset + GRUB_TERM_NUM_ENTRIES -1 ;
> + if (first+offset>menu->size)
> + {
> + offset=menu->size-first-1;
> + }
> + }
Please add spaces around '==', '>', '+', '-', etc.
> + if (offset > menu->size - 1 || offset > GRUB_TERM_NUM_ENTRIES - 1)
Does this generate a compiler warning?
--
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."
next prev parent reply other threads:[~2008-09-24 10:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-20 20:37 [PATCH] Menu control for NPAGE and PPAGE Carles Pina i Estany
2008-09-24 10:34 ` Robert Millan [this message]
2008-09-24 16:07 ` Carles Pina i Estany
2008-09-24 16:33 ` Robert Millan
2008-09-24 16:50 ` Carles Pina i Estany
2008-09-24 17:07 ` Carles Pina i Estany
2008-10-21 18:39 ` Carles Pina i Estany
2008-10-21 22:09 ` Pavel Roskin
2008-10-25 19:02 ` Carles Pina i Estany
2008-11-01 12:42 ` Robert Millan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080924103424.GK6973@thorin \
--to=rmh@aybabtu.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.