Changeset 4779 for libcaca


Ignore:
Timestamp:
Mar 6, 2011, 11:03:03 AM (8 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Updated help
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/src/cacaclock.c

    r4778 r4779  
    2626static void usage(int argc, char **argv)
    2727{
    28         fprintf(stderr, "Usage: %s [OPTIONS]... <IMAGE>\n", argv[0]);
    29         fprintf(stderr, "Convert IMAGE to any text based available format.\n");
    30         fprintf(stderr, "Example : %s -w 80 -f ansi ./caca.png\n\n", argv[0]);
     28        fprintf(stderr, "Usage: %s [OPTIONS]...\n", argv[0]);
     29        fprintf(stderr, "Display current time in text mode     (q to quit)\n");
     30        fprintf(stderr, "Example : %s -d '%%R'\n\n", argv[0]);
    3131        fprintf(stderr, "Options:\n");
    3232        fprintf(stderr, "  -h, --help\t\t\tThis help\n");
     
    5050                        CACACLOCKVERSION, caca_get_version(), __DATE__);
    5151}
    52 
    5352
    5453
     
    148147                uint32_t o = 0;
    149148
    150                 // figfont API is not complete, and does not alloq us to put a string
     149                // figfont API is not complete, and does not allow us to put a string
    151150                // at another position than 0,0
    152151                // So, we have to create a canvas which will hold the figfont string,
     
    159158                }
    160159                caca_flush_figlet (figcv);
    161                 fw = caca_get_canvas_width (figcv);
    162                 fh = caca_get_canvas_height(figcv);     
    163 
    164160                free(d);
    165161
    166162                w = caca_get_canvas_width (cv);
    167                 h = caca_get_canvas_height(cv);
     163                h = caca_get_canvas_height(cv);
     164        fw = caca_get_canvas_width (figcv);
     165                fh = caca_get_canvas_height(figcv);     
     166
    168167                uint32_t x = (w/2) - (fw/2);
    169168                uint32_t y = (h/2) - (fh/2);
Note: See TracChangeset for help on using the changeset viewer.