version 1.113, 2006/02/24 14:20:24
|
version 1.114, 2006/02/26 12:57:58
|
Line 1
|
Line 1
|
/* $Id$ |
/* $Id$ |
$State$ |
$State$ |
$Log$ |
$Log$ |
|
Revision 1.114 2006/02/26 12:57:58 brouard |
|
(Module): Some improvements in processing parameter |
|
filename with strsep. |
|
|
Revision 1.113 2006/02/24 14:20:24 brouard |
Revision 1.113 2006/02/24 14:20:24 brouard |
(Module): Memory leaks checks with valgrind and: |
(Module): Memory leaks checks with valgrind and: |
datafile was not closed, some imatrix were not freed and on matrix |
datafile was not closed, some imatrix were not freed and on matrix |
Line 4141 int main(int argc, char *argv[])
|
Line 4145 int main(int argc, char *argv[])
|
char line[MAXLINE], linepar[MAXLINE]; |
char line[MAXLINE], linepar[MAXLINE]; |
char path[MAXLINE],pathc[MAXLINE],pathcd[MAXLINE],pathtot[MAXLINE],model[MAXLINE]; |
char path[MAXLINE],pathc[MAXLINE],pathcd[MAXLINE],pathtot[MAXLINE],model[MAXLINE]; |
char pathr[MAXLINE], pathimach[MAXLINE]; |
char pathr[MAXLINE], pathimach[MAXLINE]; |
|
char **bp, *tok, *val; /* pathtot */ |
int firstobs=1, lastobs=10; |
int firstobs=1, lastobs=10; |
int sdeb, sfin; /* Status at beginning and end */ |
int sdeb, sfin; /* Status at beginning and end */ |
int c, h , cpt,l; |
int c, h , cpt,l; |
Line 4218 int main(int argc, char *argv[])
|
Line 4223 int main(int argc, char *argv[])
|
printf("\n%s\n%s",version,fullversion); |
printf("\n%s\n%s",version,fullversion); |
if(argc <=1){ |
if(argc <=1){ |
printf("\nEnter the parameter file name: "); |
printf("\nEnter the parameter file name: "); |
scanf("%s",pathtot); |
fgets(pathr,FILENAMELENGTH,stdin); |
|
i=strlen(pathr); |
|
if(pathr[i-1]=='\n') |
|
pathr[i-1]='\0'; |
|
for (tok = pathr; tok != NULL; ){ |
|
printf("Pathr |%s|\n",pathr); |
|
while ((val = strsep(&tok, "\"" )) != NULL && *val == '\0'); |
|
printf("val= |%s| pathr=%s\n",val,pathr); |
|
strcpy (pathtot, val); |
|
if(pathr[0] == '\0') break; /* Un peu sale */ |
|
} |
} |
} |
else{ |
else{ |
strcpy(pathtot,argv[1]); |
strcpy(pathtot,argv[1]); |