grub-devel
[Top][All Lists]
Advanced

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

Re: [Bulk] [PATCH] Small unicode problem fix in normal/menu.c


From: Marco Gerards
Subject: Re: [Bulk] [PATCH] Small unicode problem fix in normal/menu.c
Date: Tue, 05 Jul 2005 12:07:03 +0200
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux)

"Yoshinori K. Okuji" <address@hidden> writes:

> On Monday 04 July 2005 16:45, Vincent Pelletier wrote:
>> ncurses-like (not macros !) :
>>
>> void grub_getyx (unsigned int &y, unsigned int &x)
>> void grub_getmaxyx (unsigned int &y, unsigned int &x) /* to get the term
>> size */
>
> My feeling is that it is not convenient to use pointers. For example, when I 
> just want to know if the position is 0 or not in the x axis, I can do this in 
> the current API:
>
> if (grub_getxy () >> 8)
>
> But if I need to use a pointer, this becomes:
>
> unsigned x;
> grub_getyx (0, &x);
> if (x)
>
> Well, this might be just a preference.

Yeah, personally I prefer pointers to do this.  how about adding:

inline unsigned
grub_getx (void)
{
  return grub_getxy () >> 8;
}

Or a macro or so which does the same.

Thanks,
Marco





reply via email to

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