Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KQNOF-0002jv-IJ for mharc-grub-devel@gnu.org; Tue, 05 Aug 2008 10:19:55 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KQNOD-0002go-4i for grub-devel@gnu.org; Tue, 05 Aug 2008 10:19:53 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KQNOC-0002fr-Co for grub-devel@gnu.org; Tue, 05 Aug 2008 10:19:52 -0400 Received: from [199.232.76.173] (port=41290 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KQNOC-0002fj-7r for grub-devel@gnu.org; Tue, 05 Aug 2008 10:19:52 -0400 Received: from ti-out-0910.google.com ([209.85.142.185]:31057) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KQNOB-000400-OX for grub-devel@gnu.org; Tue, 05 Aug 2008 10:19:52 -0400 Received: by ti-out-0910.google.com with SMTP id u5so719379tia.10 for ; Tue, 05 Aug 2008 07:19:51 -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=vWkJZqHRdVLoLQLmxAJi0Sruli1330c9C5AQyJDnLZ0=; b=O9olz0F4WxWRV3DPvmpa06s/WvnsprdNLmZGwySjHtlNAg1uRcJHJRa6iAWrnqwLcI qIWU+VS4DLoN3h0Mui7i3pBTlX+unKgjpqd6bdh2A/iMHg9GRihVhN1JfnapnzMTQ8Mp K0iI7nJq/0gZE5LWKt69ZQLrjMD5vOvRY/FQw= 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=AIjbJ97J9ip5gWh1OVavzXBNQzkjfeMDeo7wVVy7E/cOurnDs/TcIA8f2VGax6cVH/ PW7FpfXFLUJZrEjWjk+EhitoOX/aFpxx9nKsrHD6cwVNl0W9MI8BLDcfcxLpAnvyO1E0 fK6TpElmdLXFGWKJ1Ddnwf4skWd7YcdF31qu0= Received: by 10.110.15.19 with SMTP id 19mr1043811tio.42.1217945990843; Tue, 05 Aug 2008 07:19:50 -0700 (PDT) Received: by 10.110.16.5 with HTTP; Tue, 5 Aug 2008 07:19:50 -0700 (PDT) Message-ID: Date: Tue, 5 Aug 2008 22:19:50 +0800 From: Bean To: "The development of GRUB 2" In-Reply-To: <878wvbg22m.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> <878wvbg22m.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 14:19:53 -0000 On Tue, Aug 5, 2008 at 6:59 PM, Marco Gerards wrote: > Bean writes: > >> 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. > > Ah, ok :-) Committed. -- Bean