|
|
| version 1.101, 2004/09/15 10:38:38 | version 1.102, 2004/09/15 17:31:30 |
|---|---|
| Line 1 | Line 1 |
| /* $Id$ | /* $Id$ |
| $State$ | $State$ |
| $Log$ | $Log$ |
| Revision 1.102 2004/09/15 17:31:30 brouard | |
| Add the possibility to read data file including tab characters. | |
| Revision 1.101 2004/09/15 10:38:38 brouard | Revision 1.101 2004/09/15 10:38:38 brouard |
| Fix on curr_time | Fix on curr_time |
| Line 244 | Line 247 |
| /* $Id$ */ | /* $Id$ */ |
| /* $State$ */ | /* $State$ */ |
| char version[]="Imach version 0.97b, May 2004, INED-EUROREVES "; | char version[]="Imach version 0.97c, September 2004, INED-EUROREVES "; |
| char fullversion[]="$Revision$ $Date$"; | char fullversion[]="$Revision$ $Date$"; |
| int erreur, nberr=0, nbwarn=0; /* Error number, number of errors number of warnings */ | int erreur, nberr=0, nbwarn=0; /* Error number, number of errors number of warnings */ |
| int nvar; | int nvar; |
| Line 439 int nbocc(char *s, char occ) | Line 442 int nbocc(char *s, char occ) |
| void cutv(char *u,char *v, char*t, char occ) | void cutv(char *u,char *v, char*t, char occ) |
| { | { |
| /* cuts string t into u and v where u is ended by char occ excluding it | /* cuts string t into u and v where u ends before first occurence of char 'occ' |
| and v is after occ excluding it too : ex cutv(u,v,"abcdef2ghi2j",2) | and v starts after first occurence of char 'occ' : ex cutv(u,v,"abcdef2ghi2j",'2') |
| gives u="abcedf" and v="ghi2j" */ | gives u="abcedf" and v="ghi2j" */ |
| int i,lg,j,p=0; | int i,lg,j,p=0; |
| i=0; | i=0; |
| Line 4399 int main(int argc, char *argv[]) | Line 4402 int main(int argc, char *argv[]) |
| i=1; | i=1; |
| while (fgets(line, MAXLINE, fic) != NULL) { | while (fgets(line, MAXLINE, fic) != NULL) { |
| if ((i >= firstobs) && (i <=lastobs)) { | if ((i >= firstobs) && (i <=lastobs)) { |
| for(j=0; line[j] != '\n';j++){ /* Untabifies line */ | |
| if(line[j] == '\t') | |
| line[j] = ' '; | |
| } | |
| for (j=maxwav;j>=1;j--){ | for (j=maxwav;j>=1;j--){ |
| cutv(stra, strb,line,' '); s[j][i]=atoi(strb); | cutv(stra, strb,line,' '); s[j][i]=atoi(strb); |
| strcpy(line,stra); | strcpy(line,stra); |