aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2021-02-06 04:07:40 +0000
committerGitHub <noreply@github.com>2021-02-06 04:07:40 +0000
commite66ca9fa4ee8eb9e9370bba0bfa4d2084a300a3e (patch)
tree759d7d3bd2023845ab491d0f1810c8f278c6b150 /main.c
parentUpdate ChangeLog (diff)
parentClarify inline image setting's wording (diff)
downloadw3m-e66ca9fa4ee8eb9e9370bba0bfa4d2084a300a3e.tar.gz
w3m-e66ca9fa4ee8eb9e9370bba0bfa4d2084a300a3e.zip
Merge pull request #161 from bptato/master
Improved inline image protocol support
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 4 insertions, 4 deletions
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);