Gestion d'erreur

master
Louis GERMAIN 1 year ago
parent 6c46daa790
commit cb9e502dbe

BIN
SAE2

Binary file not shown.

@ -3,7 +3,7 @@ Structure Electricite
Structure Plomberie
Plomberie Murs
Electricite Menuiserie
Plomberie Sols
Plomberies Sols
Murs Peinture
Peinture Finitions
Sols Finitions
Sols Finitions

Binary file not shown.

@ -119,7 +119,7 @@ Precedence *loadPrec(int *tmax, int *tlog)
FILE *prec;
Precedence *tabP, *s;
char *precSuccStr;
int index=0;
int index;
prec=fopen("files/precedences.txt", "r");
(*tmax)=0;
(*tlog)=0;
@ -138,6 +138,7 @@ Precedence *loadPrec(int *tmax, int *tlog)
precSuccStr = readFromFile(prec);
while(!feof(prec))
{
index=0;
printf("%s\n", precSuccStr);
if((*tlog)==(*tmax))
{
@ -150,19 +151,20 @@ Precedence *loadPrec(int *tmax, int *tlog)
}
tabP = s;
}
printf("HI\n");
while (precSuccStr[index] != '\t')
index++;
printf("HELLO\n");
strcpy(tabP[*tlog].travauxSucc, precSuccStr+index+1);
precSuccStr[index]='\0';
strcpy(tabP[*tlog].travauxPrec, precSuccStr);
printf("HI\n");
precSuccStr = readFromFile(prec);
(*tlog)++;
printf("HELLO\n");
}
printf("HI\n");
free(precSuccStr);
fclose(prec);
return tabP;

Loading…
Cancel
Save