Changeset 3427 for libcaca/trunk


Ignore:
Timestamp:
Apr 29, 2009, 2:13:19 PM (10 years ago)
Author:
Sam Hocevar
Message:

import.c: when importing ANSI or UTF-8 files, treat L as a canvas
frame separator. Not extremely robust yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/codec/import.c

    r3412 r3427  
    2222#   include <stdlib.h>
    2323#   include <string.h>
     24#   include <stdio.h>
    2425#endif
    2526
     
    678679        }
    679680
     681        /* Form feed means a new frame */
     682        else if(buffer[i] == '\f' && buffer[i + 1] == '\n')
     683        {
     684            int f = caca_get_frame_count(cv);
     685            caca_create_frame(cv, f);
     686            caca_set_frame(cv, f);
     687            x = y = 0;
     688            skip++;
     689        }
     690
    680691        /* Get the character we’re going to paste */
    681692        else if(utf8)
Note: See TracChangeset for help on using the changeset viewer.