From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1JElFU-0007fq-C2 for mharc-grub-devel@gnu.org; Tue, 15 Jan 2008 07:50:36 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JElFS-0007et-RA for grub-devel@gnu.org; Tue, 15 Jan 2008 07:50:34 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JElFQ-0007eT-8b for grub-devel@gnu.org; Tue, 15 Jan 2008 07:50:34 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JElFQ-0007eQ-2o for grub-devel@gnu.org; Tue, 15 Jan 2008 07:50:32 -0500 Received: from smtp-vbr2.xs4all.nl ([194.109.24.22]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JElFP-0005bZ-II for grub-devel@gnu.org; Tue, 15 Jan 2008 07:50:31 -0500 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr2.xs4all.nl (8.13.8/8.13.8) with ESMTP id m0FCoRhs025324 for ; Tue, 15 Jan 2008 13:50:28 +0100 (CET) (envelope-from mgerards@xs4all.nl) From: Marco Gerards To: The development of GRUB 2 References: <20080114141015.GA27293@thorin> <200801142132.39086.okuji@enbug.org> <20080114204751.GA6888@thorin> <87prw31dje.fsf@xs4all.nl> <20080115124115.GC924@thorin> Mail-Copies-To: mgerards@xs4all.nl Date: Tue, 15 Jan 2008 13:51:23 +0100 In-Reply-To: <20080115124115.GC924@thorin> (Robert Millan's message of "Tue, 15 Jan 2008 13:41:15 +0100") Message-ID: <87wsqbz1ys.fsf@xs4all.nl> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by XS4ALL Virus Scanner X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.6-4.9 Subject: Re: [PATCH] fix flickering timeout message for slow terminals (gfxterm) 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, 15 Jan 2008 12:50:35 -0000 Robert Millan writes: > On Tue, Jan 15, 2008 at 01:25:25PM +0100, Marco Gerards wrote: >> Robert Millan writes: >> >> > On Mon, Jan 14, 2008 at 09:32:39PM +0100, Yoshinori K. Okuji wrote: >> >> On Monday 14 January 2008 15:10, Robert Millan wrote: >> >> > As subject says. Based on suggestions from Vesa. >> >> >> >> Why do you want to use a nested function? >> > >> > No special reason; just to restrict the namespace use to the scope where >> > it'll be needed, and avoid passing of parameters (offset, timeout). >> > >> > I'm fine with moving it out if that's preferred. >> >> If it doesn't uglify your code, that's usually a better thing to do. > > Ok, here's a new patch. Here's a review :) > -- > Robert Millan > > I know my rights; I want my phone call! > What use is a phone call, if you are unable to speak? > (as seen on /.) > > > * normal/menu.c (run_menu): Move timeout message from here ... > (print_timeout): ... to here. > (run_menu): Use print_timeout() once during initial draw to print > the whole message, and again in every clock tick to update only > the number of seconds. > > diff -x '*~' -x configure -x config.h.in -ur grub2/normal/menu.c flickery/normal/menu.c > --- grub2/normal/menu.c 2008-01-05 13:10:28.000000000 +0100 > +++ flickery/normal/menu.c 2008-01-15 13:37:54.000000000 +0100 > @@ -308,12 +308,27 @@ > return entry; > } > > +void > +print_timeout (int timeout, int offset, int second_stage) please make this function static. Otherwise, I do not see any problems. -- Marco