aboutsummaryrefslogtreecommitdiffstats
path: root/filter.c
diff options
context:
space:
mode:
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;