text-utils: use proper paths to term.h

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2017-05-30 17:15:37 +02:00
parent 18451b2cf4
commit 2ac1bc84d7
4 changed files with 33 additions and 13 deletions

View file

@ -60,16 +60,13 @@
#include <termios.h> #include <termios.h>
#include <unistd.h> #include <unistd.h>
#ifndef NCURSES_CONST #ifdef HAVE_TERM_H
# define NCURSES_CONST const /* define before including term.h */ # include <term.h>
#elif defined(HAVE_NCURSES_TERM_H)
# include <ncurses/term.h>
#elif defined(HAVE_NCURSESW_TERM_H)
# include <ncursesw/term.h>
#endif #endif
#ifdef HAVE_NCURSES_H
# include <ncurses.h>
#elif defined(HAVE_NCURSES_NCURSES_H)
# include <ncurses/ncurses.h>
#endif
/* must include after ncurses.h */
#include <term.h>
#ifdef HAVE_LINUX_TIOCL_H #ifdef HAVE_LINUX_TIOCL_H
# include <linux/tiocl.h> # include <linux/tiocl.h>

View file

@ -190,7 +190,13 @@ static struct {
} context, screen_start; } context, screen_start;
extern char PC; /* pad character */ extern char PC; /* pad character */
#include <term.h> /* include after <curses.h> */ #ifdef HAVE_TERM_H
# include <term.h>
#elif defined(HAVE_NCURSES_TERM_H)
# include <ncurses/term.h>
#elif defined(HAVE_NCURSESW_TERM_H)
# include <ncursesw/term.h>
#endif
#define TERM_AUTO_RIGHT_MARGIN "am" #define TERM_AUTO_RIGHT_MARGIN "am"
#define TERM_CEOL "xhp" #define TERM_CEOL "xhp"

View file

@ -59,13 +59,23 @@
#include <signal.h> #include <signal.h>
#include <setjmp.h> #include <setjmp.h>
#ifdef HAVE_NCURSES_H #ifdef HAVE_NCURSESW_H
# include <ncursesw.h>
#elif defined(HAVE_NCURSES_H)
# include <ncurses.h> # include <ncurses.h>
#elif defined(HAVE_NCURSESW_NCURSES_H)
# include <ncursesw/ncurses.h>
#elif defined(HAVE_NCURSES_NCURSES_H) #elif defined(HAVE_NCURSES_NCURSES_H)
# include <ncurses/ncurses.h> # include <ncurses/ncurses.h>
#endif #endif
#include <term.h> #ifdef HAVE_TERM_H
# include <term.h>
#elif defined(HAVE_NCURSES_TERM_H)
# include <ncurses/term.h>
#elif defined(HAVE_NCURSESW_TERM_H)
# include <ncursesw/term.h>
#endif
#include "nls.h" #include "nls.h"
#include "xalloc.h" #include "xalloc.h"

View file

@ -43,13 +43,20 @@
#include <stdio.h> #include <stdio.h>
#include <unistd.h> /* for getopt(), isatty() */ #include <unistd.h> /* for getopt(), isatty() */
#include <string.h> /* for memset(), strcpy() */ #include <string.h> /* for memset(), strcpy() */
#include <term.h> /* for setupterm() */
#include <stdlib.h> /* for getenv() */ #include <stdlib.h> /* for getenv() */
#include <limits.h> /* for INT_MAX */ #include <limits.h> /* for INT_MAX */
#include <signal.h> /* for signal() */ #include <signal.h> /* for signal() */
#include <errno.h> #include <errno.h>
#include <getopt.h> #include <getopt.h>
#ifdef HAVE_TERM_H
# include <term.h>
#elif defined(HAVE_NCURSES_TERM_H)
# include <ncurses/term.h>
#elif defined(HAVE_NCURSESW_TERM_H)
# include <ncursesw/term.h>
#endif
#include "nls.h" #include "nls.h"
#include "xalloc.h" #include "xalloc.h"
#include "widechar.h" #include "widechar.h"