It's not clear that this is the best way to do it: both in this patch
and yesterday's what I'm doing it modifying the bitmap *as it's read
in* to add blank pixels on the left side to center the picture. It
seems to me that the proper way to do this is modify the
adjust_image() function under the various window systems to note the
true size of the image and center it appropriately. Unfortunately,
the true size of the image is not kept anywhere that I can find; it's
always assumed to be 64x64... so the way to do this with the least
hacking of the code is during the reading of the image.
Note this patch applies over my patch yesterday; if you didn't apply
that one this one should still apply but you'll get a message from
``patch'' about a fuzz factor or something.
paul
-----
------------------------------------------------------------------
| Paul D. Smith | paul_smith@dg.com |
| Data General Corp. | pds@lemming.webo.dg.com |
| Network Systems Development Division | |
| Open Network Systems Development | "Pretty Damn S..." |
------------------------------------------------------------------
-------------------------------------------------------------------------------
*** get.c-dist Mon Nov 18 23:00:46 1991
--- get.c Thu Apr 16 13:09:04 1992
***************
*** 465,471 ****
char *ibuf ;
unsigned short obuf[] ;
{
! char *ptr ;
int i, j, temp ;
ptr = ibuf ;
--- 470,476 ----
char *ibuf ;
unsigned short obuf[] ;
{
! char *ptr, *tp ;
int i, j, temp ;
ptr = ibuf ;
***************
*** 484,489 ****
--- 489,498 ----
ptr++ ;
}
obuf[i*4 + 3] = 0 ;
+ tp = (char *)&obuf[i*4 + 3];
+ for (j = 0; j < 6; ++j, --tp)
+ *tp = tp[-1];
+ *tp = '\0';
}
for (i = BLITHEIGHT; i < iconheight; i++)
for (j = 0; j < 4; j++) obuf[i*4 + j] = 0 ;