diff options
author | Tatsuya Kinoshita <tats@debian.org> | 2021-01-02 00:20:47 +0000 |
---|---|---|
committer | Tatsuya Kinoshita <tats@debian.org> | 2021-01-02 00:20:47 +0000 |
commit | a722a562112506c63c9b6519b8252d633534a35a (patch) | |
tree | 78dc4b8bbefa910007339970eaf004f012d2082f /w3mimg/fb/fb_w3mimg.c | |
parent | Switch upstream to Debian's w3m (diff) | |
parent | New upstream version 0.5.3+git20210102 (diff) | |
download | w3m-a722a562112506c63c9b6519b8252d633534a35a.tar.gz w3m-a722a562112506c63c9b6519b8252d633534a35a.zip |
Update upstream source from tag 'upstream/0.5.3+git20210102'
Update to upstream version '0.5.3+git20210102'
with Debian dir e89c066385156d7c9ed01b0c8a1a08e01019959d
Diffstat (limited to 'w3mimg/fb/fb_w3mimg.c')
-rw-r--r-- | w3mimg/fb/fb_w3mimg.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/w3mimg/fb/fb_w3mimg.c b/w3mimg/fb/fb_w3mimg.c index d3ae5a9..62511f0 100644 --- a/w3mimg/fb/fb_w3mimg.c +++ b/w3mimg/fb/fb_w3mimg.c @@ -153,10 +153,15 @@ check_tty_console(char *tty) return 0; if (strncmp(tty, "/dev/", 5) == 0) tty += 5; +#if defined(__linux__) if (strncmp(tty, "tty", 3) == 0 && isdigit(*(tty + 3))) return 1; if (strncmp(tty, "vc/", 3) == 0 && isdigit(*(tty + 3))) return 1; +#elif defined(__FreeBSD__) + if (strncmp(tty, "ttyv", 4) == 0 && isxdigit(*(tty + 4))) + return 1; +#endif return 0; } #else @@ -172,7 +177,9 @@ w3mimg_fbopen() return NULL; memset(wop, 0, sizeof(w3mimg_op)); - if (!check_tty_console(getenv("W3M_TTY")) && strcmp("jfbterm", getenv("TERM")) != 0) { + if (!check_tty_console(getenv("W3M_TTY")) && + strncmp("fbterm", getenv("TERM"), 6) != 0 && + strncmp("jfbterm", getenv("TERM"), 7) != 0) { fprintf(stderr, "w3mimgdisplay/fb: tty is not console\n"); goto error; } |