aboutsummaryrefslogtreecommitdiffstats
path: root/www/wb0/files
diff options
context:
space:
mode:
Diffstat (limited to 'www/wb0/files')
-rw-r--r--www/wb0/files/patch-Makefile30
-rw-r--r--www/wb0/files/patch-etc_wb0_wb0.config7
-rw-r--r--www/wb0/files/patch-watcher.c139
3 files changed, 176 insertions, 0 deletions
diff --git a/www/wb0/files/patch-Makefile b/www/wb0/files/patch-Makefile
new file mode 100644
index 000000000000..f5c6ab7ca19f
--- /dev/null
+++ b/www/wb0/files/patch-Makefile
@@ -0,0 +1,30 @@
+--- Makefile.orig Mon Dec 6 00:45:08 1999
++++ Makefile Wed Jan 31 14:58:33 2001
+@@ -1,16 +1,17 @@
+-
+-CFLAGS=-O2 -Wall -fomit-frame-pointer -malign-functions=0
+-LDFLAGS= -lm -s -lvga -lvgagl -ljpeg -lpng -lz
++PREFIX?= /usr/local
++CFLAGS+= -I${LOCALBASE}/include
++LDFLAGS= -L${LOCALBASE}/lib -lm -s -lvga -lvgagl -ljpeg -lpng -lz
+
+ all: wb0
+-
++
+ install:
+- mkdir -p /etc/wb0
+- cp ./etc/wb0/* /etc/wb0
+- cp ./wb0 /usr/local/bin/wb0
+- echo "path `pwd`/data/" >>/etc/wb0/wb0.config
+- chmod a+s /usr/local/bin/wb0
+- chown root:root /usr/local/bin/wb0
++ mkdir -p ${PREFIX}/share/wb0
++ cp ./wb0 ${PREFIX}/bin
++ cp ./etc/wb0/wb0.config ${PREFIX}/etc/
++ cp ./data/* ${PREFIX}/share/wb0/
++ echo "path ${PREFIX}/share/wb0/" >>${PREFIX}/etc/wb0.config
++ chmod a+s ${PREFIX}/bin/wb0
++ chown root:wheel ${LOCALBASE}/bin/wb0
+
+ pkfont: pkfont.c
+
diff --git a/www/wb0/files/patch-etc_wb0_wb0.config b/www/wb0/files/patch-etc_wb0_wb0.config
new file mode 100644
index 000000000000..ced1e204bd5f
--- /dev/null
+++ b/www/wb0/files/patch-etc_wb0_wb0.config
@@ -0,0 +1,7 @@
+--- etc/wb0/wb0.config.orig Mon Dec 6 00:45:07 1999
++++ etc/wb0/wb0.config Wed Jan 31 13:54:55 2001
+@@ -20,4 +20,3 @@
+ shift_b 0
+
+
+-path /usr/local/src/wb0-991204/data/
diff --git a/www/wb0/files/patch-watcher.c b/www/wb0/files/patch-watcher.c
new file mode 100644
index 000000000000..9d14d789c541
--- /dev/null
+++ b/www/wb0/files/patch-watcher.c
@@ -0,0 +1,139 @@
+--- watcher.c.orig Mon Dec 6 00:45:07 1999
++++ watcher.c Wed Jan 31 13:42:20 2001
+@@ -2,7 +2,7 @@
+ /* (c) 1999 Clocksoft */
+ /* Watcher -- watches for incoming data and keyhits */
+
+-#define OTHK
++//#define OTHK
+ //#define WATCHDOG
+ /* When no keyboard scan is performed during 10 seconds, the program ends. */
+
+@@ -11,6 +11,7 @@
+ #include <sys/types.h>
+ #include <unistd.h>
+ #include <stdlib.h>
++#include <term.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <string.h>
+@@ -18,10 +19,15 @@
+ #include <vgakeyboard.h>
+ #include <signal.h>
+ #include <sys/ioctl.h>
+-#ifndef OTHK
+-#include <linux/kd.h>
++#ifdef __FreeBSD__
++#include <sys/ioctl_compat.h>
++#include <machine/pcvt_ioctl.h>
++#include <sys/kbio.h>
+ #endif
++#ifdef LINUX
++#include <linux/kd.h>
+ #include <sys/vt.h>
++#endif
+ #include <sys/wait.h>
+
+ #include "gvars.h"
+@@ -38,9 +44,7 @@
+ #define FILE_BUFFER_SIZE 4096
+ #define min(x,y) ((x)<(y)?(x):(y))
+
+-#ifndef OTHK
+ extern int __svgalib_tty_fd;
+-#endif
+
+ /********************* Global variables for watcher ***************************/
+
+@@ -138,7 +142,7 @@
+ int
+ reset_keyboard(void)
+ {
+- #ifdef OTHK
++ #if 0//def OTHK
+ keyboard_close();
+ #else
+ if (ioctl(__svgalib_tty_fd,KDSKBMODE,old_keyboard_mode))
+@@ -658,11 +662,11 @@
+ close(fds[1]);
+ if (content_type==WAI_HTML||content_type==WAI_TEXT)
+ {
+- execlp("lynx","lynx","-dump","-raw","-cfg=/etc/wb0/wb0.lynx.cfg",filename,NULL);
++ execlp("lynx","lynx","-dump","-raw","",filename,NULL);
+ }
+ else
+ {
+- execlp("lynx","lynx","-source","-cfg=/etc/wb0/wb0.lynx.cfg",filename,NULL);
++ execlp("lynx","lynx","-source","",filename,NULL);
+ }
+ fprintf(stderr,"Unable to execlp lynx.\n");
+ _exit(-1); /* Error */
+@@ -941,7 +945,11 @@
+ {
+ /* alt-f1 ... alt-f10, alt-f11 ... alt-f12 */
+ int vt;
++#ifdef __FreeBSD__
++ struct screeninfo vts;
++#else
+ struct vt_stat vts;
++#endif
+
+ if (k>=87)
+ {vt=11+k-87;
+@@ -949,22 +957,30 @@
+ else
+ {vt=1+k-59;
+ }
++#ifdef __FreeBSD__
++ if (ioctl(__svgalib_tty_fd,VGAGETSCREEN,&vts))
++#else
+ #ifdef OTHK
+ ioctl(keyboard_fd,VT_GETSTATE,&vts);
+ #else
+ ioctl(__svgalib_tty_fd,VT_GETSTATE,&vts);
+ #endif
+ if (vt!=vts.v_active)
++#endif
+ {
+ rightshift=leftshift=rightalt=leftalt=leftctrl=rightctrl=capslock=0;
+ #ifdef DEBUG_VT
+ printf("Trying to switch VT.\n");
+ #endif
++#ifdef __FreeBSD__
++ ioctl(__svgalib_tty_fd,VT_ACTIVATE,vt);
++#else
+ #ifdef OTHK
+ ioctl(keyboard_fd,VT_ACTIVATE,vt);
+ #else
+ ioctl(__svgalib_tty_fd,VT_ACTIVATE,vt);
+ #endif
++#endif
+ }
+ }
+ break;
+@@ -1399,8 +1415,13 @@
+ int
+ set_keyboard(void)
+ {
++#ifdef __FreeBSD__
++ int sigs[]={SIGINT,SIGQUIT,SIGTERM,SIGSEGV,SIGHUP,SIGILL,SIGABRT,SIGFPE,
++ SIGBUS,SIGUSR1,SIGURG,SIGALRM};
++#else
+ int sigs[]={SIGINT,SIGQUIT,SIGTERM,SIGSEGV,SIGHUP,SIGILL,SIGABRT,SIGFPE,
+ SIGBUS,SIGPWR,SIGSTKFLT,SIGALRM};
++#endif
+ int *p;
+ int i;
+
+@@ -1436,7 +1457,11 @@
+ return 1;
+ }
+ }
++#ifdef __FreeBSD__
++ if (ioctl(__svgalib_tty_fd,KDSKBMODE,CBREAK))
++#else
+ if (ioctl(__svgalib_tty_fd,KDSKBMODE,K_MEDIUMRAW))
++#endif
+ {
+ fprintf(stderr,"Unable to set keyboard to medium-raw mode.\n");
+ return 1;