[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pager does work from a menu?

From: Robert Millan
Subject: Re: Pager does work from a menu?
Date: Tue, 12 Jun 2007 16:34:44 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

On Tue, Jun 12, 2007 at 01:57:42PM +0200, adrian15 wrote:
> This code from: normal/command.c
>   /* Enable the pager if the environment pager is set to 1.  */
>   if (interactive)
>     pager = grub_env_get ("pager");
>   else
>     pager = 0;
>   if (pager && (! grub_strcmp (pager, "1")))
>     grub_set_more (1);
> Can anyone confirm my suspictions that even the pager variable set to 1
> there is NO stop on the screen when running a grub option that has the
> cat command inside it with a big file?

Can you ellaborate?  From the code you pasted, I just see that when
"interactive" is set to 0, this has the same effect as pager being set to
the "0" string.

(btw, this pager = 0 assignment looks a bit confusing; I changed it to NULL
altogether with the other two I spotted earlier)

> I am suspecting because in grub legacy there was the same stupid
> behaviour which I fixed of course.
> I also do not like the way that pager is run. I mean, putting a getkey
> inside the
> void
> grub_putcode (grub_uint32_t code)
> function from: kern/term.c
> it seems to me a bit childish although I do not know so far a better
> solution.

Please try to tear down that language!  "stupid" and "childish" are in general
not very appropiate words for a development list.

I suppose you're referring to:

          grub_printf ("--MORE--");
          grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);

          key = grub_getkey ();

What do you find wrong in this code?  AFAICS, the message is printed and then
we use grub_getkey to block untill a key is pressed.  Sounds like normal
pager-ish behaviour to me..

Robert Millan

My spam trap is address@hidden  Note: this address is only intended
for spam harvesters.  Writing to it will get you added to my black list.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]