summaryrefslogtreecommitdiff
path: root/wm/tvtwm
diff options
context:
space:
mode:
authorwiz <wiz>2000-12-12 02:03:46 +0000
committerwiz <wiz>2000-12-12 02:03:46 +0000
commitd1cfd61b2dbd018498de837178e68416bbc3a46a (patch)
tree0386b8c653f44899ccf3b63ba89ad7c5638f4887 /wm/tvtwm
parentbba4c506a905e25c06a3e9c3f4d6e98019fe5905 (diff)
downloadpkgsrc-d1cfd61b2dbd018498de837178e68416bbc3a46a.tar.gz
Add new category wm for window managers, and move lots of package from
x11 here. Only changes are: `wm' in category added and some paths fixed.
Diffstat (limited to 'wm/tvtwm')
-rw-r--r--wm/tvtwm/Makefile15
-rw-r--r--wm/tvtwm/files/md53
-rw-r--r--wm/tvtwm/files/patch-sum26
-rw-r--r--wm/tvtwm/patches/patch-aa85
-rw-r--r--wm/tvtwm/patches/patch-ad27
-rw-r--r--wm/tvtwm/patches/patch-ae83
-rw-r--r--wm/tvtwm/patches/patch-af19
-rw-r--r--wm/tvtwm/patches/patch-ag196
-rw-r--r--wm/tvtwm/patches/patch-ah103
-rw-r--r--wm/tvtwm/patches/patch-ai253
-rw-r--r--wm/tvtwm/patches/patch-aj26
-rw-r--r--wm/tvtwm/patches/patch-ak57
-rw-r--r--wm/tvtwm/patches/patch-al96
-rw-r--r--wm/tvtwm/patches/patch-am38
-rw-r--r--wm/tvtwm/patches/patch-an501
-rw-r--r--wm/tvtwm/patches/patch-ao27
-rw-r--r--wm/tvtwm/patches/patch-ap99
-rw-r--r--wm/tvtwm/patches/patch-aq209
-rw-r--r--wm/tvtwm/patches/patch-ar18
-rw-r--r--wm/tvtwm/patches/patch-as26
-rw-r--r--wm/tvtwm/patches/patch-at66
-rw-r--r--wm/tvtwm/patches/patch-au19
-rw-r--r--wm/tvtwm/patches/patch-av77
-rw-r--r--wm/tvtwm/patches/patch-aw87
-rw-r--r--wm/tvtwm/patches/patch-ax151
-rw-r--r--wm/tvtwm/patches/patch-ay79
-rw-r--r--wm/tvtwm/patches/patch-az98
-rw-r--r--wm/tvtwm/pkg/COMMENT1
-rw-r--r--wm/tvtwm/pkg/DESCR24
-rw-r--r--wm/tvtwm/pkg/PLIST5
30 files changed, 2514 insertions, 0 deletions
diff --git a/wm/tvtwm/Makefile b/wm/tvtwm/Makefile
new file mode 100644
index 00000000000..b7ef1016feb
--- /dev/null
+++ b/wm/tvtwm/Makefile
@@ -0,0 +1,15 @@
+# $NetBSD: Makefile,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+DISTNAME= tvtwm.pl11
+PKGNAME= tvtwm-11
+CATEGORIES= x11 wm
+MASTER_SITES= ${MASTER_SITE_XCONTRIB:=window_managers/}
+
+MAINTAINER= packages@netbsd.org
+
+USE_IMAKE= YES
+USE_XPM= YES
+
+WRKSRC= ${WRKDIR}/tvtwm
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/wm/tvtwm/files/md5 b/wm/tvtwm/files/md5
new file mode 100644
index 00000000000..7c3988fc2db
--- /dev/null
+++ b/wm/tvtwm/files/md5
@@ -0,0 +1,3 @@
+$NetBSD: md5,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+MD5 (tvtwm.pl11.tar.gz) = 0e91b9c05ad9709e5843606200bff42a
diff --git a/wm/tvtwm/files/patch-sum b/wm/tvtwm/files/patch-sum
new file mode 100644
index 00000000000..91b685d11d7
--- /dev/null
+++ b/wm/tvtwm/files/patch-sum
@@ -0,0 +1,26 @@
+$NetBSD: patch-sum,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+MD5 (patch-aa) = 7c0fc3433bdad992718dd225e191eab4
+MD5 (patch-ad) = e8e46b5564cb6ec6ca7f2118a7c4fe95
+MD5 (patch-ae) = b6ba9900002aec7938ff956557c0b0b7
+MD5 (patch-af) = 4d004d60e742e3b2d1fccfd0c59b9685
+MD5 (patch-ag) = 0981d9eefb055f116e1e5998fad865f5
+MD5 (patch-ah) = bf556d932567cef553b3b6da0c7e5a0d
+MD5 (patch-ai) = b943342ec08548c97ae670a61c33e613
+MD5 (patch-aj) = db8741bca4c546a46582e5655ac09156
+MD5 (patch-ak) = 2813de3747b6a068888972692ba2eca9
+MD5 (patch-al) = 5584c4428fbc3c7e807aa08d0f997b07
+MD5 (patch-am) = afa1c255a98b25a56dccc1d21915273f
+MD5 (patch-an) = 55b4c9645c12b5830948651fe3d1380e
+MD5 (patch-ao) = 7403853911ba0ca5ec3d176a52178b88
+MD5 (patch-ap) = 6dd668b2ec1ad4f225634556b0c9daaa
+MD5 (patch-aq) = a4a35ccafa1233f5e3e4c3e5388bb9c0
+MD5 (patch-ar) = 4a88ca3459011e3898cfabe533fddfe2
+MD5 (patch-as) = 2629eb44a07a9e4814d0551e0b1c2ab8
+MD5 (patch-at) = f9a461eb19177671248109d6acee276f
+MD5 (patch-au) = 68087811105f4bfdd79a0113c5b97301
+MD5 (patch-av) = f4ce8f79373442c33673ad7d18da7573
+MD5 (patch-aw) = 74e254d7b844fc7ab0dd0e939fda40a2
+MD5 (patch-ax) = 03807da002d1760037e06a062865206b
+MD5 (patch-ay) = f0f473a5d525086f38369caebb61743e
+MD5 (patch-az) = 40d4928f6baddd248e404304efa86549
diff --git a/wm/tvtwm/patches/patch-aa b/wm/tvtwm/patches/patch-aa
new file mode 100644
index 00000000000..131f9ebdd26
--- /dev/null
+++ b/wm/tvtwm/patches/patch-aa
@@ -0,0 +1,85 @@
+$NetBSD: patch-aa,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+--- Imakefile.orig Thu Feb 2 19:25:44 1995
++++ Imakefile
+@@ -51,12 +51,12 @@
+ XCOMM <cross@eng.umd.edu>
+ XCOMM
+ XCOMM Also note, if you install your libXpm.a in a strange place, you'll
+-XCOMM have to adjust $(XPMLIB) below. You may also have to change the
++XCOMM have to adjust $(XPM_LIB) below. You may also have to change the
+ XCOMM include path of the compile, so that the code can include from
+ XCOMM <X11/xpm.h>.
+ XCOMM
+
+- XPMLIB = -lXpm
++ XPM_LIB = -lXpm
+ XPM_DEF = -DXPM
+ XLOADIM_DEF = -DXLOADIMAGE=\"$(BINDIR)/xloadimage\"
+
+@@ -71,7 +71,7 @@
+
+ XCOMM Various defines to pass into twm.c
+
+-#if DefaultToM4
++#ifdef DefaultToM4
+ M4_DEF = -DM4_DEFAULT
+ #endif
+ #ifdef No_waitpid
+@@ -79,7 +79,7 @@
+ #endif
+ TWM_DEFS = $(XLOADIM_DEF) $(M4_DEF) $(WAITPID_DEF)
+
+-LOCAL_LIBRARIES = $(XMULIB) $(EXTENSIONLIB) $(XPMLIB) $(XLIB)
++LOCAL_LIBRARIES = $(XMULIB) $(EXTENSIONLIB) $(XPM_LIB) $(XLIB)
+ LINTLIBS = $(LINTXMU) $(LINTEXTENSIONLIB) $(LINTXLIB)
+ DEFINES = -DSHAPE $(RELEASE_DEFINES) $(LOCAL_DEFINES) $(SIGNAL_DEFINES)
+
+@@ -93,14 +93,15 @@
+ iconmgr.o cursor.o icons.o vdt.o move.o LocPixmap.o \
+ regexp.o
+
+-AllTarget(tvtwm ssetroot)
++AllTarget(tvtwm ssetroot system.tvtwmrc)
+
+-SpecialObjectRule(parse.o,NullParameter,'-DSYSTEM_INIT_FILE="'$(TWMDIR)'/system.twmrc"')
++SpecialObjectRule(parse.o,NullParameter,'-DSYSTEM_INIT_FILE="'$(TWMDIR)'/system.tvtwmrc"')
+ SpecialObjectRule(vdt.o,NullParameter,$(XLOADIM_DEF))
+-SpecialObjectRule(LocPixmap.o,NullParameter,'-DBITMAPDIR="$(INCDIR)/bitmaps"')
++SpecialObjectRule(LocPixmap.o,NullParameter,'-DBITMAPDIR="$(INCDIR)/X11/bitmaps"')
+ SpecialObjectRule(twm.o,NullParameter,$(TWM_DEFS))
+
+-#if defined(UltrixArchitecture) || defined(AlphaArchitecture)
++/* The following rule is only applicable to a specific compiler on Ultrix. */
++#if defined(UltrixArchitecture)
+ SpecialObjectRule(menus.o,NullParameter,-Olimit 700)
+ #endif
+
+@@ -120,11 +121,12 @@
+ XCOMM ln $(BINDIR)/tvtwm $(BINDIR)/twm
+
+ #if (ProjectX < 5)
+-InstallNonExec(system.twmrc,$(TWMDIR))
++InstallNonExec(system.tvtwmrc,$(TWMDIR))
+ /* InstallProgram(ssetroot,$(BINDIR)/xsetroot) */
+ #else
+-InstallNonExecFile(system.twmrc,$(TWMDIR))
+-/* InstallNamedProg(ssetroot,xsetroot,$(BINDIR)) */
++InstallNonExecFile(system.tvtwmrc,$(TWMDIR))
++/* Install ssetroot as ssetroot so we don't overwrite the real xsetroot */
++InstallNamedProg(ssetroot,ssetroot,$(BINDIR))
+ #endif
+
+ gram.h gram.c: gram.y
+@@ -135,7 +137,10 @@
+ clean::
+ $(RM) y.tab.h y.tab.c lex.yy.c gram.h gram.c lex.c deftwmrc.c
+
+-deftwmrc.c: system.twmrc
++system.tvtwmrc: system.twmrc
++ cp system.twmrc system.tvtwmrc
++
++deftwmrc.c: system.tvtwmrc
+ $(RM) $@
+ @echo '/* ' >>$@
+ @echo ' * This file is generated automatically from the default' >>$@
diff --git a/wm/tvtwm/patches/patch-ad b/wm/tvtwm/patches/patch-ad
new file mode 100644
index 00000000000..f4662d2dfd7
--- /dev/null
+++ b/wm/tvtwm/patches/patch-ad
@@ -0,0 +1,27 @@
+$NetBSD: patch-ad,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+Index: LocPixmap.c
+===================================================================
+RCS file: /home/siren/src/tvtwm/LocPixmap.c,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- LocPixmap.c 1999/08/08 05:46:53 1.1.1.1
++++ LocPixmap.c 1999/08/08 05:56:47 1.2
+@@ -34,7 +34,6 @@
+ *
+ * Chris P. Ross
+ */
+-
+ #ifdef XPM
+
+ #include "twm.h"
+@@ -223,7 +222,7 @@
+
+ switch (i) {
+ case 1:
+- if (!(name[0] == '/' || (name[0] == '.') && name[1] == '/'))
++ if (!(name[0] == '/' || ((name[0] == '.') && name[1] == '/')))
+ continue;
+ fn = (char *) name;
+ try_plain_name = False;
diff --git a/wm/tvtwm/patches/patch-ae b/wm/tvtwm/patches/patch-ae
new file mode 100644
index 00000000000..672cd7c23be
--- /dev/null
+++ b/wm/tvtwm/patches/patch-ae
@@ -0,0 +1,83 @@
+$NetBSD: patch-ae,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+Index: add_window.c
+===================================================================
+RCS file: /home/siren/src/tvtwm/add_window.c,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- add_window.c 1999/08/08 05:46:53 1.1.1.1
++++ add_window.c 1999/08/08 05:56:47 1.2
+@@ -40,6 +40,7 @@
+ #include <stdio.h>
+ #include "twm.h"
+ #include <X11/Xatom.h>
++#include <X11/Xmu/Drawing.h>
+ #include "add_window.h"
+ #include "util.h"
+ #include "resize.h"
+@@ -220,7 +221,8 @@
+
+ if (Scr->VirtualDesktop) {
+ tmp_win->sticky =
+- (short)(int)LookInList(Scr->StickyL, tmp_win->full_name, &tmp_win->class);
++ (LookInList(Scr->StickyL, tmp_win->full_name,
++ &tmp_win->class) != NULL);
+ if (tmp_win->w == Scr->Panner)
+ tmp_win->sticky = True;
+
+@@ -236,31 +238,30 @@
+ SetTWM_FLAGS(tmp_win);
+
+ tmp_win->highlight = Scr->Highlight &&
+- (!(short)(int) LookInList(Scr->NoHighlight, tmp_win->full_name,
+- &tmp_win->class));
++ (LookInList(Scr->NoHighlight, tmp_win->full_name,
++ &tmp_win->class) == NULL);
+
+ tmp_win->stackmode = Scr->StackMode &&
+- (!(short)(int) LookInList(Scr->NoStackModeL, tmp_win->full_name,
+- &tmp_win->class));
++ (LookInList(Scr->NoStackModeL, tmp_win->full_name,
++ &tmp_win->class) == NULL);
+
+ tmp_win->titlehighlight = Scr->TitleHighlight &&
+- (!(short)(int) LookInList(Scr->NoTitleHighlight, tmp_win->full_name,
+- &tmp_win->class));
++ (LookInList(Scr->NoTitleHighlight, tmp_win->full_name,
++ &tmp_win->class) == NULL);
+
+- tmp_win->auto_raise = (short)(int) LookInList(Scr->AutoRaise,
+- tmp_win->full_name,
+- &tmp_win->class);
++ tmp_win->auto_raise = (LookInList(Scr->AutoRaise, tmp_win->full_name,
++ &tmp_win->class) != NULL);
+ if (tmp_win->auto_raise) Scr->NumAutoRaises++;
+ tmp_win->iconify_by_unmapping = Scr->IconifyByUnmapping;
+ if (Scr->IconifyByUnmapping)
+ {
+ tmp_win->iconify_by_unmapping = iconm ? FALSE :
+- !(short)(int) LookInList(Scr->DontIconify, tmp_win->full_name,
+- &tmp_win->class);
++ (LookInList(Scr->DontIconify, tmp_win->full_name,
++ &tmp_win->class) == NULL);
+ }
+ tmp_win->iconify_by_unmapping |=
+- (short)(int) LookInList(Scr->IconifyByUn, tmp_win->full_name,
+- &tmp_win->class);
++ (LookInList(Scr->IconifyByUn, tmp_win->full_name,
++ &tmp_win->class) != NULL);
+
+ if (LookInList(Scr->WindowRingL, tmp_win->full_name, &tmp_win->class)) {
+ if (Scr->Ring) {
+@@ -1490,8 +1491,8 @@
+
+ number_cmap_windows = 0;
+
+- if (/* SUPPRESS 560 */previously_installed =
+- (Scr->cmapInfo.cmaps == &tmp->cmaps && tmp->cmaps.number_cwins)) {
++ if ((previously_installed =
++ ((Scr->cmapInfo.cmaps == &tmp->cmaps) && tmp->cmaps.number_cwins))) {
+ cwins = tmp->cmaps.cwins;
+ for (i = 0; i < tmp->cmaps.number_cwins; i++)
+ cwins[i]->colormap->state = 0;
diff --git a/wm/tvtwm/patches/patch-af b/wm/tvtwm/patches/patch-af
new file mode 100644
index 00000000000..5ff85f8aa42
--- /dev/null
+++ b/wm/tvtwm/patches/patch-af
@@ -0,0 +1,19 @@
+$NetBSD: patch-af,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+Index: cursor.c
+===================================================================
+RCS file: /home/siren/src/tvtwm/cursor.c,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- cursor.c 1999/08/08 05:46:53 1.1.1.1
++++ cursor.c 1999/08/08 05:56:48 1.2
+@@ -208,7 +208,7 @@
+ return bm;
+ }
+
+-NewBitmapCursor(cp, source, mask)
++void NewBitmapCursor(cp, source, mask)
+ Cursor *cp;
+ char *source, *mask;
+ {
diff --git a/wm/tvtwm/patches/patch-ag b/wm/tvtwm/patches/patch-ag
new file mode 100644
index 00000000000..92eab6bec5c
--- /dev/null
+++ b/wm/tvtwm/patches/patch-ag
@@ -0,0 +1,196 @@
+$NetBSD: patch-ag,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+Index: events.c
+===================================================================
+RCS file: /home/siren/src/tvtwm/events.c,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- events.c 1999/08/08 05:46:53 1.1.1.1
++++ events.c 1999/08/08 05:56:49 1.2
+@@ -392,7 +392,7 @@
+ */
+ Bool DispatchEvent ()
+ {
+- extern void RestartTwm();
++/* extern void RestartTwm();*/
+
+ Window w = Event.xany.window;
+ StashEventTime (&Event);
+@@ -683,7 +683,7 @@
+ */
+
+ void
+-HandleFocusIn(event)
++/* ARGSUSED */ HandleFocusIn(event)
+ XFocusInEvent *event;
+ {
+
+@@ -714,7 +714,7 @@
+ }
+
+ void
+-HandleFocusOut(event)
++/* ARGSUSED */ HandleFocusOut(event)
+ XFocusOutEvent *event;
+ {
+ #ifdef TRACE_FOCUS
+@@ -740,11 +740,12 @@
+ if (Tmp_win) {
+ event = LastFocusEvent(Event.xany.window,&Event);
+
+- if (event)
++ if (event) {
+ if (event->type == FocusIn)
+ HandleFocusIn(event);
+ else
+- HandleFocusOut(event);
++ HandleFocusOut(event);
++ }
+ }
+ }
+
+@@ -972,9 +973,9 @@
+ Atom actual = None;
+ int actual_format;
+ unsigned long nitems, bytesafter;
+- unsigned long valuemask; /* mask for create windows */
+- XSetWindowAttributes attributes; /* attributes for create windows */
+- Pixmap pm;
++/* unsigned long valuemask; mask for create windows */
++/* XSetWindowAttributes attributes; attributes for create windows */
++/* Pixmap pm; */
+
+ /* watch for standard colormap changes */
+ if (Event.xproperty.window == Scr->Root) {
+@@ -1126,9 +1127,9 @@
+ ***********************************************************************
+ */
+
+-RedoIconName()
++void RedoIconName(void)
+ {
+- int x, y;
++/* int x, y;*/
+
+ if (Tmp_win->list)
+ {
+@@ -1184,7 +1185,7 @@
+ XUngrabPointer(dpy, CurrentTime);
+ }
+ }
+- } else if (Event.xclient.message_type = _XA_TWM_RESTART) {
++ } else if (Event.xclient.message_type == _XA_TWM_RESTART) {
+ RestartTwm(CurrentTime);
+ }
+ }
+@@ -1571,11 +1572,12 @@
+ */
+ if (Event.xreparent.event == Scr->VirtualDesktop) {
+ if (XFindContext(dpy, Event.xreparent.window, ScreenContext, &junk)
+- == XCNOENT)
++ == XCNOENT) {
+ if (Event.xreparent.parent == Scr->VirtualDesktop)
+ XAddToSaveSet(dpy, Event.xreparent.window);
+ else
+- XRemoveFromSaveSet(dpy, Event.xreparent.window);
++ XRemoveFromSaveSet(dpy, Event.xreparent.window);
++ }
+ #ifdef DEBUG_EVENTS
+ else
+ fprintf(stderr, "\tone of ours\n");
+@@ -2047,7 +2049,7 @@
+
+
+
+-static do_menu (menu, w)
++static void do_menu (menu, w)
+ MenuRoot *menu; /* menu to pop up */
+ Window w; /* invoking window or None */
+ {
+@@ -2120,7 +2122,7 @@
+
+ if (XFindContext (dpy, Event.xany.window, VirtualContext, (caddr_t *) &Tmp_win) != XCNOENT)
+ {
+- HandlePannerMove(&Event, Tmp_win);
++ HandlePannerMove((XButtonEvent *) &Event, Tmp_win);
+ return;
+ }
+ if (ButtonPressed != -1 && !InfoLines) /* want menus if we have info box */
+@@ -2131,11 +2133,12 @@
+ Cancel = TRUE;
+ CurrentDragX = origDragX;
+ CurrentDragY = origDragY;
+- if (!menuFromFrameOrWindowOrTitlebar)
+- if (Scr->OpaqueMove && DragWindow != None) {
+- XMoveWindow (dpy, DragWindow, origDragX, origDragY);
+- } else {
+- MoveOutline(None, 0, 0, 0, 0, 0, 0);
++ if (!menuFromFrameOrWindowOrTitlebar) {
++ if (Scr->OpaqueMove && DragWindow != None) {
++ XMoveWindow (dpy, DragWindow, origDragX, origDragY);
++ } else {
++ MoveOutline(None, 0, 0, 0, 0, 0, 0);
++ }
+ }
+ XUnmapWindow(dpy, Scr->SizeWindow);
+ if (!Scr->OpaqueMove)
+@@ -2878,7 +2881,7 @@
+ ***********************************************************************
+ */
+
+-int
++short
+ Transient(w, propw)
+ Window w, *propw;
+ {
+@@ -2947,7 +2950,7 @@
+ ***********************************************************************
+ */
+
+-InstallWindowColormaps (type, tmp)
++void InstallWindowColormaps (type, tmp)
+ int type;
+ TwmWindow *tmp;
+ {
+@@ -3065,7 +3068,7 @@
+ ***********************************************************************
+ */
+
+-InstallRootColormap()
++void InstallRootColormap(void)
+ {
+ TwmWindow *tmp;
+ if (Scr->cmapInfo.root_pushes == 0) {
+@@ -3090,20 +3093,22 @@
+ XEvent *ev;
+ char *args;
+ {
+- if (!*args)
+- if (ev->type == EnterNotify) {
+- if (ev->xcrossing.mode != NotifyGrab)
+- *args = 1;
+- } else if (ev->type == LeaveNotify) {
+- if (ev->xcrossing.mode == NotifyNormal)
+- *args = 1;
++ if (!*args) {
++ if (ev->type == EnterNotify) {
++ if (ev->xcrossing.mode != NotifyGrab)
++ *args = 1;
++ } else if (ev->type == LeaveNotify) {
++ if (ev->xcrossing.mode == NotifyNormal)
++ *args = 1;
++ }
+ }
+-
+- return (False);
++
++ return (False);
+ }
+
+
+
++void
+ UninstallRootColormap()
+ {
+ char args;
diff --git a/wm/tvtwm/patches/patch-ah b/wm/tvtwm/patches/patch-ah
new file mode 100644
index 00000000000..19e550413c1
--- /dev/null
+++ b/wm/tvtwm/patches/patch-ah
@@ -0,0 +1,103 @@
+$NetBSD: patch-ah,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+Index: gram.y
+===================================================================
+RCS file: /home/siren/src/tvtwm/gram.y,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- gram.y 1999/08/08 05:46:53 1.1.1.1
++++ gram.y 1999/08/08 05:56:49 1.2
+@@ -80,6 +80,8 @@
+ extern name_list **do_colorlist_keyword();
+ extern int do_color_keyword(), do_string_savecolor();
+ extern int yylineno;
++
++ int yylex(void);
+ %}
+
+ %union
+@@ -207,7 +209,8 @@
+ root = GetRoot(TWM_ROOT,NULLSTR,NULLSTR);
+ Scr->Mouse[$1][C_ROOT][0].item =
+ AddToMenu(root,"x",Action,
+- NULLSTR,$2,NULLSTR,NULLSTR);
++ (MenuRoot *) NULLSTR,
++ $2,NULLSTR,NULLSTR);
+ }
+ Action = "";
+ pull = NULL;
+@@ -274,7 +277,8 @@
+ root = GetRoot(TWM_ROOT,NULLSTR,NULLSTR);
+ Scr->DefaultFunction.item =
+ AddToMenu(root,"x",Action,
+- NULLSTR,$2, NULLSTR, NULLSTR);
++ (MenuRoot *) NULLSTR,
++ $2, NULLSTR, NULLSTR);
+ }
+ Action = "";
+ pull = NULL;
+@@ -283,7 +287,8 @@
+ root = GetRoot(TWM_ROOT,NULLSTR,NULLSTR);
+ Scr->WindowFunction.item =
+ AddToMenu(root,"x",Action,
+- NULLSTR,$2, NULLSTR, NULLSTR);
++ (MenuRoot *) NULLSTR,
++ $2, NULLSTR, NULLSTR);
+ Action = "";
+ pull = NULL;
+ }
+@@ -640,8 +645,9 @@
+ | function_entries function_entry
+ ;
+
+-function_entry : action { AddToMenu(root, "", Action, NULLSTR, $1,
+- NULLSTR, NULLSTR);
++function_entry : action { AddToMenu(root, "", Action,
++ (MenuRoot *) NULLSTR, $1,
++ NULLSTR, NULLSTR);
+ Action = "";
+ }
+ ;
+@@ -829,6 +835,7 @@
+ ;
+
+ %%
++void
+ yyerror(s) char *s;
+ {
+ twmrc_error_prefix();
+@@ -836,12 +843,13 @@
+ fprintf (stderr, ": %s", current_input_line());
+ ParseError = 1;
+ }
++void
+ RemoveDQuote(str)
+ char *str;
+ {
+ register char *i, *o;
+- register n;
+- register count;
++ register int n;
++ register int count;
+
+ for (i=str+1, o=str; *i && *i != '\"'; o++)
+ {
+@@ -964,7 +972,7 @@
+ {
+ root = GetRoot(TWM_ROOT, NULLSTR, NULLSTR);
+ Scr->Mouse[butt][i][mods].item = AddToMenu(root,"x",Action,
+- NULLSTR, func, NULLSTR, NULLSTR);
++ (MenuRoot *) NULLSTR, func, NULLSTR, NULLSTR);
+ }
+ }
+ Action = "";
+@@ -1053,7 +1061,7 @@
+ }
+
+
+-twmrc_error_prefix ()
++void twmrc_error_prefix ()
+ {
+ fprintf (stderr, "%s: line %d: ", ProgramName, yylineno);
+ }
diff --git a/wm/tvtwm/patches/patch-ai b/wm/tvtwm/patches/patch-ai
new file mode 100644
index 00000000000..8a298a6c3b6
--- /dev/null
+++ b/wm/tvtwm/patches/patch-ai
@@ -0,0 +1,253 @@
+$NetBSD: patch-ai,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+Index: icons.c
+===================================================================
+RCS file: /home/siren/src/tvtwm/icons.c,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- icons.c 1999/08/08 05:46:53 1.1.1.1
++++ icons.c 1999/08/08 05:56:50 1.2
+@@ -116,6 +116,7 @@
+ **********************************************************************/
+
+ #include <stdio.h>
++#include <malloc.h>
+ #include "twm.h"
+ #include "screen.h"
+ #include "icons.h"
+@@ -123,6 +124,10 @@
+ #include "parse.h"
+ #include "util.h"
+
++static void
++AddOneIconRegion(char *name, short type, int x, int y, int w, int h,
++ int grav1, int grav2, int stepx, int stepy);
++
+ #define iconWidth(w) (w->icon.width + 2 * w->icon.bw)
+ #define iconHeight(w) (w->icon.height + 2 * w->icon.bw)
+
+@@ -131,8 +136,7 @@
+ Pixmap SetIconClip();
+ #endif
+
+-static
+-splitEntry (ie, grav1, grav2, w, h)
++void splitEntry (ie, grav1, grav2, w, h)
+ IconEntry *ie;
+ int grav1, grav2;
+ int w, h;
+@@ -185,6 +189,7 @@
+ }
+ }
+
++int
+ roundUp (v, multiple)
+ int v;
+ int multiple;
+@@ -192,6 +197,7 @@
+ return ((v + multiple - 1) / multiple) * multiple;
+ }
+
++void
+ PlaceIcon(tmp_win, def_x, def_y, final_x, final_y)
+ TwmWindow *tmp_win;
+ int def_x, def_y;
+@@ -206,8 +212,8 @@
+ ir_list = Scr->IconRegions;
+
+ while (ir_list)
+- if (ir = (IconRegion *)MultiLookInList(ir_list, tmp_win->full_name,
+- &tmp_win->class, &ir_list)) {
++ if ((ir = (IconRegion *)MultiLookInList(ir_list, tmp_win->full_name,
++ &tmp_win->class, &ir_list))) {
+ w = roundUp (iconWidth (tmp_win), ir->stepx);
+ h = roundUp (iconHeight (tmp_win), ir->stepy);
+ for (ie = ir->entries; ie; ie=ie->next) {
+@@ -264,7 +270,7 @@
+ return 0;
+ }
+
+-IconUp (tmp_win)
++void IconUp (tmp_win)
+ TwmWindow *tmp_win;
+ {
+ int x, y;
+@@ -290,8 +296,10 @@
+
+ ir_list = Scr->IconRegions;
+ while (ir_list)
+- if (ir = (IconRegion *)MultiLookInList(ir_list, tmp_win->full_name,
+- &tmp_win->class, &ir_list)) {
++ if ((ir = (IconRegion *)MultiLookInList(ir_list,
++ tmp_win->full_name,
++ &tmp_win->class,
++ &ir_list))) {
+ if (x >= ir->x && x < (ir->x + ir->w) &&
+ y >= ir->y && y < (ir->y + ir->h))
+ break;
+@@ -330,8 +338,7 @@
+ * regions together
+ */
+
+-static
+-mergeEntries (old, ie)
++void mergeEntries (old, ie)
+ IconEntry *old, *ie;
+ {
+ if (old->y == ie->y) {
+@@ -345,7 +352,7 @@
+ }
+ }
+
+-IconDown (tmp_win)
++void IconDown (tmp_win)
+ TwmWindow *tmp_win;
+ {
+ IconEntry *ie, *ip, *in;
+@@ -381,14 +388,16 @@
+ }
+ }
+
+-static int AddOneIconRegion();
+-
+-AddIconRegion(name, type, geom, itterate, grav1, grav2, stepx, stepy)
++void
++AddIconRegion(name, icontype, geom, itterate, grav1, grav2, stepx, stepy)
+ char *name;
+-short type;
++short icontype;
+ char *geom;
+ Bool itterate;
+-int grav1, grav2;
++int grav1;
++int grav2;
++int stepx;
++int stepy;
+ {
+ int mask, x, y, w, h;
+
+@@ -412,21 +421,21 @@
+
+ for (x1 = x ; x1 < vdtw ; x1 += Scr->MyDisplayWidth)
+ for (y1 = y ; y1 < vdth ; y1 += Scr->MyDisplayHeight)
+- AddOneIconRegion(name, type, x1, y1, w, h,
++ AddOneIconRegion(name, icontype, x1, y1, w, h,
+ grav1, grav2, stepx, stepy);
+ } else
+- AddOneIconRegion(name, type, x, y, w, h, grav1, grav2, stepx, stepy);
++ AddOneIconRegion(name, icontype, x, y, w, h, grav1, grav2, stepx, stepy);
+ }
+
+-static
++static void
+ AddOneIconRegion(name, type, x, y, w, h, grav1, grav2, stepx, stepy)
+ char *name;
+ short type;
+ int x, y, w, h;
+-int grav1, grav2;
++int grav1, grav2, stepx, stepy;
+ {
+ IconRegion *ir;
+- int mask;
++/* int mask;*/
+
+ ir = (IconRegion *)malloc(sizeof(IconRegion));
+ AddToList(&(Scr->IconRegions), name, type, (char *)ir);
+@@ -498,12 +507,11 @@
+ width, height,
+ foreground,
+ background,
+- border_pixel,
+ pmp)
+ Pixmap pm, mask;
+ int depth;
+ int width, height;
+-Pixel foreground, background, border_pixel;
++Pixel foreground, background;
+ Pixmap *pmp;
+ {
+ if ((*pmp = XCreatePixmap(dpy, Scr->Root, width,
+@@ -658,7 +666,7 @@
+ } *cached;
+ Window image;
+ XSetWindowAttributes attributes;
+- Pixmap pm, clip;
++ Pixmap pm /*, clip*/;
+ Bool isXpm;
+
+ /* check cache first */
+@@ -702,14 +710,13 @@
+
+ cached->depth = isXpm?Scr->d_depth:1;
+
+- AddToList(&Scr->Icons, name, LTYPE_EXACT_NAME, cached);
++ AddToList(&Scr->Icons, name, LTYPE_EXACT_NAME, (char *) cached);
+ }
+
+ if (!pm_n_mask_to_pm(cached->pm, cached->mask, cached->depth,
+ cached->width, cached->height,
+ tmp_win->iconc.fore,
+ tmp_win->iconc.back,
+- tmp_win->icon_border,
+ &pm))
+ return False;
+
+@@ -772,7 +779,6 @@
+ width, height,
+ tmp_win->iconc.fore,
+ tmp_win->iconc.back,
+- tmp_win->icon_border,
+ &newpm))
+ return False;
+
+@@ -819,6 +825,7 @@
+ * CreateIconWindows Actually creates the windows representing the icon.
+ */
+
++void
+ CreateIconWindows(tmp_win)
+ TwmWindow *tmp_win;
+ {
+@@ -1005,6 +1012,7 @@
+
+ #define max(x,y) ((x)>(y)?(x):(y))
+
++void
+ ConfigureIconWindows(tmp_win)
+ TwmWindow *tmp_win;
+ {
+@@ -1102,6 +1110,7 @@
+ * or SqueezeIcon has been turned on for this window.
+ */
+
++void
+ ShapeIconWindows(tmp_win)
+ TwmWindow *tmp_win;
+ {
+@@ -1187,6 +1196,7 @@
+ * PlaceIconWindows figures out where to put it.
+ */
+
++void
+ PlaceIconWindows(tmp_win, def_x, def_y)
+ TwmWindow *tmp_win;
+ int def_x, def_y;
+@@ -1217,7 +1227,7 @@
+ * Finally, here is the top level function.
+ */
+
+-CreateIconWindow(tmp_win, def_x, def_y)
++void CreateIconWindow(tmp_win, def_x, def_y)
+ TwmWindow *tmp_win;
+ int def_x, def_y;
+ {
+@@ -1234,7 +1244,7 @@
+ return;
+ }
+
+-DestroyIconWindow(tmp_win)
++void DestroyIconWindow(tmp_win)
+ TwmWindow *tmp_win;
+ {
+ TwmIcon *icon = &(tmp_win->icon);
diff --git a/wm/tvtwm/patches/patch-aj b/wm/tvtwm/patches/patch-aj
new file mode 100644
index 00000000000..419a7279d24
--- /dev/null
+++ b/wm/tvtwm/patches/patch-aj
@@ -0,0 +1,26 @@
+$NetBSD: patch-aj,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+Index: icons.h
+===================================================================
+RCS file: /home/siren/src/tvtwm/icons.h,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- icons.h 1999/08/08 05:46:52 1.1.1.1
++++ icons.h 1999/08/08 05:56:50 1.2
+@@ -29,6 +29,8 @@
+ *
+ **********************************************************************/
+
++#include "twm.h"
++
+ #ifndef ICONS_H
+ #define ICONS_H
+
+@@ -80,5 +82,6 @@
+
+ #define ICON_TEXT_VBORDER 1
+ #define ICON_TEXT_HBORDER 2
++
+
+ #endif /* ICONS_H */
diff --git a/wm/tvtwm/patches/patch-ak b/wm/tvtwm/patches/patch-ak
new file mode 100644
index 00000000000..6947dc80da9
--- /dev/null
+++ b/wm/tvtwm/patches/patch-ak
@@ -0,0 +1,57 @@
+$NetBSD: patch-ak,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+Index: lex.l
+===================================================================
+RCS file: /home/siren/src/tvtwm/lex.l,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- lex.l 1999/08/08 05:46:53 1.1.1.1
++++ lex.l 1999/08/08 05:56:51 1.2
+@@ -37,12 +37,34 @@
+ ***********************************************************************/
+
+ /* #include <stdio.h> */ /* lex already includes stdio.h */
++#include "twm.h"
+ #include "gram.h"
+ #include "parse.h"
+ extern char *ProgramName;
+
+ extern int ParseError;
+
++#if defined(__NetBSD__)
++#undef YY_INPUT
++#define YY_INPUT(buf,result,size) ((result) = doinput((buf),(size)))
++int
++doinput (buf, size)
++char *buf;
++int size;
++{
++ int c;
++
++ if (size == 0)
++ return (0);
++
++ if ((c = (*twmInputFunc)()) <= 0)
++ return (0);
++
++ buf[0] = c;
++ return (1);
++}
++#endif
++
+ %}
+
+ string \"([^"]|\\.)*\"
+@@ -94,7 +116,10 @@
+ }
+ %%
+ #ifndef yywrap
+-yywrap() { return(1);}
++int yywrap() { return(1);}
++#endif
++#ifdef __NetBSD__
++int yylineno;
+ #endif
+
+ #undef unput
diff --git a/wm/tvtwm/patches/patch-al b/wm/tvtwm/patches/patch-al
new file mode 100644
index 00000000000..41b4cdaf0e1
--- /dev/null
+++ b/wm/tvtwm/patches/patch-al
@@ -0,0 +1,96 @@
+$NetBSD: patch-al,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+Index: list.c
+===================================================================
+RCS file: /home/siren/src/tvtwm/list.c,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- list.c 1999/08/08 05:46:52 1.1.1.1
++++ list.c 1999/08/08 05:56:52 1.2
+@@ -61,6 +61,7 @@
+ char *ptr; /* list dependent data */
+ };
+
++
+ /***********************************************************************
+ *
+ * Wrappers to allow code to step through a list
+@@ -185,15 +186,12 @@
+ }
+
+ static int
+-MatchName(name, pattern, length, compiled, type)
++MatchName(name, pattern, compiled, type)
+ char *name;
+ char *pattern;
+-int length;
+ regexp *compiled;
+ short type;
+ {
+- /* fprintf(stderr, "\tcompare %s with %s\n", name, pattern); */
+-
+ if (type & LTYPE_ANYTHING)
+ return 1;
+
+@@ -203,7 +201,7 @@
+
+ regexp_error = "";
+ if ((matcher = regcomp(pattern)) == NULL) {
+- fprintf(stderr, "%s: Error in regexp `%s'\n", ProgramName,
++ fprintf(stderr, "%s: Error in regexp `%s' name %s\n", ProgramName,
+ regexp_error, name);
+ return 0;
+ }
+@@ -224,17 +222,13 @@
+ }
+
+ char *
+-MultiLookInList(list_head, name, class, /* win,*/ continuation)
++MultiLookInList(list_head, name, class, continuation)
+ name_list *list_head;
+ char *name;
+ XClassHint *class;
+-/* Window win; */
+ name_list **continuation;
+ {
+ name_list *nptr;
+- Window win = None;
+-
+- /* fprintf(stderr, "looking for %s\n", name); */
+
+ for (nptr = list_head ; nptr ; nptr = nptr->next) {
+ #ifdef CACHE_REGEXP
+@@ -264,18 +258,20 @@
+ return nptr->ptr;
+ }
+ if (nptr->type & LTYPE_NAME)
+- if (MatchName(name, nptr->name, nptr->namelen, nptr->regexp, nptr->type)) {
++ if (MatchName(name, nptr->name, nptr->regexp, nptr->type)) {
+ *continuation = nptr->next;
+ return nptr->ptr;
+ }
+ if (class) {
+ if (nptr->type & LTYPE_RES_NAME)
+- if (MatchName(class->res_name, nptr->name, nptr->namelen, nptr->regexp, nptr->type)) {
++ if (MatchName(class->res_name, nptr->name, nptr->regexp,
++ nptr->type)) {
+ *continuation = nptr->next;
+ return nptr->ptr;
+ }
+ if (nptr->type & LTYPE_RES_CLASS)
+- if (MatchName(class->res_class, nptr->name, nptr->namelen, nptr->regexp, nptr->type)) {
++ if (MatchName(class->res_class, nptr->name, nptr->regexp,
++ nptr->type)) {
+ *continuation = nptr->next;
+ return nptr->ptr;
+ }
+@@ -284,7 +280,7 @@
+ if (win && (nptr->type & LTYPE_PROPERTY)) {
+ char *s = GetPropertyString(win, nptr->property);
+
+- if (s && MatchName(s, nptr->name, nptr->namelen, nptr->regexp, nptr->type)) {
++ if (s && MatchName(s, nptr->name, nptr->regexp, nptr->type)) {
+ *continuation = nptr->next;
+ free(s);
+ return nptr->ptr;
diff --git a/wm/tvtwm/patches/patch-am b/wm/tvtwm/patches/patch-am
new file mode 100644
index 00000000000..6fba4df7c56
--- /dev/null
+++ b/wm/tvtwm/patches/patch-am
@@ -0,0 +1,38 @@
+$NetBSD: patch-am,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+Index: list.h
+===================================================================
+RCS file: /home/siren/src/tvtwm/list.h,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- list.h 1999/08/08 05:46:52 1.1.1.1
++++ list.h 1999/08/08 05:56:52 1.2
+@@ -63,14 +63,19 @@
+ LTYPE_RES_CLASS | LTYPE_REGEXP)
+ #define LTYPE_EXACT_NAME (LTYPE_NAME | LTYPE_STRING)
+
+-extern void AddToList();
+-extern char* LookInList();
+-extern char* LookInNameList();
+-extern int GetColorFromList();
+-extern void FreeList();
+-
+-extern name_list *next_entry();
+-extern char *contents_of_entry();
++/* function prototypes */
++char *
++MultiLookInList(name_list *list_head, char *name, XClassHint *class,
++ name_list **continuation);
++void
++AddToList(name_list **list_head, char *name, short type, char *ptr);
++void FreeList(name_list **list);
++char *LookInList(name_list *list_head, char *name, XClassHint *class);
++char *LookInNameList(name_list *list_head, char *name);
++int GetColorFromList(name_list *list_head, char *name, XClassHint *class,
++ Pixel *ptr);
++name_list *next_entry(name_list *list);
++char *contents_of_entry(name_list *list);
+
+ #endif /* _LIST_ */
+
diff --git a/wm/tvtwm/patches/patch-an b/wm/tvtwm/patches/patch-an
new file mode 100644
index 00000000000..6c6d66ab483
--- /dev/null
+++ b/wm/tvtwm/patches/patch-an
@@ -0,0 +1,501 @@
+$NetBSD: patch-an,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+--- menus.c.orig Thu Feb 9 21:09:18 1995
++++ menus.c
+@@ -191,6 +191,7 @@
+ #include "gram.h"
+ #include "screen.h"
+ #include <X11/Xmu/CharSet.h> /* for XmuCompareISOLatin1() */
++#include <X11/Xmu/Drawing.h> /* for XmuLocateBitmapFile */
+ #include "version.h"
+ #include "vdt.h"
+ #include "add_window.h"
+@@ -228,8 +229,6 @@
+ } MenuOrigins[MAXMENUDEPTH];
+ static Cursor LastCursor;
+
+-void WarpAlongRing(), WarpToWindow();
+-
+ extern char *Action;
+ extern int Context;
+ extern TwmWindow *ButtonWindow, *Tmp_win;
+@@ -237,6 +236,12 @@
+ extern char *InitFile;
+ static void Identify();
+
++/* Local function prototypes */
++Bool Deferrable(int func);
++int DeferExecution(int context, int func, char *action, Cursor cursor);
++void WarpToWindow (TwmWindow *t);
++void WarpAlongRing (XButtonEvent *ev, Bool forward);
++
+ #define MAX(x,y) ((x)>(y)?(x):(y))
+
+
+@@ -527,7 +532,7 @@
+
+
+
+-PaintEntry(mr, mi, exposure)
++void PaintEntry(mr, mi, exposure)
+ MenuRoot *mr;
+ MenuItem *mi;
+ int exposure;
+@@ -602,9 +607,9 @@
+ #endif
+
+ Scr->pullrightPm.pm = FindPixmap(Scr->pullrightPm.name,
+- &Scr->pullrightPm.width,
+- &Scr->pullrightPm.height,
+- &Scr->pullrightPm.isXpm,
++ &(Scr->pullrightPm.width),
++ &(Scr->pullrightPm.height),
++ &(Scr->pullrightPm.isXpm),
+ NULL,
+ #ifdef XPM
+ ctrans, 2,
+@@ -684,7 +689,7 @@
+
+
+
+-PaintMenu(mr, e)
++void PaintMenu(mr, e)
+ MenuRoot *mr;
+ XEvent *e;
+ {
+@@ -710,7 +715,7 @@
+
+ static Bool fromMenu;
+
+-#if 1
++void
+ UpdateMenu()
+ {
+ MenuItem *mi;
+@@ -787,13 +792,8 @@
+ if (Event.type != MotionNotify)
+ continue;
+
+-#if 1
+ XQueryPointer( dpy, ActiveMenu->w, &aJunkRoot, &aJunkChild,
+ &x_root, &y_root, &x, &y, &aJunkMask);
+-#else
+- x = ((XMotionEvent *)&Event)->x;
+- y = ((XMotionEvent *)&Event)->y;
+-#endif
+
+ /* if we are in the parent, pop back down, this should prevent
+ * menus that are slow to pop up from hanging around too long.
+@@ -910,137 +910,6 @@
+ }
+
+ }
+-#else
+-UpdateMenu()
+-{
+- MenuItem *mi;
+- int i, x, y, x_root, y_root, entry;
+- int done;
+- MenuItem *badItem = NULL;
+- Window aJunkRoot, aJunkChild;
+- unsigned int aJunkMask;
+- static int firstTime = True;
+-
+- fromMenu = TRUE;
+-
+- while (TRUE) {
+- while (XCheckMaskEvent(dpy, ButtonPressMask | ButtonReleaseMask |
+- EnterWindowMask | ExposureMask, &Event)) {
+- if (!DispatchEvent())
+- continue;
+-
+- if (Event.type == ButtonRelease || ActiveMenu == NULL) {
+- menuFromFrameOrWindowOrTitlebar = FALSE;
+- fromMenu = FALSE;
+- if (Scr->StayUpMenus) {
+- if (firstTime == True) {
+- /* it was the first release of the button */
+- firstTime = False;
+- }
+- /* end if */
+- else {
+- /* thats the second we need to return now */
+- firstTime = True;
+- return;
+- } /* end else */
+- }
+- /* end if */
+- else {
+- return;
+- } /* end else */
+- }
+- if (Event.type == Cancel) {
+- menuFromFrameOrWindowOrTitlebar = FALSE;
+- fromMenu = FALSE;
+- return;
+- }
+- }
+-
+- done = FALSE;
+- XQueryPointer(dpy, ActiveMenu->w, &aJunkRoot, &aJunkChild,
+- &x_root, &y_root, &x, &y, &aJunkMask);
+-
+- /* if we haven't received the enter notify yet, wait */
+- if (!ActiveMenu || !ActiveMenu->entered)
+- continue;
+-
+- XFindContext(dpy, ActiveMenu->w, ScreenContext, (caddr_t *) & Scr);
+-
+- if (x < 0 || y < 0 ||
+- x >= ActiveMenu->width || y >= ActiveMenu->height) {
+- if (ActiveItem && ActiveItem->func != F_TITLE) {
+- ActiveItem->state = 0;
+- PaintEntry(ActiveMenu, ActiveItem, False);
+- }
+- ActiveItem = NULL;
+- continue;
+- }
+- /* look for the entry that the mouse is in */
+- entry = y / Scr->EntryHeight;
+- for (i = 0, mi = ActiveMenu->first; mi != NULL; i++, mi = mi->next) {
+- if (i == entry)
+- break;
+- }
+-
+- /* if there is an active item, we might have to turn it off */
+- if (ActiveItem) {
+- /* is the active item the one we are on ? */
+- if (ActiveItem->item_num == entry && ActiveItem->state)
+- done = TRUE;
+-
+- /*
+- * if we weren't on the active entry, let's turn the old active
+- * one off
+- */
+- if (!done && ActiveItem->func != F_TITLE) {
+- ActiveItem->state = 0;
+- PaintEntry(ActiveMenu, ActiveItem, False);
+- }
+- }
+- /*
+- * if we weren't on the active item, change the active item and turn
+- * it on
+- */
+- if (!done) {
+- ActiveItem = mi;
+- if (ActiveItem->func != F_TITLE && !ActiveItem->state) {
+- ActiveItem->state = 1;
+- PaintEntry(ActiveMenu, ActiveItem, False);
+- }
+- }
+- /* now check to see if we were over the arrow of a pull right entry */
+- if ((ActiveItem->func == F_MENU || ActiveItem->func == F_MENUFUNC) &&
+- ((ActiveMenu->width - x) * 100 <
+- (ActiveMenu->width * Scr->PopupSensitivity))) {
+- MenuRoot *save = ActiveMenu;
+- int savex = MenuOrigins[MenuDepth - 1].x;
+- int savey = MenuOrigins[MenuDepth - 1].y;
+- if (MenuDepth < MAXMENUDEPTH) {
+- PopUpMenu(ActiveItem->sub,
+- (savex + (int)(ActiveMenu->width
+- * (100-Scr->PopupSensitivity) / 100.0)),
+- (savey + ActiveItem->item_num * Scr->EntryHeight)
+- /*
+- * (savey + ActiveItem->item_num * Scr->EntryHeight +
+- * (Scr->EntryHeight >> 1))
+- */ , False);
+- } else if (!badItem) {
+- XBell(dpy, 0);
+- badItem = ActiveItem;
+- }
+- /* if the menu did get popped up, unhighlight the active item */
+- if (save != ActiveMenu && ActiveItem->state) {
+- ActiveItem->state = 0;
+- PaintEntry(save, ActiveItem, False);
+- ActiveItem = NULL;
+- }
+- }
+- if (badItem != ActiveItem)
+- badItem = NULL;
+- XFlush(dpy);
+- }
+-}
+-#endif
+
+
+
+@@ -1205,7 +1074,7 @@
+
+
+
+-MakeMenus()
++void MakeMenus(void)
+ {
+ MenuRoot *mr;
+
+@@ -1220,7 +1089,7 @@
+
+
+
+-MakeMenu(mr)
++void MakeMenu(mr)
+ MenuRoot *mr;
+ {
+ MenuItem *start, *end, *cur, *tmp;
+@@ -1472,10 +1341,11 @@
+ * *
+ \********************************************************************/
+
++void
+ HandleChangingMenus(menu)
+ MenuRoot *menu;
+ {
+- int WindowNameOffset, WindowNameCount;
++ int /*WindowNameOffset,*/ WindowNameCount;
+ TwmWindow **WindowNames;
+ TwmWindow *tmp_win2, *tmp_win3;
+ TwmWindow **sortlist, *bakwin;
+@@ -1524,8 +1394,8 @@
+ AddToMenu(menu,sortlist[loop]->name, (char *)sortlist[loop],
+ NULL, F_POPUP, NULLSTR, NULLSTR);
+ } else {
+- WindowNameOffset=(char *)Scr->TwmRoot.next->name -
+- (char *)Scr->TwmRoot.next;
++/* WindowNameOffset=(char *)Scr->TwmRoot.next->name -
++ (char *)Scr->TwmRoot.next;*/
+ for(tmp_win = Scr->TwmRoot.next , WindowNameCount=0;
+ tmp_win != NULL;
+ tmp_win = tmp_win->next)
+@@ -1665,7 +1535,7 @@
+ ***********************************************************************
+ */
+
+-PopDownMenu()
++void PopDownMenu()
+ {
+ MenuRoot *tmp;
+
+@@ -1770,19 +1640,19 @@
+ Window w;
+ TwmWindow *tmp_win;
+ {
+- int lastx, lasty, width, height, bw2;
+- int namelen;
+- int stat;
++ int lastx, lasty, /*width, height,*/ bw2;
++/* int namelen;
++ int stat;*/
+ XEvent event;
+- Window junk;
++/* Window junk;*/
+
+- namelen = strlen (tmp_win->name);
++/* namelen = strlen (tmp_win->name);*/
+ bw2 = tmp_win->frame_bw * 2;
+ AddingW = tmp_win->attr.width + bw2;
+ AddingH = tmp_win->attr.height + tmp_win->title_height + bw2;
+- width = (SIZE_HINDENT + XTextWidth (Scr->SizeFont.font,
++/* width = (SIZE_HINDENT + XTextWidth (Scr->SizeFont.font,
+ tmp_win->name, namelen));
+- height = Scr->SizeFont.height + SIZE_VINDENT * 2;
++ height = Scr->SizeFont.height + SIZE_VINDENT * 2;*/
+ XGetGeometry(dpy, w, &JunkRoot, &origDragX, &origDragY,
+ (unsigned int *)&DragWidth, (unsigned int *)&DragHeight,
+ &JunkBW, &JunkDepth);
+@@ -1953,18 +1823,14 @@
+ int context;
+ int pulldown;
+ {
+- static Time last_time = 0;
+ short Real_OpaqueMove; /* holder for F_OPAQUEMOVE */
+ char tmp[200];
+ char *ptr;
+ char buff[MAX_FILE_SIZE];
+ int count, fd;
+- Window rootw;
+- int origX, origY;
++/* Window rootw;*/
+ int do_next_action = TRUE;
+- int moving_icon = FALSE;
+ Bool fromtitlebar = False;
+- extern int ConstrainedMoveTime;
+ struct MenuItem *item;
+
+ RootFunction = 0;
+@@ -2049,6 +1915,7 @@
+ case F_SCROLLUP:
+ case F_SCROLLDOWN:
+ case F_SCROLLBACK:
++ FocusOnRoot();
+ ScrollDesktop(func, action);
+ break;
+
+@@ -2092,8 +1959,6 @@
+ return TRUE;
+
+ if (Scr->VirtualDesktop) {
+- int x, y;
+-
+ if (tmp_win->sticky) {
+ if (Scr->StickyAbove) {
+ XReparentWindow(dpy, tmp_win->frame, Scr->VirtualDesktop,
+@@ -2300,7 +2165,7 @@
+ return TRUE;
+
+ PopDownMenu();
+- rootw = eventp->xbutton.root;
++/* rootw = eventp->xbutton.root;*/
+ MoveFunction = func;
+ if (MoveFunction == F_OPAQUEMOVE) {
+ Real_OpaqueMove = Scr->OpaqueMove;
+@@ -2313,11 +2178,11 @@
+
+ if (context == C_ICON && tmp_win->icon.w)
+ {
+- DragIcon(tmp_win, eventp, pulldown);
++ DragIcon(tmp_win, (XButtonEvent *) eventp, pulldown);
+ }
+ else if (w != tmp_win->icon.w)
+ {
+- DragFrame(tmp_win, eventp, pulldown);
++ DragFrame(tmp_win, (XButtonEvent *) eventp, pulldown);
+ }
+ #ifdef OLD_MOVE
+ if (DeferExecution(context, func, action, Scr->MoveCursor))
+@@ -3149,7 +3014,7 @@
+ ***********************************************************************
+ */
+
+-ReGrab()
++void ReGrab(void)
+ {
+ XGrabPointer(dpy, Scr->Root, True,
+ ButtonPressMask | ButtonReleaseMask,
+@@ -3171,6 +3036,7 @@
+ ***********************************************************************
+ */
+
++Bool
+ Deferrable(func)
+ int func;
+ {
+@@ -3205,7 +3071,7 @@
+ }
+ }
+
+-NeedToDefer(root)
++Bool NeedToDefer(root)
+ MenuRoot *root;
+ {
+ MenuItem *mitem;
+@@ -3321,7 +3187,7 @@
+ Scr->FocusRoot = TRUE;
+ }
+
+-DeIconify(tmp_win)
++void DeIconify(tmp_win)
+ TwmWindow *tmp_win;
+ {
+ TwmWindow *t;
+@@ -3396,7 +3262,7 @@
+
+
+
+-Iconify(tmp_win, def_x, def_y)
++void Iconify(tmp_win, def_x, def_y)
+ TwmWindow *tmp_win;
+ int def_x, def_y;
+ {
+@@ -3603,7 +3469,7 @@
+
+
+
+-SetMapStateProp(tmp_win, state)
++void SetMapStateProp(tmp_win, state)
+ TwmWindow *tmp_win;
+ int state;
+ {
+@@ -3647,7 +3513,7 @@
+
+
+
+-WarpToScreen (n, inc)
++void WarpToScreen (n, inc)
+ int n, inc;
+ {
+ Window dumwin;
+@@ -3691,7 +3557,7 @@
+ * BumpWindowColormap - rotate our internal copy of WM_COLORMAP_WINDOWS
+ */
+
+-BumpWindowColormap (tmp, inc)
++void BumpWindowColormap (tmp, inc)
+ TwmWindow *tmp;
+ int inc;
+ {
+@@ -3704,9 +3570,9 @@
+ cwins = (ColormapWindow **) malloc(sizeof(ColormapWindow *)*
+ tmp->cmaps.number_cwins);
+ if (cwins) {
+- if (previously_installed =
+- /* SUPPRESS 560 */(Scr->cmapInfo.cmaps == &tmp->cmaps &&
+- tmp->cmaps.number_cwins)) {
++ if ((previously_installed =
++ (Scr->cmapInfo.cmaps == &tmp->cmaps &&
++ tmp->cmaps.number_cwins))) {
+ for (i = tmp->cmaps.number_cwins; i-- > 0; )
+ tmp->cmaps.cwins[i]->colormap->state = 0;
+ }
+@@ -3737,7 +3603,7 @@
+
+
+
+-HideIconManager ()
++void HideIconManager ()
+ {
+ SetMapStateProp (Scr->iconmgr.twm_win, WithdrawnState);
+ UnmapFrame(Scr->iconmgr.twm_win);
+@@ -3749,7 +3615,7 @@
+
+
+
+-SetBorder (tmp, onoroff)
++void SetBorder (tmp, onoroff)
+ TwmWindow *tmp;
+ Bool onoroff;
+ {
+@@ -3768,7 +3634,7 @@
+
+
+
+-DestroyMenu (menu)
++void DestroyMenu (menu)
+ MenuRoot *menu;
+ {
+ MenuItem *item;
+@@ -3890,14 +3756,14 @@
+ XSendEvent (dpy, w, False, 0L, (XEvent *) &ev);
+ }
+
+-SendDeleteWindowMessage (tmp, timestamp)
++void SendDeleteWindowMessage (tmp, timestamp)
+ TwmWindow *tmp;
+ Time timestamp;
+ {
+ send_clientmessage (tmp->w, _XA_WM_DELETE_WINDOW, timestamp);
+ }
+
+-SendSaveYourselfMessage (tmp, timestamp)
++void SendSaveYourselfMessage (tmp, timestamp)
+ TwmWindow *tmp;
+ Time timestamp;
+ {
+@@ -3905,7 +3771,7 @@
+ }
+
+
+-SendTakeFocusMessage (tmp, timestamp)
++void SendTakeFocusMessage (tmp, timestamp)
+ TwmWindow *tmp;
+ Time timestamp;
+ {
diff --git a/wm/tvtwm/patches/patch-ao b/wm/tvtwm/patches/patch-ao
new file mode 100644
index 00000000000..c1b4333975b
--- /dev/null
+++ b/wm/tvtwm/patches/patch-ao
@@ -0,0 +1,27 @@
+$NetBSD: patch-ao,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+Index: menus.h
+===================================================================
+RCS file: /home/siren/src/tvtwm/menus.h,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- menus.h 1999/08/08 05:46:53 1.1.1.1
++++ menus.h 1999/08/08 05:56:53 1.2
+@@ -143,16 +143,5 @@
+ #define COLORMAP_PREV "prev"
+ #define COLORMAP_DEFAULT "default"
+
+-extern void InitTitlebarButtons();
+-extern void InitMenus();
+-extern MenuRoot *NewMenuRoot();
+-extern MenuItem *AddToMenu();
+-extern Bool PopUpMenu();
+-extern MenuRoot *FindMenuRoot();
+-extern Bool AddFuncKey();
+-extern int ExecuteFunction();
+-extern int DeferExecution();
+-extern int Execute();
+-extern void FocusOnRoot();
+
+ #endif /* _MENUS_ */
diff --git a/wm/tvtwm/patches/patch-ap b/wm/tvtwm/patches/patch-ap
new file mode 100644
index 00000000000..3185c0aeaf2
--- /dev/null
+++ b/wm/tvtwm/patches/patch-ap
@@ -0,0 +1,99 @@
+$NetBSD: patch-ap,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+Index: move.c
+===================================================================
+RCS file: /home/siren/src/tvtwm/move.c,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- move.c 1999/08/08 05:46:52 1.1.1.1
++++ move.c 1999/08/08 05:56:54 1.2
+@@ -34,11 +34,6 @@
+ *
+ **********************************************************************/
+
+-#if !defined(lint) && !defined(SABER)
+-static char RCSinfo[]=
+-"$XConsortium: move.c,v 1.140 90/03/23 11:42:33 jim Exp $";
+-#endif
+-
+ #include <stdio.h>
+ #include <X11/X.h>
+ #include <X11/Xatom.h>
+@@ -70,7 +65,8 @@
+
+ static void reallyStartMove();
+ static void doMove();
+-static void getPointer();
++static void getPointer(int *x_root, int *y_root, int *cancel, int *done,
++ int *first, int adding, int pulldown);
+
+ /***********************************************************************
+ *
+@@ -165,11 +161,9 @@
+ int pulldown; /* moving window from a pulldown menu */
+ {
+ Window junkRoot, junkChild;
+- unsigned int junkDepth, numChildren;
++ unsigned int junkDepth;
+ int junkX, junkY;
+- int junkxroot, junkyroot;
+ Bool old_save_under;
+- unsigned int junkMask;
+ int first;
+ XSetWindowAttributes attr;
+ XWindowAttributes wattr;
+@@ -338,7 +332,7 @@
+ XRaiseWindow(dpy, window);
+
+ while (True) {
+- getPointer(outlineWindow, x_root, y_root, cancel, &done, first, adding, pulldown);
++ getPointer(/*outlineWindow,*/ x_root, y_root, cancel, &done, first, adding, pulldown);
+ if (done) {
+ doMove(tmp_win, window, *x_root, *y_root, &xdest, &ydest, panner, False);
+ break;
+@@ -363,9 +357,8 @@
+ int paint;
+ {
+ int xl, yt;
+- int deltax, deltay;
++/* int deltax, deltay;*/
+ int vdtx, vdty;
+- char str[20];
+ Window actual, virtual;
+
+ dragX = x_root;
+@@ -374,8 +367,8 @@
+ xl = dragX + diffX;
+ yt = dragY + diffY;
+
+- deltax = xl - origX/scale;
+- deltay = yt - origY/scale;
++/* deltax = xl - origX/scale;
++ deltay = yt - origY/scale;*/
+
+ if (MoveFunction != F_FORCEMOVE && Scr->DontMoveOff && outlineWindow != Scr->Panner) {
+ if (tmp_win->root == Scr->VirtualDesktop || tmp_win->root == Scr->Panner) {
+@@ -438,8 +431,8 @@
+ }
+
+ static void
+-getPointer(window, x_root, y_root, cancel, done, first, adding, pulldown)
+-Window window;
++getPointer(/*window,*/ x_root, y_root, cancel, done, first, adding, pulldown)
++/*Window window;*/
+ int *x_root;
+ int *y_root;
+ int *cancel;
+@@ -448,11 +441,9 @@
+ int adding;
+ int pulldown;
+ {
+- Window junkChild;
+ int doingFine;
+ XEvent event,bakevent;
+
+- int xdest, ydest;
+ unsigned mask;
+ static int buttons;
+
diff --git a/wm/tvtwm/patches/patch-aq b/wm/tvtwm/patches/patch-aq
new file mode 100644
index 00000000000..7279b035a71
--- /dev/null
+++ b/wm/tvtwm/patches/patch-aq
@@ -0,0 +1,209 @@
+$NetBSD: patch-aq,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+Index: parse.c
+===================================================================
+RCS file: /home/siren/src/tvtwm/parse.c,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- parse.c 1999/08/08 05:46:53 1.1.1.1
++++ parse.c 1999/08/08 05:56:55 1.2
+@@ -41,6 +41,7 @@
+ #include <errno.h>
+ #include <X11/Xos.h>
+ #include <X11/Xmu/CharSet.h>
++#include <X11/Xmu/SysUtil.h>
+ #include "twm.h"
+ #include "screen.h"
+ #include "menus.h"
+@@ -70,6 +71,10 @@
+ #endif
+ #define BUF_LEN 300
+
++#ifndef errno
++extern int errno;
++#endif
++
+ static FILE *twmrc;
+ static FILE *menufile;
+ static int ptr = 0;
+@@ -98,9 +103,10 @@
+ static int twmFileInput(), twmStringListInput(), twmMenuInput();
+ void twmUnput();
+ int (*twmInputFunc)();
++char *m4_defs(Display *dpy, char *display_name);
+
+ extern char *defTwmrc[]; /* default bindings */
+-
++extern void yyparse(void);
+
+ /***********************************************************************
+ *
+@@ -462,6 +468,7 @@
+
+ void
+ TwmOutput(c)
++ int c;
+ {
+ putchar(c);
+ }
+@@ -1420,6 +1427,7 @@
+ /*
+ * put_pixel_on_root() Save a pixel value in twm root window color property.
+ */
++void
+ put_pixel_on_root(pixel)
+ Pixel pixel;
+ {
+@@ -1562,11 +1570,11 @@
+ return -1;
+ }
+
+-
+-do_squeeze_entry (list, name, type, justify, num, denom)
++void
++do_squeeze_entry (list, name, matchtype, justify, num, denom)
+ name_list **list; /* squeeze or dont-squeeze list */
+ char *name; /* window name */
+- short type; /* match type */
++ short matchtype; /* match type */
+ int justify; /* left, center, right */
+ int num; /* signed num */
+ int denom; /* 0 or indicates fraction denom */
+@@ -1605,7 +1613,7 @@
+ sinfo->justify = justify;
+ sinfo->num = num;
+ sinfo->denom = denom;
+- AddToList (list, name, type, (char *)sinfo);
++ AddToList (list, name, matchtype, (char *)sinfo);
+ }
+ }
+
+@@ -1614,27 +1622,29 @@
+ {
+ int fno;
+ int fids[2];
+- int fres; /* Fork result */
++ pid_t fres; /* Fork result */
+
+ fno = fileno(fraw);
+ /* if (-1 == fcntl(fno, F_SETFD, 0)) perror("fcntl()"); */
+- pipe(fids);
++ if (pipe(fids) != 0) perror("pipe creation failed for m4");
++
+ fres = fork();
+ if (fres < 0) {
+- perror("Fork for m4 failed");
++ perror("Fork for m4 failed");
+ exit(23);
+ }
+ if (fres == 0) {
+ extern Display *dpy;
+ extern char *display_name;
+- static char *m4_defs();
+ char *tmp_file;
+-
++
+ /* Child */
+ close(0); /* stdin */
+ close(1); /* stdout */
+ dup2(fno, 0); /* stdin = fraw */
+ dup2(fids[1], 1); /* stdout = pipe to parent */
++ close(fids[0]); /* read end of pipe */
++ close(fids[1]); /* write end of pipe - its been duped */
+ /* get_defs("m4", dpy, display_name) */
+ tmp_file = m4_defs(dpy, display_name);
+ execlp("m4", "m4", tmp_file, M4STDIN, NULL);
+@@ -1696,7 +1706,7 @@
+
+ /* Make a definition, but quote the defined string... */
+
+-static char *MkQte(name, def)
++char *MkQte(name, def)
+ char *name, *def;
+ {
+ char *cp, *cp2;
+@@ -1714,7 +1724,7 @@
+ strcpy(cp + 1, def);
+ strcat(cp, "\'");
+ cp2 = MkDef(name, cp);
+- free(cp); /* Not really needed, but good habits die hard... */
++ free(cp); /*Not really needed, but good habits die hard... */
+ return(cp2);
+ }
+
+@@ -1741,24 +1751,29 @@
+ }
+ #endif
+
+-static char *m4_defs(display, host)
++char *m4_defs(display, host)
+ Display *display;
+ char *host;
+ {
+ extern int KeepTmpFile;
+- int i;
+ Screen *screen;
+ Visual *visual;
+ char client[MAXHOSTNAME], server[MAXHOSTNAME], *colon;
+ struct hostent *hostname;
+ char *vc; /* Visual Class */
+- static char tmp_name[] = "/tmp/twmrcXXXXXX";
++ char *tmp_name, name[] = "/tmp/twmrcXXXXXX";
+ int fd;
+ FILE *tmpf;
+ char *sp;
+ char *getenv_res; /* Result of a getenv() call */
+ Boolean tvtwm = False;
+
++ if ((tmp_name = malloc(sizeof(char)*strlen(name)+1)) == NULL) {
++ perror("Cannot malloc temp_name\n");
++ exit(2);
++ }
++
++ strcpy(tmp_name, name);
+ fd = mkstemp(tmp_name); /* I *hope* mkstemp exists, because */
+ /* I tried to find the "portable" */
+ /* mktmp... */
+@@ -1864,7 +1879,7 @@
+ {
+ struct group *g;
+ int i, ngids, staffg = 10;
+-#if defined(SYSV) || defined(SVR4)
++#if defined(SYSV) || defined(SVR4) || defined(__NetBSD__)
+ gid_t gids[NGIDS];
+ #else
+ int gids[NGIDS];
+@@ -1899,18 +1914,19 @@
+ /* next release. */
+ /* <cross@eng.umd.edu> */
+
+-static int getmask()
++int getmask()
+ {
++#define L 150 /* Length of a line in /etc/passwd */
++#ifdef NOT
+ int tuid; /* target */
+ FILE *passwd2;
+ int lineno = 0;
+ int mask, uid, gid;
+-#define L 150 /* Length of a line in /etc/passwd */
+ char line[L], bak[L];
+ char *uname, *pisswd, *gcos, *dir, *shell, *num, *end;
+ int ch;
+-
+-#if 0
++#endif
++#if NOT
+ tuid = getuid();
+ passwd2 = fopen("/usr/local/etc/passwd/passwd", "r");
+ if (passwd2 == NULL) {
+@@ -1952,7 +1968,7 @@
+ #endif
+ }
+
+-def_netmask(tmpf)
++void def_netmask(tmpf)
+ FILE *tmpf;
+ {
+ int mask;
diff --git a/wm/tvtwm/patches/patch-ar b/wm/tvtwm/patches/patch-ar
new file mode 100644
index 00000000000..792af147c67
--- /dev/null
+++ b/wm/tvtwm/patches/patch-ar
@@ -0,0 +1,18 @@
+$NetBSD: patch-ar,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+Index: parse.h
+===================================================================
+RCS file: /home/siren/src/tvtwm/parse.h,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- parse.h 1999/08/08 05:46:53 1.1.1.1
++++ parse.h 1999/08/08 05:56:55 1.2
+@@ -125,4 +125,7 @@
+ #define D_EAST 3
+ #define D_WEST 4
+
++/* function prototypes */
++int ParseMenuFile(char *filename, char *menuname);
++
+ #endif /* _PARSE_ */
diff --git a/wm/tvtwm/patches/patch-as b/wm/tvtwm/patches/patch-as
new file mode 100644
index 00000000000..fa235bca305
--- /dev/null
+++ b/wm/tvtwm/patches/patch-as
@@ -0,0 +1,26 @@
+$NetBSD: patch-as,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+Index: regexp.c
+===================================================================
+RCS file: /home/siren/src/tvtwm/regexp.c,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- regexp.c 1999/08/08 05:46:53 1.1.1.1
++++ regexp.c 1999/08/08 05:56:56 1.2
+@@ -25,14 +25,13 @@
+ #ifndef FILE
+ #include <stdio.h>
+ #endif /* FILE */
++#include <strings.h>
+ #ifndef NSUBEXP
+ #include "regexp.h"
+ #endif /* NSUBEXP */
+ #ifndef MAGIC
+ #include "regmagic.h"
+ #endif /* MAGIC */
+-
+-extern char *strchr();
+
+ /*
+ * The "internal use only" fields in regexp.h are present to pass info from
diff --git a/wm/tvtwm/patches/patch-at b/wm/tvtwm/patches/patch-at
new file mode 100644
index 00000000000..fbdf4b6d9cf
--- /dev/null
+++ b/wm/tvtwm/patches/patch-at
@@ -0,0 +1,66 @@
+$NetBSD: patch-at,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+Index: resize.c
+===================================================================
+RCS file: /home/siren/src/tvtwm/resize.c,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- resize.c 1999/08/08 05:46:53 1.1.1.1
++++ resize.c 1999/08/08 05:56:56 1.2
+@@ -90,6 +90,9 @@
+ #include "add_window.h"
+ #include "screen.h"
+
++/* function prototypes */
++void SetFrameShape (TwmWindow *tmp);
++
+ #define MINHEIGHT 0 /* had been 32 */
+ #define MINWIDTH 0 /* had been 60 */
+
+@@ -349,8 +352,8 @@
+ TwmWindow *tmp_win;
+ int x, y, w, h;
+ {
+- Window junkRoot;
+- unsigned int junkbw, junkDepth;
++/* Window junkRoot;
++ unsigned int junkbw, junkDepth;*/
+ XGrabServer(dpy);
+ XGrabPointer(dpy, Scr->Root, True,
+ ButtonPressMask | ButtonMotionMask | PointerMotionMask,
+@@ -677,7 +680,7 @@
+ }
+
+ if (!Scr->NoRaiseResize)
+- RaiseFrame(dpy, tmp_win);
++ RaiseFrame(tmp_win);
+
+ UninstallRootColormap();
+
+@@ -735,7 +738,7 @@
+ *
+ ***********************************************************************/
+
+-ConstrainSize (tmp_win, widthp, heightp)
++void ConstrainSize (tmp_win, widthp, heightp)
+ TwmWindow *tmp_win;
+ int *widthp, *heightp;
+ {
+@@ -1174,7 +1177,7 @@
+ }
+
+ if (!Scr->NoRaiseResize)
+- RaiseFrame(dpy, tmp_win);
++ RaiseFrame(tmp_win);
+
+ ConstrainSize(tmp_win, &dragWidth, &dragHeight);
+
+@@ -1183,6 +1186,7 @@
+ XUngrabServer (dpy);
+ }
+
++void
+ SetFrameShape (tmp)
+ TwmWindow *tmp;
+ {
diff --git a/wm/tvtwm/patches/patch-au b/wm/tvtwm/patches/patch-au
new file mode 100644
index 00000000000..4eecfd2f82d
--- /dev/null
+++ b/wm/tvtwm/patches/patch-au
@@ -0,0 +1,19 @@
+$NetBSD: patch-au,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+Index: screen.h
+===================================================================
+RCS file: /home/siren/src/tvtwm/screen.h,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- screen.h 1999/08/08 05:46:53 1.1.1.1
++++ screen.h 1999/08/08 05:56:57 1.2
+@@ -63,7 +63,7 @@
+ Pixmap pm; /* focus highlight window right end */
+ Pixmap mask; /* shape mask */
+ Bool isXpm; /* is it an Xpm format pixmap? */
+- int height, width; /* cache the size */
++ unsigned int height, width; /* cache the size */
+ } TwmPixmap;
+
+ typedef struct ScreenInfo
diff --git a/wm/tvtwm/patches/patch-av b/wm/tvtwm/patches/patch-av
new file mode 100644
index 00000000000..7b770055716
--- /dev/null
+++ b/wm/tvtwm/patches/patch-av
@@ -0,0 +1,77 @@
+$NetBSD: patch-av,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+Index: ssetroot.c
+===================================================================
+RCS file: /home/siren/src/tvtwm/ssetroot.c,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- ssetroot.c 1999/08/08 05:46:52 1.1.1.1
++++ ssetroot.c 1999/08/08 05:56:58 1.2
+@@ -37,11 +37,21 @@
+ #include <X11/Xlib.h>
+ #include <X11/Xutil.h>
+ #include <X11/Xatom.h>
++#include <X11/Xmu/CurUtil.h>
+ #include <stdio.h>
++#include <stdlib.h>
+ #include "X11/bitmaps/gray"
+ #include "X11/bitmaps/root_weave"
+
+ char *index();
++Cursor CreateCursorFromFiles(char *cursor_file, char *mask_file);
++Pixmap MakeModulaBitmap(), ReadBitmapFile();
++XColor NameToXColor();
++unsigned long NameToPixel();
++Cursor CreateCursorFromName();
++void SetBackgroundToBitmap(Pixmap bitmap, unsigned int width,
++ unsigned int height);
++void FixupState(void);
+
+ #define Dynamic 1
+
+@@ -58,6 +68,7 @@
+ int unsave_past = 0;
+ Pixmap save_pixmap = (Pixmap)None;
+
++void
+ usage()
+ {
+ fprintf(stderr, "usage: %s [options]\n", program_name);
+@@ -79,11 +90,8 @@
+ /*NOTREACHED*/
+ }
+
+-Pixmap MakeModulaBitmap(), ReadBitmapFile();
+-XColor NameToXColor();
+-unsigned long NameToPixel();
+-Cursor CreateCursorFromName();
+
++int
+ main(argc, argv)
+ int argc;
+ char **argv;
+@@ -310,6 +318,7 @@
+
+
+ /* Free past incarnation if needed, and retain state if needed. */
++void
+ FixupState()
+ {
+ Atom prop, type;
+@@ -345,6 +354,7 @@
+ * SetBackgroundToBitmap: Set the root window background to a caller supplied
+ * bitmap.
+ */
++void
+ SetBackgroundToBitmap(bitmap, width, height)
+ Pixmap bitmap;
+ unsigned int width, height;
+@@ -382,6 +392,7 @@
+ */
+ #define BITMAP_HOT_DEFAULT 8
+
++Cursor
+ CreateCursorFromFiles(cursor_file, mask_file)
+ char *cursor_file, *mask_file;
+ {
diff --git a/wm/tvtwm/patches/patch-aw b/wm/tvtwm/patches/patch-aw
new file mode 100644
index 00000000000..e8fdd16e284
--- /dev/null
+++ b/wm/tvtwm/patches/patch-aw
@@ -0,0 +1,87 @@
+$NetBSD: patch-aw,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+Index: twm.c
+===================================================================
+RCS file: /home/siren/src/tvtwm/twm.c,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- twm.c 1999/08/08 05:46:53 1.1.1.1
++++ twm.c 1999/08/08 05:56:58 1.2
+@@ -142,6 +142,7 @@
+ #include <signal.h>
+ #include <fcntl.h>
+ #include <sys/wait.h>
++#include <unistd.h>
+ #include "twm.h"
+ #include "add_window.h"
+ #include "gc.h"
+@@ -153,9 +154,12 @@
+ #include "gram.h"
+ #include "screen.h"
+ #include "iconmgr.h"
++#include "list.h"
++#include "icons.h"
+ #include <X11/Xproto.h>
+ #include <X11/Xatom.h>
+ #include <X11/bitmaps/root_weave>
++#include <X11/Xmu/Error.h>
+ #include "vdt.h"
+ #define XK_LATIN1
+ #include <X11/keysymdef.h>
+@@ -230,6 +234,10 @@
+
+ extern void assign_var_savecolor();
+
++void InternUsefulAtoms (void);
++void InitVariables(void);
++void CreateFonts (void);
++
+ /***********************************************************************
+ *
+ * Procedure:
+@@ -238,7 +246,7 @@
+ ***********************************************************************
+ */
+
+-main(argc, argv, environ)
++int main(argc, argv, environ)
+ int argc;
+ char **argv;
+ char **environ;
+@@ -727,6 +735,8 @@
+ }
+
+ HandleEvents();
++ exit(0);
++ /* NOTREACHED */
+ }
+
+ /***********************************************************************
+@@ -827,7 +837,7 @@
+ ***********************************************************************
+ */
+
+-InitVariables()
++void InitVariables(void)
+ {
+ FreeList(&Scr->BorderColorL);
+ FreeList(&Scr->IconBorderColorL);
+@@ -1020,7 +1030,7 @@
+ }
+
+
+-RestoreWithdrawnLocation (tmp)
++void RestoreWithdrawnLocation (tmp)
+ TwmWindow *tmp;
+ {
+ int gravx, gravy;
+@@ -1227,7 +1237,7 @@
+ Atom _XA_TWM_PROCESS; /* used to record where twm is */
+ Atom _XA_TWM_MACHINE;
+
+-InternUsefulAtoms ()
++void InternUsefulAtoms (void)
+ {
+ /*
+ * Create priority colors if necessary.
diff --git a/wm/tvtwm/patches/patch-ax b/wm/tvtwm/patches/patch-ax
new file mode 100644
index 00000000000..e5d2b8b0498
--- /dev/null
+++ b/wm/tvtwm/patches/patch-ax
@@ -0,0 +1,151 @@
+$NetBSD: patch-ax,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+Index: twm.h
+===================================================================
+RCS file: /home/siren/src/tvtwm/twm.h,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- twm.h 1999/08/08 05:46:53 1.1.1.1
++++ twm.h 1999/08/08 05:56:59 1.2
+@@ -39,6 +39,7 @@
+ #ifndef _TWM_
+ #define _TWM_
+
++#include <stdio.h>
+ #include <X11/Intrinsic.h>
+ #include <X11/cursorfont.h>
+ #include <X11/extensions/shape.h>
+@@ -51,6 +52,9 @@
+
+ #include "icons.h"
+
++#include "menus.h"
++#include "list.h"
++
+ #ifndef WithdrawnState
+ #define WithdrawnState 0
+ #endif
+@@ -388,6 +392,122 @@
+ extern Atom _XA_WM_SAVE_YOURSELF;
+ extern Atom _XA_WM_DELETE_WINDOW;
+ extern Atom _XA_TWM_FLAGS;
++
++/* Function prototypes */
++void ResizeVirtual(Window window, int width, int height);
++Pixmap XcprLocatePixmapFile (Screen *screen, _Xconst char *name,
++ XpmColorSymbol *trans, int numtrans,
++ unsigned int depth,
++ char *srcname, int srcnamelen,
++ int *widthp, int *heightp, int *xhotp, int *yhotp,
++ Bool *isXpm, XpmAttributes *attribs,
++ Pixmap *mask);
++
++Pixmap GetCursorGlyph(char *name, int *widthp, int *heightp,
++ Pixmap *shape_mask);
++void SetFrameShape (TwmWindow *tmp);
++int ExecuteFunction(int func, char *action, struct MenuRoot *sub, Window w,
++ TwmWindow *tmp_win, XEvent *eventp, int context,
++ int pulldown);
++Bool AddFuncKey (char *name, int cont, int mods, int func, char *win_name,
++ char *action);
++MenuItem *AddToMenu(MenuRoot *menu, char *item, char *action, MenuRoot *sub,
++ int func, char *fore, char *back);
++void FocusOnRoot(void);
++void PaintEntry(MenuRoot *mr, MenuItem *mi, int exposure);
++Bool PopUpMenu (MenuRoot *menu, int x, int y, Bool center);
++MenuRoot *FindMenuRoot(char *name);
++MenuRoot *NewMenuRoot(char *name);
++void RelativeMove(TwmWindow *win, char *geom);
++void MenuStartResize(TwmWindow *tmp_win, int x, int y, int w, int h);
++void MenuEndResize(TwmWindow *tmp_win);
++void MenuDoResize(int x_root, int y_root, TwmWindow *tmp_win);
++int Execute(char *s, TwmWindow *tmp_win);
++void InitMenus(void);
++void InitTitlebarButtons(void);
++void DestroyMenu (MenuRoot *menu);
++void MakeMenu(MenuRoot *mr);
++void DeIconify(TwmWindow *tmp_win);
++void HideIconManager (void);
++Bool NeedToDefer(MenuRoot *root);
++void SendDeleteWindowMessage (TwmWindow *tmp, Time timestamp);
++void SendSaveYourselfMessage (TwmWindow *tmp, Time timestamp);
++void WarpToScreen (int n, int inc);
++void BumpWindowColormap (TwmWindow *tmp, int inc);
++void DestroyIconWindow(TwmWindow *tmp_win);
++char *current_input_line(void);
++void do_var_savecolor(int key);
++void twmrc_error_prefix (void);
++char *MkQte(char *name, char *def);
++int CreateTitleButton (char *name, int func, char *action, MenuRoot *menuroot,
++ Bool rightside, Bool append);
++void AddIconRegion(char *name, short type, char *geom, Bool iterate,
++ int grav1, int grav2, int stepx, int stepy);
++int do_pixmap_keyword(int keyword, char *filename);
++void NewBitmapCursor(Cursor *cp, char *source, char *mask);
++void do_squeeze_entry (name_list **list, char *name, short icontype, int justify,
++ int num, int denom);
++void FetchWmProtocols (TwmWindow *tmp);
++void FetchWmColormapWindows (TwmWindow *tmp);
++short Transient(Window w, Window *wp);
++void def_netmask(FILE *tmpf);
++void MoveIcon(TwmWindow *tmp_win, int x, int y);
++Window MakeVirtual(TwmWindow *tmp_win, int x, int y, int width, int height,
++ long background, long border);
++Pixmap FindPixmap (char *name, unsigned int *widthp, unsigned int *heightp,
++ Bool *isXpm, Pixel *bg_color,
++#ifdef XPM
++ XpmColorSymbol *colors,
++#else
++ char *colors,
++#endif
++ int numcolors, Pixmap *shape_mask);
++void SendSyntheticConfigureNotify(TwmWindow *tmp_win);
++void SetupFrame (TwmWindow *tmp_win, int x, int y, int w, int h, int bw,
++ Bool sendEvent);
++void SetupWindow (TwmWindow *tmp_win, int x, int y, int w, int h, int bw);
++int parse_keyword (char *s, int *nump);
++void SimulateWinGravity (TwmWindow *tmp);
++void SetBorder (TwmWindow *tmp, Bool onoroff);
++void InstallRootColormap(void);
++void ConstrainSize (TwmWindow *tmp_win, int *widthp, int *heightp);
++void UninstallRootColormap(void);
++void SetSWM_ROOT(TwmWindow *tmp_win);
++void ReGrab(void);
++void InstallWindowColormaps (int type, TwmWindow *tmp);
++int GetColor(int kind, Pixel *what, char *name);
++void LocateStandardColormaps(void);
++void SetFocus (TwmWindow *tmp_win, Time time);
++void MakeMenus(void);
++void SetSWM_VERSION(void);
++void SetMapStateProp(TwmWindow *tmp_win, int state);
++void CreateFonts (void);
++void GetFont(MyFont *font);
++void GetGravityOffsets (TwmWindow *tmp, int *xp, int *yp);
++void RemoveSWM_VERSION();
++void AddDefaultBindings ();
++void ScrollToQuadrant(TwmWindow *tmp_win);
++void DragIcon(TwmWindow *tmp_win, XButtonEvent *ev, int pulldown);
++void DragFrame(TwmWindow *tmp_win, XButtonEvent *ev, int pulldown);
++void Iconify(TwmWindow *tmp_win, int def_x, int def_y);
++void DeIconify(TwmWindow *tmp_win);
++void IconDown (TwmWindow *tmp_win);
++void IconUp (TwmWindow *tmp_win);
++void CreateIconWindow(TwmWindow *tmp_win, int def_x, int def_y);
++void InsertRGBColormap (Atom a, XStandardColormap *maps, int nmaps,
++ Bool replace);
++void RemoveRGBColormap (Atom a);
++void RedoIconName(void);
++void PaintMenu(MenuRoot *mr, XEvent *e);
++void RestoreWithdrawnLocation (TwmWindow *tmp);
++void PopDownMenu(void);
++void UpdateMenu(void);
++void HandlePannerMove(XButtonEvent *ev, TwmWindow *tmp_win);
++void SendTakeFocusMessage (TwmWindow *tmp, Time timestamp);
++void RaiseFrame(TwmWindow *tmp_win);
++void ResizeDesktop(int width, int height);
++void MoveOutline(Window root, int x, int y, int width, int height, int bw,
++ int th);
+ extern Atom _XA_TWM_RESTART;
+ extern Atom _XA_TWM_PROCESS;
+ extern Atom _XA_TWM_MACHINE;
diff --git a/wm/tvtwm/patches/patch-ay b/wm/tvtwm/patches/patch-ay
new file mode 100644
index 00000000000..c17d622249f
--- /dev/null
+++ b/wm/tvtwm/patches/patch-ay
@@ -0,0 +1,79 @@
+$NetBSD: patch-ay,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+Index: util.c
+===================================================================
+RCS file: /home/siren/src/tvtwm/util.c,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- util.c 1999/08/08 05:46:52 1.1.1.1
++++ util.c 1999/08/08 05:56:59 1.2
+@@ -306,6 +306,7 @@
+
+ extern int XmuCompareISOLatin1();
+
++/* ARGSUSED */
+ Pixmap FindPixmap (name, widthp, heightp, isXpm, bg_color, colors,
+ numcolors, shape_mask)
+ char *name;
+@@ -496,7 +497,7 @@
+ }
+
+
+-InsertRGBColormap (a, maps, nmaps, replace)
++void InsertRGBColormap (a, maps, nmaps, replace)
+ Atom a;
+ XStandardColormap *maps;
+ int nmaps;
+@@ -538,7 +539,7 @@
+ return;
+ }
+
+-RemoveRGBColormap (a)
++void RemoveRGBColormap (a)
+ Atom a;
+ {
+ StdCmap *sc, *prev;
+@@ -558,7 +559,7 @@
+ return;
+ }
+
+-LocateStandardColormaps()
++void LocateStandardColormaps(void)
+ {
+ Atom *atoms;
+ int natoms;
+@@ -655,7 +656,7 @@
+ return TRUE;
+ }
+
+-GetFont(font)
++void GetFont(font)
+ MyFont *font;
+ {
+ char *deffontname = "fixed";
+@@ -685,6 +686,7 @@
+ * SetFocus - separate routine to set focus to make things more understandable
+ * and easier to debug
+ */
++void
+ SetFocus (tmp_win, time)
+ TwmWindow *tmp_win;
+ Time time;
+@@ -913,6 +915,7 @@
+ int *widthp, *heightp;
+ {
+ CreateMenuIcon (Scr->TBInfo.width - Scr->TBInfo.border * 2,widthp,heightp);
++ return Scr->tbpm.menu;
+ }
+
+ Pixmap CreateMenuIcon (height, widthp, heightp)
+@@ -1013,7 +1016,7 @@
+ unsigned long nitems;
+ unsigned long bytes_after;
+ unsigned char *value;
+- int status;
++/* int status;*/
+ char *s;
+
+ if (XGetWindowProperty(dpy, win, atom, 0, (MAX_NUM+3)/4,
diff --git a/wm/tvtwm/patches/patch-az b/wm/tvtwm/patches/patch-az
new file mode 100644
index 00000000000..93c15056870
--- /dev/null
+++ b/wm/tvtwm/patches/patch-az
@@ -0,0 +1,98 @@
+$NetBSD: patch-az,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+
+Index: vdt.c
+===================================================================
+RCS file: /home/siren/src/tvtwm/vdt.c,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- vdt.c 1999/08/08 05:46:53 1.1.1.1
++++ vdt.c 1999/08/08 05:57:00 1.2
+@@ -139,12 +139,8 @@
+ *
+ **********************************************************************/
+
+-#if !defined(lint) && !defined(SABER)
+-static char RCSinfo[]=
+-"$XConsortium: vdt.c,v 1.140 90/03/23 11:42:33 jim Exp $";
+-#endif
+-
+ #include <stdio.h>
++#include <unistd.h>
+ #include <X11/X.h>
+ #include <X11/Xatom.h>
+ #include "twm.h"
+@@ -545,8 +541,6 @@
+ TwmWindow *tmp_win;
+ int x, y;
+ {
+- XWindowChanges xwc;
+-
+ XMoveWindow(dpy, tmp_win->icon.w, x, y);
+ tmp_win->icon_loc_x = x;
+ tmp_win->icon_loc_y = y;
+@@ -572,13 +566,14 @@
+ Pixmap pm;
+ XSetWindowAttributes attr;
+ unsigned attrMask;
+- extern char *display_name;
++#ifdef XLOADIMAGE
+ char display[80];
+ char *ptr;
+- int fres;
+ char fg_text[14], bg_text[14];
+ XColor colors[2];
+-
++ pid_t fres;
++#endif
++
+ /*
+ * Make vdt size an integral multiple of physical screen size
+ * if the given width and/or height are less than physical
+@@ -638,7 +633,7 @@
+ colors[1].green, colors[1].blue);
+ /* Fork the process */
+ fres = fork();
+- if (fres < 0) fprintf(stderr, "%s: error in fork()...\n");
++ if (fres < 0) fprintf(stderr, "%s: error in fork()...\n", ProgramName);
+ if (fres == 0) { /* This is the child */
+ execlp("xloadimage", "xsetbg", "-display",
+ display, "-foreground",
+@@ -703,7 +698,6 @@
+ XSizeHints *sizeHints;
+ XWMHints *wmHints;
+ XClassHint *classHints;
+- int status;
+ int x, y, width, height;
+ Pixmap pm;
+ unsigned attrMask;
+@@ -980,10 +974,10 @@
+ int y;
+ {
+ TwmWindow *tmp;
+- XSetWindowAttributes attributes;
+ XEvent ev;
+ register int delta_x, delta_y;
+ #ifdef INSTANT_MOVE_HACK
++ XSetWindowAttributes attributes;
+ Window hack;
+ #endif
+
+@@ -1288,7 +1282,6 @@
+ TwmWindow *tmp_win;
+ {
+ register int x, y;
+- int xr, yb;
+
+ if (!tmp_win->sticky) {
+ x=tmp_win->frame_x;
+@@ -1320,9 +1313,6 @@
+ PaintVirtualWindow(tmp_win)
+ TwmWindow *tmp_win;
+ {
+- int x, y;
+- int xr, yb;
+-
+ if (Scr->ShowVirtualNames) {
+ FBF(tmp_win->virtual.fore, tmp_win->virtual.back,
+ Scr->VirtualFont.font->fid);
diff --git a/wm/tvtwm/pkg/COMMENT b/wm/tvtwm/pkg/COMMENT
new file mode 100644
index 00000000000..efdcedb0ff8
--- /dev/null
+++ b/wm/tvtwm/pkg/COMMENT
@@ -0,0 +1 @@
+Classic twm with virtual desktop support
diff --git a/wm/tvtwm/pkg/DESCR b/wm/tvtwm/pkg/DESCR
new file mode 100644
index 00000000000..51ebcf3575a
--- /dev/null
+++ b/wm/tvtwm/pkg/DESCR
@@ -0,0 +1,24 @@
+ tvtwm is a superset of the X11R5 release of twm (Tom's Window Manager),
+written by Tom LaStrange. Much of the early functionality, which is
+described in more detail in README.old, was added by Tom LaStrange himself.
+Since then, tvtwm has fallen under my control, and I've added some things
+myself.
+
+ Why doesn't tvtwm have version numbers, and only has patchlevels? I
+don't know. History, I suppose. But, for information's sake, that is
+effectually the version number. In this case, pl11.
+
+ The major benefit of tvtwm over twm is the "Virtual Desktop". This
+allows you do define a substitute root window that is larger than your
+display area. This new virtual root window is the parent for all of your
+X clients. tvtwm provides a "Panner" which will let you see a scaled down
+representation of the whole virtual desktop. Using this panner, and keys
+bound to functions added to tvtwm, you can move around this desktop to
+have your physical display showing only part of the whole desktop. Thus,
+you can have sections of your desktop assigned to particular tasks, or
+just use it to keep from having 20 million layers of windows. :-)
+
+ Many other things are discussed in README.old. Please look there for
+further information. The more recent changes have been documented on an
+item-by-item basis, and these changes can be found, not surprisingly, in
+the CHANGES file.
diff --git a/wm/tvtwm/pkg/PLIST b/wm/tvtwm/pkg/PLIST
new file mode 100644
index 00000000000..a356dcfe4d2
--- /dev/null
+++ b/wm/tvtwm/pkg/PLIST
@@ -0,0 +1,5 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+bin/tvtwm
+bin/ssetroot
+lib/X11/twm/system.tvtwmrc
+man/cat1/tvtwm.0