summaryrefslogtreecommitdiff
path: root/src/shared/util.h
diff options
context:
space:
mode:
authorShawn Landden <shawn@churchofgit.com>2013-09-20 18:37:33 -0700
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-10-13 17:56:54 -0400
commitf405e86de361ec305dc2b8634efeaa23dc144053 (patch)
treeb3fe37e4a143a5d2dee14eb34d96f96cb03b84fc /src/shared/util.h
parent14a9283eb38a93ec384c322ccbe06352c86a25f8 (diff)
util, utf8: make ellipsize take multi-byte characters into account
rename old versions to ascii_* Do not take into account zerowidth characters, but do consider double-wide characters. Import needed utf8 helper code from glib. v3: rebase ontop of utf8 restructuring work [zj: tweak the algorithm a bit, move new code to separate file]
Diffstat (limited to 'src/shared/util.h')
-rw-r--r--src/shared/util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/shared/util.h b/src/shared/util.h
index c9d078257f..26af5b30af 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -405,6 +405,7 @@ static inline const char *ansi_highlight_off(void) {
int running_in_chroot(void);
char *ellipsize(const char *s, size_t length, unsigned percent);
+ /* bytes columns */
char *ellipsize_mem(const char *s, size_t old_length, size_t new_length, unsigned percent);
int touch(const char *path);