Ticket #3628: mc-3628-04-restructure-ncurses-term-define.patch

File mc-3628-04-restructure-ncurses-term-define.patch, 1.2 KB (added by and, 8 years ago)
  • lib/tty/tty-ncurses.c

    From 572ed3023aee6e75455929f8bcdf5bc309870f7e Mon Sep 17 00:00:00 2001
    From: Andreas Mohr <and@gmx.li>
    Date: Sun, 10 Apr 2016 16:02:24 +0000
    Subject: [PATCH] Restructure ncurses term define
    
    Restructure ncurses term define and remove superfluous want_term_h.
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    ---
     lib/tty/tty-ncurses.c | 12 ++++--------
     1 file changed, 4 insertions(+), 8 deletions(-)
    
    diff --git a/lib/tty/tty-ncurses.c b/lib/tty/tty-ncurses.c
    index 78fcba6..b1b77c7 100644
    a b  
    4242#include "lib/global.h" 
    4343#include "lib/strutil.h"        /* str_term_form */ 
    4444 
    45 #ifndef WANT_TERM_H 
    46 #define WANT_TERM_H 
    47 #endif 
    48  
    4945#include "tty-internal.h"       /* mc_tty_normalize_from_utf8() */ 
    5046#include "tty.h" 
    5147#include "color-internal.h" 
     
    5450#include "win.h" 
    5551 
    5652/* include at last !!! */ 
    57 #ifdef WANT_TERM_H 
    58 #ifdef HAVE_NCURSES_TERM_H 
     53#ifdef HAVE_NCURSESW_TERM_H 
     54#include <ncursesw/term.h> 
     55#elif defined HAVE_NCURSES_TERM_H 
    5956#include <ncurses/term.h> 
    6057#else 
    6158#include <term.h> 
    62 #endif /* HAVE_NCURSES_TERM_H */ 
    63 #endif /* WANT_TERM_H */ 
     59#endif 
    6460 
    6561/*** global variables ****************************************************************************/ 
    6662