]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
*** empty log message ***
authorhades <hades>
Mon, 2 Apr 2001 17:10:26 +0000 (17:10 +0000)
committerhades <hades>
Mon, 2 Apr 2001 17:10:26 +0000 (17:10 +0000)
51 files changed:
allParam/ca/client/caParam.c
allParam/ca/server/paramBlobRecord.cc
allParam/ca/server/paramIntRecord.cc
allParam/test/blob/b_odd_size.c
allParam/test/blob/b_to_large.c
allParam/test/blob/test1.blob
allParam/test/tcl/blob_p.tcl
allParam/test/test1.c [deleted file]
allParam/test/test1.h [deleted file]
allParam/test/test10.c [deleted file]
allParam/test/test10.h [deleted file]
allParam/test/test11.c [deleted file]
allParam/test/test11.h [deleted file]
allParam/test/test12.c [deleted file]
allParam/test/test12.h [deleted file]
allParam/test/test13.c [deleted file]
allParam/test/test13.h [deleted file]
allParam/test/test14.c [deleted file]
allParam/test/test14.h [deleted file]
allParam/test/test15.c [deleted file]
allParam/test/test15.h [deleted file]
allParam/test/test16.c [deleted file]
allParam/test/test16.h [deleted file]
allParam/test/test17.c [deleted file]
allParam/test/test17.h [deleted file]
allParam/test/test18.c [deleted file]
allParam/test/test18.h [deleted file]
allParam/test/test19.c [deleted file]
allParam/test/test19.h [deleted file]
allParam/test/test2.c [deleted file]
allParam/test/test2.h [deleted file]
allParam/test/test20.c [deleted file]
allParam/test/test20.h [deleted file]
allParam/test/test21.c [deleted file]
allParam/test/test21.h [deleted file]
allParam/test/test22.c [deleted file]
allParam/test/test22.h [deleted file]
allParam/test/test3.c [deleted file]
allParam/test/test3.h [deleted file]
allParam/test/test4.c [deleted file]
allParam/test/test4.h [deleted file]
allParam/test/test5.c [deleted file]
allParam/test/test5.h [deleted file]
allParam/test/test6.c [deleted file]
allParam/test/test6.h [deleted file]
allParam/test/test7.c [deleted file]
allParam/test/test7.h [deleted file]
allParam/test/test8.c [deleted file]
allParam/test/test8.h [deleted file]
allParam/test/test9.c [deleted file]
allParam/test/test9.h [deleted file]

index 842f721e2acada3b09ab84f994515b43d2af957c..c7b163c5adf8aeef2dd047cc7c254f33638e5593 100644 (file)
@@ -3,6 +3,7 @@
 #include <unistd.h>
 
 #include <ctype.h>
+#include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -293,7 +294,12 @@ int Param_getBlob(const Param *my, const char *name, const char *idx, size_t *si
                found = 0;
                retVal = 0;
        }
-       *val = tmpfile();
+       if((*val = tmpfile()) == NULL) {
+               Param_strerror((Param *) my, strerror(errno));
+               found = 0;
+               retVal = -1;
+       }
+
        if(found == 1) {
                ParamBlobResult resultS, *result = &resultS;
                result->val = val;
@@ -456,19 +462,24 @@ static void Param_copyStringsToAllocMem(struct event_handler_args args)
 
 static void Param_copyIntsToAllocMem(struct event_handler_args args)
 {
+#if 1
        int i;
+#endif
        ParamIntResult *result = args.usr;
+#if 0
        dbr_long_t *buffer = (dbr_long_t *) args.dbr;
-       
+#endif
+
        *(result->rows) = (args.count > result->maxrows) ?
                result->maxrows :
                args.count;
        if(args.type == DBR_LONG && args.status == ECA_NORMAL) {
+               memcpy(result->val, (dbr_long_t *) args.dbr, (sizeof(dbr_long_t) * *(result->rows)));
                for(i = 0 ; i < *(result->rows) ; i++) {
-                       (result->val)[i] = buffer[i];
 #if 0
-                       fprintf(stderr, "val[%d] received: %ld\n", i, (result->val)[i]);
+                       (result->val)[i] = buffer[i];
 #endif
+                       fprintf(stderr, "val[%d] received: %ld\n", i, (result->val)[i]);
                }
        } else {
                Param_strerror((Param *) result->my, ca_message(args.status));
@@ -480,11 +491,11 @@ static void Param_copyBlobToAllocMem(struct event_handler_args args)
 {
        ParamBlobResult *result = args.usr;
        dbr_long_t *buffer = (dbr_long_t *) args.dbr;
-       
-       *(result->size) = args.count;
        if(args.type == DBR_LONG && args.status == ECA_NORMAL) {
-               fwrite(buffer, sizeof(dbr_long_t), *(result->size), *result->val);
-               rewind(*result->val);
+               *(result->size) = *buffer;
+               fwrite(buffer + 1, 1, *(result->size), *(result->val));
+               fflush(*(result->val));
+               rewind(*(result->val));
        } else {
                Param_strerror((Param *) result->my, ca_message(args.status));
                *(result->size) = 0;
index 537e5fdba6c4c92aea0b4134bf4240e2ebc31649..ed556e08cd84ba9f803af9d05a71b5aed1b15dc8 100644 (file)
@@ -7,6 +7,8 @@ extern "C" {
 
 #include "paramBlobRecord.h"
 
+#define EPICS_MAX_INDEX 4092
+
 ParamBlobRecord::ParamBlobRecord(caServer& cas, const Param *p, const char *rn, const char *u) :
   ParamRecord(cas, p, rn, u)
 {
@@ -14,6 +16,9 @@ ParamBlobRecord::ParamBlobRecord(caServer& cas, const Param *p, const char *rn,
        FILE *tmp;
        if(Param_getBlob(param, name, idx, &size, &tmp) == 0) {
                index = (unsigned int) ((size - 1) / sizeof(aitUint32)) + 2;
+               if (index > EPICS_MAX_INDEX) {
+                       index = 0;
+               }
        } else {
                index = 0;
        }
@@ -65,7 +70,7 @@ gddAppFuncTableStatus ParamBlobRecord::readValue(gdd &value)
 
        retVal = Param_getBlob(param, name, idx, &size, &blob);
        index = 2 + (((unsigned int) size - 1) / sizeof(aitUint32));
-       if((retVal != 0) || (index == 0)) {
+       if((retVal != 0) || (index == 0) || (index > EPICS_MAX_INDEX)) {
                return S_cas_noRead;
        } else {
                aitUint32 *ourValue = new aitUint32[index];
@@ -90,7 +95,7 @@ caStatus ParamBlobRecord::scan()
 
        retVal = Param_getBlob(param, name, idx, &size, &blob);
        index = 2 + (((unsigned int) size - 1) / sizeof(aitUint32));
-       if((retVal != 0) || (index == 0)) {
+       if((retVal != 0) || (index == 0) || (index > EPICS_MAX_INDEX)) {
                return S_cas_noRead;
        } else {
                aitUint32 *ourValue = new aitUint32[index];
index 10fb61b706a5ed58de3c1fa11ba7d9141e3f5195..af1ce82f4e3a95b9ee6a7fd6560379d508050ae7 100644 (file)
@@ -108,9 +108,9 @@ caStatus ParamIntRecord::scan()
                val->putConvert(intValue);
        } else {
                aitUint32 *intValue = new aitUint32[index];
-               for (unsigned int k = 0 ; k < index ; k++) {
+               for (unsigned int k = 0 ; k < index  ; k++) {
                        intValue[k] = ourValue[k];
-#if 0
+#if 1
                        fprintf(stderr, "intValue[%d] put: %d\n", k, intValue[k]);
 #endif
                }
index b62289ae78d8037f9cdf86fb78e6d950b8868f85..6b3f3e141473d8540cbfeb22d001d8793a9a9132 100644 (file)
@@ -11,7 +11,7 @@
 int b_odd_size(const char *testid) {
        Param *param;
        char *name = "file";
-       char *idx = "rname";
+       char *idx = "rnameodd";
        FILE *result;
        FILE *store;
        size_t size;
index f00d2065e213a5310e70e6a68e7f4e916aad1302..a626b77bd23212fca94e471182746ada6914a374 100644 (file)
@@ -31,7 +31,7 @@ int b_to_large(const char *testid) {
        conSetupParam(param, testid);
 
        retVal = Param_getBlob(param, name, idx, &size, &result);
-       if (((size == file->st_size) && (retVal == 0)) {
+       if ((size == file->st_size) && (retVal == 0)) {
                int buf;
                store = fopen("test1.blob", "w+");
                while((buf = fgetc(result)) != EOF) {
index 6258757487a594fa93f5abf894d5265e43f7d30c..ae56c07133a54e32e3dda56fc643fb92722a2897 100644 (file)
Binary files a/allParam/test/blob/test1.blob and b/allParam/test/blob/test1.blob differ
index 19d0002402a3e76a614c3e00975719af37dde868..31355666d103ad6956105bd8d71c481149c77e64 100644 (file)
@@ -2,5 +2,5 @@ set glob(basedir) blob
 
 set file(rname) test0.blob
 set file(aname) /test0.blob
-set file(rnamellarge) test1.blob
+set file(rnamelarge) test1.blob
 set file(rnameodd) test2.blob
diff --git a/allParam/test/test1.c b/allParam/test/test1.c
deleted file mode 100644 (file)
index d064a65..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-
-#include <allParam.h>
-
-#include "test1.h"
-
-int test1(const char *testid, const Param *param) {
-       char *name = "tname";
-       char *idx = "tstring";
-       char result[PARAM_MAX_VALUE_LEN];
-       int rows;
-       int retVal;
-       int myRetVal;
-
-       printf("%s : Param_getString: Lowercase input on correct statements.\n", testid);
-
-       retVal = Param_getString(param, name, idx, &rows, result);
-       if ((rows == 1) && result && (strcmp(result, "test100") == 0) && (retVal == 0)) {
-               myRetVal = 0;
-               printf("%s : Passed.\n", testid);
-       } else {
-               printf("%s : Failed. Rows: %d, result: \'%s\', return Value: %d.\n", testid, rows, result, retVal);
-               printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
-               myRetVal = -1;
-       }
-       return myRetVal;
-}
-
diff --git a/allParam/test/test1.h b/allParam/test/test1.h
deleted file mode 100644 (file)
index 3c59cfb..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef TEST1_H
-#define TEST1_H
-
-#include <allParam.h>
-
-int test1(const char *, const Param *);
-
-#endif
diff --git a/allParam/test/test10.c b/allParam/test/test10.c
deleted file mode 100644 (file)
index 45456d4..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-
-#include <allParam.h>
-
-#include "test10.h"
-
-int test10(const char *testid, const Param *param) {
-       char *name = "tname";
-       char *idx = "bla";
-       unsigned long int result;
-       int rows;
-       int retVal;
-       int myRetVal;
-
-       printf("%s : Param_getInt: Non-existing idx.\n", testid);
-
-       retVal = Param_getInt(param, name, idx, &rows, &result);
-       if ((rows == 0) && (retVal == 0)) {
-               myRetVal = 0;
-               printf("%s : Passed.\n", testid);
-       } else {
-               printf("%s : Failed. Rows: %d, return Value: %d.\n", testid, rows, retVal);
-               printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
-               myRetVal = -1;
-       }
-       return myRetVal;
-}
-
diff --git a/allParam/test/test10.h b/allParam/test/test10.h
deleted file mode 100644 (file)
index 494c275..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef TEST10_H
-#define TEST10_H
-
-#include <allParam.h>
-
-int test10(const char *, const Param *);
-
-#endif
diff --git a/allParam/test/test11.c b/allParam/test/test11.c
deleted file mode 100644 (file)
index bf07ed0..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-
-#include <allParam.h>
-
-#include "test11.h"
-
-int test11(const char *testid, const Param *param) {
-       char *name = "tname";
-       char *idx = "tint";
-       char result[PARAM_MAX_VALUE_LEN];
-       int rows;
-       int retVal;
-       int myRetVal;
-
-       printf("%s : Param_getString: String is wanted but int-like value found.\n", testid);
-
-       retVal = Param_getString(param, name, idx, &rows, result);
-       if ((rows == 1) && result && (strcmp(result, "100") == 0) && (retVal == 0)) {
-               myRetVal = 0;
-               printf("%s : Passed.\n", testid);
-       } else {
-               printf("%s : Failed. Rows: %d, result: \'%s\', return Value: %d.\n", testid, rows, result, retVal);
-               printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
-               myRetVal = -1;
-       }
-       return myRetVal;
-}
-
diff --git a/allParam/test/test11.h b/allParam/test/test11.h
deleted file mode 100644 (file)
index 9018171..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef TEST11_H
-#define TEST11_H
-
-#include <allParam.h>
-
-int test11(const char *, const Param *);
-
-#endif
diff --git a/allParam/test/test12.c b/allParam/test/test12.c
deleted file mode 100644 (file)
index 15c51b5..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-
-#include <allParam.h>
-
-#include "test12.h"
-
-int test12(const char *testid, const Param *param) {
-       char *name = "tname";
-       char *idx = "tstring";
-       unsigned long int result;
-       int rows;
-       int retVal;
-       int myRetVal;
-
-       printf("%s : Param_getInt: Integer is wanted but string-like value found.\n", testid);
-
-       retVal = Param_getInt(param, name, idx, &rows, &result);
-       if ((rows == 0) && (retVal == -1)) {
-               myRetVal = 0;
-               printf("%s : Passed.\n", testid);
-       } else {
-               printf("%s : Failed. Rows: %d, return Value: %d.\n", testid, rows, retVal);
-               printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
-               myRetVal = -1;
-       }
-       return myRetVal;
-}
-
diff --git a/allParam/test/test12.h b/allParam/test/test12.h
deleted file mode 100644 (file)
index 55d872b..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef TEST12_H
-#define TEST12_H
-
-#include <allParam.h>
-
-int test12(const char *, const Param *);
-
-#endif
diff --git a/allParam/test/test13.c b/allParam/test/test13.c
deleted file mode 100644 (file)
index 38eea13..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include <allParam.h>
-
-#include "test13.h"
-
-int test13(const char *testid, const Param *param) {
-       char *name = "tname";
-       char *idx = "bla";
-       char *result[NUM1];
-       int rows;
-       int retVal;
-       int myRetVal;
-       int i;
-
-       for (i = 0 ; i < NUM1 ; i++) {
-               result[i] = malloc(PARAM_MAX_VALUE_LEN * sizeof(char));
-       }
-       printf("%s : Param_getStringArray: Non-existing idx.\n", testid);
-
-       retVal = Param_getStringArray(param, name, idx, NUM1, &rows, result);
-       if ((rows == 0) && (retVal == 0)) {
-               myRetVal = 0;
-               printf("%s : Passed.\n", testid);
-       } else {
-               printf("%s : Failed. Rows: %d, return Value: %d.\n", testid, rows, retVal);
-               printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
-               myRetVal = -1;
-       }
-       for (i = 0 ; i < NUM1 ; i++) {
-               free(result[i]);
-       }
-       return myRetVal;
-}
-
diff --git a/allParam/test/test13.h b/allParam/test/test13.h
deleted file mode 100644 (file)
index 41b2a22..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef TEST13_H
-#define TEST13_H
-
-#include <allParam.h>
-
-#define NUM1 8
-
-int test13(const char *, const Param *);
-
-#endif
diff --git a/allParam/test/test14.c b/allParam/test/test14.c
deleted file mode 100644 (file)
index 70de9f3..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-
-#include <allParam.h>
-
-#include "test14.h"
-
-int test14(const char *testid, const Param *param) {
-       char *name = "tname";
-       char *idx = "bla";
-       unsigned long int result[NUM2];
-       int rows;
-       int retVal;
-       int myRetVal;
-
-       printf("%s : Param_getIntArray: Non-existing idx.\n", testid);
-
-       retVal = Param_getIntArray(param, name, idx, NUM2, &rows, result);
-       if ((rows == 0) && (retVal == 0)) {
-               myRetVal = 0;
-               printf("%s : Passed.\n", testid);
-       } else {
-               printf("%s : Failed. Rows: %d, return Value: %d\n", testid, rows, retVal);
-               printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
-               myRetVal = -1;
-       }
-       return myRetVal;
-}
-
diff --git a/allParam/test/test14.h b/allParam/test/test14.h
deleted file mode 100644 (file)
index b5d6bee..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef TEST14_H
-#define TEST14_H
-
-#include <allParam.h>
-
-#define NUM2 32
-
-int test14(const char *, const Param *);
-
-#endif
diff --git a/allParam/test/test15.c b/allParam/test/test15.c
deleted file mode 100644 (file)
index 720e3c4..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include <allParam.h>
-
-#include "test15.h"
-
-int test15(const char *testid, const Param *param) {
-       char *name = "tname";
-       char *idx = "tstringa";
-       char *result[NUM3];
-       int rows;
-       int retVal;
-       int myRetVal;
-       int i;
-
-       for (i = 0 ; i < NUM3 ; i++) {
-               result[i] = malloc(PARAM_MAX_VALUE_LEN * sizeof(char));
-       }
-       printf("%s : Param_getStringArray: To few array members available.\n", testid);
-
-       retVal = Param_getStringArray(param, name, idx, NUM3, &rows, result);
-       if ((rows == NUM1) &&
-               result[0] && (strcmp(result[0], "test1") == 0) &&
-               result[1] && (strcmp(result[1], "test0") == 0) &&
-               result[2] && (strcmp(result[2], "test3") == 0) &&
-               result[3] && (strcmp(result[3], "test2") == 0) &&
-               result[4] && (strcmp(result[4], "test5") == 0) &&
-               result[5] && (strcmp(result[5], "test4") == 0) &&
-               result[6] && (strcmp(result[6], "test7") == 0) &&
-               result[7] && (strcmp(result[7], "test6") == 0) &&
-               (retVal == 0)) {
-               myRetVal = 0;
-               printf("%s : Passed.\n", testid);
-       } else {
-               printf("%s : Failed. Rows: %d, return Value: %d.\n", testid, rows, retVal);
-               printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
-               myRetVal = -1;
-       }
-       for (i = 0 ; i < NUM3 ; i++) {
-               free(result[i]);
-       }
-       return myRetVal;
-}
-
diff --git a/allParam/test/test15.h b/allParam/test/test15.h
deleted file mode 100644 (file)
index fdbb051..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef TEST15_H
-#define TEST15_H
-
-#include <allParam.h>
-
-#define NUM1 8
-#define NUM3 16
-
-int test15(const char *, const Param *);
-
-#endif
diff --git a/allParam/test/test16.c b/allParam/test/test16.c
deleted file mode 100644 (file)
index ab733c9..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-
-#include <allParam.h>
-
-#include "test16.h"
-
-int test16(const char *testid, const Param *param) {
-       char *name = "tname";
-       char *idx = "tinta";
-       unsigned long int result[NUM4];
-       int rows;
-       int resultsum = 1;
-       int i;
-       int retVal;
-       int myRetVal;
-
-       printf("%s : Param_getIntArray: To few array members available.\n", testid);
-
-       retVal = Param_getIntArray(param, name, idx, NUM4, &rows, result);
-       for(i = 0 ; i < NUM2 ; i++) {
-               resultsum &= (result[i] == i + 1 - 2*(i%2));
-       }
-       if ((rows == NUM2) && resultsum && (retVal == 0)) {
-               myRetVal = 0;
-               printf("%s : Passed.\n", testid);
-       } else {
-               printf("%s : Failed. Rows: %d, return Value: %d\n", testid, rows, retVal);
-               printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
-               myRetVal = -1;
-       }
-       return myRetVal;
-}
-
diff --git a/allParam/test/test16.h b/allParam/test/test16.h
deleted file mode 100644 (file)
index 5d3d1b5..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef TEST16_H
-#define TEST16_H
-
-#include <allParam.h>
-
-#define NUM2 32
-#define NUM4 64
-
-int test16(const char *, const Param *);
-
-#endif
diff --git a/allParam/test/test17.c b/allParam/test/test17.c
deleted file mode 100644 (file)
index 22a9b5e..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include <allParam.h>
-
-#include "test17.h"
-
-int test17(const char *testid, const Param *param) {
-       char *name = "tname";
-       char *idx = "tstringa";
-       char *result[NUM5];
-       int rows;
-       int retVal;
-       int myRetVal;
-       int i;
-
-       for (i = 0 ; i < NUM5 ; i++) {
-               result[i] = malloc(PARAM_MAX_VALUE_LEN * sizeof(char));
-       }
-       printf("%s : Param_getStringArray: To many array members available.\n", testid);
-
-       retVal = Param_getStringArray(param, name, idx, NUM5, &rows, result);
-       if ((rows == NUM5) &&
-               result[0] && (strcmp(result[0], "test1") == 0) &&
-               result[1] && (strcmp(result[1], "test0") == 0) &&
-               result[2] && (strcmp(result[2], "test3") == 0) &&
-               result[3] && (strcmp(result[3], "test2") == 0) &&
-               (retVal == 0)) {
-               myRetVal = 0;
-               printf("%s : Passed.\n", testid);
-       } else {
-               printf("%s : Failed. Rows: %d, return Value: %d.\n", testid, rows, retVal);
-               printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
-               myRetVal = -1;
-       }
-       for (i = 0 ; i < NUM5 ; i++) {
-               free(result[i]);
-       }
-       return myRetVal;
-}
-
diff --git a/allParam/test/test17.h b/allParam/test/test17.h
deleted file mode 100644 (file)
index e1187d8..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef TEST17_H
-#define TEST17_H
-
-#include <allParam.h>
-
-#define NUM1 8
-#define NUM5 4
-
-int test17(const char *, const Param *);
-
-#endif
diff --git a/allParam/test/test18.c b/allParam/test/test18.c
deleted file mode 100644 (file)
index f41206f..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-
-#include <allParam.h>
-
-#include "test18.h"
-
-int test18(const char *testid, const Param *param) {
-       char *name = "tname";
-       char *idx = "tinta";
-       unsigned long int result[NUM6];
-       int rows;
-       int resultsum = 1;
-       int i;
-       int retVal;
-       int myRetVal;
-
-       printf("%s : Param_getIntArray: To many array members available.\n", testid);
-
-       retVal = Param_getIntArray(param, name, idx, NUM6, &rows, result);
-       for(i = 0 ; i < NUM6 ; i++) {
-               resultsum &= (result[i] == i + 1 - 2*(i%2));
-       }
-       if ((rows == NUM6) && resultsum && (retVal == 0)) {
-               myRetVal = 0;
-               printf("%s : Passed.\n", testid);
-       } else {
-               printf("%s : Failed. Rows: %d, return Value: %d\n", testid, rows, retVal);
-               printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
-               myRetVal = -1;
-       }
-       return myRetVal;
-}
-
diff --git a/allParam/test/test18.h b/allParam/test/test18.h
deleted file mode 100644 (file)
index c11451b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef TEST18_H
-#define TEST18_H
-
-#include <allParam.h>
-
-#define NUM2 32
-#define NUM6 16
-
-int test18(const char *, const Param *);
-
-#endif
diff --git a/allParam/test/test19.c b/allParam/test/test19.c
deleted file mode 100644 (file)
index 2b5607b..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include <allParam.h>
-
-#include "test19.h"
-
-int test19(const char *testid, const Param *param) {
-       char *name = "tname";
-       char *idx = "tinta";
-       char *result[NUM2];
-       int rows;
-       int retVal;
-       int myRetVal;
-       int i;
-
-       for (i = 0 ; i < NUM2 ; i++) {
-               result[i] = malloc(PARAM_MAX_VALUE_LEN * sizeof(char));
-       }
-       printf("%s : Param_getStringArray: String is wanted but Int-like values found.\n", testid);
-
-       retVal = Param_getStringArray(param, name, idx, NUM2, &rows, result);
-       if ((rows == NUM2) &&
-               result[0] && (strcmp(result[0], "1") == 0) &&
-               result[1] && (strcmp(result[1], "0") == 0) &&
-               result[2] && (strcmp(result[2], "3") == 0) &&
-               result[3] && (strcmp(result[3], "2") == 0) &&
-               result[4] && (strcmp(result[4], "5") == 0) &&
-               result[5] && (strcmp(result[5], "4") == 0) &&
-               result[6] && (strcmp(result[6], "7") == 0) &&
-               result[7] && (strcmp(result[7], "6") == 0) &&
-               result[8] && (strcmp(result[8], "9") == 0) &&
-               result[9] && (strcmp(result[9], "8") == 0) &&
-               result[10] && (strcmp(result[10], "11") == 0) &&
-               result[11] && (strcmp(result[11], "10") == 0) &&
-               result[12] && (strcmp(result[12], "13") == 0) &&
-               result[13] && (strcmp(result[13], "12") == 0) &&
-               result[14] && (strcmp(result[14], "15") == 0) &&
-               result[15] && (strcmp(result[15], "14") == 0) &&
-               result[16] && (strcmp(result[16], "17") == 0) &&
-               result[17] && (strcmp(result[17], "16") == 0) &&
-               result[18] && (strcmp(result[18], "19") == 0) &&
-               result[19] && (strcmp(result[19], "18") == 0) &&
-               result[20] && (strcmp(result[20], "21") == 0) &&
-               result[21] && (strcmp(result[21], "20") == 0) &&
-               result[22] && (strcmp(result[22], "23") == 0) &&
-               result[23] && (strcmp(result[23], "22") == 0) &&
-               result[24] && (strcmp(result[24], "25") == 0) &&
-               result[25] && (strcmp(result[25], "24") == 0) &&
-               result[26] && (strcmp(result[26], "27") == 0) &&
-               result[27] && (strcmp(result[27], "26") == 0) &&
-               result[28] && (strcmp(result[28], "29") == 0) &&
-               result[29] && (strcmp(result[29], "28") == 0) &&
-               result[30] && (strcmp(result[30], "31") == 0) &&
-               result[31] && (strcmp(result[31], "30") == 0) &&
-               (retVal == 0)) {
-               myRetVal = 0;
-               printf("%s : Passed.\n", testid);
-       } else {
-               printf("%s : Failed. Rows: %d, return Value: %d.\n", testid, rows, retVal);
-               printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
-               myRetVal = -1;
-       }
-       for (i = 0 ; i < NUM2 ; i++) {
-               free(result[i]);
-       }
-       return myRetVal;
-}
-
diff --git a/allParam/test/test19.h b/allParam/test/test19.h
deleted file mode 100644 (file)
index f1ac665..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef TEST19_H
-#define TEST19_H
-
-#include <allParam.h>
-
-#define NUM2 32
-
-int test19(const char *, const Param *);
-
-#endif
diff --git a/allParam/test/test2.c b/allParam/test/test2.c
deleted file mode 100644 (file)
index f34ffe8..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-
-#include <allParam.h>
-
-#include "test2.h"
-
-int test2(const char *testid, const Param *param) {
-       char *name = "tname";
-       char *idx = "tint";
-       unsigned long int result;
-       int rows;
-       int retVal;
-       int myRetVal;
-
-       printf("%s : Param_getInt: Lowercase input on correct statements.\n", testid);
-
-       retVal = Param_getInt(param, name, idx, &rows, &result);
-       if ((rows == 1) && (result == 100) && (retVal == 0)) {
-               myRetVal = 0;
-               printf("%s : Passed.\n", testid);
-       } else {
-               printf("%s : Failed. Rows: %d, result: \'%ld\', return Value: %d.\n", testid, rows, result, retVal);
-               printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
-               myRetVal = -1;
-       }
-       return myRetVal;
-}
-
diff --git a/allParam/test/test2.h b/allParam/test/test2.h
deleted file mode 100644 (file)
index f4d6fde..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef TEST2_H
-#define TEST2_H
-
-#include <allParam.h>
-
-int test2(const char *, const Param *);
-
-#endif
diff --git a/allParam/test/test20.c b/allParam/test/test20.c
deleted file mode 100644 (file)
index 35506dc..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-
-#include <allParam.h>
-
-#include "test20.h"
-
-int test20(const char *testid, const Param *param) {
-       char *name = "tname";
-       char *idx = "tstringa";
-       unsigned long int result[NUM1];
-       int rows;
-       int retVal;
-       int myRetVal;
-
-       printf("%s : Param_getIntArray: Int is wanted but String-like values found.\n", testid);
-
-       retVal = Param_getIntArray(param, name, idx, NUM1, &rows, result);
-       if ((rows == 0) && (retVal == -1)) {
-               myRetVal = 0;
-               printf("%s : Passed.\n", testid);
-       } else {
-               printf("%s : Failed. Rows: %d, return Value: %d\n", testid, rows, retVal);
-               printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
-               myRetVal = -1;
-       }
-       return myRetVal;
-}
-
diff --git a/allParam/test/test20.h b/allParam/test/test20.h
deleted file mode 100644 (file)
index 754e555..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef TEST20_H
-#define TEST20_H
-
-#include <allParam.h>
-
-#define NUM1 8
-
-int test20(const char *, const Param *);
-
-#endif
diff --git a/allParam/test/test21.c b/allParam/test/test21.c
deleted file mode 100644 (file)
index 76277d1..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include <allParam.h>
-
-#include "test21.h"
-
-int test21(const char *testid, const Param *param) {
-       char *name = "tname";
-       char *idx = "tstring";
-       char *result[NUM1];
-       int i;
-       int rows;
-       int retVal;
-       int myRetVal;
-
-       for (i = 0 ; i < NUM1 ; i++) {
-               result[i] = malloc(PARAM_MAX_VALUE_LEN * sizeof(char));
-       }
-       printf("%s : Param_getStringArray: Request for a scalar value.\n", testid);
-
-       retVal = Param_getStringArray(param, name, idx, NUM1, &rows, result);
-       if ((rows == 1) && result && (strcmp(result[0], "test100") == 0) && (retVal == 0)) {
-               myRetVal = 0;
-               printf("%s : Passed.\n", testid);
-       } else {
-               printf("%s : Failed. Rows: %d, result: \'%s\', return Value: %d.\n", testid, rows, result[0], retVal);
-               printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
-               myRetVal = -1;
-       }
-       for (i = 0 ; i < NUM1 ; i++) {
-               free(result[i]);
-       }
-       return myRetVal;
-}
-
diff --git a/allParam/test/test21.h b/allParam/test/test21.h
deleted file mode 100644 (file)
index 30e078c..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef TEST21_H
-#define TEST21_H
-
-#include <allParam.h>
-
-#define NUM1 8
-
-int test21(const char *, const Param *);
-
-#endif
diff --git a/allParam/test/test22.c b/allParam/test/test22.c
deleted file mode 100644 (file)
index 84dc726..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-
-#include <allParam.h>
-
-#include "test22.h"
-
-int test22(const char *testid, const Param *param) {
-       char *name = "tname";
-       char *idx = "tstringa";
-       char result[PARAM_MAX_VALUE_LEN];
-       int rows;
-       int retVal;
-       int myRetVal;
-
-       printf("%s : Param_getString: Request for Array value.\n", testid);
-
-       retVal = Param_getString(param, name, idx, &rows, result);
-       if ((rows == 1) &&
-               result && (strcmp(result, "test1") == 0) &&
-               (retVal == 0)) {
-               myRetVal = 0;
-               printf("%s : Passed.\n", testid);
-       } else {
-               printf("%s : Failed. Rows: %d, result : \'%s\', return Value: %d.\n", testid, rows, result, retVal);
-               printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
-               myRetVal = -1;
-       }
-       return myRetVal;
-}
-
diff --git a/allParam/test/test22.h b/allParam/test/test22.h
deleted file mode 100644 (file)
index 147f567..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef TEST22_H
-#define TEST22_H
-
-#include <allParam.h>
-
-int test22(const char *, const Param *);
-
-#endif
diff --git a/allParam/test/test3.c b/allParam/test/test3.c
deleted file mode 100644 (file)
index d8f5abd..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include <allParam.h>
-
-#include "test3.h"
-
-int test3(const char *testid, const Param *param) {
-       char *name = "tname";
-       char *idx = "tstringa";
-       char *result[NUM1];
-       int rows;
-       int retVal;
-       int myRetVal;
-       int i;
-
-       for (i = 0 ; i < NUM1 ; i++) {
-               result[i] = malloc(PARAM_MAX_VALUE_LEN * sizeof(char));
-       }
-       printf("%s : Param_getStringArray: Lowercase input on correct statements.\n", testid);
-
-       retVal = Param_getStringArray(param, name, idx, NUM1, &rows, result);
-       if ((rows == NUM1) &&
-               result[0] && (strcmp(result[0], "test1") == 0) &&
-               result[1] && (strcmp(result[1], "test0") == 0) &&
-               result[2] && (strcmp(result[2], "test3") == 0) &&
-               result[3] && (strcmp(result[3], "test2") == 0) &&
-               result[4] && (strcmp(result[4], "test5") == 0) &&
-               result[5] && (strcmp(result[5], "test4") == 0) &&
-               result[6] && (strcmp(result[6], "test7") == 0) &&
-               result[7] && (strcmp(result[7], "test6") == 0) &&
-               (retVal == 0)) {
-               myRetVal = 0;
-               printf("%s : Passed.\n", testid);
-       } else {
-               printf("%s : Failed. Rows: %d, result array:\n%s\n\n%s\n\n%s\n\n%s\n\n%s\n\n%s\n\n%s\n\n%s\nreturn Value: %d.\n", testid, rows,
-                       result[0],
-                       result[1],
-                       result[2],
-                       result[3],
-                       result[4],
-                       result[5],
-                       result[6],
-                       result[7],
-                       retVal);
-               printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
-               myRetVal = -1;
-       }
-       for (i = 0 ; i < NUM1 ; i++) {
-               free(result[i]);
-       }
-       return myRetVal;
-}
-
diff --git a/allParam/test/test3.h b/allParam/test/test3.h
deleted file mode 100644 (file)
index 0ad4432..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef TEST3_H
-#define TEST3_H
-
-#include <allParam.h>
-
-#define NUM1 8
-
-int test3(const char *, const Param *);
-
-#endif
diff --git a/allParam/test/test4.c b/allParam/test/test4.c
deleted file mode 100644 (file)
index 3941dfb..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-
-#include <allParam.h>
-
-#include "test4.h"
-
-int test4(const char *testid, const Param *param) {
-       char *name = "tname";
-       char *idx = "tinta";
-       unsigned long int result[NUM2];
-       int rows;
-       int resultsum = 1;
-       int i;
-       int retVal;
-       int myRetVal;
-
-       printf("%s : Param_getIntArray: Lowercase input on correct statements.\n", testid);
-
-       retVal = Param_getIntArray(param, name, idx, NUM2, &rows, result);
-       for(i = 0 ; i < NUM2 ; i++) {
-               resultsum &= (result[i] == i + 1 - 2*(i%2));
-       }
-       if ((rows == NUM2) && resultsum && (retVal == 0)) {
-               myRetVal = 0;
-               printf("%s : Passed.\n", testid);
-       } else {
-               printf("%s : Failed. Rows: %d, result array:\n", testid, rows);
-               for(i = 0 ; i < NUM2 ; i++) {
-                       printf("result[%d]: %ld.\n", i, result[i]);
-               }
-               printf("return Value: %d.\n", retVal);
-               printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
-               myRetVal = -1;
-       }
-       return myRetVal;
-}
-
diff --git a/allParam/test/test4.h b/allParam/test/test4.h
deleted file mode 100644 (file)
index d293afb..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef TEST4_H
-#define TEST4_H
-
-#include <allParam.h>
-
-#define NUM2 32
-
-int test4(const char *, const Param *);
-
-#endif
diff --git a/allParam/test/test5.c b/allParam/test/test5.c
deleted file mode 100644 (file)
index 1c2d450..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-
-#include <allParam.h>
-
-#include "test5.h"
-
-int test5(const char *testid, const Param *param) {
-       char *name = "TNAME";
-       char *idx = "TSTRING";
-       char result[PARAM_MAX_VALUE_LEN];
-       int rows;
-       int retVal;
-       int myRetVal;
-
-       printf("%s : Param_getString: Uppercase input on correct statements.\n", testid);
-
-       retVal = Param_getString(param, name, idx, &rows, result);
-       if ((rows == 1) && result && (strcmp(result, "test100") == 0) && (retVal == 0)) {
-               myRetVal = 0;
-               printf("%s : Passed.\n", testid);
-       } else {
-               printf("%s : Failed. Rows: %d, result: \'%s\', return Value: %d.\n", testid, rows, result, retVal);
-               printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
-               myRetVal = -1;
-       }
-       return myRetVal;
-}
-
diff --git a/allParam/test/test5.h b/allParam/test/test5.h
deleted file mode 100644 (file)
index c4a85f6..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef TEST5_H
-#define TEST5_H
-
-#include <allParam.h>
-
-int test5(const char *, const Param *);
-
-#endif
diff --git a/allParam/test/test6.c b/allParam/test/test6.c
deleted file mode 100644 (file)
index 4967ebb..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-
-#include <allParam.h>
-
-#include "test6.h"
-
-int test6(const char *testid, const Param *param) {
-       char *name = "TNAME";
-       char *idx = "TINT";
-       unsigned long int result;
-       int rows;
-       int retVal;
-       int myRetVal;
-
-       printf("%s : Param_getInt: Uppercase input on correct statements.\n", testid);
-
-       retVal = Param_getInt(param, name, idx, &rows, &result);
-       if ((rows == 1) && (result == 100) && (retVal == 0)) {
-               myRetVal = 0;
-               printf("%s : Passed.\n", testid);
-       } else {
-               printf("%s : Failed. Rows: %d, result: \'%ld\', return Value: %d.\n", testid, rows, result, retVal);
-               printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
-               myRetVal = -1;
-       }
-       return myRetVal;
-}
-
diff --git a/allParam/test/test6.h b/allParam/test/test6.h
deleted file mode 100644 (file)
index 9b146f2..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef TEST6_H
-#define TEST6_H
-
-#include <allParam.h>
-
-int test6(const char *, const Param *);
-
-#endif
diff --git a/allParam/test/test7.c b/allParam/test/test7.c
deleted file mode 100644 (file)
index ed73dc5..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include <allParam.h>
-
-#include "test7.h"
-
-int test7(const char *testid, const Param *param) {
-       char *name = "TNAME";
-       char *idx = "TSTRINGA";
-       char *result[NUM1];
-       int rows;
-       int retVal;
-       int myRetVal;
-       int i;
-
-       for (i = 0 ; i < NUM1 ; i++) {
-               result[i] = malloc(PARAM_MAX_VALUE_LEN * sizeof(char));
-       }
-       printf("%s : Param_getStringArray: Uppercase input on correct statements.\n", testid);
-
-       retVal = Param_getStringArray(param, name, idx, NUM1, &rows, result);
-       if ((rows == NUM1) &&
-               result[0] && (strcmp(result[0], "test1") == 0) &&
-               result[1] && (strcmp(result[1], "test0") == 0) &&
-               result[2] && (strcmp(result[2], "test3") == 0) &&
-               result[3] && (strcmp(result[3], "test2") == 0) &&
-               result[4] && (strcmp(result[4], "test5") == 0) &&
-               result[5] && (strcmp(result[5], "test4") == 0) &&
-               result[6] && (strcmp(result[6], "test7") == 0) &&
-               result[7] && (strcmp(result[7], "test6") == 0) &&
-               (retVal == 0)) {
-               myRetVal = 0;
-               printf("%s : Passed.\n", testid);
-       } else {
-               printf("%s : Failed. Rows: %d, result array:\n%s\n\n%s\n\n%s\n\n%s\n\n%s\n\n%s\n\n%s\n\n%s\nreturn Value: %d.\n", testid, rows,
-                       result[0],
-                       result[1],
-                       result[2],
-                       result[3],
-                       result[4],
-                       result[5],
-                       result[6],
-                       result[7],
-                       retVal);
-               printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
-               myRetVal = -1;
-       }
-       for (i = 0 ; i < NUM1 ; i++) {
-               free(result[i]);
-       }
-       return myRetVal;
-}
-
diff --git a/allParam/test/test7.h b/allParam/test/test7.h
deleted file mode 100644 (file)
index 4eaf352..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef TEST7_H
-#define TEST7_H
-
-#include <allParam.h>
-
-#define NUM1 8
-
-int test7(const char *, const Param *);
-
-#endif
diff --git a/allParam/test/test8.c b/allParam/test/test8.c
deleted file mode 100644 (file)
index 7a8711e..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-
-#include <allParam.h>
-
-#include "test8.h"
-
-int test8(const char *testid, const Param *param) {
-       char *name = "TNAME";
-       char *idx = "TINTA";
-       unsigned long int result[NUM2];
-       int rows;
-       int resultsum = 1;
-       int i;
-       int retVal;
-       int myRetVal;
-
-       printf("%s : Param_getIntArray: Uppercase input on correct statements.\n", testid);
-
-       retVal = Param_getIntArray(param, name, idx, NUM2, &rows, result);
-       for(i = 0 ; i < NUM2 ; i++) {
-               resultsum &= (result[i] == i + 1 - 2*(i%2));
-       }
-       if ((rows == NUM2) && resultsum && (retVal == 0)) {
-               myRetVal = 0;
-               printf("%s : Passed.\n", testid);
-       } else {
-               printf("%s : Failed. Rows: %d, result array:\n", testid, rows);
-               for(i = 0 ; i < NUM2 ; i++) {
-                       printf("result[%d]: %ld.\n", i, result[i]);
-               }
-               printf("return Value: %d.\n", retVal);
-               printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
-               myRetVal = -1;
-       }
-       return myRetVal;
-}
-
diff --git a/allParam/test/test8.h b/allParam/test/test8.h
deleted file mode 100644 (file)
index 854f879..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef TEST8_H
-#define TEST8_H
-
-#include <allParam.h>
-
-#define NUM2 32
-
-int test8(const char *, const Param *);
-
-#endif
diff --git a/allParam/test/test9.c b/allParam/test/test9.c
deleted file mode 100644 (file)
index 2829d35..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-
-#include <allParam.h>
-
-#include "test9.h"
-
-int test9(const char *testid, const Param *param) {
-       char *name = "tname";
-       char *idx = "bla";
-       char result[PARAM_MAX_VALUE_LEN];
-       int rows;
-       int retVal;
-       int myRetVal;
-
-       printf("%s : Param_getString: Non-existing idx.\n", testid);
-
-       retVal = Param_getString(param, name, idx, &rows, result);
-       if ((rows == 0) && (retVal == 0)) {
-               myRetVal = 0;
-               printf("%s : Passed.\n", testid);
-       } else {
-               printf("%s : Failed. Rows: %d, return Value: %d.\n", testid, rows, retVal);
-               printf("%s : Error string: %s\n", testid, Param_getErrStr(param));
-               myRetVal = -1;
-       }
-       return myRetVal;
-}
-
diff --git a/allParam/test/test9.h b/allParam/test/test9.h
deleted file mode 100644 (file)
index d880f40..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef TEST9_H
-#define TEST9_H
-
-#include <allParam.h>
-
-int test9(const char *, const Param *);
-
-#endif