summaryrefslogtreecommitdiffstats
path: root/text-utils/pg.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/pg.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/pg.c')
-rw-r--r--text-utils/pg.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/text-utils/pg.c b/text-utils/pg.c
index eac12756c..10bdd1593 100644
--- a/text-utils/pg.c
+++ b/text-utils/pg.c
@@ -255,7 +255,7 @@ invopt(char *s)
usage();
}
-#ifdef ENABLE_WIDECHAR
+#ifdef HAVE_WIDECHAR
/*
* A mbstowcs()-alike function that transparently handles invalid sequences.
*/
@@ -402,7 +402,7 @@ checkf(void)
return 0;
}
-#ifdef ENABLE_WIDECHAR
+#ifdef HAVE_WIDECHAR
/*
* Return the last character that will fit on the line at col columns
* in case MB_CUR_MAX > 1.
@@ -489,7 +489,7 @@ endline(unsigned col, char *s)
unsigned pos = 0;
char *t = s;
-#ifdef ENABLE_WIDECHAR
+#ifdef HAVE_WIDECHAR
if (MB_CUR_MAX > 1)
return endline_for_mb(col, s);
#endif
@@ -776,7 +776,7 @@ endprompt:
cmd.count = getcount(cmd.cmdline);
}
-#ifdef ENABLE_WIDECHAR
+#ifdef HAVE_WIDECHAR
/*
* Remove backspace formatting, for searches
* in case MB_CUR_MAX > 1.
@@ -817,7 +817,7 @@ colb(char *s)
{
char *p = s, *q;
-#ifdef ENABLE_WIDECHAR
+#ifdef HAVE_WIDECHAR
if (MB_CUR_MAX > 1)
return colb_for_mb(s);
#endif
@@ -836,7 +836,7 @@ colb(char *s)
return s;
}
-#ifdef ENABLE_WIDECHAR
+#ifdef HAVE_WIDECHAR
/*
* Convert nonprintable characters to spaces
* in case MB_CUR_MAX > 1.
@@ -867,7 +867,7 @@ makeprint_for_mb(char *s, size_t l)
static void
makeprint(char *s, size_t l)
{
-#ifdef ENABLE_WIDECHAR
+#ifdef HAVE_WIDECHAR
if (MB_CUR_MAX > 1)
return makeprint_for_mb(s, l);
#endif