Guillaume - Add Files Gestion

This commit is contained in:
name 2019-12-12 13:38:10 +01:00
parent 1f80e5bb64
commit 79cac753c2
No known key found for this signature in database
GPG key ID: 03E8F3CF3183323A
2 changed files with 93 additions and 4 deletions

View file

@ -1,3 +1,18 @@
/*
Prototypes de gestion_fichiers.c + variables define + structure(s)
*/
#ifndef __GESTION_FICHIERS__
#define __GESTION_FICHIERS__
#include <stdio.h>
#define BLOCK_SIZE 4096
typedef struct
{
FILE*file; // Identificateur fichier
char mode; //Mode de lecture r ou w
unsigned char record[BLOCK_SIZE]; //Tampon pour lire ou écrire
int record_length; //nombre d'élèments du tampon
int i_record; //indice dans le tampon
char octet[8]; //On découpe l'octet en 8 caractère
int i_octet; //indice dansl'octet
int nb_octets; //Nb octet lis/écrit
}Bin_file;
#endif