mirror of https://github.com/MidnightCommander/mc
Ticket #4200: fix FTBFS with ncurses build with --disable-widec.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
2b7c21bac6
commit
e7bbf72544
|
@ -560,6 +560,7 @@ tty_fill_region (int y, int x, int rows, int cols, unsigned char ch)
|
|||
void
|
||||
tty_colorize_area (int y, int x, int rows, int cols, int color)
|
||||
{
|
||||
#ifdef ENABLE_SHADOWS
|
||||
cchar_t *ctext;
|
||||
wchar_t wch[10]; /* TODO not sure if the length is correct */
|
||||
attr_t attrs;
|
||||
|
@ -585,6 +586,13 @@ tty_colorize_area (int y, int x, int rows, int cols, int color)
|
|||
}
|
||||
|
||||
g_free (ctext);
|
||||
#else
|
||||
(void) y;
|
||||
(void) x;
|
||||
(void) rows;
|
||||
(void) cols;
|
||||
(void) color;
|
||||
#endif /* ENABLE_SHADOWS */
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
|
|
@ -30,6 +30,11 @@
|
|||
#define NCURSES_CONST const
|
||||
#endif
|
||||
|
||||
/* do not draw shadows if NCurses is built with --disable-widec */
|
||||
#if defined(NCURSES_WIDECHAR) && NCURSES_WIDECHAR
|
||||
#define ENABLE_SHADOWS 1
|
||||
#endif
|
||||
|
||||
/*** typedefs(not structures) and defined constants **********************************************/
|
||||
|
||||
/*** enums ***************************************************************************************/
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#define COLS SLtt_Screen_Cols
|
||||
#define LINES SLtt_Screen_Rows
|
||||
|
||||
#define ENABLE_SHADOWS 1
|
||||
|
||||
/*** enums ***************************************************************************************/
|
||||
|
||||
enum
|
||||
|
|
|
@ -280,7 +280,9 @@ appearance_box_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm
|
|||
switch (msg)
|
||||
{
|
||||
case MSG_INIT:
|
||||
#ifdef ENABLE_SHADOWS
|
||||
if (!tty_use_colors ())
|
||||
#endif
|
||||
{
|
||||
Widget *shadow;
|
||||
|
||||
|
|
Loading…
Reference in New Issue