summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorTom Rhodes <trhodes@FreeBSD.org>2004-08-17 04:45:52 +0000
committerTom Rhodes <trhodes@FreeBSD.org>2004-08-17 04:45:52 +0000
commitdaa790840cd5a25a45eecf88c2cab70bbfc04feb (patch)
tree015e77b3171998ebde4ac6ed57871bf5e6d7341a /lib/libc
parent2cfe973b62c0ed1b62c31696551307d872193693 (diff)
Notes
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/locale/wcwidth.310
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/libc/locale/wcwidth.3 b/lib/libc/locale/wcwidth.3
index 06c0067c3146..c87c7ed3adf7 100644
--- a/lib/libc/locale/wcwidth.3
+++ b/lib/libc/locale/wcwidth.3
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 12, 2004
+.Dd August 17, 2004
.Dt WCWIDTH 3
.Os
.Sh NAME
@@ -65,10 +65,16 @@ int column, w;
column = 0;
while ((ch = getwchar()) != WEOF) {
+<<<<<<< wcwidth.3
+ if ((w = wcwidth(ch)) > 0)
+ column += w;
+ if (column > 20) {
+=======
w = wcwidth(ch);
if (w > 0 && column + w >= 20) {
+>>>>>>> 1.4
putwchar(L'\en');
- column = 0;
+ column = w;
}
putwchar(ch);
if (ch == L'\en')