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.h | |
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.h')
-rw-r--r-- | util.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -16,6 +16,14 @@ size_t strlcat(char *, const char *, size_t); #undef strlcpy size_t strlcpy(char *, const char *, size_t); +#ifndef SFEED_DUMBTERM +#define PAD_TRUNCATE_SYMBOL "\xe2\x80\xa6" /* symbol: "ellipsis" */ +#define UTF_INVALID_SYMBOL "\xef\xbf\xbd" /* symbol: "replacement" */ +#else +#define PAD_TRUNCATE_SYMBOL "." /* symbol: "ellipsis" */ +#define UTF_INVALID_SYMBOL "?" /* symbol: "replacement" */ +#endif + /* feed info */ struct feed { char *name; /* feed name */ |