Zaibon

Untitled

May 8th, 2011
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.49 KB | None | 0 0
  1. short  retour = 1;
  2.     long offset;
  3.     Ouvrier *pOuvrierTemp ;
  4.     FILE *pf = fopen(F_OUVRIER,"rb");/*on ouvre le fichier ouvrier, il existe obligatoirement car index_int est appelé apres ouvrier_init*/
  5.  
  6.     if(pf == NULL)
  7.     {
  8.         perror("Fichier ouvrier manquant.");
  9.         retour = 0;
  10.     }
  11.     else
  12.     {
  13.         printf("recréation de l'index...");
  14.         while(feof(pf) == 0 && retour != 0)
  15.         {
  16.             if(fread(pOuvrierTemp,(long)sizeof(Ouvrier),1,pf) != 1)
  17.             {
  18.                 perror("Erreur de lecture du fichier ouvrier");
  19.                 retour = 0;
  20.             }
Add Comment
Please, Sign In to add comment