#include #include #include "config.h" #include "interface.h" #include "terminal.h" #include "exceptions.h" void supprime(char * ch) { for (; *ch; ch++) { *ch = *(ch + 1); } } void insert(char * ch, char c) { int i; for (i = strlen(ch) - 1; i; i--) { *(ch + i + 1) = *(ch + i); } *ch = c; } void ifloop(void) { int cread; int gotesc = 0; char buffer[BUFSIZ]; int position; while (1) { cread = fgetc(input); printf("%u\n", cread); if (gotesc) { } else { switch(cread) { case 27: /* Caractère ESC */ gotesc = 1; break; case 8: /* Caractère <--- */ if (position) { } break; case 127: /* Caractère Suppr */ break; } } } }