diff options
author | reinelt <> | 2003-09-09 06:54:43 +0000 |
---|---|---|
committer | reinelt <> | 2003-09-09 06:54:43 +0000 |
commit | b1f5fffddaf31835515f88859f8a4670b6252deb (patch) | |
tree | c78e80eb3a22e818c6039ca5aa68c7f46000fd94 /filter.c | |
parent | b39a42b909dfb1c174044cf977d272f94445b18e (diff) | |
download | lcd4linux-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.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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; |