From: Vincent Pelletier <subdino2004@yahoo.fr>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] Re: [BUG] grub2 menu : freeze while initial drawing
Date: Sun, 19 Dec 2004 22:57:55 +0100 [thread overview]
Message-ID: <41C5F963.8010908@yahoo.fr> (raw)
In-Reply-To: <41C5F65C.4080809@yahoo.fr>
[-- Attachment #1: Type: text/plain, Size: 41 bytes --]
Here is the patch. :$
Vincent Pelletier
[-- Attachment #2: menu.c.diff --]
[-- Type: text/plain, Size: 2586 bytes --]
Index: menu.c
===================================================================
RCS file: /cvsroot/grub/grub2/normal/menu.c,v
retrieving revision 1.8
diff -u -p -r1.8 menu.c
--- menu.c 18 Sep 2004 13:42:05 -0000 1.8
+++ menu.c 19 Dec 2004 21:27:40 -0000
@@ -51,7 +51,7 @@
#define TERM_SCROLL_WIDTH 1
/* The Y position of the top border. */
-#define TERM_TOP_BORDER_Y (TERM_MARGIN + TERM_HEIGHT + TERM_MARGIN)
+#define TERM_TOP_BORDER_Y (TERM_MARGIN + TERM_INFO_HEIGHT + TERM_MARGIN)
/* The X position of the left border. */
#define TERM_LEFT_BORDER_X TERM_MARGIN
@@ -94,31 +94,28 @@ draw_border (void)
grub_gotoxy (TERM_MARGIN, TERM_TOP_BORDER_Y);
grub_putcode (DISP_UL);
- for (i = 0; i < TERM_BORDER_WIDTH - 2; i++)
+ for (i = 0; i < TERM_BORDER_WIDTH; i++)
grub_putcode (DISP_HLINE);
grub_putcode (DISP_UR);
- i = 1;
- while (1)
+ for(i=0;i<(unsigned) TERM_NUM_ENTRIES;i++)
{
- grub_gotoxy (TERM_MARGIN, TERM_TOP_BORDER_Y + i);
-
- if (i > (unsigned) TERM_NUM_ENTRIES)
- break;
-
+ grub_gotoxy (TERM_MARGIN, TERM_TOP_BORDER_Y + i + 1);
grub_putcode (DISP_VLINE);
- grub_gotoxy (TERM_MARGIN + TERM_BORDER_WIDTH - 1, TERM_TOP_BORDER_Y + i);
+ grub_gotoxy (TERM_MARGIN + TERM_BORDER_WIDTH + 1, TERM_TOP_BORDER_Y + i + 1);
grub_putcode (DISP_VLINE);
- i++;
}
+ grub_gotoxy (TERM_MARGIN, TERM_TOP_BORDER_Y + TERM_NUM_ENTRIES + 1);
grub_putcode (DISP_LL);
- for (i = 0; i < TERM_BORDER_WIDTH - 2; i++)
+ for (i = 0; i < TERM_BORDER_WIDTH; i++)
grub_putcode (DISP_HLINE);
grub_putcode (DISP_LR);
grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);
+
+ grub_gotoxy (TERM_MARGIN, TERM_TOP_BORDER_Y + TERM_NUM_ENTRIES + TERM_MARGIN +1 );
}
static void
@@ -172,7 +169,7 @@ print_entry (int y, int highlight, grub_
grub_gotoxy (TERM_LEFT_BORDER_X + TERM_MARGIN, y);
grub_putchar (' ');
for (x = TERM_LEFT_BORDER_X + TERM_MARGIN + 1;
- x < TERM_LEFT_BORDER_X + TERM_BORDER_WIDTH - 1;
+ x < TERM_LEFT_BORDER_X + TERM_BORDER_WIDTH + 1;
x++)
{
if (*title && x <= TERM_LEFT_BORDER_X + TERM_ENTRY_WIDTH + 1)
@@ -202,7 +199,7 @@ print_entries (grub_menu_t menu, int fir
if (first)
grub_putcode (DISP_UP);
else
- grub_putchar (' ');
+ grub_putcode (DISP_VLINE);
e = get_entry (menu, first);
@@ -219,7 +216,7 @@ print_entries (grub_menu_t menu, int fir
if (e)
grub_putcode (DISP_DOWN);
else
- grub_putchar (' ');
+ grub_putcode (DISP_VLINE);
grub_gotoxy (TERM_CURSOR_X, TERM_FIRST_ENTRY_Y + offset);
}
next prev parent reply other threads:[~2004-12-19 22:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-14 10:27 [BUG] grub2 menu : freeze while initial drawing Vincent Pelletier
2004-12-19 15:22 ` Yoshinori K. Okuji
2004-12-19 21:45 ` [PATCH] " Vincent Pelletier
2004-12-19 21:57 ` Vincent Pelletier [this message]
2004-12-22 13:45 ` Yoshinori K. Okuji
2004-12-22 13:57 ` Vincent Pelletier
2004-12-22 16:03 ` Yoshinori K. Okuji
2005-01-08 15:25 ` [PATCH v2] " Vincent Pelletier
2005-01-20 14:36 ` Marco Gerards
2005-01-20 17:32 ` Yoshinori K. Okuji
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=41C5F963.8010908@yahoo.fr \
--to=subdino2004@yahoo.fr \
--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.