source: build-files/ports-overlay/www/w3m/files/patch-w3mimg_fb_fb_w3mimg.c @ f5a7226

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2
Last change on this file since f5a7226 was f5a7226, checked in by Kris Moore <kris@…>, 10 months ago

Add w3m port with fixed main.c

  • Property mode set to 100644
File size: 893 bytes
Line 
1--- w3mimg/fb/fb_w3mimg.c.orig  Wed Aug  4 17:32:28 2004
2+++ w3mimg/fb/fb_w3mimg.c       Mon Dec  3 10:42:23 2007
3@@ -153,10 +153,15 @@
4        return 0;
5     if (strncmp(tty, "/dev/", 5) == 0)
6        tty += 5;
7+#if defined(__linux__)
8     if (strncmp(tty, "tty", 3) == 0 && isdigit(*(tty + 3)))
9        return 1;
10     if (strncmp(tty, "vc/", 3) == 0 && isdigit(*(tty + 3)))
11        return 1;
12+#elif defined(__FreeBSD__)
13+    if (strncmp(tty, "ttyv", 4) == 0 && isxdigit(*(tty + 4)))
14+       return 1;
15+#endif
16     return 0;
17 }
18 #else
19@@ -172,7 +177,9 @@
20        return NULL;
21     memset(wop, 0, sizeof(w3mimg_op));
22 
23-    if (!check_tty_console(getenv("W3M_TTY")) && strcmp("jfbterm", getenv("TERM")) != 0) {
24+    if (!check_tty_console(getenv("W3M_TTY")) &&
25+       strcmp("jfbterm", getenv("TERM")) != 0 &&
26+       strncmp("jfbterm-", getenv("TERM"), 8) != 0) {
27        fprintf(stderr, "w3mimgdisplay/fb: tty is not console\n");
28        goto error;
29     }
Note: See TracBrowser for help on using the repository browser.