Ignore:
Timestamp:
Dec 1, 2007, 6:58:52 PM (12 years ago)
Author:
Sam Hocevar
Message:

=?utf-8?q?=20=20*=20Implement=20cucul=5Fput=5Ffigchar()=20to=20paste=20FIGlet/TOIlet=20characters=20in

=20=20=20=20=20=20=20=20=20=20=E2=96=8C=20=E2=96=8C=20=20=20=E2=96=9C=E2=96=9C=20=20=20=20=C2=A0=E2=96=8C=20=E2=96=8C=20=20=20=20=20=20=E2=96=9C=20=20=20=E2=96=8C=E2=96=90
=20=20=20=20=20=20=20=20=20=20=E2=96=99=E2=96=84=E2=96=8C=E2=96=9E=E2=96=80=E2=96=96=E2=96=90=E2=96=90=20=E2=96=9E=E2=96=80=E2=96=96=C2=A0=E2=96=8C=E2=96=96=E2=96=8C=E2=96=9E=E2=96=80=E2=96=96=E2=96=99=E2=96=80=E2=96=96=E2=96=90=20=E2=96=9E=E2=96=80=E2=96=8C=E2=96=90
=20=20=20=20=20=20=20=20=20=20=E2=96=8C=20=E2=96=8C=E2=96=9B=E2=96=80=20=E2=96=90=E2=96=90=20=E2=96=8C=20=E2=96=8C=C2=A0=E2=96=99=E2=96=9A=E2=96=8C=E2=96=8C=20=E2=96=8C=E2=96=8C=20=C2=A0=E2=96=90=20=E2=96=8C=20=E2=96=8C=E2=96=9D
=20=20=20=20=20=20=20=20=20=20=E2=96=98=20=E2=96=98=E2=96=9D=E2=96=80=E2=96=98=20=E2=96=98=E2=96=98=E2=96=9D=E2=96=80=20=C2=A0=E2=96=98=20=E2=96=98=E2=96=9D=E2=96=80=20=E2=96=98=20=20=20=E2=96=98=E2=96=9D=E2=96=80=E2=96=98=E2=96=9D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/examples/figfont.c

    r2110 r2111  
    1818#if !defined(__KERNEL__)
    1919#   include <stdio.h>
     20#   include <stdlib.h>
    2021#endif
    2122
     
    2526{
    2627    cucul_canvas_t *cv;
     28    void *buffer;
     29    unsigned long int len;
     30    uint8_t color = 0;
    2731
    28     if(argc < 2)
     32    if(argc < 3)
    2933    {
    3034        fprintf(stderr, "Too few arguments\n");
     
    3943    }
    4044
     45    while(argv[2][0])
     46    {
     47        cucul_set_color_ansi(cv, 1 + ((color += 4) % 15), CUCUL_TRANSPARENT);
     48        cucul_put_figchar(cv, argv[2]++[0]);
     49    }
     50
     51    buffer = cucul_export_memory(cv, "utf8", &len);
     52    fwrite(buffer, len, 1, stdout);
     53    free(buffer);
     54
    4155    cucul_free_canvas(cv);
    4256
Note: See TracChangeset for help on using the changeset viewer.