grub-devel
[Top][All Lists]
Advanced

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

Re: [patch] Widening terminal coordinates, and reading terminal size.


From: Timothy Baldwin
Subject: Re: [patch] Widening terminal coordinates, and reading terminal size.
Date: Wed, 6 Oct 2004 16:18:39 +0100
User-agent: KMail/1.7

On Wednesday 06 Oct 2004 09:55, Yoshinori K. Okuji wrote:
> On Wednesday 06 October 2004 04:29, Timothy Baldwin wrote:
> > Here is a patch to widen terminal coordinates from grub_uint8_t to
> > unsigned, change grub_getxy to return values via pointers. I have
> > also added grub_getsizexy to read the terminal size. The PPC
> > implementation is a dummy function, an the PC version assumes a
> > height of 25. Improvements would be welcome.
>
> I agree with your idea, but the name `getsizexy' is not very good, since
> the return values are not coordinates. getsize or getgeometry might be
> better. What do you think?

grub_getsize is ambiguous (size of what?) and grub_getgeometry suggests a 
function to get the geometry of a GUI window, grub_get_term_size is better. 
What do you think?

Would it be better for grub_getxy and grub_getsizexy (or whatever it is 
called) to handle the case of null pointers, rather than the terminal 
drivers?

I also noticed I omitted to change term/i386/pc/vga.c. I will fix this.


2004-10-03  Timothy Baldwin  <address@hidden>

 * include/grub/term.h 
 (grub_getsizexy): New prototype.
 (grub_gotoxy): Arguments changed to unsigned.
 (grub_getxy): Returns via pointers to unsigned, instead of packed
 into a 16-bit value, all callers updated.
 (struct grub_term): Added a new member `grub_getsizexy', arguments
 to `grub_gotoxy' changed to unsigned, `grub_getxy' returns values
 via pointers to unsigned as above.
 * kern/term.c (grub_getsizexy): New function.
 (grub_getxy): Changed arguments as above.
 * kern/i386/pc/startup.S (grub_console_getsizexy): New function.
 (grub_console_getxy): Changed arguments as above.
 * include/grub/i386/pc/console.h (grub_console_getsizexy): New prototype
 (grub_console_getxy): Changed arguments as above.
 * term/i386/pc/console.c: (grub_console_term): Added grub_console_getsizexy.
 * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_getsizexy): New function.
 (grub_ofconsole_getxy): Changed arguments as above.
 (grub_ofconsole_term): Added grub_ofconsole_getsizexy.  
 * util/console.c (grub_ncurses_getsizexy): New function.
 (grub_ncurses_getxy): Changed arguments as above.
 (grub_ncurses_term): Added grub_ncurses_getsizexy.
  
 

Attachment: pgp7TeXgGPmL7.pgp
Description: PGP signature


reply via email to

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