- if (sscanf(&ligne[73],"%d",&result) == 0)
- return -1;
-/* { printf("Erreur, ligne n0.%d :\n%s\n",*numl,ligne); return (*numsec > 0 ? -1 : -2); } */
- *numsec = result;
- typesec = ligne[72];
- switch (typesec) {
- case 'S' : ligne[72] = '\0'; return (1);
- case 'G' : ligne[72] = '\0'; return (2);
- case 'D' : ligne[72] = '\0'; return (3);
- case 'P' : ligne[72] = '\0'; return (4);
- case 'T' : ligne[72] = '\0'; return (5);
- default :; /* printf("Ligne incorrecte, ignoree n0.%d :\n%s\n",*numl,ligne); */
- }
- /* the column 72 is empty, try to check the neghbour*/
- if(strlen(ligne)==80
- && (ligne[79]=='\n' || ligne[79]=='\r') && (ligne[0]<='9' && ligne[0]>='0')) {
- /*check if the case of losted .*/
- int index;
- for(index = 1; ligne[index]<='9' && ligne[index]>='0'; index++);
- if (ligne[index]=='D' || ligne[index]=='d') {
- for(index = 79; index > 0; index--)
- ligne[index] = ligne[index-1];
- ligne[0]='.';
- }
-