summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2022-02-06 11:10:59 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2022-02-06 11:30:47 +0100
commit6cc75f8c9e2b41f27c12302b396546c528fe6440 (patch)
tree7a92242c8d22de7eb4e94d4b8acbf505d497f8ed /util.h
parent2073929621ed25546dd60cf4249adb04505ba6d5 (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.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/util.h b/util.h
index 61eeb26..6115dcf 100644
--- a/util.h
+++ b/util.h
@@ -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 */