35 #define LISTE_VIRGULE 100
36 #define LISTE_PVIRGULE 101
37 #define LISTE_ESPACE 102
53 std::string chainelue=
"";
57 size_t res=fread(&c,
sizeof(
char),1,in);
63 if (c>31) chainelue+=c;
73 char* mask=(
char *)masque.c_str();
79 char* mask=(
char *)masque.c_str();
85 decode((
char*)code,mask,arg);
95 mask=
new char[strlen(mask2)+2];
101 if ((*ptrM==
'@') || (*ptrM==
'?') || (*ptrM==
'&') || (*ptrM==
'~')) p_arg++;
105 int *type_param=
new int[nb_arg];
111 if ((*ptrM==
'@') || (*ptrM==
'&') || (*ptrM==
'~') || (*ptrM==
'?') )
113 if (*ptrM==
'@') type_param[p_arg]=
SIMPLE;
123 param=
new char*[nb_arg];
124 long lg=strlen(code)+1;
125 for (
int i=0;i<nb_arg;i++)
127 param[i]=
new char[lg];
131 Match (code,mask,param);
132 for (
int i=0;i<nb_arg;i++)
133 arg[i].argument.insert(arg[i].
argument.end(),param[i]);
134 for (
int i=0;i<nb_arg;i++)
135 if (type_param[i]!=
SIMPLE)
138 param_tmp[0]=
new char[lg];
139 param_tmp[1]=
new char[lg];
140 strcpy(param_tmp[0],arg[i].argument[0].c_str());
143 char *p=param_tmp[0];
146 char format[4]={
'@',
',',
'@',0};
150 arg[i].
argument.insert(arg[i].argument.end(),param_tmp[0]);
151 strcpy(param_tmp[0],
"");
155 delete [] param_tmp[0];
156 delete [] param_tmp[1];
159 for (
int i=0;i<nb_arg;i++)
162 delete [] type_param;
172 char *ptrC,*ptrM,*ptrP;
176 while (*ptrM && *ptrC)
183 while (*ptrC) *ptrP++ = *ptrC++;
194 if (*ptrM != *ptrC)
return(
FAUX);
199 if (*ptrM)
return(
FAUX);
211 while (*lPtrC != cFin && *lPtrC)
234 static char ouverture[4]= {
'(',
'[',
'{'};
239 if (*ptr == c)
return(ptr-ouverture);
246 static char fermeture[4] = {
')',
']',
'}'};
248 return(fermeture[i]);