summaryrefslogtreecommitdiffstats
path: root/text-utils/more.c
diff options
context:
space:
mode:
authorKarel Zak2016-06-03 14:51:01 +0200
committerKarel Zak2016-06-03 14:51:01 +0200
commit324e52a5cf5a7016807c81e8c9d668aa8fad8b34 (patch)
treee998a1ffdd8a9d8cc4efc0e97191a67e9858f475 /text-utils/more.c
parentinclude/widechar: add fallback for WEOF (diff)
downloadkernel-qcow2-util-linux-324e52a5cf5a7016807c81e8c9d668aa8fad8b34.tar.gz
kernel-qcow2-util-linux-324e52a5cf5a7016807c81e8c9d668aa8fad8b34.tar.xz
kernel-qcow2-util-linux-324e52a5cf5a7016807c81e8c9d668aa8fad8b34.zip
more: don't include ncurses.h, fix for non-widechar
It seems our crazy widechar.h is in conflict with ncurses, but it seems that nothing in more.c requires anything from ncurses. All we need is probably <term.h>. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'text-utils/more.c')
-rw-r--r--text-utils/more.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/text-utils/more.c b/text-utils/more.c
index 0a5f4942c..21e0cbc70 100644
--- a/text-utils/more.c
+++ b/text-utils/more.c
@@ -190,11 +190,6 @@ struct {
} context, screen_start;
extern char PC; /* pad character */
-#ifdef HAVE_NCURSES_H
-# include <ncurses.h>
-#elif defined(HAVE_NCURSES_NCURSES_H)
-# include <ncurses/ncurses.h>
-#endif
#include <term.h> /* include after <curses.h> */
#define TERM_AUTO_RIGHT_MARGIN "am"
@@ -1007,6 +1002,7 @@ void clreos(void)
}
+#ifdef HAVE_WIDECHAR
static UL_ASAN_BLACKLIST size_t xmbrtowc(wchar_t *wc, const char *s, size_t n,
mbstate_t *mbstate)
{
@@ -1015,6 +1011,7 @@ static UL_ASAN_BLACKLIST size_t xmbrtowc(wchar_t *wc, const char *s, size_t n,
return 1;
return mblength;
}
+#endif
/* Print a buffer of n characters */
void prbuf(register char *s, register int n)