]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
can read hex numbers from file
authormuench <muench>
Tue, 31 Aug 1999 10:45:16 +0000 (10:45 +0000)
committermuench <muench>
Tue, 31 Aug 1999 10:45:16 +0000 (10:45 +0000)
hadaq/param.c

index fb5c27c88648a432f0e3717274d314b4f95884c2..78d3f413c6ba483a522fef7370c0490fdce711db 100644 (file)
@@ -1,9 +1,11 @@
-static char rcsId[] = "$Id: param.c,v 6.1 1999-08-31 10:37:24 muench Exp $";
+static char rcsId[] = "$Id: param.c,v 6.2 1999-08-31 10:45:16 muench Stab $";
 
 #include <unistd.h>
 
 #include <errno.h>
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 
 #include <hadesstd.h>
 
@@ -26,7 +28,9 @@ int conParam(Param *my, const char *fileName)
                        i++
                ) {
                if (buf[0] != '#') {
-                       sscanf(buf, "set%s%d", &my->name[i], &my->val[i]);
+                       char s[512];
+                       sscanf(buf, "set%s%s", &my->name[i], s);
+                       my->val[i] = strtoul(s, NULL, 0);
                }
        }
        if (i == PARAM_MAXNVALS) {