-/* $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
*
*
*
* $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...
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;
-/* $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
*
*
*
* $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...
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());
-/* $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
*
*
*
* $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...
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");
-/* $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
*
*
*
* $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...
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");
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;
-/* $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
*
*
*
* $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...
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, */
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 */