[q-lang-cvs] q/modules/ggi ggi.c,1.13,1.14
Brought to you by:
agraef
From: <ag...@us...> - 2003-12-21 12:53:29
|
Update of /cvsroot/q-lang/q/modules/ggi In directory sc8-pr-cvs1:/tmp/cvs-serv15257 Modified Files: ggi.c Log Message: more bug fixes in text renderer Index: ggi.c =================================================================== RCS file: /cvsroot/q-lang/q/modules/ggi/ggi.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ggi.c 21 Dec 2003 10:54:35 -0000 1.13 --- ggi.c 21 Dec 2003 12:53:26 -0000 1.14 *************** *** 1410,1414 **** FT_BBox bbox; /* bounding box */ ggi_color fgcol, bgcol, *col = NULL; ! ggi_pixel pix, *pixel = NULL; unsigned fgalpha = 0xff, bgalpha = 0xff; --- 1410,1414 ---- FT_BBox bbox; /* bounding box */ ggi_color fgcol, bgcol, *col = NULL; ! ggi_pixel pix; unsigned fgalpha = 0xff, bgalpha = 0xff; *************** *** 1562,1566 **** /* blit the rendered string to the visual */ ! if (!error) { #ifdef HAVE_GGIBUF if (v->b[0]) { --- 1562,1566 ---- /* blit the rendered string to the visual */ ! if (!error) #ifdef HAVE_GGIBUF if (v->b[0]) { *************** *** 1578,1583 **** } ggiBufSetGCForeground(v->b[0], val); ! } else { #endif if (!(pixel = malloc(pack_size(v->vis, dim)))) { free(col); --- 1578,1585 ---- } ggiBufSetGCForeground(v->b[0], val); ! } else #endif + { + void *pixel = NULL; if (!(pixel = malloc(pack_size(v->vis, dim)))) { free(col); *************** *** 1586,1593 **** error = ggiPackColors(v->vis, pixel, col, dim) || ggiPutBox(v->vis, x, y, wd, ht, pixel); } - } free(col); - free(pixel); return !error; --- 1588,1594 ---- error = ggiPackColors(v->vis, pixel, col, dim) || ggiPutBox(v->vis, x, y, wd, ht, pixel); + free(pixel); } free(col); return !error; |