typedef struct maillon maillon, *liste; struct maillon { elem val; liste suiv; }; typedef struct { liste debut,fin;} file, *pfile; void creer(file *a,int taillemax) { a->debut=0; } int vide(file *a) { return a->debut==0; } void empiler(file *a,elem el) { maillon m={el,a->debut}; a->debut=malloc(sizeof(maillon)); *a->debut=m; if(m.suiv==0) a->fin=a->debut; } void enfiler(file *a,elem el) { if(a->debut==0) empiler(a,el); else a->fin=a->fin->suiv=malloc(sizeof(maillon)); *a->fin=(maillon){el,0}; } void depiler(file *a) { liste l=a->debut; a->debut=l->suiv; free(l); } elem sommet(file *a) { return a->debut->val; } void detruire(file *a) { while(a->debut) depiler(a); }