//获取"1001|port=100,200,300,400"串中的列表整数值,将列表值存放于指针中;
int getListint(char *str,char *match,int * port){
char *prt = str;
char val[10]="";
int * value = port;
while(true){
prt = strstr(prt,match);
if (prt ==NULL) return 0;
char aa;
aa = *(prt -1 ) ;
aa = *(prt + strlen(match) + 1);
if (((prt == str)||(*(prt -1 ) == '|')||(*(prt - 1) == ','))&&(*(prt + strlen(match)) == '='))break; }
prt = prt + strlen(match) + 1;
int j=0;
for (unsigned int i = 0 ;i<=strlen(prt);i++){
if ((*(prt + i) == ',')|| (i == strlen(prt))) {
val[j] = '\0';
*value=atoi(val);
value ++;
j = 0;
continue;
}
//结束
if(*(prt + i) == '|')return value - port;
int getListint(char *str,char *match,int * port){
char *prt = str;
char val[10]="";
int * value = port;
while(true){
prt = strstr(prt,match);
if (prt ==NULL) return 0;
char aa;
aa = *(prt -1 ) ;
aa = *(prt + strlen(match) + 1);
if (((prt == str)||(*(prt -1 ) == '|')||(*(prt - 1) == ','))&&(*(prt + strlen(match)) == '='))break; }
prt = prt + strlen(match) + 1;
int j=0;
for (unsigned int i = 0 ;i<=strlen(prt);i++){
if ((*(prt + i) == ',')|| (i == strlen(prt))) {
val[j] = '\0';
*value=atoi(val);
value ++;
j = 0;
continue;
}
//结束
if(*(prt + i) == '|')return value - port;
val[j] = *(prt + i);
j++;
}
return value - port;
}