]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
*** empty log message ***
authorhades <hades>
Fri, 8 Sep 2000 14:55:07 +0000 (14:55 +0000)
committerhades <hades>
Fri, 8 Sep 2000 14:55:07 +0000 (14:55 +0000)
allParam/ca/caParam.h
allParam/file/fileParam.c
allParam/file/fileParam.h
allParam/ora/oraParam.h
allParam/psql/psqlParam.h
allParam/tcl/tclParam.c
allParam/tcl/tclParam.h
allParam/test/Makefile
allParam/test/suite.c

index 4f8b1ff90540eec95092e840e48f12196bcd3954..38eb5abb4aeda0306daef66ae493d91b6d6a5f57 100644 (file)
@@ -1,6 +1,10 @@
 #ifndef PARAM_H
 #define PARAM_H
 
+#define PARAM_MAX_NVALS 1024
+#define PARAM_MAX_VALUE_LEN 128
+#define PARAM_MAX_NAME_LEN 128
+
 /**************************************************************************
  * Section containing struct Param (different in the different param.h's) *
  **************************************************************************/
@@ -26,48 +30,6 @@ typedef struct ParamResultS {
 int conParam(Param *);
 void desParam(Param *);
 
-/*
- * All functions have a status as return value. The value i 0 if everything
- * worked correctly and -1 if an error occured. In this case, you can get
- * the address of an error String via the function Param_getErrStr().
- *
- * Memory must be allocated for the result before the function is called.
- * In the non-array-functions at &row is filled with 0 or 1 depending on
- * whether the Parameter is found or not.
- * For example, calling Param_getInt needs
- *
- * > int row;
- * > unsigned long int value;
- * > if(Param_getInt(param, name, idx, &row, &value) != 0) {
- * >     syslog(LOG_ERR, "Error retrieving value of %s(%s). Exiting.\n", name, idx);
- * >     exit(-1);
- * > } else if(row == 0) {
- * >     syslog(LOG_ERR, "Parameter %s(%s) not found. Exiting.\n", name, idx);
- * >     exit(-1);
- * > }
- *
- * In the array functions maxrows must supply the memory available for the
- * result while the actual number of result rows is stored in rows.
- *
- * For strings char[PARAM_MAX_VALUE_LEN] has to be allocated. Therefore the
- * above example expands to
- *
- * > int rows;
- * > int maxrows = 32;
- * > char value[PARAM_MAX_VALUE_LEN][maxrows];
- * > if(Param_getStringArray(param, name, idx, maxrows, &rows, value) != 0) {
- * >     syslog(LOG_ERR, "Error retrieving values of %s(%s). Exiting.\n", name, idx);
- * >     exit(-1);
- * > } else if(row != maxrows) {
- * >     syslog(LOG_WARNING, "%d Parameters %s(%s) found instead of %d.\n", rows, name, idx, maxrows);
- * > }
- * 
- */
-
-#define PARAM_MAX_NVALS 1024
-#define PARAM_MAX_VALUE_LEN 128
-#define PARAM_MAX_NAME_LEN 128
-
 int Param_getInt(const Param *, const char *, const char *, int *, unsigned long int *);
 int Param_getString(const Param *, const char *, const char *, int *, char *);
 int Param_getIntArray(const Param *, const char *, const char *, int, int *, unsigned long int *);
index ee68b97a8055a9bbe1cad4daf294987ddbd48c56..c2bae3fdbceb4b41b516acbec49f8d921267ab24 100644 (file)
@@ -61,86 +61,72 @@ void desParam(Param *my)
 
 int Param_getInt(const Param *my, const char *name, const char *idx, int *row, unsigned long int *val)
 {
-       int retVal;
-       char valstr[PARAM_MAX_VALUE_LEN];
-       char *endptr;
-
-       if ((retVal = Param_getString(my, name, idx, row, valstr)) != 0) {
-               return retVal;
-       }
-       *val = strtoul(valstr, &endptr, 0);
-       if (*endptr != '\0') {
-               Param_strerror((Param *) my, "Value seems to be no integer.\n");
-               *row = 0;
-               retVal = -1;
-       }
-       return retVal;
+       return Param_getIntArray(my, name, idx, 1, row, val);
 }
 
 int Param_getString(const Param *my, const char *name, const char *idx, int *row, char *val)
 {
-       int i;
-       int n;
-       char lname[PARAM_MAX_NAME_LEN];
-       char lidx[PARAM_MAX_NAME_LEN];
-
-       for(i = 0 ; i <=strlen(name) ; i++) {
-               lname[i] = tolower(name[i]);
-       }
-       for(i = 0 ; i <=strlen(idx) ; i++) {
-               lidx[i] = tolower(idx[i]);
-       }
-
-
-       n = Param_getParamNumber(my, lname, lidx);
-       if (n == -1) {
-               strcpy(val, "");
-               Param_strerror((Param *) my, "Parameter not found.\n");
-               *row = 0;
-       } else {
-               strcpy(val, my->value[n]);
-               *row = 1;
-       }
-       return 0;
+       return Param_getStringArray(my, name, idx, 1, row, &val);
 }
 
 int Param_getIntArray(const Param *my, const char *name, const char *idx, int maxrows, int *rows, unsigned long int *val)
 {
-       int row;
        int retVal = 0;
        int i;
-       char index[PARAM_MAX_NAME_LEN];
+       char *endptr;
+       char *strval[PARAM_MAX_NVALS];
 
-       *rows = 0;
        for (i = 0 ; i < maxrows ; i++) {
-               sprintf(index,"%s%d", idx, i);
-               if(((retVal |= Param_getInt(my, name, index, &row, &val[i])) == 0) && (row == 1)) {
-                       (*rows)++;
-               } else {
-                       return retVal;
+               strval[i] = malloc(PARAM_MAX_VALUE_LEN * sizeof(char));
+       }
+       *rows = 0;
+       if((retVal |= Param_getStringArray(my, name, idx, maxrows, rows, strval)) == 0) {
+               for (i = 0 ; i < *rows ; i++) {
+                       val[i] = strtoul(strval[i], &endptr, 0);
+                       if (*endptr != '\0') {
+                               *rows = 0;
+                               retVal = -1;
+                               Param_strerror((Param *) my, "Value seems to be no integer.");
+                       }
                }
        }
-       
+       for (i = 0 ; i < maxrows ; i++) {
+               strval[i] = malloc(PARAM_MAX_VALUE_LEN * sizeof(char));
+       }
        return retVal;
 }
 
 int Param_getStringArray(const Param *my, const char *name, const char *idx, int maxrows, int *rows, char **val)
 {
-       int row;
        int retVal = 0;
        int i;
-       char index[PARAM_MAX_NAME_LEN];
+       int n;
+       char lname[PARAM_MAX_NAME_LEN];
+       char lidx[PARAM_MAX_NAME_LEN];
+
+       for(i = 0 ; i <=strlen(name) ; i++) {
+               lname[i] = tolower(name[i]);
+       }
+       for(i = 0 ; i <=strlen(idx) ; i++) {
+               lidx[i] = tolower(idx[i]);
+       }
 
        *rows = 0;
-       for (i = 0 ; i < maxrows ; i++) {
-               sprintf(index,"%s%d", idx, i);
-               if(((retVal |= Param_getString(my, name, index, &row, val[i])) == 0) && (row == 1)) {
-                       (*rows)++;
-               } else {
-                       return retVal;
+       if((n = Param_getParamNumber(my, lname, lidx)) != -1) {
+               strcpy(val[0], my->value[n]);
+               *rows = 1;
+       } else {
+               char index[PARAM_MAX_NAME_LEN];
+               for (i = 0 ; i < maxrows ; i++) {
+                       sprintf(index,"%s%d", lidx, i);
+                       if((n = Param_getParamNumber(my, lname, index)) != -1) {
+                               strcpy(val[i], my->value[n]);
+                               (*rows)++;
+                       } else {
+                               i = maxrows;
+                       }
                }
        }
-
        return retVal;
 }
 
index d503d39892fea3aa447593083dec8937a5d197c1..135a1cc0f9b5526d8d358a32b560acce7e6a68c4 100644 (file)
@@ -1,6 +1,10 @@
 #ifndef PARAM_H
 #define PARAM_H
 
+#define PARAM_MAX_NVALS 1024
+#define PARAM_MAX_VALUE_LEN 128
+#define PARAM_MAX_NAME_LEN 128
+
 /**************************************************************************
  * Section containing struct Param (different in the different param.h's) *
  **************************************************************************/
@@ -20,48 +24,6 @@ typedef struct ParamS {
 int conParam(Param *);
 void desParam(Param *);
 
-/*
- * All functions have a status as return value. The value i 0 if everything
- * worked correctly and -1 if an error occured. In this case, you can get
- * the address of an error String via the function Param_getErrStr().
- *
- * Memory must be allocated for the result before the function is called.
- * In the non-array-functions at &row is filled with 0 or 1 depending on
- * whether the Parameter is found or not.
- * For example, calling Param_getInt needs
- *
- * > int row;
- * > unsigned long int value;
- * > if(Param_getInt(param, name, idx, &row, &value) != 0) {
- * >     syslog(LOG_ERR, "Error retrieving value of %s(%s). Exiting.\n", name, idx);
- * >     exit(-1);
- * > } else if(row == 0) {
- * >     syslog(LOG_ERR, "Parameter %s(%s) not found. Exiting.\n", name, idx);
- * >     exit(-1);
- * > }
- *
- * In the array functions maxrows must supply the memory available for the
- * result while the actual number of result rows is stored in rows.
- *
- * For strings char[PARAM_MAX_VALUE_LEN] has to be allocated. Therefore the
- * above example expands to
- *
- * > int rows;
- * > int maxrows = 32;
- * > char value[PARAM_MAX_VALUE_LEN][maxrows];
- * > if(Param_getStringArray(param, name, idx, maxrows, &rows, value) != 0) {
- * >     syslog(LOG_ERR, "Error retrieving values of %s(%s). Exiting.\n", name, idx);
- * >     exit(-1);
- * > } else if(row != maxrows) {
- * >     syslog(LOG_WARNING, "%d Parameters %s(%s) found instead of %d.\n", rows, name, idx, maxrows);
- * > }
- * 
- */
-
-#define PARAM_MAX_NVALS 1024
-#define PARAM_MAX_VALUE_LEN 128
-#define PARAM_MAX_NAME_LEN 128
-
 int Param_getInt(const Param *, const char *, const char *, int *, unsigned long int *);
 int Param_getString(const Param *, const char *, const char *, int *, char *);
 int Param_getIntArray(const Param *, const char *, const char *, int, int *, unsigned long int *);
index ef65659c0932cf432fde5e5c81d6c657da58630b..41c000fe1ca3d209d0a25d466fabd9cf20902e56 100644 (file)
@@ -1,6 +1,10 @@
 #ifndef PARAM_H
 #define PARAM_H
 
+#define PARAM_MAX_NVALS 1024
+#define PARAM_MAX_VALUE_LEN 128
+#define PARAM_MAX_NAME_LEN 128
+
 /**************************************************************************
  * Section containing struct Param (different in the different param.h's) *
  **************************************************************************/
@@ -18,48 +22,6 @@ typedef struct ParamS {
 int conParam(Param *);
 void desParam(Param *);
 
-/*
- * All functions have a status as return value. The value i 0 if everything
- * worked correctly and -1 if an error occured. In this case, you can get
- * the address of an error String via the function Param_getErrStr().
- *
- * Memory must be allocated for the result before the function is called.
- * In the non-array-functions at &row is filled with 0 or 1 depending on
- * whether the Parameter is found or not.
- * For example, calling Param_getInt needs
- *
- * > int row;
- * > unsigned long int value;
- * > if(Param_getInt(param, name, idx, &row, &value) != 0) {
- * >     syslog(LOG_ERR, "Error retrieving value of %s(%s). Exiting.\n", name, idx);
- * >     exit(-1);
- * > } else if(row == 0) {
- * >     syslog(LOG_ERR, "Parameter %s(%s) not found. Exiting.\n", name, idx);
- * >     exit(-1);
- * > }
- *
- * In the array functions maxrows must supply the memory available for the
- * result while the actual number of result rows is stored in rows.
- *
- * For strings char[PARAM_MAX_VALUE_LEN] has to be allocated. Therefore the
- * above example expands to
- *
- * > int rows;
- * > int maxrows = 32;
- * > char value[PARAM_MAX_VALUE_LEN][maxrows];
- * > if(Param_getStringArray(param, name, idx, maxrows, &rows, value) != 0) {
- * >     syslog(LOG_ERR, "Error retrieving values of %s(%s). Exiting.\n", name, idx);
- * >     exit(-1);
- * > } else if(row != maxrows) {
- * >     syslog(LOG_WARNING, "%d Parameters %s(%s) found instead of %d.\n", rows, name, idx, maxrows);
- * > }
- * 
- */
-
-#define PARAM_MAX_NVALS 1024
-#define PARAM_MAX_VALUE_LEN 128
-#define PARAM_MAX_NAME_LEN 128
-
 int Param_getInt(const Param *, const char *, const char *, int *, unsigned long int *);
 int Param_getString(const Param *, const char *, const char *, int *, char *);
 int Param_getIntArray(const Param *, const char *, const char *, int, int *, unsigned long int *);
index 060bd9f0a3787f37d71ba0a90a2563bea3a1ec63..d7e9ea68d5094c9fde4d37f6f16f8767ce38144e 100644 (file)
@@ -1,6 +1,10 @@
 #ifndef PARAM_H
 #define PARAM_H
 
+#define PARAM_MAX_NVALS 1024
+#define PARAM_MAX_VALUE_LEN 128
+#define PARAM_MAX_NAME_LEN 128
+
 /**************************************************************************
  * Section containing struct Param (different in the different param.h's) *
  **************************************************************************/
@@ -19,48 +23,6 @@ typedef struct ParamS {
 int conParam(Param *);
 void desParam(Param *);
 
-/*
- * All functions have a status as return value. The value i 0 if everything
- * worked correctly and -1 if an error occured. In this case, you can get
- * the address of an error String via the function Param_getErrStr().
- *
- * Memory must be allocated for the result before the function is called.
- * In the non-array-functions at &row is filled with 0 or 1 depending on
- * whether the Parameter is found or not.
- * For example, calling Param_getInt needs
- *
- * > int row;
- * > unsigned long int value;
- * > if(Param_getInt(param, name, idx, &row, &value) != 0) {
- * >     syslog(LOG_ERR, "Error retrieving value of %s(%s). Exiting.\n", name, idx);
- * >     exit(-1);
- * > } else if(row == 0) {
- * >     syslog(LOG_ERR, "Parameter %s(%s) not found. Exiting.\n", name, idx);
- * >     exit(-1);
- * > }
- *
- * In the array functions maxrows must supply the memory available for the
- * result while the actual number of result rows is stored in rows.
- *
- * For strings char[PARAM_MAX_VALUE_LEN] has to be allocated. Therefore the
- * above example expands to
- *
- * > int rows;
- * > int maxrows = 32;
- * > char value[PARAM_MAX_VALUE_LEN][maxrows];
- * > if(Param_getStringArray(param, name, idx, maxrows, &rows, value) != 0) {
- * >     syslog(LOG_ERR, "Error retrieving values of %s(%s). Exiting.\n", name, idx);
- * >     exit(-1);
- * > } else if(row != maxrows) {
- * >     syslog(LOG_WARNING, "%d Parameters %s(%s) found instead of %d.\n", rows, name, idx, maxrows);
- * > }
- * 
- */
-
-#define PARAM_MAX_NVALS 1024
-#define PARAM_MAX_VALUE_LEN 128
-#define PARAM_MAX_NAME_LEN 128
-
 int Param_getInt(const Param *, const char *, const char *, int *, unsigned long int *);
 int Param_getString(const Param *, const char *, const char *, int *, char *);
 int Param_getIntArray(const Param *, const char *, const char *, int, int *, unsigned long int *);
index 49d18e8c73381b7084aace2405016058e519701f..46c3e0362280c00ea26810ee0232ffab469761fb 100644 (file)
@@ -28,7 +28,7 @@ int conParam(Param *my)
                if (*my->interp->result != 0) {
                        Param_strerror(my, my->interp->result);
                } else {
-                       Param_strerror((Param *) my, "Tcl interpreter cannot read file correctly and does not deliver an error string.\n");
+                       Param_strerror((Param *) my, "Tcl interpreter cannot read file correctly and does not deliver an error string.");
                }
                retVal = -1;
        } else {
@@ -44,69 +44,38 @@ void desParam(Param *my)
 
 int Param_getInt(const Param *my, const char *name, const char *idx, int *row, unsigned long int *val)
 {
-       char valstr[PARAM_MAX_VALUE_LEN];
-       char *endptr;
-
-       if (Param_getString(my, name, idx, row, valstr) != 0) {
-               return -1;
-       } else if(*row == 0) {
-               return 0;
-       }
-       if(valstr == NULL) {
-               *row = 0;
-       } else {
-               *val = strtoul(valstr, &endptr, 0);
-               if (*endptr != '\0') {
-                       Param_strerror((Param *) my, "Value seems to be no integer.\n");
-                       *row = 0;
-                       return -1;
-               } else {
-                       *row = 1;
-               }
-       }
-       return 0;
+       return Param_getIntArray(my, name, idx, 1, row, val);
 }
 
 int Param_getString(const Param *my, const char *name, const char *idx, int *row, char *val)
 {
-       int retVal;
-       int i;
-       char lname[PARAM_MAX_NAME_LEN];
-       char lidx[PARAM_MAX_NAME_LEN];
-
-       for(i = 0 ; i <=strlen(name) ; i++) {
-               lname[i] = tolower(name[i]);
-       }
-       for(i = 0 ; i <=strlen(idx) ; i++) {
-               lidx[i] = tolower(idx[i]);
-       }
-
-       if(Tcl_GetVar2(my->interp, lname, lidx, 0) == 0) {
-               *row = 0;
-       } else {
-               strcpy(val, Tcl_GetVar2(my->interp, lname, lidx, 0));
-               *row = 1;
-       }
-       return 0;
+       return Param_getStringArray(my, name, idx, 1, row, &val);
 }
 
 int Param_getIntArray(const Param *my, const char *name, const char *idx, int maxrows, int *rows, unsigned long int *val)
 {
        int retVal = 0;
        int i;
-       int row;
-       char index[PARAM_MAX_NAME_LEN];
+       char *endptr;
+       char *strval[PARAM_MAX_NVALS];
 
-       *rows = 0;
        for (i = 0 ; i < maxrows ; i++) {
-               sprintf(index,"%s%d", idx, i);
-               if(((retVal |= Param_getInt(my, name, index, &row, &val[i])) == 0) && (row == 1)) {
-                       (*rows)++;
-               } else {
-                       return retVal;
+               strval[i] = malloc(PARAM_MAX_VALUE_LEN * sizeof(char));
+       }
+       *rows = 0;
+       if((retVal |= Param_getStringArray(my, name, idx, maxrows, rows, strval)) == 0) {
+               for (i = 0 ; i < *rows ; i++) {
+                       val[i] = strtoul(strval[i], &endptr, 0);
+                       if (*endptr != '\0') {
+                               *rows = 0;
+                               retVal = -1;
+                               Param_strerror((Param *) my, "Value seems to be no integer.");
+                       }
                }
        }
-
+       for (i = 0 ; i < maxrows ; i++) {
+               strval[i] = malloc(PARAM_MAX_VALUE_LEN * sizeof(char));
+       }
        return retVal;
 }
 
@@ -115,18 +84,32 @@ int Param_getStringArray(const Param *my, const char *name, const char *idx, int
        int retVal = 0;
        int i;
        int row;
-       char index[PARAM_MAX_NAME_LEN];
+       char lname[PARAM_MAX_NAME_LEN];
+       char lidx[PARAM_MAX_NAME_LEN];
+
+       for(i = 0 ; i <=strlen(name) ; i++) {
+               lname[i] = tolower(name[i]);
+       }
+       for(i = 0 ; i <=strlen(idx) ; i++) {
+               lidx[i] = tolower(idx[i]);
+       }
 
        *rows = 0;
-       for (i = 0 ; i < maxrows ; i++) {
-               sprintf(index,"%s%d", idx, i);
-               if(((retVal |= Param_getString(my, name, index, &row, val[i])) == 0) && (row == 1)) {
-                       (*rows)++;
-               } else {
-                       return retVal;
+       if(Tcl_GetVar2(my->interp, lname, lidx, 0) != 0) {
+               strcpy(val[0], Tcl_GetVar2(my->interp, lname, lidx, 0));
+               *rows = 1;
+       } else {
+               char index[PARAM_MAX_NAME_LEN];
+               for (i = 0 ; i < maxrows ; i++) {
+                       sprintf(index,"%s%d", lidx, i);
+                       if(Tcl_GetVar2(my->interp, lname, index, 0) != 0) {
+                               strcpy(val[i], Tcl_GetVar2(my->interp, lname, index, 0));
+                               (*rows)++;
+                       } else {
+                               i = maxrows;
+                       }
                }
        }
-
        return retVal;
 }
 
index fbb86d19e228b8843aed6fdade5fbe6b0738de92..003ba05d10d6510d401ccca925cd36fcf8356174 100644 (file)
@@ -1,6 +1,10 @@
 #ifndef PARAM_H
 #define PARAM_H
 
+#define PARAM_MAX_NVALS 1024
+#define PARAM_MAX_VALUE_LEN 128
+#define PARAM_MAX_NAME_LEN 128
+
 /**************************************************************************
  * Section containing struct Param (different in the different param.h's) *
  **************************************************************************/
@@ -19,48 +23,6 @@ typedef struct ParamS {
 int conParam(Param *);
 void desParam(Param *);
 
-/*
- * All functions have a status as return value. The value i 0 if everything
- * worked correctly and -1 if an error occured. In this case, you can get
- * the address of an error String via the function Param_getErrStr().
- *
- * Memory must be allocated for the result before the function is called.
- * In the non-array-functions at &row is filled with 0 or 1 depending on
- * whether the Parameter is found or not.
- * For example, calling Param_getInt needs
- *
- * > int row;
- * > unsigned long int value;
- * > if(Param_getInt(param, name, idx, &row, &value) != 0) {
- * >     syslog(LOG_ERR, "Error retrieving value of %s(%s). Exiting.\n", name, idx);
- * >     exit(-1);
- * > } else if(row == 0) {
- * >     syslog(LOG_ERR, "Parameter %s(%s) not found. Exiting.\n", name, idx);
- * >     exit(-1);
- * > }
- *
- * In the array functions maxrows must supply the memory available for the
- * result while the actual number of result rows is stored in rows.
- *
- * For strings char[PARAM_MAX_VALUE_LEN] has to be allocated. Therefore the
- * above example expands to
- *
- * > int rows;
- * > int maxrows = 32;
- * > char value[PARAM_MAX_VALUE_LEN][maxrows];
- * > if(Param_getStringArray(param, name, idx, maxrows, &rows, value) != 0) {
- * >     syslog(LOG_ERR, "Error retrieving values of %s(%s). Exiting.\n", name, idx);
- * >     exit(-1);
- * > } else if(row != maxrows) {
- * >     syslog(LOG_WARNING, "%d Parameters %s(%s) found instead of %d.\n", rows, name, idx, maxrows);
- * > }
- * 
- */
-
-#define PARAM_MAX_NVALS 1024
-#define PARAM_MAX_VALUE_LEN 128
-#define PARAM_MAX_NAME_LEN 128
-
 int Param_getInt(const Param *, const char *, const char *, int *, unsigned long int *);
 int Param_getString(const Param *, const char *, const char *, int *, char *);
 int Param_getIntArray(const Param *, const char *, const char *, int, int *, unsigned long int *);
index 61028e16357b75fcb9c615e6e28e41e042147741..52a0444d157bdce11503115c202ee8b25357080b 100644 (file)
@@ -24,10 +24,10 @@ LOADPSQLLIBES = -L$(HOME)/lib/$(SYSTYPE) -lpsqlParam -lpq -lcrypt
 
 # Tcl test
 TCLCFLAGS = -I$(HOME)/include/tcl
-LOADTCLLIBES = -L$(HOME)/lib/$(SYSTYPE) -ltclParam -ltcl -lm -ldl
+LOADTCLLIBES = -L$(HOME)/lib/$(SYSTYPE) -ltclParam -ltcl8.0 -lm -ldl
 
 TESTS = test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 \
-  test12 test13 test14 test15 test16 test17 test18 test19 test20
+  test12 test13 test14 test15 test16 test17 test18 test19 test20 test21 test22
 
 OBJS = suite.o $(addsuffix .o,$(TESTS))
 
index 39e498e9bd623b41dcdc094486d7bf04f51fba5a..7a4974a3c72c2a68837f82b473030e2f9e8a76b6 100644 (file)
@@ -23,6 +23,8 @@
 #include "test18.h"
 #include "test19.h"
 #include "test20.h"
+#include "test21.h"
+#include "test22.h"
 
 int main(int argc, char *argv[]) {
        Param *param;
@@ -54,6 +56,8 @@ int main(int argc, char *argv[]) {
        errors -= test18("Test 18", param);
        errors -= test19("Test 19", param);
        errors -= test20("Test 20", param);
+       errors -= test21("Test 21", param);
+       errors -= test22("Test 22", param);
 
        desParam(param);
        free(param);