diff --git a/src/gmnlm.c b/src/gmnlm.c
index 3598e3fb1770aca2bd646d7a3f2bf642b54c2ab9..81923101e320b8517405ef2ed7efdbc626241201 100644
--- a/src/gmnlm.c
+++ b/src/gmnlm.c
@@ -23,7 +23,7 @@ struct history *prev, *next;
};
struct browser {
- bool pagination;
+ bool pagination, unicode;
struct gemini_options opts;
FILE *tty;
@@ -184,13 +184,13 @@ col += fprintf(browser->tty, " %s\n",
trim_ws(tok.heading.title));
break;
case GEMINI_LIST_ITEM:
- // TODO: Option to disable Unicode
- col += fprintf(browser->tty, " • %s\n",
+ col += fprintf(browser->tty, " %s %s\n",
+ browser->unicode ? "•" : "*",
trim_ws(tok.list_item));
break;
case GEMINI_QUOTE:
- // TODO: Option to disable Unicode
- col += fprintf(browser->tty, " | %s\n",
+ col += fprintf(browser->tty, " %s %s\n",
+ browser->unicode ? "|" : "|",
trim_ws(tok.quote_text));
break;
}
@@ -368,19 +368,23 @@ main(int argc, char *argv[])
{
struct browser browser = {
.pagination = true,
+ .unicode = true,
.url = curl_url(),
.tty = fopen("/dev/tty", "w+"),
};
int c;
- while ((c = getopt(argc, argv, "hP")) != -1) {
+ while ((c = getopt(argc, argv, "hPU")) != -1) {
switch (c) {
+ case 'h':
+ usage(argv[0]);
+ return 0;
case 'P':
browser.pagination = false;
break;
- case 'h':
- usage(argv[0]);
- return 0;
+ case 'U':
+ browser.unicode = false;
+ break;
default:
fprintf(stderr, "fatal: unknown flag %c\n", c);
return 1;