typedef struct { elem *t; int debut,fin,taillemax;} file, *pfile; void creer(file *a,int taillemax) { a->taillemax=taillemax; a->debut=a->fin=0; a->t=malloc(taillemax*sizeof(elem)); } void detruire(file *a) { free(a->t); } int vide(file *a) { return a->debut==a->fin; } void enfiler(file *a,elem el) { a->t[a->fin++]=el; if(a->fin==a->taillemax) a->fin=0; } void empiler(file *a,elem el) { if(a->debut==0) a->debut=a->taillemax; a->t[--a->debut]=el; } void depiler(file *a) { if(++a->debut==a->taillemax) a->debut=0; } elem sommet(file *a) { return a->t[a->debut]; }