Ignore:
Timestamp:
Nov 14, 2006, 12:42:43 AM (13 years ago)
Author:
Sam Hocevar
Message:
  • Factored terminal title setting code.
  • Do not try to set the terminal title if TERM=linux.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/driver_ncurses.c

    r1391 r1392  
    6060static void ncurses_check_terminal(void);
    6161#endif
    62 static void ncurses_set_title(char const *);
    6362static void ncurses_write_utf32(uint32_t);
    6463
     
    111110#endif
    112111
    113     ncurses_set_title("caca for ncurses");
     112    _caca_set_term_title("caca for ncurses");
    114113
    115114    initscr();
     
    170169static int ncurses_end_graphics(caca_display_t *dp)
    171170{
    172     ncurses_set_title("");
     171    _caca_set_term_title("");
    173172    mousemask(dp->drv.p->oldmask, NULL);
    174173    curs_set(1);
     
    183182static int ncurses_set_display_title(caca_display_t *dp, char const *title)
    184183{
    185     ncurses_set_title(title);
     184    _caca_set_term_title(title);
    186185
    187186    return 0;
     
    436435#endif
    437436
    438 static void ncurses_set_title(char const *str)
    439 {
    440     fprintf(stdout, "\x1b]0;%s\x07\n", str);
    441     fflush(stdout);
    442 }
    443 
    444437static void ncurses_write_utf32(uint32_t ch)
    445438{
Note: See TracChangeset for help on using the changeset viewer.