From 429036b6886e31a8d20024f73a203e1d4c3e2f65 Mon Sep 17 00:00:00 2001 From: reinelt <> Date: Sun, 26 Mar 2000 18:46:28 +0000 Subject: [lcd4linux @ 2000-03-26 18:46:28 by reinelt] bug in pixmap.c that leaded to empty bars fixed name conflicts with X11 resolved --- XWindow.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) (limited to 'XWindow.c') diff --git a/XWindow.c b/XWindow.c index 0072a94..d52c7ac 100644 --- a/XWindow.c +++ b/XWindow.c @@ -1,4 +1,4 @@ -/* $Id: XWindow.c,v 1.4 2000/03/25 05:50:43 reinelt Exp $ +/* $Id: XWindow.c,v 1.5 2000/03/26 18:46:28 reinelt Exp $ * * driver for X11 * @@ -20,6 +20,11 @@ * * * $Log: XWindow.c,v $ + * Revision 1.5 2000/03/26 18:46:28 reinelt + * + * bug in pixmap.c that leaded to empty bars fixed + * name conflicts with X11 resolved + * * Revision 1.4 2000/03/25 05:50:43 reinelt * * memory leak in Raster_flush closed @@ -47,7 +52,7 @@ * * exported fuctions: * - * struct DISPLAY XWindow[] + * struct LCD XWindow[] * */ @@ -71,7 +76,7 @@ static int foreground=0; static int halfground=0; static int background=0; -static DISPLAY Display; +static LCD Lcd; int X_flush (void) { @@ -79,22 +84,22 @@ int X_flush (void) unsigned char *buffer; unsigned char R[3], G[3], B[3]; - xsize=2*border+(Display.cols-1)*cgap+Display.cols*Display.xres*(pixel+pgap); - ysize=2*border+(Display.rows-1)*rgap+Display.rows*Display.yres*(pixel+pgap); + xsize=2*border+(Lcd.cols-1)*cgap+Lcd.cols*Lcd.xres*(pixel+pgap); + ysize=2*border+(Lcd.rows-1)*rgap+Lcd.rows*Lcd.yres*(pixel+pgap); if ((buffer=malloc(xsize*ysize*sizeof(*buffer)))==NULL) return -1; memset (buffer, 0, xsize*ysize*sizeof(*buffer)); - for (row=0; rowcols=cols; Self->xres=xres; Self->yres=yres; - Display=*Self; + Lcd=*Self; pix_clear(); return 0; @@ -189,7 +194,7 @@ int X_bar (int type, int row, int col, int max, int len1, int len2) } -DISPLAY XWindow[] = { +LCD XWindow[] = { { "X11", 0, 0, 0, 0, BARS, X_init, X_clear, X_put, X_bar, X_flush }, { NULL } }; -- cgit v1.2.3