144 char *scan_in_description;
145 char *scan_out_description;
146 char *final_description;
152 float *tab_float=NULL;
156 int final_description_length;
161 length = strlen(description);
164 length = length + nb_int*4*((int)
sizeof(int)) + nb_float*4*((
int)
sizeof(
float)) + 1;
166 final_description_length=length;
169 scan_in_description = description;
170 scan_out_description = final_description;
172 *(scan_out_description)=
'\0';
174 while((*scan_in_description) !=
'\0')
176 if ((*scan_in_description) ==
'%')
178 if ((*(scan_in_description+1)) ==
'd')
180 if (int_step < nb_int)
182 sprintf(line,
"%d", *(tab_int+int_step));
186 else if ((*(scan_in_description+1)) ==
'f')
188 if (float_step < nb_float)
191 sprintf(line,
"%g", *(tab_float+float_step));
195 else if ((*(scan_in_description+1)) ==
's')
197 if (int_step < nb_int)
199 length = *(tab_int+int_step);
207 if ( ( length != 0) && ((nb_int-int_step) >= length))
215 int_step = int_step+length;
219 length = strlen(line);
221 strcat_s(final_description,final_description_length, line);
223 strcat(final_description, line);
227 scan_out_description = scan_out_description + length;
229 scan_in_description = scan_in_description +2;
233 *scan_out_description=*scan_in_description;
234 *(scan_out_description+1)=
'\0';
235 scan_out_description=scan_out_description+1;
237 scan_in_description = scan_in_description +1;
241 return final_description;