967c844
--- 9wm-1.2.orig/menu.c
967c844
+++ 9wm-1.2/menu.c
967c844
@@ -1,6 +1,8 @@
967c844
 /* Copyright (c) 1994-1996 David Hogan, see README for licence details */
967c844
+#include <stdlib.h>
967c844
 #include <stdio.h>
967c844
 #include <signal.h>
967c844
+#include <unistd.h>
967c844
 #include <X11/X.h>
967c844
 #include <X11/Xlib.h>
967c844
 #include <X11/Xutil.h>
967c844
@@ -191,7 +193,7 @@
967c844
 	}
967c844
 	XUnmapWindow(dpy, c->parent);
967c844
 	XUnmapWindow(dpy, c->window);
967c844
-	setstate(c, IconicState);
967c844
+	setwinstate(c, IconicState);
967c844
 	if (c == current)
967c844
 		nofocus();
967c844
 	hiddenc[numhidden] = c;
967c844
@@ -222,7 +224,7 @@
967c844
 	if (map) {
967c844
 		XMapWindow(dpy, c->window);
967c844
 		XMapRaised(dpy, c->parent);
967c844
-		setstate(c, NormalState);
967c844
+		setwinstate(c, NormalState);
967c844
 		active(c);
967c844
 		top(c);
967c844
 	}
967c844
--- 9wm-1.2.orig/manage.c
967c844
+++ 9wm-1.2/manage.c
967c844
@@ -50,7 +50,7 @@
967c844
 
967c844
 	/* Figure out what to do with the window from hints */
967c844
 
967c844
-	if (!getstate(c->window, &state))
967c844
+	if (!getwinstate(c->window, &state))
967c844
 		state = hints ? hints->initial_state : NormalState;
967c844
 	dohide = (state == IconicState);
967c844
 
967c844
@@ -135,7 +135,7 @@
967c844
 			active(c);
967c844
 		else
967c844
 			setactive(c, 0);
967c844
-		setstate(c, NormalState);
967c844
+		setwinstate(c, NormalState);
967c844
 	}
967c844
 	if (current && (current != c))
967c844
 		cmapfocus(current);
967c844
@@ -195,7 +195,7 @@
967c844
 	XReparentWindow(dpy, c->window, c->screen->root, c->x, c->y);
967c844
 	gravitate(c, 0);
967c844
 	XRemoveFromSaveSet(dpy, c->window);
967c844
-	setstate(c, WithdrawnState);
967c844
+	setwinstate(c, WithdrawnState);
967c844
 
967c844
 	/* flush any errors */
967c844
 	ignore_badwindow = 1;
967c844
@@ -452,7 +452,7 @@
967c844
 }
967c844
 
967c844
 void
967c844
-setstate(c, state)
967c844
+setwinstate(c, state)
967c844
 Client *c;
967c844
 int state;
967c844
 {
967c844
@@ -467,7 +467,7 @@
967c844
 }
967c844
 
967c844
 int
967c844
-getstate(w, state)
967c844
+getwinstate(w, state)
967c844
 Window w;
967c844
 int *state;
967c844
 {
967c844
--- 9wm-1.2.orig/client.c
967c844
+++ 9wm-1.2/client.c
967c844
@@ -1,5 +1,7 @@
967c844
 /* Copyright (c) 1994-1996 David Hogan, see README for licence details */
967c844
+#include <stdlib.h>
967c844
 #include <stdio.h>
967c844
+#include <string.h>
967c844
 #include <X11/X.h>
967c844
 #include <X11/Xlib.h>
967c844
 #include <X11/Xutil.h>
967c844
--- 9wm-1.2.orig/main.c
967c844
+++ 9wm-1.2/main.c
967c844
@@ -1,4 +1,5 @@
967c844
 /* Copyright (c) 1994-1996 David Hogan, see README for licence details */
967c844
+#include <stdlib.h>
967c844
 #include <stdio.h>
967c844
 #include <signal.h>
967c844
 #include <errno.h>
967c844
--- 9wm-1.2.orig/event.c
967c844
+++ 9wm-1.2/event.c
967c844
@@ -1,4 +1,5 @@
967c844
 /* Copyright (c) 1994-1996 David Hogan, see README for licence details */
967c844
+#include <stdlib.h>
967c844
 #include <stdio.h>
967c844
 #include <X11/X.h>
967c844
 #include <X11/Xos.h>
967c844
@@ -200,7 +201,7 @@
967c844
 		XMapWindow(dpy, c->window);
967c844
 		XMapRaised(dpy, c->parent);
967c844
 		top(c);
967c844
-		setstate(c, NormalState);
967c844
+		setwinstate(c, NormalState);
967c844
 		if (c->trans != None && current && c->trans == current->window)
967c844
 				active(c);
967c844
 		break;
967c844
--- 9wm-1.2.orig/error.c
967c844
+++ 9wm-1.2/error.c
967c844
@@ -1,4 +1,5 @@
967c844
 /* Copyright (c) 1994-1996 David Hogan, see README for licence details */
967c844
+#include <stdlib.h>
967c844
 #include <stdio.h>
967c844
 #include <X11/X.h>
967c844
 #include <X11/Xlib.h>
967c844
--- 9wm-1.2.orig/fns.h
967c844
+++ 9wm-1.2/fns.h
967c844
@@ -46,8 +46,8 @@
967c844
 char	*getprop();
967c844
 Window	getwprop();
967c844
 int 	getiprop();
967c844
-int 	getstate();
967c844
-void	setstate();
967c844
+int 	getwinstate();
967c844
+void	setwinstate();
967c844
 void	setlabel();
967c844
 void	getproto();
967c844
 void	gettrans();