From: Kumar Appaiah Date: Mon, 20 Sep 2010 23:10:11 +0000 (-0500) Subject: Check the ncurses version before using set_tabsize X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3ff7fff834173c6d01f04feef6403c6b0a724ebf;p=tig.git Check the ncurses version before using set_tabsize This patch checks the ncurses patch level to decide if set_tabsize is to be used in place of the TABSIZE macro, for setting the tab size. Signed-off-by: Jonas Fonseca --- diff --git a/NEWS b/NEWS index c8c94d9..a9cbe07 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,13 @@ Release notes ============= +tig master +---------- + +Bug fixes: + + - Fix set_tabsize() compile error for older versions of ncurses. + tig-0.16.1 ---------- diff --git a/tig.c b/tig.c index 7bc5daa..01b55d7 100644 --- a/tig.c +++ b/tig.c @@ -7111,7 +7111,11 @@ init_display(void) keypad(status_win, TRUE); wbkgdset(status_win, get_line_attr(LINE_STATUS)); +#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20080119) set_tabsize(opt_tab_size); +#else + TABSIZE = opt_tab_size; +#endif term = getenv("XTERM_VERSION") ? NULL : getenv("COLORTERM"); if (term && !strcmp(term, "gnome-terminal")) {