[lcd4linux @ 2000-04-03 04:01:31 by reinelt]

if 'gap' is specified as -1, a gap of (pixelsize+pixelgap) is selected automatically

git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@33 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
This commit is contained in:
reinelt
2000-04-03 04:01:31 +00:00
parent 568f40eacc
commit c82e27017c
3 changed files with 20 additions and 8 deletions
+8 -2
View File
@@ -1,4 +1,4 @@
/* $Id: Raster.c,v 1.8 2000/03/28 07:22:15 reinelt Exp $
/* $Id: Raster.c,v 1.9 2000/04/03 04:01:31 reinelt Exp $
*
* driver for raster formats
*
@@ -20,6 +20,10 @@
*
*
* $Log: Raster.c,v $
* Revision 1.9 2000/04/03 04:01:31 reinelt
*
* if 'gap' is specified as -1, a gap of (pixelsize+pixelgap) is selected automatically
*
* Revision 1.8 2000/03/28 07:22:15 reinelt
*
* version 0.95 released
@@ -226,10 +230,12 @@ int Raster_init (LCD *Self)
return -1;
}
if (sscanf(s=cfg_get("gap")?:"3x3", "%dx%d", &cgap, &rgap)!=2 || cgap<0 || rgap<0) {
if (sscanf(s=cfg_get("gap")?:"3x3", "%dx%d", &cgap, &rgap)!=2 || cgap<-1 || rgap<-1) {
fprintf (stderr, "Raster: bad gap '%s'\n", s);
return -1;
}
if (rgap<0) rgap=pixel+pgap;
if (cgap<0) cgap=pixel+pgap;
border=atoi(cfg_get("border")?:"0");
+8 -2
View File
@@ -1,4 +1,4 @@
/* $Id: XWindow.c,v 1.14 2000/04/02 22:07:10 herp Exp $
/* $Id: XWindow.c,v 1.15 2000/04/03 04:01:31 reinelt Exp $
*
* X11 Driver for LCD4Linux
*
@@ -20,6 +20,10 @@
*
*
* $Log: XWindow.c,v $
* Revision 1.15 2000/04/03 04:01:31 reinelt
*
* if 'gap' is specified as -1, a gap of (pixelsize+pixelgap) is selected automatically
*
* Revision 1.14 2000/04/02 22:07:10 herp
* fixded a bug that occasionally caused Xlib errors
*
@@ -303,10 +307,12 @@ char *s;
return -1;
}
if (sscanf(s=cfg_get("gap")?:"3x3","%dx%d",&cgap,&rgap)!=2
|| cgap<0 || rgap<0) {
|| cgap<-1 || rgap<-1) {
fprintf(stderr,"X11: bad gap '%s'\n",s);
return -1;
}
if (rgap<0) rgap=pixel+pgap;
if (cgap<0) cgap=pixel+pgap;
border=atoi(cfg_get("border")?:"0");
rgbfg=cfg_get("foreground")?:"#000000";
rgbbg=cfg_get("background")?:"#80d000";
+4 -4
View File
@@ -14,11 +14,11 @@
#background \#80d000
Display X11
size 20x6
size 20x5
font 5x8
pixel 5+1
gap 6x6
border 3
pixel 1+0
gap 1x1
border 1
foreground \#102000
halfground \#90c000
background \#a0d000