From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CFDg5-0000wM-HF for mharc-grub-devel@gnu.org; Wed, 06 Oct 2004 11:26:05 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CFDg4-0000wD-CR for grub-devel@gnu.org; Wed, 06 Oct 2004 11:26:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CFDg3-0000vu-GJ for grub-devel@gnu.org; Wed, 06 Oct 2004 11:26:03 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CFDg3-0000vk-7Q for grub-devel@gnu.org; Wed, 06 Oct 2004 11:26:03 -0400 Received: from [194.106.33.237] (helo=outmail.freedom2surf.net) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CFDZ7-0004tm-Ka for grub-devel@gnu.org; Wed, 06 Oct 2004 11:18:53 -0400 Received: from bfg.majoroak.f2s.com (i-195-137-1-136.freedom2surf.net [195.137.1.136]) by outmail.freedom2surf.net (8.12.10/8.12.10) with ESMTP id i96FIknG026811 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Wed, 6 Oct 2004 16:18:52 +0100 From: Timothy Baldwin To: The development of GRUB 2 Date: Wed, 6 Oct 2004 16:18:39 +0100 User-Agent: KMail/1.7 References: <200410060329.44046.tim.lists@majoroak.f2s.com> <200410061055.38925.okuji@enbug.org> In-Reply-To: <200410061055.38925.okuji@enbug.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1634089.k549ni2MmI"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200410061618.45255.tim.lists@majoroak.f2s.com> Subject: Re: [patch] Widening terminal coordinates, and reading terminal size. 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: Wed, 06 Oct 2004 15:26:04 -0000 --nextPart1634089.k549ni2MmI Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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=20 function to get the geometry of a GUI window, grub_get_term_size is better.= =20 What do you think? Would it be better for grub_getxy and grub_getsizexy (or whatever it is=20 called) to handle the case of null pointers, rather than the terminal=20 drivers? I also noticed I omitted to change term/i386/pc/vga.c. I will fix this. 2004-10-03 Timothy Baldwin * include/grub/term.h=20 (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_getsizex= y. * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_getsizexy): New functi= on. (grub_ofconsole_getxy): Changed arguments as above. (grub_ofconsole_term): Added grub_ofconsole_getsizexy. =20 * util/console.c (grub_ncurses_getsizexy): New function. (grub_ncurses_getxy): Changed arguments as above. (grub_ncurses_term): Added grub_ncurses_getsizexy. =20 =20 --nextPart1634089.k549ni2MmI Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQBBZAzVjXSPyZ9/z+QRAqfmAJ90YWXv81+0HK6SxTq3fUec6YK8WQCfXayZ pu0DlcKb2sRdVy8JrSEJsuI= =NjV/ -----END PGP SIGNATURE----- --nextPart1634089.k549ni2MmI--