diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2022-02-06 11:10:59 +0100 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2022-02-06 11:30:47 +0100 |
commit | 6cc75f8c9e2b41f27c12302b396546c528fe6440 (patch) | |
tree | 7a92242c8d22de7eb4e94d4b8acbf505d497f8ed /util.c | |
parent | 2073929621ed25546dd60cf4249adb04505ba6d5 (diff) |
add compile-time option to improve output on dumb non-UTF8 terminals
This makes atleast feeds with simple ASCII work.
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -354,11 +354,11 @@ printutf8pad(FILE *fp, const char *s, size_t len, int pad) } if (col + w > len || (col + w == len && s[i + inc])) { - fputs("\xe2\x80\xa6", fp); /* ellipsis */ + fputs(PAD_TRUNCATE_SYMBOL, fp); /* ellipsis */ col++; break; } else if (rl < 0) { - fputs("\xef\xbf\xbd", fp); /* replacement */ + fputs(UTF_INVALID_SYMBOL, fp); /* replacement */ col++; continue; } @@ -367,7 +367,7 @@ printutf8pad(FILE *fp, const char *s, size_t len, int pad) } else { /* optimization: simple ASCII character */ if (col + 1 > len || (col + 1 == len && s[i + 1])) { - fputs("\xe2\x80\xa6", fp); /* ellipsis */ + fputs(PAD_TRUNCATE_SYMBOL, fp); /* ellipsis */ col++; break; } |