Introduction
Introduction Statistics Contact Development Disclaimer Help
default to character width 1 - sob - simple output bar
git clone git://git.codemadness.org/sob
Log
Files
Refs
README
LICENSE
---
commit 6f02addad1b6c1f13090d951703a00edba6662c3
parent 74676ddd350816d7c6bdd5ef274a8c66ae49d105
Author: Hiltjo Posthuma <[email protected]>
Date: Sun, 26 Oct 2014 12:01:22 +0000
default to character width 1
if wcwidth() == -1, default to character width 1 (usual case).
with glibc: printf '\xd4\xa4' | sob
Diffstat:
M sob.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/sob.c b/sob.c
@@ -116,7 +116,7 @@ colw(const char *s, size_t max)
if((r = mbtowc(&w, s, i + 4 > max ? max - i : 4)) == -…
break;
if((r = wcwidth(w)) == -1)
- break;
+ r = 1;
len += r;
}
}
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.