printf("-config : invalid number of parameters, format is section:key=value\n");
returnrv;
}
wchar*sep=strstr(arg[1],":");
if(sep==0)
{
printf("-config : invalid parameter %s, format is section:key=value\n",arg[1]);
returnrv;
}
wchar*value=strstr(sep+1,"=");
if(value==0)
{
printf("-config : invalid parameter %s, format is section:key=value\n",arg[1]);
returnrv;
}
*sep++=0;
*value++=0;
wchar*sect=trim_ws(arg[1]);
wchar*key=trim_ws(sep);
value=trim_ws(value);
if(sect==0||key==0)
{
printf("-config : invalid parameter, format is section:key=value\n");
returnrv;
}
if(value==0)
value="";
printf("Virtual cfg %s:%s=%s\n",sect,key,value);
cfgSetVitual(sect,key,value);
rv++;
if(cl>=3&&stricmp(arg[2],",")==0)
{
cl-=2;
arg+=2;
rv++;
continue;
}
else
break;
}
returnrv;
}
intshowhelp(wchar**arg,intcl)
{
printf("Available commands :\n");
printf("-config section:key=value [, ..]: add a virtual config value\n Virtual config values wont be saved to the .cfg file\n unless a different value is writen to em\nNote :\n You can specify many settings in the xx:yy=zz , gg:hh=jj , ...\n format.The spaces betwen the values and ',' are needed.");