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

Re: [patch] bogl memset_var for 32 bpp screen



On Wed, Jan 17, 2001 at 10:10:23PM +0800, ha shao wrote:
> A minor bug.
> It only effect 32 bpp framebuff which I was using when worked
> with bterm.
> 
> 
> Index: bogl-cfb.c
> ===================================================================
> RCS file: /cvs/debian-boot/boot-floppies/utilities/bogl/bogl-cfb.c,v
> retrieving revision 1.1
> diff -u -r1.1 bogl-cfb.c
> --- bogl-cfb.c	1999/04/17 00:52:47	1.1
> +++ bogl-cfb.c	2001/01/17 14:03:05
> @@ -63,7 +63,8 @@
>        /* Size of an "unsigned int" in pixels:
>  	 == sizeof(unsigned int) / b / 8 */
>        const int intsiz = sizeof(unsigned int) * 8 / b;
> -      const int mask = (1 << b) - 1;
> +      /* long long is needed for b == 32 */
> +      const int mask = ((long long) 1 << b) - 1;
>        unsigned int fill;
>        /* MUST be signed! */
>        ssize_t xlen;

I'd have thought it would work anyway (since 1 << b is usually 0 for b
>= 32, although this is not well-defined...).  Odd.

Could you please look in to using the bogl-bterm package in the archive
instead of the included bogl in CVS?  It should work fine, although you'll
have to fiddle a little to do the font reduction.

Dan

/--------------------------------\  /--------------------------------\
|       Daniel Jacobowitz        |__|        SCS Class of 2002       |
|   Debian GNU/Linux Developer    __    Carnegie Mellon University   |
|         dan@debian.org         |  |       dmj+@andrew.cmu.edu      |
\--------------------------------/  \--------------------------------/



Reply to: