aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreinelt <>2000-04-03 04:01:31 +0000
committerreinelt <>2000-04-03 04:01:31 +0000
commitf74bc8f6b3ab97b0be384a219239201ccba7037d (patch)
tree70aa9c6a57b1cc7d76d7818de7544f4d211f5acb
parent6db7e00dd99c0568f05b64f4e642f9c7603c391c (diff)
downloadlcd4linux-f74bc8f6b3ab97b0be384a219239201ccba7037d.tar.gz
[lcd4linux @ 2000-04-03 04:01:31 by reinelt]
if 'gap' is specified as -1, a gap of (pixelsize+pixelgap) is selected automatically
Diffstat (limited to '')
-rw-r--r--Raster.c10
-rw-r--r--XWindow.c10
-rw-r--r--lcd4linux.conf.sample8
3 files changed, 20 insertions, 8 deletions
diff --git a/Raster.c b/Raster.c
index f0a25ea..d2eba13 100644
--- a/Raster.c
+++ b/Raster.c
@@ -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");
diff --git a/XWindow.c b/XWindow.c
index cbd60bf..4d049a8 100644
--- a/XWindow.c
+++ b/XWindow.c
@@ -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";
diff --git a/lcd4linux.conf.sample b/lcd4linux.conf.sample
index 8281295..526f430 100644
--- a/lcd4linux.conf.sample
+++ b/lcd4linux.conf.sample
@@ -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