diff --git a/caca/codec/import.c b/caca/codec/import.c index c938632..376eee1 100644 --- a/caca/codec/import.c +++ b/caca/codec/import.c @@ -21,6 +21,7 @@ #if !defined __KERNEL__ # include # include +# include #endif #include "caca.h" @@ -677,6 +678,16 @@ static ssize_t import_ansi(caca_canvas_t *cv, void const *data, free(string); } + /* Form feed means a new frame */ + else if(buffer[i] == '\f' && buffer[i + 1] == '\n') + { + int f = caca_get_frame_count(cv); + caca_create_frame(cv, f); + caca_set_frame(cv, f); + x = y = 0; + skip++; + } + /* Get the character we’re going to paste */ else if(utf8) {