aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cfg.c7
-rw-r--r--drv_Image.c7
-rw-r--r--drv_X11.c7
-rw-r--r--widget_bar.c9
-rw-r--r--widget_text.c11
5 files changed, 28 insertions, 13 deletions
diff --git a/cfg.c b/cfg.c
index 4d1e2da..be21ea6 100644
--- a/cfg.c
+++ b/cfg.c
@@ -1,4 +1,4 @@
-/* $Id: cfg.c,v 1.42 2004/06/26 12:04:59 reinelt Exp $^
+/* $Id: cfg.c,v 1.43 2004/11/29 04:42:06 reinelt Exp $^
*
* config file stuff
*
@@ -23,6 +23,9 @@
*
*
* $Log: cfg.c,v $
+ * Revision 1.43 2004/11/29 04:42:06 reinelt
+ * removed the 99999 msec limit on widget update time (thanks to Petri Damsten)
+ *
* Revision 1.42 2004/06/26 12:04:59 reinelt
*
* uh-oh... the last CVS log message messed up things a lot...
@@ -579,7 +582,7 @@ int cfg_number (const char *section, const char *key, const int defval, const in
return -1;
}
- if (*value>max) {
+ if (max > min && max != -1 && *value > max) {
error ("bad %s value '%d' in %s, maximum is %d", key, *value, cfg_source(), max);
*value=max;
return -1;
diff --git a/drv_Image.c b/drv_Image.c
index 9044171..694d34d 100644
--- a/drv_Image.c
+++ b/drv_Image.c
@@ -1,4 +1,4 @@
-/* $Id: drv_Image.c,v 1.9 2004/06/26 12:04:59 reinelt Exp $
+/* $Id: drv_Image.c,v 1.10 2004/11/29 04:42:07 reinelt Exp $
*
* new style Image (PPM/PNG) Driver for LCD4Linux
*
@@ -23,6 +23,9 @@
*
*
* $Log: drv_Image.c,v $
+ * Revision 1.10 2004/11/29 04:42:07 reinelt
+ * removed the 99999 msec limit on widget update time (thanks to Petri Damsten)
+ *
* Revision 1.9 2004/06/26 12:04:59 reinelt
*
* uh-oh... the last CVS log message messed up things a lot...
@@ -422,7 +425,7 @@ static int drv_IMG_start (const char *section)
if (rgap<0) rgap=pixel+pgap;
if (cgap<0) cgap=pixel+pgap;
- if (cfg_number(section, "border", 0, 0, 1000000, &border)<0) return -1;
+ if (cfg_number(section, "border", 0, 0, -1, &border)<0) return -1;
if (sscanf(s=cfg_get(NULL, "foreground", "#102000"), "#%x", &fg_col)!=1) {
error ("%s: bad %s.foreground color '%s' from %s", Name, section, s, cfg_source());
diff --git a/drv_X11.c b/drv_X11.c
index bec5f20..b862edf 100644
--- a/drv_X11.c
+++ b/drv_X11.c
@@ -1,4 +1,4 @@
-/* $Id: drv_X11.c,v 1.8 2004/06/26 12:04:59 reinelt Exp $
+/* $Id: drv_X11.c,v 1.9 2004/11/29 04:42:07 reinelt Exp $
*
* new style X11 Driver for LCD4Linux
*
@@ -26,6 +26,9 @@
*
*
* $Log: drv_X11.c,v $
+ * Revision 1.9 2004/11/29 04:42:07 reinelt
+ * removed the 99999 msec limit on widget update time (thanks to Petri Damsten)
+ *
* Revision 1.8 2004/06/26 12:04:59 reinelt
*
* uh-oh... the last CVS log message messed up things a lot...
@@ -236,7 +239,7 @@ static int drv_X11_start (const char *section)
if (rgap<0) rgap=pixel+pgap;
if (cgap<0) cgap=pixel+pgap;
- if (cfg_number(section, "border", 0, 0, 1000000, &border)<0) return -1;
+ if (cfg_number(section, "border", 0, 0, -1, &border)<0) return -1;
fg_col = cfg_get(section, "foreground", "#000000");
bg_col = cfg_get(section, "background", "#80d000");
diff --git a/widget_bar.c b/widget_bar.c
index 8d63885..990ef57 100644
--- a/widget_bar.c
+++ b/widget_bar.c
@@ -1,4 +1,4 @@
-/* $Id: widget_bar.c,v 1.12 2004/06/26 12:05:00 reinelt Exp $
+/* $Id: widget_bar.c,v 1.13 2004/11/29 04:42:07 reinelt Exp $
*
* bar widget handling
*
@@ -21,6 +21,9 @@
*
*
* $Log: widget_bar.c,v $
+ * Revision 1.13 2004/11/29 04:42:07 reinelt
+ * removed the 99999 msec limit on widget update time (thanks to Petri Damsten)
+ *
* Revision 1.12 2004/06/26 12:05:00 reinelt
*
* uh-oh... the last CVS log message messed up things a lot...
@@ -206,7 +209,7 @@ int widget_bar_init (WIDGET *Self)
Compile (Bar->expr_max, &Bar->tree_max);
/* bar length, default 1 */
- cfg_number (section, "length", 1, 0, 99999, &(Bar->length));
+ cfg_number (section, "length", 1, 0, -1, &(Bar->length));
/* direction: East (default), West, North, South */
c = cfg_get (section, "direction", "E");
@@ -230,7 +233,7 @@ int widget_bar_init (WIDGET *Self)
free (c);
/* update interval (msec), default 1 sec */
- cfg_number (section, "update", 1000, 10, 99999, &(Bar->update));
+ cfg_number (section, "update", 1000, 10, -1, &(Bar->update));
free (section);
Self->data=Bar;
diff --git a/widget_text.c b/widget_text.c
index 29bcb69..949b82e 100644
--- a/widget_text.c
+++ b/widget_text.c
@@ -1,4 +1,4 @@
-/* $Id: widget_text.c,v 1.19 2004/06/26 12:05:00 reinelt Exp $
+/* $Id: widget_text.c,v 1.20 2004/11/29 04:42:07 reinelt Exp $
*
* simple text widget handling
*
@@ -21,6 +21,9 @@
*
*
* $Log: widget_text.c,v $
+ * Revision 1.20 2004/11/29 04:42:07 reinelt
+ * removed the 99999 msec limit on widget update time (thanks to Petri Damsten)
+ *
* Revision 1.19 2004/06/26 12:05:00 reinelt
*
* uh-oh... the last CVS log message messed up things a lot...
@@ -365,7 +368,7 @@ int widget_text_init (WIDGET *Self)
Compile (Text->expression, &Text->tree);
/* field width, default 10 */
- cfg_number (section, "width", 10, 0, 99999, &(Text->width));
+ cfg_number (section, "width", 10, 0, -1, &(Text->width));
/* precision: number of digits after the decimal point (default: none) */
/* Note: this is the *maximum* precision on small values, */
@@ -397,13 +400,13 @@ int widget_text_init (WIDGET *Self)
free (c);
/* update interval (msec), default 1 sec, 0 stands for never */
- cfg_number (section, "update", 1000, 0, 99999, &(Text->update));
+ cfg_number (section, "update", 1000, 0, -1, &(Text->update));
/* limit update interval to min 10 msec */
if (Text->update > 0 && Text->update < 10) Text->update = 10;
/* marquee scroller speed: interval (msec), default 500msec */
if (Text->align==ALIGN_MARQUEE) {
- cfg_number (section, "speed", 500, 10, 99999, &(Text->speed));
+ cfg_number (section, "speed", 500, 10, -1, &(Text->speed));
}
/* buffer */