I am getting the following warning:
warning: declaration of `lr_searchReplace' does not match previous declaration at vuser_init.c (941)
code is as below:-
Note: I have declared char *abc;
in global.
vuser_init()
{
abc = lr_eval_string("{c_Topic1Name}");
lr_searchReplace(abc,"c_newtopic1name",'_','-');
lr_output_message("New string is :- %s",lr_eval_string("{c_newtopic1name}"));
return(0);
}
void lr_searchReplace(char* inputStr, char* outputStr, char lookupChar, char repChar)
{
char *ptr =inputStr;
char xchar;
int len=0;
int i=0;
lr_output_message("%s",inputStr);
xchar = *ptr;//Copy initial
len=strlen(inputStr);
while (len>0)
{
len--;
xchar = *ptr;
if(xchar==lookupChar)
{
inputStr[i]= repChar;
}
ptr++;
i++;
}
lr_save_string(inputStr,outputStr);
lr_output_message("%s",inputStr);
}