From 8a4bedda7a77e88e13c088800fb1f3d2dabcb16d Mon Sep 17 00:00:00 2001 From: hadaq Date: Thu, 16 May 2002 16:45:23 +0000 Subject: [PATCH] *** empty log message *** --- allParam/ca/client/Makefile | 3 +- allParam/ca/client/caParam.c | 399 +++++++++++++++++++-------- allParam/ca/server/Makefile | 2 +- allParam/ca/server/paramRecordSet.cc | 1 + allParam/file/Makefile | 3 +- allParam/file/fileParam.c | 4 + allParam/include/allParam.h | 1 + allParam/ora/Makefile | 3 +- allParam/ora/oraParam.pc | 4 + allParam/psql/psqlParam.c | 4 + allParam/tcl/Makefile | 3 +- allParam/tcl/tclParam.c | 6 +- 12 files changed, 313 insertions(+), 120 deletions(-) diff --git a/allParam/ca/client/Makefile b/allParam/ca/client/Makefile index b5ba6ea..c09a438 100644 --- a/allParam/ca/client/Makefile +++ b/allParam/ca/client/Makefile @@ -11,7 +11,8 @@ install : libcaParam.a -mkdir -p $(LIBDIR) cp $< $(LIBDIR) -mkdir -p $(INCDIR) - cp -f ../../include/allParam.h $(INCDIR) + rm -f $(INCDIR)/allParam.h + cp ../../include/allParam.h $(INCDIR) clean : rm -f *.o diff --git a/allParam/ca/client/caParam.c b/allParam/ca/client/caParam.c index 0e59eb0..33cef60 100644 --- a/allParam/ca/client/caParam.c +++ b/allParam/ca/client/caParam.c @@ -9,6 +9,7 @@ #include #include +#include #include @@ -19,6 +20,15 @@ static void Param_copyIntsToAllocMem(struct event_handler_args args); static void Param_copyBlobToAllocMem(struct event_handler_args args); static void Param_returnPVName(const Param *my, const char *, const char *, const char *, char *); static void Param_strerror(Param *, const char *); +static int Param_getIntArrayCache(const Param *, const char *, const char *, int, int *, unsigned long int *); +static int Param_getStringArrayCache(const Param *, const char *, const char *, int, int *, char **); +static int Param_getFilenameArrayCache(const Param *, const char *, const char *, int, int *, char **); +static int Param_storeIntCache(const Param *, const char *, const char *, unsigned long int); +static int Param_storeStringCache(const Param *, const char *, const char *, const char *); + +typedef struct CaParamS { + Tcl_Interp *cache; +} CaParam; typedef struct ParamStringResultS { char **val; @@ -46,12 +56,16 @@ typedef struct ParamBlobResultS { int conSetupParam(Param *my, const char *setup) { my->strerror = NULL; + my->specParam = malloc(sizeof(CaParam)); + if(setup != NULL) { my->setup = malloc(strlen(setup) + 1); strcpy(my->setup, setup); } else { my->setup = NULL; } + ((CaParam *) (my->specParam))->cache = Tcl_CreateInterp(); + return 0; } @@ -62,6 +76,7 @@ int conParam(Param *my) void desParam(Param *my) { + Tcl_DeleteInterp(((CaParam *) (my->specParam))->cache); if(my->setup != NULL) { free(my->setup); } @@ -89,55 +104,67 @@ int Param_getIntArray(const Param *my, const char *name, const char *idx, int ma int found = 1; chid chan; char *pPVName; + int i; + char buf[PARAM_MAX_NAME_LEN]; *rows = 0; - if((status = ca_task_initialize()) != ECA_NORMAL) { - Param_strerror((Param *) my, ca_message(status)); - retVal = -1; - } - - pPVName = malloc((strlen("HAD:PI:") + (my->setup == NULL ? 0 : strlen(my->setup) + 1) + strlen(name) + 1 + strlen(idx) + 1) * sizeof(char)); - Param_returnPVName(my, "PI", name, idx, pPVName); - - if((status = ca_search(pPVName, &chan)) == ECA_GETFAIL) { - Param_strerror((Param *) my, ca_message(status)); - found = 0; - } else if (status != ECA_NORMAL) { - Param_strerror((Param *) my, ca_message(status)); - retVal = -1; - } - - if((status = ca_pend_io(TIMEOUT)) != ECA_NORMAL) { - Param_strerror((Param *) my, ca_message(status)); - found = 0; - retVal = 0; - } - if(found == 1) { - ParamIntResult resultS, *result = &resultS; - result->val = val; - result->rows = rows; - result->maxrows = maxrows; - result->my = my; - result->retVal = &retVal; + if(Param_getIntArrayCache(my, name, idx, maxrows, rows, val) || (*rows != maxrows)) { + if((status = ca_task_initialize()) != ECA_NORMAL) { + Param_strerror((Param *) my, ca_message(status)); + retVal = -1; + } - status = ca_array_get_callback(ca_field_type(chan), ca_element_count(chan), chan, Param_copyIntsToAllocMem, result); - Param_strerror((Param *) my, ca_message(status)); + pPVName = malloc((strlen("HAD:PI:") + (my->setup == NULL ? 0 : strlen(my->setup) + 1) + strlen(name) + 1 + strlen(idx) + 1) * sizeof(char)); + Param_returnPVName(my, "PI", name, idx, pPVName); - if((status = ca_pend_event(TIMEOUT)) == ECA_TIMEOUT) { + if((status = ca_search(pPVName, &chan)) == ECA_GETFAIL) { Param_strerror((Param *) my, ca_message(status)); + found = 0; } else if (status != ECA_NORMAL) { Param_strerror((Param *) my, ca_message(status)); + retVal = -1; } - } - if((status = ca_clear_channel(chan)) != ECA_NORMAL) { - Param_strerror((Param *) my, ca_message(status)); - } + if((status = ca_pend_io(TIMEOUT)) != ECA_NORMAL) { + Param_strerror((Param *) my, ca_message(status)); + found = 0; + retVal = 0; + } + if(found == 1) { + ParamIntResult resultS, *result = &resultS; + result->val = val; + result->rows = rows; + result->maxrows = maxrows; + result->my = my; + result->retVal = &retVal; + + status = ca_array_get_callback(ca_field_type(chan), ca_element_count(chan), chan, Param_copyIntsToAllocMem, result); + Param_strerror((Param *) my, ca_message(status)); - free(pPVName); + if((status = ca_pend_event(TIMEOUT)) == ECA_TIMEOUT) { + Param_strerror((Param *) my, ca_message(status)); + } else if (status != ECA_NORMAL) { + Param_strerror((Param *) my, ca_message(status)); + } + } - if((status = ca_task_exit()) != ECA_NORMAL) { - Param_strerror((Param *) my, ca_message(status)); + if((status = ca_clear_channel(chan)) != ECA_NORMAL) { + Param_strerror((Param *) my, ca_message(status)); + } + + free(pPVName); + + if((status = ca_task_exit()) != ECA_NORMAL) { + Param_strerror((Param *) my, ca_message(status)); + } + if(maxrows == 1) { + Param_storeIntCache(my, name, idx, *val); + } else { + for (i = 0 ; i < *rows ; i++) { + sprintf(buf, "%s%d", idx, i); + Param_storeIntCache(my, name, buf, val[i]); + } + } } return retVal; @@ -150,55 +177,67 @@ int Param_getStringArray(const Param *my, const char *name, const char *idx, int int found = 1; chid chan; char *pPVName; + int i; + char buf[PARAM_MAX_NAME_LEN]; *rows = 0; - if((status = ca_task_initialize()) != ECA_NORMAL) { - Param_strerror((Param *) my, ca_message(status)); - retVal = -1; - } - - pPVName = malloc((strlen("HAD:PS:") + (my->setup == NULL ? 0 : strlen(my->setup) + 1) + strlen(name) + 1 + strlen(idx) + 1) * sizeof(char)); - Param_returnPVName(my, "PS", name, idx, pPVName); - - if((status = ca_search(pPVName, &chan)) == ECA_GETFAIL) { - Param_strerror((Param *) my, ca_message(status)); - found = 0; - } else if (status != ECA_NORMAL) { - Param_strerror((Param *) my, ca_message(status)); - retVal = -1; - } - - if((status = ca_pend_io(TIMEOUT)) != ECA_NORMAL) { - Param_strerror((Param *) my, ca_message(status)); - found = 0; - retVal = 0; - } - if(found == 1) { - ParamStringResult resultS, *result = &resultS; - result->val = val; - result->rows = rows; - result->maxrows = maxrows; - result->my = my; - result->retVal = &retVal; + if(Param_getStringArrayCache(my, name, idx, maxrows, rows, val) || (*rows != maxrows)) { + if((status = ca_task_initialize()) != ECA_NORMAL) { + Param_strerror((Param *) my, ca_message(status)); + retVal = -1; + } - status = ca_array_get_callback(ca_field_type(chan), ca_element_count(chan), chan, Param_copyStringsToAllocMem, result); - Param_strerror((Param *) my, ca_message(status)); + pPVName = malloc((strlen("HAD:PS:") + (my->setup == NULL ? 0 : strlen(my->setup) + 1) + strlen(name) + 1 + strlen(idx) + 1) * sizeof(char)); + Param_returnPVName(my, "PS", name, idx, pPVName); - if((status = ca_pend_event(TIMEOUT)) == ECA_TIMEOUT) { + if((status = ca_search(pPVName, &chan)) == ECA_GETFAIL) { Param_strerror((Param *) my, ca_message(status)); + found = 0; } else if (status != ECA_NORMAL) { Param_strerror((Param *) my, ca_message(status)); + retVal = -1; } - } - if((status = ca_clear_channel(chan)) != ECA_NORMAL) { - Param_strerror((Param *) my, ca_message(status)); - } + if((status = ca_pend_io(TIMEOUT)) != ECA_NORMAL) { + Param_strerror((Param *) my, ca_message(status)); + found = 0; + retVal = 0; + } + if(found == 1) { + ParamStringResult resultS, *result = &resultS; + result->val = val; + result->rows = rows; + result->maxrows = maxrows; + result->my = my; + result->retVal = &retVal; + + status = ca_array_get_callback(ca_field_type(chan), ca_element_count(chan), chan, Param_copyStringsToAllocMem, result); + Param_strerror((Param *) my, ca_message(status)); - free(pPVName); + if((status = ca_pend_event(TIMEOUT)) == ECA_TIMEOUT) { + Param_strerror((Param *) my, ca_message(status)); + } else if (status != ECA_NORMAL) { + Param_strerror((Param *) my, ca_message(status)); + } + } - if((status = ca_task_exit()) != ECA_NORMAL) { - Param_strerror((Param *) my, ca_message(status)); + if((status = ca_clear_channel(chan)) != ECA_NORMAL) { + Param_strerror((Param *) my, ca_message(status)); + } + + free(pPVName); + + if((status = ca_task_exit()) != ECA_NORMAL) { + Param_strerror((Param *) my, ca_message(status)); + } + if(maxrows == 1) { + Param_storeStringCache(my, name, idx, *val); + } else { + for (i = 0 ; i < *rows ; i++) { + sprintf(buf, "%s%d", idx, i); + Param_storeStringCache(my, name, buf, val[i]); + } + } } return retVal; @@ -211,55 +250,67 @@ int Param_getFilenameArray(const Param *my, const char *name, const char *idx, i int found = 1; chid chan; char *pPVName; + int i; + char buf[PARAM_MAX_NAME_LEN]; *rows = 0; - if((status = ca_task_initialize()) != ECA_NORMAL) { - Param_strerror((Param *) my, ca_message(status)); - retVal = -1; - } - - pPVName = malloc((strlen("HAD:PF:") + (my->setup == NULL ? 0 : strlen(my->setup) + 1) + strlen(name) + 1 + strlen(idx) + 1) * sizeof(char)); - Param_returnPVName(my, "PF", name, idx, pPVName); - - if((status = ca_search(pPVName, &chan)) == ECA_GETFAIL) { - Param_strerror((Param *) my, ca_message(status)); - found = 0; - } else if (status != ECA_NORMAL) { - Param_strerror((Param *) my, ca_message(status)); - retVal = -1; - } - - if((status = ca_pend_io(TIMEOUT)) != ECA_NORMAL) { - Param_strerror((Param *) my, ca_message(status)); - found = 0; - retVal = 0; - } - if(found == 1) { - ParamStringResult resultS, *result = &resultS; - result->val = val; - result->rows = rows; - result->maxrows = maxrows; - result->my = my; - result->retVal = &retVal; + if(Param_getFilenameArrayCache(my, name, idx, maxrows, rows, val) || (*rows != maxrows)) { + if((status = ca_task_initialize()) != ECA_NORMAL) { + Param_strerror((Param *) my, ca_message(status)); + retVal = -1; + } - status = ca_array_get_callback(ca_field_type(chan), ca_element_count(chan), chan, Param_copyStringsToAllocMem, result); - Param_strerror((Param *) my, ca_message(status)); + pPVName = malloc((strlen("HAD:PF:") + (my->setup == NULL ? 0 : strlen(my->setup) + 1) + strlen(name) + 1 + strlen(idx) + 1) * sizeof(char)); + Param_returnPVName(my, "PF", name, idx, pPVName); - if((status = ca_pend_event(TIMEOUT)) == ECA_TIMEOUT) { + if((status = ca_search(pPVName, &chan)) == ECA_GETFAIL) { Param_strerror((Param *) my, ca_message(status)); + found = 0; } else if (status != ECA_NORMAL) { Param_strerror((Param *) my, ca_message(status)); + retVal = -1; } - } - if((status = ca_clear_channel(chan)) != ECA_NORMAL) { - Param_strerror((Param *) my, ca_message(status)); - } + if((status = ca_pend_io(TIMEOUT)) != ECA_NORMAL) { + Param_strerror((Param *) my, ca_message(status)); + found = 0; + retVal = 0; + } + if(found == 1) { + ParamStringResult resultS, *result = &resultS; + result->val = val; + result->rows = rows; + result->maxrows = maxrows; + result->my = my; + result->retVal = &retVal; + + status = ca_array_get_callback(ca_field_type(chan), ca_element_count(chan), chan, Param_copyStringsToAllocMem, result); + Param_strerror((Param *) my, ca_message(status)); - free(pPVName); + if((status = ca_pend_event(TIMEOUT)) == ECA_TIMEOUT) { + Param_strerror((Param *) my, ca_message(status)); + } else if (status != ECA_NORMAL) { + Param_strerror((Param *) my, ca_message(status)); + } + } - if((status = ca_task_exit()) != ECA_NORMAL) { - Param_strerror((Param *) my, ca_message(status)); + if((status = ca_clear_channel(chan)) != ECA_NORMAL) { + Param_strerror((Param *) my, ca_message(status)); + } + + free(pPVName); + + if((status = ca_task_exit()) != ECA_NORMAL) { + Param_strerror((Param *) my, ca_message(status)); + } + if(maxrows == 1) { + Param_storeStringCache(my, name, idx, *val); + } else { + for (i = 0 ; i < *rows ; i++) { + sprintf(buf, "%s%d", idx, i); + Param_storeStringCache(my, name, buf, val[i]); + } + } } return retVal; @@ -436,6 +487,12 @@ int Param_storeString(const Param *my, const char *name, const char *idx, const return retVal; } +void Param_clearCache(const Param *my) +{ + Tcl_DeleteInterp(((CaParam *) (my->specParam))->cache); + ((CaParam *) (my->specParam))->cache = Tcl_CreateInterp(); +} + const char *Param_getErrStr(const Param *my) { return my->strerror; @@ -525,3 +582,117 @@ static void Param_strerror(Param *my, const char *strerror) } } +static int Param_getIntArrayCache(const Param *my, const char *name, const char *idx, int maxrows, int *rows, unsigned long int *val) +{ + int retVal = 0; + int i; + char *endptr; + char *strval[PARAM_MAX_ARRAY_LEN]; + + for (i = 0 ; i < maxrows ; i++) { + 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++) { + free(strval[i]); + } + return retVal; +} + +static int Param_getStringArrayCache(const Param *my, const char *name, const char *idx, int maxrows, int *rows, char **val) +{ + int retVal = 0; + 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]); + } + + *rows = 0; + if(Tcl_GetVar2(((CaParam *) (my->specParam))->cache, lname, lidx, 0) != 0) { + strcpy(val[0], Tcl_GetVar2(((CaParam *) (my->specParam))->cache, 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(((CaParam *) (my->specParam))->cache, lname, index, 0) != 0) { + strcpy(val[i], Tcl_GetVar2(((CaParam *) (my->specParam))->cache, lname, index, 0)); + (*rows)++; + } else { + i = maxrows; + } + } + } + return retVal; +} + +static int Param_getFilenameArrayCache(const Param *my, const char *name, const char *idx, int maxrows, int *rows, char **val) +{ + int retVal = 0; + int row = 0; + int i; + char *value[PARAM_MAX_ARRAY_LEN]; + + for (i = 0 ; i < maxrows ; i++) { + value[i] = malloc(PARAM_MAX_VALUE_LEN); + } + + if (((retVal = Param_getStringArray(my, name, idx, maxrows, rows, value)) == 0) && (*rows > 0)) { + char basedir[PARAM_MAX_VALUE_LEN]; + + if ((Param_getString(my, "glob", "basedir", &row, basedir) == 0) && (row == 1)) { + strcat(basedir, "/"); + } else { + strcpy(basedir, ""); + } + for (i = 0 ; i < *rows ; i++) { + if (value[i][0] != '/') { + strcpy(val[i], basedir); + } else { + strcpy(val[i], ""); + } + strcat(val[i], value[i]); + } + } else { + *rows = 0; + } + + for (i = 0 ; i < maxrows ; i++) { + free(value[i]); + } + + return retVal; +} + +static int Param_storeIntCache(const Param *my, const char *name, const char *idx, unsigned long int value) +{ + char buf[7 + 2 * PARAM_MAX_NAME_LEN + PARAM_MAX_VALUE_LEN]; + sprintf(buf, "set %s(%s)\t%lu\n", name, idx, value); + Tcl_Eval(((CaParam *) (my->specParam))->cache, buf); + return 0; +} + +static int Param_storeStringCache(const Param *my, const char *name, const char *idx, const char *value) +{ + char buf[7 + 2 * PARAM_MAX_NAME_LEN + PARAM_MAX_VALUE_LEN]; + sprintf(buf, "set %s(%s)\t\"%s\"\n", name, idx, value); + Tcl_Eval(((CaParam *) (my->specParam))->cache, buf); + return 0; +} + diff --git a/allParam/ca/server/Makefile b/allParam/ca/server/Makefile index 5f32761..b7143d1 100644 --- a/allParam/ca/server/Makefile +++ b/allParam/ca/server/Makefile @@ -25,7 +25,7 @@ daq_file_param_cas : $(OBJS) ../../file/libfileParam.a daq_ora_param_cas : $(OBJS) ../../ora/liboraParam.a $(MAKE) daq_param_cas \ "LOADLIBES=-L../../ora -loraParam -L$(ORACLE_HOME)/lib \ - -lsql -lclntsh -lcommon -lcore4 -lnlsrtl3 $(LOADLIBES)" + -lsql8 -lclntsh -lcommon8 -lcore8 -lnls8 $(LOADLIBES)" $(MV) daq_param_cas $@ daq_psql_param_cas : $(OBJS) ../../psql/libpsqlParam.a diff --git a/allParam/ca/server/paramRecordSet.cc b/allParam/ca/server/paramRecordSet.cc index c685048..5760ab5 100644 --- a/allParam/ca/server/paramRecordSet.cc +++ b/allParam/ca/server/paramRecordSet.cc @@ -88,6 +88,7 @@ pvExistReturn ParamRecordSet::pvExistTest(const casCtx &ctx, const char *pPVName syslog(LOG_INFO, "Constructed new param source: %s", setup); numParamSrc++; } else { + syslog(LOG_INFO, "Failed to construct new param source: %s", setup); desParam(param[numParamSrc]); delete param[numParamSrc]; } diff --git a/allParam/file/Makefile b/allParam/file/Makefile index 836daf9..5202e9f 100644 --- a/allParam/file/Makefile +++ b/allParam/file/Makefile @@ -10,7 +10,8 @@ install : libfileParam.a -mkdir -p $(LIBDIR) cp $< $(LIBDIR) -mkdir -p $(INCDIR) - cp -f ../include/allParam.h $(INCDIR) + rm -f $(INCDIR)/allParam.h + cp ../include/allParam.h $(INCDIR) clean : rm -f *.o diff --git a/allParam/file/fileParam.c b/allParam/file/fileParam.c index 21942d9..27b8d3a 100644 --- a/allParam/file/fileParam.c +++ b/allParam/file/fileParam.c @@ -370,6 +370,10 @@ int Param_storeString(const Param *my, const char *name, const char *idx, const return 0; } +void Param_clearCache(const Param *my) +{ +} + const char *Param_getErrStr(const Param *my) { return my->strerror; diff --git a/allParam/include/allParam.h b/allParam/include/allParam.h index 2a78bb0..efaba35 100644 --- a/allParam/include/allParam.h +++ b/allParam/include/allParam.h @@ -33,6 +33,7 @@ int Param_getBlob(const Param *, const char *, const char *, size_t *, FILE **); int Param_storeInt(const Param *, const char *, const char *, unsigned long int); int Param_storeString(const Param *, const char *, const char *, const char *); +void Param_clearCache(const Param *); const char *Param_getErrStr(const Param *); diff --git a/allParam/ora/Makefile b/allParam/ora/Makefile index 720db71..a4c636b 100644 --- a/allParam/ora/Makefile +++ b/allParam/ora/Makefile @@ -27,7 +27,8 @@ install : liboraParam.a -mkdir -p $(LIBDIR) cp $< $(LIBDIR) -mkdir -p $(INCDIR) - cp -f ../include/allParam.h $(INCDIR) + rm -f $(INCDIR)/allParam.h + cp ../include/allParam.h $(INCDIR) clean : rm -f *.o oraParam.c oraParam.lis sqlnet.log diff --git a/allParam/ora/oraParam.pc b/allParam/ora/oraParam.pc index 72d315e..746d5c5 100644 --- a/allParam/ora/oraParam.pc +++ b/allParam/ora/oraParam.pc @@ -335,6 +335,10 @@ int Param_storeString(const Param *my, const char *name, const char *idx, const return 0; } +void Param_clearCache(const Param *my) +{ +} + const char *Param_getErrStr(const Param *my) { return my->strerror; diff --git a/allParam/psql/psqlParam.c b/allParam/psql/psqlParam.c index da19943..1cee36b 100644 --- a/allParam/psql/psqlParam.c +++ b/allParam/psql/psqlParam.c @@ -293,6 +293,10 @@ int Param_storeString(const Param *my, const char *name, const char *idx, const return 0; } +void Param_clearCache(const Param *my) +{ +} + const char *Param_getErrStr(const Param *my) { return my->strerror; diff --git a/allParam/tcl/Makefile b/allParam/tcl/Makefile index a4fa0ee..43566b9 100644 --- a/allParam/tcl/Makefile +++ b/allParam/tcl/Makefile @@ -10,7 +10,8 @@ install : libtclParam.a -mkdir -p $(LIBDIR) cp $< $(LIBDIR) -mkdir -p $(INCDIR) - cp -f ../include/allParam.h $(INCDIR) + rm -f $(INCDIR)/allParam.h + cp ../include/allParam.h $(INCDIR) clean : rm -f *.o diff --git a/allParam/tcl/tclParam.c b/allParam/tcl/tclParam.c index 0030fde..e509acd 100644 --- a/allParam/tcl/tclParam.c +++ b/allParam/tcl/tclParam.c @@ -287,12 +287,16 @@ int Param_storeString(const Param *my, const char *name, const char *idx, const return 0; } +void Param_clearCache(const Param *my) +{ +} + const char *Param_getErrStr(const Param *my) { return my->strerror; } -void Param_strerror(Param *my, const char *strerror) +static void Param_strerror(Param *my, const char *strerror) { my->strerror = realloc(my->strerror, strlen(strerror) + 1); if(my->strerror != NULL) { -- 2.43.0