From c5cd2b5716b999c32b120b220846e57a3f67e260 Mon Sep 17 00:00:00 2001 From: bptato Date: Tue, 2 Feb 2021 15:06:53 +0100 Subject: sixel and osc5379 image display protocols can be chosen in options --- main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 7bcf898..bbdf3c3 100644 --- a/main.c +++ b/main.c @@ -123,7 +123,7 @@ static int searchKeyNum(void); #define help() fusage(stdout, 0) #define usage() fusage(stderr, 1) -int enable_inline_image; /* 1 == mlterm OSC 5379, 2 == sixel */ +int enable_inline_image; static void fversion(FILE * f) @@ -692,10 +692,10 @@ main(int argc, char **argv, char **envp) } #endif else if (!strcmp("-ri", argv[i])) { - enable_inline_image = 1; + enable_inline_image = INLINE_IMG_OSC5379; } else if (!strcmp("-sixel", argv[i])) { - enable_inline_image = 2; + enable_inline_image = INLINE_IMG_SIXEL; } else if (!strcmp("-num", argv[i])) showLineNum = TRUE; @@ -5961,7 +5961,7 @@ deleteFiles() } while ((f = popText(fileToDelete)) != NULL) { unlink(f); - if (enable_inline_image == 2 && strcmp(f+strlen(f)-4, ".gif") == 0) { + if (enable_inline_image == INLINE_IMG_SIXEL && strcmp(f+strlen(f)-4, ".gif") == 0) { Str firstframe = Strnew_charp(f); Strcat_charp(firstframe, "-1"); unlink(firstframe->ptr); -- cgit v1.2.3