Ticket #4200: 4200_ncurses_disable_widec.patch

File 4200_ncurses_disable_widec.patch, 2.1 KB (added by andrew_b, 10 months ago)
  • lib/tty/tty-ncurses.c

    diff --git a/lib/tty/tty-ncurses.c b/lib/tty/tty-ncurses.c
    index 5cddf5059..2c117ef4b 100644
    a b tty_fill_region (int y, int x, int rows, int cols, unsigned char ch) 
    560560void 
    561561tty_colorize_area (int y, int x, int rows, int cols, int color) 
    562562{ 
     563#ifdef ENABLE_SHADOWS 
    563564    cchar_t *ctext; 
    564565    wchar_t wch[10];            /* TODO not sure if the length is correct */ 
    565566    attr_t attrs; 
    tty_colorize_area (int y, int x, int rows, int cols, int color) 
    585586    } 
    586587 
    587588    g_free (ctext); 
     589#else 
     590    (void) y; 
     591    (void) x; 
     592    (void) rows; 
     593    (void) cols; 
     594    (void) color; 
     595#endif /* ENABLE_SHADOWS */ 
    588596} 
    589597 
    590598/* --------------------------------------------------------------------------------------------- */ 
  • lib/tty/tty-ncurses.h

    diff --git a/lib/tty/tty-ncurses.h b/lib/tty/tty-ncurses.h
    index d75df9533..8feb17ccd 100644
    a b  
    3030#define NCURSES_CONST const 
    3131#endif 
    3232 
     33/* do not draw shadows if NCurses is built with --disable-widec */ 
     34#if defined(NCURSES_WIDECHAR) && NCURSES_WIDECHAR 
     35#define ENABLE_SHADOWS 1 
     36#endif 
     37 
    3338/*** typedefs(not structures) and defined constants **********************************************/ 
    3439 
    3540/*** enums ***************************************************************************************/ 
  • lib/tty/tty-slang.h

    diff --git a/lib/tty/tty-slang.h b/lib/tty/tty-slang.h
    index c36785ffc..15fd00a94 100644
    a b  
    2727#define COLS  SLtt_Screen_Cols 
    2828#define LINES SLtt_Screen_Rows 
    2929 
     30#define ENABLE_SHADOWS 1 
     31 
    3032/*** enums ***************************************************************************************/ 
    3133 
    3234enum 
  • src/filemanager/boxes.c

    diff --git a/src/filemanager/boxes.c b/src/filemanager/boxes.c
    index ed16d04dd..4c1f5ba84 100644
    a b appearance_box_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm 
    280280    switch (msg) 
    281281    { 
    282282    case MSG_INIT: 
     283#ifdef ENABLE_SHADOWS 
    283284        if (!tty_use_colors ()) 
     285#endif 
    284286        { 
    285287            Widget *shadow; 
    286288