ListeC ajoutChaine(char* t, ListeC l) { if ( t[0] == '\0') return l; else { l = ajout_fin(l, t[0]); l = ajoutChaine(t+1, l); } }
ListeC ajout_fin(ListeC l, char e) { if ( l == NULL ) //Si l est vide on ne parcours pas la liste on ajoute e au debut; { l = ajout_debut(l,e); return l; } l->suiv = ajout_fin(l->suiv,e); return l; }
struct maille *tranfo_tab_chaine (struct maille *ptr_debut, int tab_int[], int long_tab) { int i = 0; while (i < long_tab) { ptr_debut = ajout_fin (ptr_debut, tab_int[i]); i++; } return ptr_debut; }