#include #include #include "ligne.h" #define LONGUEUR_INITIALE 80 static int longueur_ligne = LONGUEUR_INITIALE; void ligne_fixer_longueur(unsigned l) { longueur_ligne = l; } void ligne_ecrire(char *mot) { static int position = 0; int ncar = strlen(mot); if (position + ncar >= longueur_ligne) { printf("\n"); position = 0; } printf("%s", mot); position += ncar; }