Skip to content

Commit

Permalink
more: don't include ncurses.h, fix for non-widechar
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
karelzak committed Jun 3, 2016
1 parent e19916c commit 324e52a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions text-utils/more.c
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
{
Expand All @@ -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)
Expand Down

0 comments on commit 324e52a

Please sign in to comment.