aboutsummaryrefslogtreecommitdiffstats
path: root/filter.c
diff options
context:
space:
mode:
authorreinelt <>2003-09-09 06:54:43 +0000
committerreinelt <>2003-09-09 06:54:43 +0000
commitb1f5fffddaf31835515f88859f8a4670b6252deb (patch)
treec78e80eb3a22e818c6039ca5aa68c7f46000fd94 /filter.c
parentb39a42b909dfb1c174044cf977d272f94445b18e (diff)
downloadlcd4linux-b1f5fffddaf31835515f88859f8a4670b6252deb.tar.gz
[lcd4linux @ 2003-09-09 06:54:43 by reinelt]
new function 'cfg_number()'
Diffstat (limited to 'filter.c')
-rw-r--r--filter.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/filter.c b/filter.c
index 32af53d..a9aa8af 100644
--- a/filter.c
+++ b/filter.c
@@ -1,4 +1,4 @@
-/* $Id: filter.c,v 1.6 2003/02/22 07:53:10 reinelt Exp $
+/* $Id: filter.c,v 1.7 2003/09/09 06:54:43 reinelt Exp $
*
* smooth and damp functions
*
@@ -20,6 +20,9 @@
*
*
* $Log: filter.c,v $
+ * Revision 1.7 2003/09/09 06:54:43 reinelt
+ * new function 'cfg_number()'
+ *
* Revision 1.6 2003/02/22 07:53:10 reinelt
* cfg_get(key,defval)
*
@@ -138,9 +141,9 @@ double damp(char *name, double value)
double max;
int i, j;
- if (tau==-1)
- tau=atoi(cfg_get("tau","500"));
-
+ if (tau==-1)
+ if (cfg_number("tau", 500, 0, 1000000, &tau)<0) tau=0.0;
+
if (tau==0.0)
return value;