]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
*** empty log message ***
authorhades <hades>
Wed, 28 Mar 2001 16:47:50 +0000 (16:47 +0000)
committerhades <hades>
Wed, 28 Mar 2001 16:47:50 +0000 (16:47 +0000)
29 files changed:
allParam/VERSION
allParam/test/Makefile
allParam/test/i_store.tcl [new file with mode: 0644]
allParam/test/i_store_existing.tcl [new file with mode: 0644]
allParam/test/i_store_multiple.tcl [new file with mode: 0644]
allParam/test/int/i_lowercase.c
allParam/test/int/i_lowercase.h
allParam/test/int/i_no_index.c
allParam/test/int/i_no_index.h
allParam/test/int/i_store_existing.c
allParam/test/int/i_store_existing.h [new file with mode: 0644]
allParam/test/int/i_store_multiple.c
allParam/test/int/i_store_multiple.h [new file with mode: 0644]
allParam/test/int/i_string_available.c
allParam/test/int/i_string_available.h
allParam/test/int/i_uppercase.c
allParam/test/int/i_uppercase.h
allParam/test/int/ia_long_array.c
allParam/test/int/ia_long_array.h
allParam/test/int/ia_lowercase.c
allParam/test/int/ia_lowercase.h
allParam/test/int/ia_no_index.c
allParam/test/int/ia_no_index.h
allParam/test/int/ia_short_array.c
allParam/test/int/ia_short_array.h
allParam/test/int/ia_string_available.c
allParam/test/int/ia_string_available.h
allParam/test/int/ia_uppercase.c
allParam/test/int/ia_uppercase.h

index 11808190d4b90b20fe074a2dad43af6c0c1427ee..3b04cfb60da13a716867848ebeb2191a164887d9 100644 (file)
@@ -1 +1 @@
-0.1.7
+0.2
index 552b797f44b001d7643a6529858181579996815c..863eee8f0386c9e10eb424ac3a93342de248c4cc 100644 (file)
@@ -17,7 +17,7 @@ HEADERS = blob/*.h filename/*.h int/*.h string/*.h
 
 VPATH=.:blob:filename:int:string
 
-CFLAGS = -I../include
+CFLAGS = -Wall -I../include
 OBJS = suite.o blobobjs filenameobjs intobjs stringobjs
 
 LIBS = ca file ora psql tcl
@@ -50,13 +50,13 @@ suite.c :
        bin/main.sh
 
 blobobjs :
-       cd blob ; $(MAKE) "CFLAGS=-I../../include"
+       cd blob ; $(MAKE) "CFLAGS=-Wall -I../../include"
 filenameobjs :
-       cd filename ; $(MAKE) "CFLAGS=-I../../include"
+       cd filename ; $(MAKE) "CFLAGS=-Wall -I../../include"
 intobjs :
-       cd int ; $(MAKE) "CFLAGS=-I../../include"
+       cd int ; $(MAKE) "CFLAGS=-Wall -I../../include"
 stringobjs :
-       cd string ; $(MAKE) "CFLAGS=-I../../include"
+       cd string ; $(MAKE) "CFLAGS=-Wall -I../../include"
 
 clean :
        cd blob ; $(MAKE) $@
diff --git a/allParam/test/i_store.tcl b/allParam/test/i_store.tcl
new file mode 100644 (file)
index 0000000..d6670b1
--- /dev/null
@@ -0,0 +1 @@
+set tname(tnewint)     42
diff --git a/allParam/test/i_store_existing.tcl b/allParam/test/i_store_existing.tcl
new file mode 100644 (file)
index 0000000..4ff87a4
--- /dev/null
@@ -0,0 +1 @@
+set tname(tint)        42
diff --git a/allParam/test/i_store_multiple.tcl b/allParam/test/i_store_multiple.tcl
new file mode 100644 (file)
index 0000000..effc966
--- /dev/null
@@ -0,0 +1,2 @@
+set tname(tnewint)     13
+set tname(tnewint)     26
index ab2454cfe2250930923ff0c5a1f634b878d7d5ba..b6d32320992cd350a4749ef76b6f6a1687b950a7 100644 (file)
@@ -1,11 +1,13 @@
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
 #include <allParam.h>
 
 #include "i_lowercase.h"
 
-int i_lowercase(const char *testid, const Param *param) {
+int i_lowercase(const char *testid) {
+       Param *param;
        char *name = "tname";
        char *idx = "tint";
        unsigned long int result;
@@ -17,6 +19,9 @@ int i_lowercase(const char *testid, const Param *param) {
        printf("%s : Param_getInt: Lowercase input on correct statements.\n", testid);
 #endif
 
+       param = malloc(sizeof(Param));
+       conParam(param);
+
        retVal = Param_getInt(param, name, idx, &rows, &result);
        if ((rows == 1) && (result == 100) && (retVal == 0)) {
                myRetVal = 0;
@@ -30,6 +35,9 @@ int i_lowercase(const char *testid, const Param *param) {
 #endif
                myRetVal = -1;
        }
+       desParam(param);
+       free(param);
+
        return myRetVal;
 }
 
index 219e478a34c15fced92a8aa95775483dee384a99..6dce8dd4f642378508d07e92fd16638cf9166156 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef I_LOWERCASE_H
 #define I_LOWERCASE_H
 
-#include <allParam.h>
-
-int i_lowercase(const char *, const Param *);
+int i_lowercase(const char *);
 
 #endif
index 48fadacc461a1942cba8867c441d05d4dcc1b17f..0699f5f830975c40172ec0744be8b5a23d17cd64 100644 (file)
@@ -1,11 +1,13 @@
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
 #include <allParam.h>
 
 #include "i_no_index.h"
 
-int i_no_index(const char *testid, const Param *param) {
+int i_no_index(const char *testid) {
+       Param *param;
        char *name = "tname";
        char *idx = "bla";
        unsigned long int result;
@@ -17,6 +19,9 @@ int i_no_index(const char *testid, const Param *param) {
        printf("%s : Param_getInt: Non-existing idx.\n", testid);
 #endif
 
+       param = malloc(sizeof(Param));
+       conParam(param);
+
        retVal = Param_getInt(param, name, idx, &rows, &result);
        if ((rows == 0) && (retVal == 0)) {
                myRetVal = 0;
@@ -30,6 +35,9 @@ int i_no_index(const char *testid, const Param *param) {
 #endif
                myRetVal = -1;
        }
+       desParam(param);
+       free(param);
+
        return myRetVal;
 }
 
index 8fda97589c54a2dd5683fe3f1e6bac8471f510e5..0f5d448ba7aea68baa16afec1a612cd031f8e475 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef I_NO_INDEX_H
 #define I_NO_INDEX_H
 
-#include <allParam.h>
-
-int i_no_index(const char *, const Param *);
+int i_no_index(const char *);
 
 #endif
index 3050ae72ff7037c39227e71d7455456f4b839212..2f1b5ab1439471743724ab663333a75da364e3cb 100644 (file)
@@ -27,8 +27,8 @@ int i_store_existing(const char *testid) {
        param = malloc(sizeof(Param));
        conParam(param);
 
-       retVal1 = Param_storeString(param, name, idx, tostore);
-       retVal2 = Param_getString(param, name, idx, &rows, &result);
+       retVal1 = Param_storeInt(param, name, idx, tostore);
+       retVal2 = Param_getInt(param, name, idx, &rows, &result);
 
        desParam(param);
        free(param);
diff --git a/allParam/test/int/i_store_existing.h b/allParam/test/int/i_store_existing.h
new file mode 100644 (file)
index 0000000..7e3cdc1
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef I_STORE_EXISTING_H
+#define I_STORE_EXISTING_H
+
+int i_store_existing(const char *);
+
+#endif
index b51f55e3b11026bef59349d8ae8e19a6cb155861..bb4208a5a19ccf75bd5db425b92ce0cd12764b46 100644 (file)
@@ -21,7 +21,7 @@ int i_store_multiple(const char *testid) {
        int myRetVal;
 
 #ifdef VERBOSE
-       printf("%s : Param_storeString: Storing a value multiple.\n", testid);
+       printf("%s : Param_storeInt: Storing a value multiple.\n", testid);
 #endif
 
        truncate("storage.tcl", 0);
diff --git a/allParam/test/int/i_store_multiple.h b/allParam/test/int/i_store_multiple.h
new file mode 100644 (file)
index 0000000..125532e
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef I_STORE_MULTIPLE_H
+#define I_STORE_MULTIPLE_H
+
+int i_store_multiple(const char *);
+
+#endif
index 58db7650673eb2c20fcbee6caf0e250eb2959527..3d43a9884a96d75cf70ae54c5235683c4ac10f29 100644 (file)
@@ -1,11 +1,13 @@
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
 #include <allParam.h>
 
 #include "i_string_available.h"
 
-int i_string_available(const char *testid, const Param *param) {
+int i_string_available(const char *testid) {
+       Param *param;
        char *name = "tname";
        char *idx = "tstring";
        unsigned long int result;
@@ -17,6 +19,9 @@ int i_string_available(const char *testid, const Param *param) {
        printf("%s : Param_getInt: Integer is wanted but string-like value found.\n", testid);
 #endif
 
+       param = malloc(sizeof(Param));
+       conParam(param);
+
        retVal = Param_getInt(param, name, idx, &rows, &result);
        if ((rows == 0) && (retVal == -1)) {
                myRetVal = 0;
@@ -30,6 +35,9 @@ int i_string_available(const char *testid, const Param *param) {
 #endif
                myRetVal = -1;
        }
+       desParam(param);
+       free(param);
+
        return myRetVal;
 }
 
index 4efb6565667e19dc07c4ea8e4cf6909c1bf1dfc3..58931b4e6f2abb7af4c0c997d6c86513d583bf65 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef I_STRING_AVAILABLE_H
 #define I_STRING_AVAILABLE_H
 
-#include <allParam.h>
-
-int i_string_available(const char *, const Param *);
+int i_string_available(const char *);
 
 #endif
index 8504c319d953f10adb524adb5b549a8d4e450391..3cfd368962f1c14c0d34017815bddbee102452b8 100644 (file)
@@ -1,11 +1,13 @@
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
 #include <allParam.h>
 
 #include "i_uppercase.h"
 
-int i_uppercase(const char *testid, const Param *param) {
+int i_uppercase(const char *testid) {
+       Param *param;
        char *name = "TNAME";
        char *idx = "TINT";
        unsigned long int result;
@@ -17,6 +19,9 @@ int i_uppercase(const char *testid, const Param *param) {
        printf("%s : Param_getInt: Uppercase input on correct statements.\n", testid);
 #endif
 
+       param = malloc(sizeof(Param));
+       conParam(param);
+
        retVal = Param_getInt(param, name, idx, &rows, &result);
        if ((rows == 1) && (result == 100) && (retVal == 0)) {
                myRetVal = 0;
@@ -30,6 +35,9 @@ int i_uppercase(const char *testid, const Param *param) {
 #endif
                myRetVal = -1;
        }
+       desParam(param);
+       free(param);
+
        return myRetVal;
 }
 
index 3b9c93ade2564c7ffeeea39b40564cbb4f7ede7d..f61580b1f1f9ca65fa3b451aa4a0c9a95957e643 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef I_UPPERCASE_H
 #define I_UPPERCASE_H
 
-#include <allParam.h>
-
-int i_uppercase(const char *, const Param *);
+int i_uppercase(const char *);
 
 #endif
index dcb787c4849ab033240861ea235c3e3234b22bd9..9a0893a5164e724a1bf8f0b97885aa564137d135 100644 (file)
@@ -1,11 +1,16 @@
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
 #include <allParam.h>
 
 #include "ia_long_array.h"
 
-int ia_long_array(const char *testid, const Param *param) {
+#define NUM2 32
+#define NUM6 16
+
+int ia_long_array(const char *testid) {
+       Param *param;
        char *name = "tname";
        char *idx = "tinta";
        unsigned long int result[NUM6];
@@ -19,6 +24,9 @@ int ia_long_array(const char *testid, const Param *param) {
        printf("%s : Param_getIntArray: To many array members available.\n", testid);
 #endif
 
+       param = malloc(sizeof(Param));
+       conParam(param);
+
        retVal = Param_getIntArray(param, name, idx, NUM6, &rows, result);
        for(i = 0 ; i < NUM6 ; i++) {
                resultsum &= (result[i] == i + 1 - 2*(i%2));
@@ -35,6 +43,9 @@ int ia_long_array(const char *testid, const Param *param) {
 #endif
                myRetVal = -1;
        }
+       desParam(param);
+       free(param);
+
        return myRetVal;
 }
 
index 7de5dedeb9b272f8efe2470180088eaf3754abf5..3503b716f6c23c31ce013d39feb90e91cc0e055d 100644 (file)
@@ -1,11 +1,6 @@
 #ifndef IA_LONG_ARRAY_H
 #define IA_LONG_ARRAY_H
 
-#include <allParam.h>
-
-#define NUM2 32
-#define NUM6 16
-
-int ia_long_array(const char *, const Param *);
+int ia_long_array(const char *);
 
 #endif
index 52b86aef8f7c8bec02cea88831afa265e4493040..54cc87dd5892e6a021b33c91b76ee65c57326bfa 100644 (file)
@@ -1,11 +1,15 @@
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
 #include <allParam.h>
 
 #include "ia_lowercase.h"
 
-int ia_lowercase(const char *testid, const Param *param) {
+#define NUM2 32
+
+int ia_lowercase(const char *testid) {
+       Param *param;
        char *name = "tname";
        char *idx = "tinta";
        unsigned long int result[NUM2];
@@ -19,6 +23,9 @@ int ia_lowercase(const char *testid, const Param *param) {
        printf("%s : Param_getIntArray: Lowercase input on correct statements.\n", testid);
 #endif
 
+       param = malloc(sizeof(Param));
+       conParam(param);
+
        retVal = Param_getIntArray(param, name, idx, NUM2, &rows, result);
        for(i = 0 ; i < NUM2 ; i++) {
                resultsum &= (result[i] == i + 1 - 2*(i%2));
@@ -39,6 +46,9 @@ int ia_lowercase(const char *testid, const Param *param) {
 #endif
                myRetVal = -1;
        }
+       desParam(param);
+       free(param);
+
        return myRetVal;
 }
 
index 8aef49ab5711e41164a831187af26b7edef484aa..2f41fbef5ff9a4497bd28c596699aa6139eb166e 100644 (file)
@@ -1,10 +1,6 @@
 #ifndef IA_LOWERCASE_H
 #define IA_LOWERCASE_H
 
-#include <allParam.h>
-
-#define NUM2 32
-
-int ia_lowercase(const char *, const Param *);
+int ia_lowercase(const char *);
 
 #endif
index 5dcaf94e6d0e554f7618a96a8e249729f0920e81..21cdd06caa0166cff2494a6965d86fdeeaee03c1 100644 (file)
@@ -1,11 +1,15 @@
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
 #include <allParam.h>
 
 #include "ia_no_index.h"
 
-int ia_no_index(const char *testid, const Param *param) {
+#define NUM2 32
+
+int ia_no_index(const char *testid) {
+       Param *param;
        char *name = "tname";
        char *idx = "bla";
        unsigned long int result[NUM2];
@@ -17,6 +21,9 @@ int ia_no_index(const char *testid, const Param *param) {
        printf("%s : Param_getIntArray: Non-existing idx.\n", testid);
 #endif
 
+       param = malloc(sizeof(Param));
+       conParam(param);
+
        retVal = Param_getIntArray(param, name, idx, NUM2, &rows, result);
        if ((rows == 0) && (retVal == 0)) {
                myRetVal = 0;
@@ -30,6 +37,9 @@ int ia_no_index(const char *testid, const Param *param) {
 #endif
                myRetVal = -1;
        }
+       desParam(param);
+       free(param);
+
        return myRetVal;
 }
 
index ef4a1e72fbb378b6300d60597ccc7240d1f35d17..547c55184acaefde5c429e6ea94e90e007f5bb88 100644 (file)
@@ -1,10 +1,6 @@
 #ifndef IA_NO_INDEX_H
 #define IA_NO_INDEX_H
 
-#include <allParam.h>
-
-#define NUM2 32
-
-int ia_no_index(const char *, const Param *);
+int ia_no_index(const char *);
 
 #endif
index a6f98df528c319133b4001fd27f1147b7e091c0e..0552bc19dccb54b2a32f84c46d585e5a223e822a 100644 (file)
@@ -1,11 +1,16 @@
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
 #include <allParam.h>
 
 #include "ia_short_array.h"
 
-int ia_short_array(const char *testid, const Param *param) {
+#define NUM2 32
+#define NUM4 64
+
+int ia_short_array(const char *testid) {
+       Param *param;
        char *name = "tname";
        char *idx = "tinta";
        unsigned long int result[NUM4];
@@ -19,6 +24,9 @@ int ia_short_array(const char *testid, const Param *param) {
        printf("%s : Param_getIntArray: To few array members available.\n", testid);
 #endif
 
+       param = malloc(sizeof(Param));
+       conParam(param);
+
        retVal = Param_getIntArray(param, name, idx, NUM4, &rows, result);
        for(i = 0 ; i < NUM2 ; i++) {
                resultsum &= (result[i] == i + 1 - 2*(i%2));
@@ -35,6 +43,9 @@ int ia_short_array(const char *testid, const Param *param) {
 #endif
                myRetVal = -1;
        }
+       desParam(param);
+       free(param);
+
        return myRetVal;
 }
 
index d3032af6d71ca061c46b7a3170a6494ef372cf9b..913f010b5d5f25e830543b3b9fbe417da4202a75 100644 (file)
@@ -1,11 +1,6 @@
 #ifndef IA_SHORT_ARRAY_H
 #define IA_SHORT_ARRAY_H
 
-#include <allParam.h>
-
-#define NUM2 32
-#define NUM4 64
-
-int ia_short_array(const char *, const Param *);
+int ia_short_array(const char *);
 
 #endif
index ad9d01e60c848a7dc00a1ad03406b296e79b1e50..3919b3cb9c25d9bbb72072ae2aa0d81ab9d4be53 100644 (file)
@@ -1,11 +1,15 @@
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
 #include <allParam.h>
 
 #include "ia_string_available.h"
 
-int ia_string_available(const char *testid, const Param *param) {
+#define NUM1 8
+
+int ia_string_available(const char *testid) {
+       Param *param;
        char *name = "tname";
        char *idx = "tstringa";
        unsigned long int result[NUM1];
@@ -17,6 +21,9 @@ int ia_string_available(const char *testid, const Param *param) {
        printf("%s : Param_getIntArray: Int is wanted but String-like values found.\n", testid);
 #endif
 
+       param = malloc(sizeof(Param));
+       conParam(param);
+
        retVal = Param_getIntArray(param, name, idx, NUM1, &rows, result);
        if ((rows == 0) && (retVal == -1)) {
                myRetVal = 0;
@@ -30,6 +37,9 @@ int ia_string_available(const char *testid, const Param *param) {
 #endif
                myRetVal = -1;
        }
+       desParam(param);
+       free(param);
+
        return myRetVal;
 }
 
index d42ffadd9ba9a43386c101c4e553605d1565c379..0448bbe7e51dca7e0af4a73f2c3d94403fec6917 100644 (file)
@@ -1,10 +1,6 @@
 #ifndef IA_STRING_AVAILABLE_H
 #define IA_STRING_AVAILABLE_H
 
-#include <allParam.h>
-
-#define NUM1 8
-
-int ia_string_available(const char *, const Param *);
+int ia_string_available(const char *);
 
 #endif
index aceda75d917f3eb3c668046f3b2623306eac31ed..b7c0527ca68aa9fdad403d093d4c924eef762f05 100644 (file)
@@ -1,11 +1,15 @@
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
 #include <allParam.h>
 
 #include "ia_uppercase.h"
 
-int ia_uppercase(const char *testid, const Param *param) {
+#define NUM2 32
+
+int ia_uppercase(const char *testid) {
+       Param *param;
        char *name = "TNAME";
        char *idx = "TINTA";
        unsigned long int result[NUM2];
@@ -19,6 +23,9 @@ int ia_uppercase(const char *testid, const Param *param) {
        printf("%s : Param_getIntArray: Uppercase input on correct statements.\n", testid);
 #endif
 
+       param = malloc(sizeof(Param));
+       conParam(param);
+
        retVal = Param_getIntArray(param, name, idx, NUM2, &rows, result);
        for(i = 0 ; i < NUM2 ; i++) {
                resultsum &= (result[i] == i + 1 - 2*(i%2));
@@ -39,6 +46,9 @@ int ia_uppercase(const char *testid, const Param *param) {
 #endif
                myRetVal = -1;
        }
+       desParam(param);
+       free(param);
+
        return myRetVal;
 }
 
index 7c1e9809a77fb10ee012f7715b3aacb5330b9d06..851fd6cd2ac9adcb14b3d1b6580b249b6e2f73ad 100644 (file)
@@ -1,10 +1,6 @@
 #ifndef IA_UPPERCASE_H
 #define IA_UPPERCASE_H
 
-#include <allParam.h>
-
-#define NUM2 32
-
-int ia_uppercase(const char *, const Param *);
+int ia_uppercase(const char *);
 
 #endif