irods  4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

nre.reHelpers2.cpp
Go to the documentation of this file.
1 
4 #include "reGlobalsExtern.hpp"
5 #include "resource.hpp"
6 #include "dataObjOpr.hpp"
7 
8 extern char *rmemmove( void *dest, void *src, int strLen, int maxLen );
9 
10 static int staticVarNumber = 1;
11 
12 
13 int
14 getNewVarName( char *v, msParamArray_t *msParamArray ) {
15  /* msParam_t *mP;*/
16 
17  sprintf( v, "*RNDVAR%i", staticVarNumber );
19 
20  while ( getMsParamByLabel( msParamArray, v ) != NULL ) {
21  sprintf( v, "*RNDVAR%i", staticVarNumber );
23  }
24 
25 
26  return 0;
27 }
28 
29 int
30 removeTmpVarName( msParamArray_t *msParamArray ) {
31 
32  int i;
33 
34  for ( i = 0; i < msParamArray->len; i++ ) {
35  if ( strncmp( msParamArray->msParam[i]->label, "*RNDVAR", 7 ) == 0 ) {
36  rmMsParamByLabel( msParamArray, msParamArray->msParam[i]->label, 1 );
37  }
38  }
39  return 0;
40 
41 }
42 
NULL
#define NULL
Definition: rodsDef.h:70
staticVarNumber
static int staticVarNumber
Definition: nre.reHelpers2.cpp:10
rmMsParamByLabel
int rmMsParamByLabel(msParamArray_t *msParamArray, const char *label, int freeStruct)
Definition: msParam.cpp:424
getMsParamByLabel
msParam_t * getMsParamByLabel(msParamArray_t *msParamArray, const char *label)
Definition: msParam.cpp:376
getNewVarName
int getNewVarName(char *v, msParamArray_t *msParamArray)
Definition: nre.reHelpers2.cpp:14
reGlobalsExtern.hpp
MsParamArray::msParam
msParam_t ** msParam
Definition: msParam.h:87
run_tests.dest
dest
Definition: run_tests.py:123
MsParamArray::len
int len
Definition: msParam.h:85
MsParam::label
char * label
Definition: msParam.h:77
resource.hpp
rmemmove
char * rmemmove(void *dest, void *src, int strLen, int maxLen)
dataObjOpr.hpp
MsParamArray
Definition: msParam.h:84
removeTmpVarName
int removeTmpVarName(msParamArray_t *msParamArray)
Definition: nre.reHelpers2.cpp:30