summaryrefslogtreecommitdiffstats
path: root/text-utils/more.c
diff options
context:
space:
mode:
authorKarel Zak2006-12-07 00:26:54 +0100
committerKarel Zak2006-12-07 00:26:54 +0100
commit48d7b13a1eab85fab91c8d6c5ddf298f733c74f5 (patch)
tree8813d36590ee3361bd75f57a12fd2032e9296ddb /text-utils/more.c
parentImported from util-linux-2.12r tarball. (diff)
downloadkernel-qcow2-util-linux-48d7b13a1eab85fab91c8d6c5ddf298f733c74f5.tar.gz
kernel-qcow2-util-linux-48d7b13a1eab85fab91c8d6c5ddf298f733c74f5.tar.xz
kernel-qcow2-util-linux-48d7b13a1eab85fab91c8d6c5ddf298f733c74f5.zip
Imported from util-linux-2.13-pre1 tarball.
Diffstat (limited to 'text-utils/more.c')
-rw-r--r--text-utils/more.c53
1 files changed, 4 insertions, 49 deletions
diff --git a/text-utils/more.c b/text-utils/more.c
index 5b2f5733b..2b4fceb92 100644
--- a/text-utils/more.c
+++ b/text-utils/more.c
@@ -165,17 +165,12 @@ struct {
} context, screen_start;
extern char PC; /* pad character */
-#ifndef HAVE_termcap
-#define USE_CURSES
-#endif
-
-#ifdef USE_CURSES
-
-#if NCH
+#ifdef HAVE_NCURSES_H
#include <ncurses.h>
-#else
-#include <curses.h>
+#elif defined(HAVE_NCURSES_NCURSES_H)
+#include <ncurses/ncurses.h>
#endif
+
#include <term.h> /* include after <curses.h> */
static void
@@ -208,46 +203,6 @@ my_tgoto(const char *cap, int col, int row) {
return tparm(cap, col, row);
}
-#else /* no CURSES */
-#include <termcap.h>
-
-char termbuffer[4096];
-char tcbuffer[4096];
-char *strbuf = termbuffer;
-
-static void
-my_putstring(char *s) {
- tputs (s, 1, putchar);
-}
-
-static void
-my_setupterm(const char *term, int fildes, int *errret) {
- *errret = tgetent(tcbuffer, term);
-}
-
-static int
-my_tgetnum(char *s, char *ss) {
- return tgetnum(s);
-}
-
-static int
-my_tgetflag(char *s, char *ss) {
- return tgetflag(s);
-}
-
-static char *
-my_tgetstr(char *s, char *ss) {
- return tgetstr(s, &strbuf);
-}
-
-static char *
-my_tgoto(const char *cap, int col, int row) {
- return tgoto(cap, col, row);
-}
-
-
-#endif /* USE_CURSES */
-
static void
idummy(int *kk) {}