Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KQJqd-0002bI-Dv for mharc-grub-devel@gnu.org; Tue, 05 Aug 2008 06:32:59 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KQJqX-0002aN-Ez for grub-devel@gnu.org; Tue, 05 Aug 2008 06:32:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KQJqU-0002Zb-E2 for grub-devel@gnu.org; Tue, 05 Aug 2008 06:32:51 -0400 Received: from [199.232.76.173] (port=48357 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQJqS-0002ZI-NQ for grub-devel@gnu.org; Tue, 05 Aug 2008 06:32:48 -0400 Received: from ti-out-0910.google.com ([209.85.142.186]:65509) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KQJqS-0007TW-1V for grub-devel@gnu.org; Tue, 05 Aug 2008 06:32:48 -0400 Received: by ti-out-0910.google.com with SMTP id u5so677565tia.10 for ; Tue, 05 Aug 2008 03:32:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=GOgRldtG6NAs3NqCtrwnIWgXmrUKb/nlMVIqFpQ6nVQ=; b=P9ZXmCxq2MmNWc4T38TILupMmA2kGA/4UDhsVBXZIVgEB5YMqfwPsOQWVLigaLg61i dqDGIM1hZJaNvk2iPxl/MbbE48g1RcGWVelv83FpbBO6Lkc3cRP7d3RF3HQ1gaMIFa9/ QTXeCgl/S9v17qR5w3CCUW07aGoe8XWudXO6g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=CzviC3WM9KcZGnIENIJZE6XO4ubQQ+ZabTZfbBkf2E9ci0Xsl29iS6IfrXZMRzWvrK 0X8FhHo8+huVUAtd//xNBeZD7ipSXXDEzu1oDIRI5IsqKhc0ihEP4LFcaxSdnn0tVluc sC+AIYv6PDcpIbeBXTBiUL7gR+HvSxJShbKUA= Received: by 10.110.15.19 with SMTP id 19mr773101tio.42.1217932366226; Tue, 05 Aug 2008 03:32:46 -0700 (PDT) Received: by 10.110.16.5 with HTTP; Tue, 5 Aug 2008 03:32:45 -0700 (PDT) Message-ID: Date: Tue, 5 Aug 2008 18:32:45 +0800 From: Bean To: "The development of GRUB 2" In-Reply-To: <87od47hior.fsf@xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <87od47hior.fsf@xs4all.nl> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Subject: Re: [PATCH] Fix color problem the grub-emu 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: Tue, 05 Aug 2008 10:32:54 -0000 On Tue, Aug 5, 2008 at 6:15 PM, Marco Gerards wrote: > Hi, > > Bean writes: > >> Currently, the color handling in grub-emu is broken, sometimes you see >> nothing on screen. This patch fix it, now variable menu_color_normal >> and menu_color_highlight works properly in grub-emu. >> >> 2008-08-02 Bean >> >> * util/console.c (grub_console_cur_color): New variable. >> (grub_console_standard_color): Likewise. >> (grub_console_normal_color): Likewise. >> (grub_console_highlight_color): Likewise. >> (color_map): Likewise. >> (use_color): Likewise. >> (NUM_COLORS): New macro. >> (grub_ncurses_setcolorstate): Handle color properly. >> (grub_ncurses_setcolor): Don't change color here, just remember the >> settings, color will be set in grub_ncurses_setcolorstate. >> (grub_ncurses_getcolor): New function. >> (grub_ncurses_init): Initialize color pairs. >> (grub_term grub_ncurses_term): New member grub_ncurses_getcolor. > > This should be: > > (grub_ncurses_term): New member grub_ncurses_getcolor. > >> -- >> Bean >> >> diff --git a/util/console.c b/util/console.c >> index 8c9401c..53fc5d0 100644 >> --- a/util/console.c >> +++ b/util/console.c >> @@ -41,6 +41,28 @@ >> >> static int grub_console_attr = A_NORMAL; >> >> +grub_uint8_t grub_console_cur_color = 7; > > Any reason why this is not static? Hi, This files include , which define grub_console_cur_color as global variable. Although grub-emu doesn't use this variable itself, but if I define it as static, it will generate a warning message. -- Bean