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: Marco Gerards
Subject: Re: [patch] Widening terminal coordinates, and reading terminal size.
Date: Wed, 06 Oct 2004 15:41:48 +0000
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Timothy Baldwin <address@hidden> writes:

>> 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?

How about getdimensions?  That is the term that is used in the Hurd.

> 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?

The case of null pointers?  I think when you have a nullpointer this
is a bug, no?

>  (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.

As above is very confusing.  In that case I would do:

 (grub_getxy): Returns via pointers to unsigned, instead of packed
 into a 16-bit value, all callers updated.
 (grub_getxy): Likewise.
 (struct grub_term): Likewise for `grub_getxy'.  Added a new member
 `grub_getsizexy', arguments to `grub_gotoxy' changed to unsigned,
 `grub_getxy'.

So you can better reorder things or duplicate the text IMHO.

--
Marco





reply via email to

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