summaryrefslogtreecommitdiffstats
path: root/text-utils/more.c
diff options
context:
space:
mode:
authorKarel Zak2007-01-30 13:49:50 +0100
committerKarel Zak2007-01-30 13:49:50 +0100
commit06b04b23cdff2f038e4f341a1247c51b5261f332 (patch)
tree0f454ed17bcacc6fdd14b6db2c3375b90fadab4b /text-utils/more.c
parenttests: add return code (diff)
downloadkernel-qcow2-util-linux-06b04b23cdff2f038e4f341a1247c51b5261f332.tar.gz
kernel-qcow2-util-linux-06b04b23cdff2f038e4f341a1247c51b5261f332.tar.xz
kernel-qcow2-util-linux-06b04b23cdff2f038e4f341a1247c51b5261f332.zip
build-sys: fix ifdef ENABLE_WIDECHAR usage
There has been unexpected mix of HAVE_WIDECHAR and ENABLE_WIDECHAR macros. The ENABLE_WIDECHAR is old version and has to be replaced everywhere otherwise we will see bugs with multibyte stuff. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'text-utils/more.c')
-rw-r--r--text-utils/more.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/text-utils/more.c b/text-utils/more.c
index 72f2832a7..982edbece 100644
--- a/text-utils/more.c
+++ b/text-utils/more.c
@@ -739,7 +739,7 @@ int get_line(register FILE *f, int *length)
int column;
static int colflg;
-#ifdef ENABLE_WIDECHAR
+#ifdef HAVE_WIDECHAR
int i;
wchar_t wc;
int wc_width;
@@ -762,7 +762,7 @@ int get_line(register FILE *f, int *length)
c = Getc (f);
}
while (p < &Line[LINSIZ - 1]) {
-#ifdef ENABLE_WIDECHAR
+#ifdef HAVE_WIDECHAR
if (fold_opt && use_mbc_buffer_flag && MB_CUR_MAX > 1) {
use_mbc_buffer_flag = 0;
state_bak = state;
@@ -880,7 +880,7 @@ process_mbc:
*length = p - Line;
return (column);
} else {
-#ifdef ENABLE_WIDECHAR
+#ifdef HAVE_WIDECHAR
if (fold_opt && MB_CUR_MAX > 1) {
memset (mbc, '\0', MB_LEN_MAX);
mbc_pos = 0;
@@ -1808,7 +1808,7 @@ void ttyin (unsigned char buf[], register int nmax, char pchar) {
}
else if (((cc_t) c == otty.c_cc[VERASE]) && !slash) {
if (sp > buf) {
-#ifdef ENABLE_WIDECHAR
+#ifdef HAVE_WIDECHAR
if (MB_CUR_MAX > 1)
{
wchar_t wc;