changeset 72:78697280afa1 default tip

mostly stdbool changes
author ng0@n0.is
date Fri, 20 Dec 2019 10:13:54 +0000
parents 3f614e7be76f
children
files .dir-locals.el Beep.c CircleDown.c CircleUp.c Error.c Focus.c GetButton.c Iconify.c Icons.c Kill.c Lower.c Makefile Menu.c Move.c MoveOpaque.c NewIconify.c Pause.c Push.c Raise.c Refresh.c Resize.c Restart.c RubberBand.c colormap.c configure globals.c uwm.c uwm.h windowinfo.c
diffstat 29 files changed, 285 insertions(+), 242 deletions(-) [+]
line wrap: on
line diff
--- a/.dir-locals.el	Fri Oct 11 16:08:06 2019 +0000
+++ b/.dir-locals.el	Fri Dec 20 10:13:54 2019 +0000
@@ -3,8 +3,7 @@
          (fill-column . 80)))
  ;; Warn about spaces used for indentation:
  (haskell-mode . ((eval . (highlight-regexp "^ *"))))
- (c-mode . ((c-file-style . "BSD")
-	    (eval add-hook 'before-save-hook #'clang-format-buffer nil t)))
+ (c-mode . ((c-file-style . "BSD")))
  (java-mode . ((c-file-style . "BSD")))
  ("src/imported"
   . ((nil . ((change-log-default-name . "ChangeLog.local"))))))
--- a/Beep.c	Fri Oct 11 16:08:06 2019 +0000
+++ b/Beep.c	Fri Dec 20 10:13:54 2019 +0000
@@ -19,8 +19,6 @@
  *
  */
 
-#include <stdbool.h>
-
 /*
  * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
  *
@@ -67,5 +65,5 @@
 Beep (Window window, int mask, int button, int x, int y)
 {
         XBell (dpy, VOLUME_PERCENTAGE (Volume));
-        return (FALSE);
+        return (false);
 }
--- a/CircleDown.c	Fri Oct 11 16:08:06 2019 +0000
+++ b/CircleDown.c	Fri Dec 20 10:13:54 2019 +0000
@@ -56,7 +56,6 @@
 #endif
 
 #include "uwm.h"
-#include <stdbool.h>
 
 /*
  * Window window: Event window.
@@ -68,5 +67,5 @@
 CircleDown (Window window, int mask, int button, int x, int y)
 {
         XCirculateSubwindowsDown (dpy, RootWindow (dpy, scr));
-        return (FALSE);
+        return (false);
 }
--- a/CircleUp.c	Fri Oct 11 16:08:06 2019 +0000
+++ b/CircleUp.c	Fri Dec 20 10:13:54 2019 +0000
@@ -56,7 +56,6 @@
 #endif
 
 #include "uwm.h"
-#include <stdbool.h>
 
 /*
  * Window window: Event window.
@@ -68,5 +67,5 @@
 CircleUp (Window window, int mask, int button, int x, int y)
 {
         XCirculateSubwindowsUp (dpy, RootWindow (dpy, scr));
-        return (FALSE);
+        return (false);
 }
--- a/Error.c	Fri Oct 11 16:08:06 2019 +0000
+++ b/Error.c	Fri Dec 20 10:13:54 2019 +0000
@@ -62,6 +62,7 @@
  *
  * char *s: Error description string
  */
+int
 Error (char *s)
 {
         fprintf (stderr, "uwm: %s\n", s);
@@ -71,4 +72,8 @@
 /*
  * char *s: Error description string
  */
-Warning (char *s) { fprintf (stderr, "uwm: warning: %s\n", s); }
+void
+Warning (char *s)
+{
+        fprintf (stderr, "uwm: warning: %s\n", s);
+}
--- a/Focus.c	Fri Oct 11 16:08:06 2019 +0000
+++ b/Focus.c	Fri Dec 20 10:13:54 2019 +0000
@@ -56,7 +56,6 @@
 #endif
 
 #include "uwm.h"
-#include <stdbool.h>
 
 /*
  * Window window: Event window.
@@ -68,6 +67,6 @@
 Focus (Window window, int mask, int button, int x, int y)
 {
         XSetInputFocus (dpy, window, RevertToParent, CurrentTime);
-        FocusSetByUser = TRUE;
-        return (FALSE);
+        FocusSetByUser = true;
+        return (false);
 }
--- a/GetButton.c	Fri Oct 11 16:08:06 2019 +0000
+++ b/GetButton.c	Fri Dec 20 10:13:54 2019 +0000
@@ -20,7 +20,6 @@
  */
 
 #include <stdlib.h>
-#include <stdbool.h>
 
 /*
  * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
@@ -76,6 +75,18 @@
 
 #define ICONSTR (icon_str ? icon_str : "")
 
+static void
+CheckMap (Window window);
+
+/*
+ * declared in windowinfo.c as
+ * int processInterestEvent (XAnyEvent *ev).
+ */
+
+int
+processInterestEvent (XAnyEvent *ev);
+
+
 /*
  * XEvent *button_event: Button event packet.
  */
@@ -106,7 +117,7 @@
          */
         XNextEvent (dpy, button_event);
 
-        processInterestEvent (button_event);
+        processInterestEvent ((XAnyEvent *) button_event);
 
         /*
          * The event occured on the root window, check for substructure
@@ -131,30 +142,30 @@
                 case EnterNotify:
                 case LeaveNotify:
                 case CirculateNotify:
-                        return (FALSE);
+                        return (false);
 
                 case MappingNotify:
-                        XRefreshKeyboardMapping (button_event);
-                        return (FALSE);
+                        XRefreshKeyboardMapping ((XMappingEvent *) button_event);
+                        return (false);
 
                 case MapRequest:
                         CheckMap (((XMapEvent *) button_event)->window);
-                        return (FALSE);
+                        return (false);
 
                 case ConfigureRequest:
-                        Configure ((XConfigureEvent *) button_event);
-                        return (FALSE);
+                        Configure ((XConfigureRequestEvent *) button_event);
+                        return (false);
 
                 case CirculateRequest:
                         Circulate ((XCirculateEvent *) button_event);
-                        return (FALSE);
+                        return (false);
 
                 case DestroyNotify:
                         deleteWindowInfo (
                           ((XDestroyWindowEvent *) button_event)->window);
                         RemoveIcon (
                           ((XDestroyWindowEvent *) button_event)->window);
-                        return (FALSE);
+                        return (false);
 
                 case FocusIn:
                         if (((XFocusInEvent *) button_event)->detail ==
@@ -166,10 +177,10 @@
                                                         PointerRoot,
                                                         None,
                                                         CurrentTime);
-                                        FocusSetByUser = FALSE;
+                                        FocusSetByUser = false;
                                 }
                         }
-                        return (FALSE);
+                        return (false);
 
                 case FocusOut:
                         if (((XFocusOutEvent *) button_event)->detail ==
@@ -183,16 +194,16 @@
                                                         CurrentTime);
                                 }
                         }
-                        return (FALSE);
+                        return (false);
 
                 case ButtonPress:
                 case ButtonRelease:
-                        return (TRUE);
+                        return (true);
 
                 default:
                         printf (
                           "uwm internal error: unexpected event on Root Window\n");
-                        return (FALSE);
+                        return (false);
                 }
         }
 
@@ -200,7 +211,8 @@
          * If the event type is EnterWindow, LeaveWindow, or MouseMoved,
          * we are processing a menu.
          * If the event type is ButtonPress or ButtonRelease,
-         * we have a button event.      */
+         * we have a button event.
+         */
         switch (button_event->type)
         {
         case EnterNotify:
@@ -208,9 +220,9 @@
         case MotionNotify:
         case ButtonPress:
         case ButtonRelease:
-                return (TRUE);
+                return (true);
         case 0:
-                return (FALSE);
+                return (false);
         default:
                 break;
         }
@@ -226,15 +238,15 @@
          */
         status = XGetWindowAttributes (dpy, icon, &icon_info);
         if (status == FAILURE)
-                return (FALSE);
+                return (false);
         /*
          * Get the name of the window associated with the icon and
          * determine its length.
          */
         icon_x = icon_info.x;
         icon_y = icon_info.y;
-        if (! IsIcon (icon, icon_x, icon_y, FALSE, &appl))
-                return (FALSE);
+        if (! IsIcon (icon, icon_x, icon_y, false, &appl))
+                return (false);
 
         /*
          * If the event is an UnmapWindow event or a ConfigureNotify event,
@@ -248,7 +260,7 @@
             button_event->type == CirculateNotify ||
             button_event->type == ColormapNotify ||
             button_event->type == ConfigureNotify)
-                return (FALSE);
+                return (false);
 
         /*
          * Initialize the icon name variables.
@@ -301,11 +313,11 @@
                          */
                         free (icon_str);
                 }
-                return (FALSE);
+                return (false);
         }
 
         if (button_event->type != KeyPress)
-                return (FALSE);
+                return (false);
 
         /*
          * If we have gotten this far event can only be a key pressed event.
@@ -328,7 +340,7 @@
         {
                 if (icon_str)
                         free (icon_str);
-                return (FALSE);
+                return (false);
         }
         for (i = 0; i < nbytes; i++)
         {
@@ -449,7 +461,7 @@
          */
         if (icon_str)
                 free (icon_str);
-        return (FALSE);
+        return (false);
 }
 
 void
@@ -614,7 +626,7 @@
                 DrawBox ();
                 GetButton (&event);
                 DrawBox ();
-                return TRUE;
+                return true;
         }
-        return FALSE;
+        return false;
 }
--- a/Iconify.c	Fri Oct 11 16:08:06 2019 +0000
+++ b/Iconify.c	Fri Dec 20 10:13:54 2019 +0000
@@ -55,7 +55,6 @@
 #endif
 
 #include "uwm.h"
-#include <stdbool.h>
 
 /*
  * Window window: Event window.
@@ -85,7 +84,7 @@
          * Do not try to iconify the root window.
          */
         if (window == RootWindow (dpy, scr))
-                return (FALSE);
+                return (false);
 
         /*
          * Clear the vector buffer.
@@ -112,12 +111,12 @@
          */
         status = XGetWindowAttributes (dpy, window, &window_info);
         if (status == FAILURE)
-                return (FALSE);
+                return (false);
 
         /*
          * If the event window is an icon, de-iconify it and return.
          */
-        if (IsIcon (window, mse_x, mse_y, TRUE, &assoc))
+        if (IsIcon (window, mse_x, mse_y, true, &assoc))
         {
 
 
@@ -126,7 +125,7 @@
                  */
                 status = XGetWindowAttributes (dpy, assoc, &assoc_info);
                 if (status == FAILURE)
-                        return (FALSE);
+                        return (false);
 
                 /*
                  * Store the zap vector buffer.
@@ -176,7 +175,7 @@
                 {
                         status = XGetWindowAttributes (dpy, assoc, &assoc_info);
                         if (status == FAILURE)
-                                return (FALSE);
+                                return (false);
                         status = XWarpPointer (dpy,
                                                None,
                                                assoc,
@@ -191,7 +190,7 @@
                                                  ? 10
                                                  : assoc_info.height / 2);
                         if (status == FAILURE)
-                                return (FALSE);
+                                return (false);
                 }
         }
         else
@@ -202,7 +201,7 @@
                  */
                 status = XGetWindowAttributes (dpy, assoc, &assoc_info);
                 if (status == FAILURE)
-                        return (FALSE);
+                        return (false);
                 icon_x = assoc_info.x;
                 icon_y = assoc_info.y;
                 icon_w = assoc_info.width;
@@ -255,7 +254,7 @@
                 {
                         status = XGetWindowAttributes (dpy, assoc, &assoc_info);
                         if (status == FAILURE)
-                                return (FALSE);
+                                return (false);
                         status = XWarpPointer (dpy,
                                                None,
                                                assoc,
@@ -266,8 +265,8 @@
                                                assoc_info.width / 2,
                                                assoc_info.height / 2);
                         if (status == FAILURE)
-                                return (FALSE);
+                                return (false);
                 }
         }
-        return (TRUE);
+        return (true);
 }
--- a/Icons.c	Fri Oct 11 16:08:06 2019 +0000
+++ b/Icons.c	Fri Dec 20 10:13:54 2019 +0000
@@ -16,7 +16,6 @@
  */
 
 #include <stdlib.h>
-#include <stdbool.h>
 #include <stdio.h>
 
 /*
@@ -103,7 +102,8 @@
                             &junk))
         {
                 Warning ("client passed invalid pixmap for icon.");
-                return (NULL);
+                // return (NULL);
+		return 0;
         }
 
         tile = XCreatePixmap (dpy,
@@ -145,7 +145,7 @@
 IsIcon (Window icon, int x, int y, int mousePositioned, Window *assoc)
 {
         WindowList ptr;
-        Window MakeIcon ();
+        //Window MakeIcon();
 
         for (ptr = Icons; ptr; ptr = ptr->next)
         {
@@ -153,21 +153,22 @@
                 {
                         if (assoc)
                                 *assoc = ptr->window;
-                        return (TRUE);
+                        return (true);
                 }
                 if (ptr->window == icon)
                 {
                         if (assoc)
                                 *assoc = ptr->icon;
-                        return (FALSE);
+                        return (false);
                 }
         }
         if (assoc)
                 *assoc = MakeIcon (icon, x, y, mousePositioned);
-        return (FALSE);
+        return (false);
 }
 
 
+void
 RemoveIcon (Window window)
 {
         WindowList ptr, ptr1;
@@ -198,6 +199,7 @@
         }
 }
 
+void
 GetDefaultSize (Window window, int *icon_w, int *icon_h)
 {
         char *name; /* Event window name. */
@@ -221,8 +223,7 @@
  * int x, y: Event mouse position.
  * bool mousePositioned
  */
-Window
-MakeIcon (Window window, int x, int y, bool mousePositioned)
+Window MakeIcon (Window window, int x, int y, bool mousePositioned)
 {
         Window icon; /* icon window. */
         int icon_x, icon_y; /* Icon U. L. X and Y coordinates. */
@@ -234,7 +235,7 @@
         XSetWindowAttributes iconValues; /* for icon window creation */
         XWMHints *wmhints; /* see if icon position provided */
         XWMHints *XGetWMHints ();
-        Window AddIcon ();
+        // Window AddIcon ();
 
         iconValues.background_pixmap = IBackground;
         mask = (KeyPressMask | ExposureMask | StructureNotifyMask);
@@ -249,7 +250,7 @@
                         free ((char *) wmhints);
                         return (AddIcon (window,
                                          iw,
-                                         FALSE,
+                                         false,
                                          (StructureNotifyMask),
                                          (Pixmap) NULL));
                 }
@@ -373,7 +374,7 @@
                 free ((char *) wmhints);
 
         return (
-          AddIcon (window, icon, TRUE, mask, iconValues.background_pixmap));
+          AddIcon (window, icon, true, mask, iconValues.background_pixmap));
 }
 
 /*
@@ -387,8 +388,10 @@
 {
         WindowList ptr;
 
-        if (icon == NULL)
-                return (NULL);
+	// historic? if(icon == NULL)
+	                //return (NULL);
+        if (icon == 0)
+		return 0;
         /*
          * Use the text cursor whenever the mouse is in the icon window.
          */
--- a/Kill.c	Fri Oct 11 16:08:06 2019 +0000
+++ b/Kill.c	Fri Dec 20 10:13:54 2019 +0000
@@ -16,7 +16,6 @@
  *
  */
 #include "uwm.h"
-#include <stdbool.h>
 
 /*
  * Window window: Event window.
@@ -29,9 +28,9 @@
 {
         Window assoc;
 
-        if (IsIcon (window, x, y, TRUE, &assoc))
+        if (IsIcon (window, x, y, true, &assoc))
                 XKillClient (dpy, assoc);
         else
                 XKillClient (dpy, window);
-        return FALSE;
+        return false;
 }
--- a/Lower.c	Fri Oct 11 16:08:06 2019 +0000
+++ b/Lower.c	Fri Dec 20 10:13:54 2019 +0000
@@ -55,7 +55,6 @@
 #endif
 
 #include "uwm.h"
-#include <stdbool.h>
 
 /*
  * Window window: Event window.
@@ -72,5 +71,5 @@
          */
         if (window != RootWindow (dpy, scr))
                 XLowerWindow (dpy, window);
-        return (FALSE);
+        return (false);
 }
--- a/Makefile	Fri Oct 11 16:08:06 2019 +0000
+++ b/Makefile	Fri Dec 20 10:13:54 2019 +0000
@@ -30,18 +30,20 @@
 # site:  $XConsortium: site.def,v 1.21 89/12/06 11:46:50 jim Exp $
 
 PROG=		uwm
-SRCS=		globals.c Beep.c Bindings.c CircleDown.c CircleUp.c\
-		Cursors.c Focus.c GetButton.c  GridBox.c Iconify.c\
-		Icons.c Kill.c Lower.c\
+#SRCS+=		gram.y lex.l
+SRCS+=		globals.c Beep.c Bindings.c CircleDown.c CircleUp.c\
+		Cursors.c Focus.c Error.c windowinfo.c \
+		Icons.c GetButton.c GridBox.c Iconify.c\
+		Kill.c Lower.c\
 		Menu.c Move.c MoveOpaque.c NewIconify.c Pause.c\
-		Push.c Error.c\
+		Push.c \
 		Raise.c Refresh.c Resize.c Restart.c RubberBand.c\
 		StoreBox.c \
-		StoreZap.c XError.c uwm.c colormap.c windowinfo.c
+		StoreZap.c XError.c uwm.c colormap.c
 CPPFLAGS+=	-I. -I${.CURDIR} -I/usr/X11R7/include
-YHEADER=
-LDADD+=		-lX11
-DPADD+=		${LIBL}
+LDADD+=		-lX11 -lext
+DPADD+=		${LIBL} ${LIBEXT} ${LIBX11}
+CLEANFILES+=	*~
 # OBJS=		gram.o lex.o globals.o Beep.o Bindings.o\
 # 		CircleDown.o CircleUp.o\
 # 		Cursors.o Focus.o GetButton.o GridBox.o Iconify.o\
--- a/Menu.c	Fri Oct 11 16:08:06 2019 +0000
+++ b/Menu.c	Fri Dec 20 10:13:54 2019 +0000
@@ -65,7 +65,6 @@
 #include "uwm.h"
 #include <stdlib.h>
 #include <sys/wait.h>
-#include <stdbool.h>
 
 bool alternateGC = True; /* true if only 2 colors are used */
 
@@ -118,11 +117,13 @@
 static void
 AdjustMaxColors (int pixel);
 
+// TODO: Can I drop this? It seems like a bad idea to do this in 2019.
 /*
  * the following procedure is a copy of the implementation of system,
  * modified to reset the handling of SIGINT, SIGQUIT, and SIGHUP before
  * exec-ing
  */
+int
 execute (char *s)
 {
         int status, pid, w;
@@ -190,7 +191,7 @@
         MenuLine *ml; /* Menu lines pointer. */
         char *hlname; /* Pointer to hi-liter name. */
         char *strbuf; /* String buffer for IsTextNL. */
-        bool checkMotion = TRUE; /* To Restore Cursor Position */
+        bool checkMotion = true; /* To Restore Cursor Position */
         int funcbutton; /* function button for window select */
 
         /*
@@ -226,7 +227,7 @@
         /*
          * Main loop.
          */
-        while (TRUE)
+        while (true)
         {
 
                 /*
@@ -258,7 +259,7 @@
                                 {
                                         ResetCursor (button);
                                         UnmapMenu (menu);
-                                        return (FALSE);
+                                        return (false);
                                 }
                         }
                         goto hilite;
@@ -270,11 +271,11 @@
                 case MotionNotify: {
                         event_x = ((XPointerMovedEvent *) &button_event)->x;
                         event_y = ((XPointerMovedEvent *) &button_event)->y;
-                        if ((checkMotion == TRUE) &&
+                        if ((checkMotion == true) &&
                             ((event_x != (menu->width >> 2) * 3) ||
                              (event_y != (menu->iheight >> 1))))
                                 checkMotion =
-                                  FALSE; /* Mouse Has Moved From Top Pane */
+                                  false; /* Mouse Has Moved From Top Pane */
                 hilite:
                         /*
                          * If the mouse has moved below or above the menu, but
@@ -360,7 +361,7 @@
                                 {
                                         /* If Needed Reset The Cursor Position
                                          */
-                                        if (checkMotion == TRUE)
+                                        if (checkMotion == true)
                                                 XWarpPointer (dpy,
                                                               None,
                                                               RootWindow (dpy,
@@ -373,7 +374,7 @@
                                                               y);
                                         ResetCursor (button);
                                         UnmapMenu (menu);
-                                        return (TRUE);
+                                        return (true);
                                 }
 
                                 /*
@@ -424,7 +425,7 @@
                                          * event to select the target window */
                                         if (XGrabPointer (dpy,
                                                           RootWindow (dpy, scr),
-                                                          TRUE,
+                                                          true,
                                                           EVENTMASK,
                                                           GrabModeAsync,
                                                           GrabModeAsync,
@@ -446,11 +447,11 @@
                                                                event_x,
                                                                event_y);
                                         else
-                                                func_stat = FALSE;
+                                                func_stat = false;
                                         if (! func_stat)
                                         {
                                                 /* eat the next ButtonRelease */
-                                                while (TRUE)
+                                                while (true)
                                                 {
                                                         if (GetButton (
                                                               &button_event) &&
@@ -472,7 +473,7 @@
                                         break;
 
                                 case IsMenuFunction:
-                                        while (TRUE)
+                                        while (true)
                                         {
                                                 if (! GetButton (&button_event))
                                                         continue;
@@ -487,7 +488,7 @@
                                                        ->button != button))
                                                 {
                                                         UnmapMenu (menu);
-                                                        return (TRUE);
+                                                        return (true);
                                                 }
                                                 break;
                                         }
@@ -504,7 +505,7 @@
                                 default:
                                         Error ("Menu -> Internal type error.");
                                 }
-                                return (TRUE);
+                                return (true);
                         }
                         /* else a different button was released. Fall through:
                          */
@@ -515,7 +516,7 @@
                          */
                         ResetCursor (button);
                         /* If Needed Reset The Cursor Position */
-                        if (checkMotion == TRUE)
+                        if (checkMotion == true)
                                 XWarpPointer (dpy,
                                               None,
                                               RootWindow (dpy, scr),
@@ -526,7 +527,7 @@
                                               x,
                                               y);
                         UnmapMenu (menu);
-                        return (TRUE);
+                        return (true);
                 }
                 }
         }
@@ -536,7 +537,8 @@
 /*
  * Create the menu windows for later use.
  */
-CreateMenus ()
+void
+CreateMenus (void)
 {
         MenuLink *ptr;
 
@@ -551,9 +553,13 @@
                 InitMenu (ptr->menu);
 }
 
+/* defined below first usage */
+void GetMenuColors (MenuInfo *menu);
+
 /*
  * Initialize a menu.
  */
+void
 InitMenu (MenuInfo *menu)
 {
         MenuLine *ml; /* Menu lines pointer. */
@@ -650,6 +656,7 @@
 /*
  * Map a menu.
  */
+void
 MapMenu (MenuInfo *menu, int x, int y)
 {
         int item;
@@ -745,6 +752,7 @@
  * Unmap a menu, restoring the contents of the screen underneath
  * if necessary. (Restore portion is a future.)
  */
+void
 UnmapMenu (MenuInfo *menu)
 {
         /*
@@ -763,7 +771,7 @@
 {
         XEvent button_event; /* Button input event. */
 
-        while (TRUE)
+        while (true)
         {
 
                 /*
@@ -814,6 +822,7 @@
  * more colors, even though the colors may have already been allocated.  It
  * probably ought to be done right someday.
  */
+void
 GetMenuColors (MenuInfo *menu)
 {
         register MenuLine *ml; /* Menu lines pointer. */
@@ -854,7 +863,7 @@
                         AdjustMaxColors (menu->fg.pixel);
                         AdjustMaxColors (menu->bg.pixel);
                         alternateGC =
-                          False; /* since we just allocated colors */
+                          false; /* since we just allocated colors */
                 }
 
                 /*
--- a/Move.c	Fri Oct 11 16:08:06 2019 +0000
+++ b/Move.c	Fri Dec 20 10:13:54 2019 +0000
@@ -55,7 +55,6 @@
 #endif
 
 #include "uwm.h"
-#include <stdbool.h>
 
 /*
  * Window window: Event window.
--- a/MoveOpaque.c	Fri Oct 11 16:08:06 2019 +0000
+++ b/MoveOpaque.c	Fri Dec 20 10:13:54 2019 +0000
@@ -57,7 +57,6 @@
 
 #include "uwm.h"
 #include <X11/Xatom.h>
-#include <stdbool.h>
 
 /*
  * Window window: Event window.
@@ -83,7 +82,7 @@
          * Do not try to move the root window.
          */
         if (window == RootWindow (dpy, scr))
-                return (FALSE);
+                return (false);
 
         /*
          * Change the cursor.
@@ -98,7 +97,7 @@
          */
         status = XGetWindowAttributes (dpy, window, &window_info);
         if (status == FAILURE)
-                return (FALSE);
+                return (false);
 
         /*
          * Initialize movement variables.
@@ -155,7 +154,7 @@
                                 XMoveWindow (dpy, window, win_x, win_y);
                         }
 
-                        return (TRUE);
+                        return (true);
                 }
 
                 /*
--- a/NewIconify.c	Fri Oct 11 16:08:06 2019 +0000
+++ b/NewIconify.c	Fri Dec 20 10:13:54 2019 +0000
@@ -50,7 +50,6 @@
 #endif
 
 #include "uwm.h"
-#include <stdbool.h>
 
 bool NewIconify (window, mask, button, x, y) Window window; /* Event window. */
 int mask; /* Button/key mask. */
@@ -89,7 +88,7 @@
          * Do not lower or iconify the root window.
          */
         if (window == RootWindow (dpy, scr))
-                return (FALSE);
+                return (false);
 
         /*
          * Change the cursor to the icon cursor.
@@ -111,12 +110,12 @@
          */
         status = XGetWindowAttributes (dpy, window, &window_info);
         if (status == FAILURE)
-                return (FALSE);
+                return (false);
 
         /*
          * Are we iconifying or de-iconifying?
          */
-        if (! IsIcon (window, x, y, FALSE, &icon))
+        if (! IsIcon (window, x, y, false, &icon))
         {
 
                 /*
@@ -126,7 +125,7 @@
                  * If an icon window doesn't exist for the event window, then
                  * make one.
                  */
-                iconifying = TRUE;
+                iconifying = true;
         }
         else
         {
@@ -139,14 +138,14 @@
                  * We call the normal window the "icon" window only to simplify
                  * the code later on in the function.
                  */
-                iconifying = FALSE;
+                iconifying = false;
         }
         /*
          * Get info on the icon window.
          */
         status = XGetWindowAttributes (dpy, icon, &icon_info);
         if (status == FAILURE)
-                return (FALSE);
+                return (false);
 
         /*
          * Determine the height, width, and borderwidth of the icon.
@@ -207,7 +206,7 @@
          * We spin our wheels here looking for mouse movement or a change
          * in the status of the buttons.
          */
-        while (TRUE)
+        while (true)
         {
 
                 /*
@@ -333,7 +332,7 @@
             (((XButtonReleasedEvent *) &button_event)->button != button))
         {
                 ResetCursor (button);
-                return (TRUE);
+                return (true);
         }
 
         /*
@@ -397,5 +396,5 @@
         if (iconifying)
                 XAddToSaveSet (dpy, window);
         XUnmapWindow (dpy, window);
-        return (TRUE);
+        return (true);
 }
--- a/Pause.c	Fri Oct 11 16:08:06 2019 +0000
+++ b/Pause.c	Fri Dec 20 10:13:54 2019 +0000
@@ -56,7 +56,6 @@
 #endif
 
 #include "uwm.h"
-#include <stdbool.h>
 
 /*
  * Window window: Event window.
@@ -68,7 +67,7 @@
 Pause (Window window, int mask, int button, int x, int y)
 {
         XGrabServer (dpy);
-        return (FALSE);
+        return (false);
 }
 
 /*
@@ -81,5 +80,5 @@
 Continue (Window window, int mask, int button, int x, int y)
 {
         XUngrabServer (dpy);
-        return (FALSE);
+        return (false);
 }
--- a/Push.c	Fri Oct 11 16:08:06 2019 +0000
+++ b/Push.c	Fri Dec 20 10:13:54 2019 +0000
@@ -56,7 +56,6 @@
 #endif
 
 #include "uwm.h"
-#include <stdbool.h>
 
 #define PUSH_DOWN 1
 #define PUSH_UP 2
@@ -110,14 +109,14 @@
          * Do not try to move the root window.
          */
         if (w == RootWindow (dpy, scr))
-                return (FALSE);
+                return (false);
 
         /*
          * Gather info on the event window.
          */
         status = XGetWindowAttributes (dpy, w, &winfo);
         if (status == FAILURE)
-                return (FALSE);
+                return (false);
 
         /*
          * Calculate the movement offsets.
@@ -167,5 +166,5 @@
          */
         XMoveWindow (dpy, w, x, y);
 
-        return (FALSE);
+        return (false);
 }
--- a/Raise.c	Fri Oct 11 16:08:06 2019 +0000
+++ b/Raise.c	Fri Dec 20 10:13:54 2019 +0000
@@ -55,7 +55,6 @@
 #endif
 
 #include "uwm.h"
-#include <stdbool.h>
 
 /*
  * Window window: Event window.
@@ -83,7 +82,7 @@
                 {
                         status = XGetWindowAttributes (dpy, window, &winfo);
                         if (status == FAILURE)
-                                return (FALSE);
+                                return (false);
 
                         status =
                           XWarpPointer (dpy,
@@ -98,8 +97,8 @@
                                         winfo.height >= 10 ? 10
                                                            : winfo.height / 2);
                         if (status == FAILURE)
-                                return (FALSE);
+                                return (false);
                 }
         }
-        return (FALSE);
+        return (false);
 }
--- a/Refresh.c	Fri Oct 11 16:08:06 2019 +0000
+++ b/Refresh.c	Fri Dec 20 10:13:54 2019 +0000
@@ -56,7 +56,6 @@
 #endif
 
 #include "uwm.h"
-#include <stdbool.h>
 
 bool Refresh (window, mask, button, x, y) Window window; /* Event window. */
 int mask; /* Button/key mask. */
@@ -100,5 +99,5 @@
         XDestroyWindow (dpy, w);
         XFlush (dpy);
 
-        return (FALSE);
+        return (false);
 }
--- a/Resize.c	Fri Oct 11 16:08:06 2019 +0000
+++ b/Resize.c	Fri Dec 20 10:13:54 2019 +0000
@@ -58,7 +58,6 @@
 #include "uwm.h"
 #include <X11/Xatom.h>
 #include <stdlib.h>
-#include <stdbool.h>
 
 #define max(a, b) ((a) > (b) ? (a) : (b))
 #define min(a, b) ((a) > (b) ? (b) : (a))
@@ -105,20 +104,20 @@
          * Do nothing if the event window is the root window.
          */
         if (window == RootWindow (dpy, scr))
-                return (FALSE);
+                return (false);
 
         /*
          * Gather info about the event window.
          */
         status = XGetWindowAttributes (dpy, window, &window_info);
         if (status == FAILURE)
-                return (FALSE);
+                return (false);
 
         /*
          * Do not resize an icon window (NULL for assoc means don't create too).
          */
-        if (IsIcon (window, 0, 0, FALSE, NULL))
-                return (FALSE);
+        if (IsIcon (window, 0, 0, false, NULL))
+                return (false);
 
         /*
          * (x0,y0) are in root window coordinates and correspond to where the
@@ -379,7 +378,7 @@
         DrawBox ();
         Frozen = window;
 
-        stop = FALSE;
+        stop = false;
         x = -1;
         y = -1;
 
@@ -539,13 +538,13 @@
                                 y2 =
                                   ((XButtonReleasedEvent *) &button_event)->y +
                                   y_offset;
-                                stop = TRUE;
+                                stop = true;
                         }
                         else
                         {
                                 XUnmapWindow (dpy, Pop);
                                 ResetCursor (button);
-                                return (TRUE);
+                                return (true);
                         }
                 }
                 else
@@ -649,10 +648,11 @@
                 XMoveResizeWindow (dpy, window, x1, y1, Rhsize, Rvsize);
         }
         XUnmapWindow (dpy, Pop);
-        return (TRUE);
+        return (true);
 }
 
-CheckConsistency (hints) XSizeHints *hints;
+void
+CheckConsistency (XSizeHints *hints);
 {
         if (hints->min_height < 0)
                 hints->min_height = 0;
--- a/Restart.c	Fri Oct 11 16:08:06 2019 +0000
+++ b/Restart.c	Fri Dec 20 10:13:54 2019 +0000
@@ -51,7 +51,6 @@
 
 #include <stdlib.h>
 #include "uwm.h"
-#include <stdbool.h>
 
 /*
  * Window window: Event window.
--- a/RubberBand.c	Fri Oct 11 16:08:06 2019 +0000
+++ b/RubberBand.c	Fri Dec 20 10:13:54 2019 +0000
@@ -50,7 +50,6 @@
  */
 
 #include "uwm.h"
-#include <stdbool.h>
 #include <X11/cursorfont.h>
 
 #define max(a, b) ((a) > (b) ? (a) : (b))
@@ -79,7 +78,7 @@
         /* XFontStruct *pfont; */
 #define pfont PFontInfo /* text font for pop-up */
         Cursor ur, ul, ll, lr; /* cursors for rubber banding    */
-        int change_cursor = FALSE;
+        int change_cursor = false;
         int current_cursor;
         char *text; /* text for prompt string       */
         int nz; /* count where zeros are        */
@@ -168,7 +167,7 @@
                 int res;
                 if ((res = XGrabPointer (dpy,
                                          RootWindow (dpy, scr),
-                                         FALSE,
+                                         false,
                                          events,
                                          GrabModeAsync,
                                          GrabModeAsync,
@@ -211,7 +210,7 @@
                                    BW,
                                    pbord,
                                    pback);
-        attr.save_under = True;
+        attr.save_under = true;
         attr.event_mask = (VisibilityChangeMask | ExposureMask);
         XChangeWindowAttributes (dpy, pop, (CWSaveUnder | CWEventMask), &attr);
         XMapWindow (dpy, pop);
@@ -315,10 +314,10 @@
         vsize = defheight; /* already includes border_width */
         x2 = x1 + hsize;
         y2 = y1 + vsize;
-        stop = FALSE;
-        changed = TRUE;
+        stop = false;
+        changed = true;
 
-        while (stop == FALSE)
+        while (stop == false)
         {
                 if ((xb != max (x1, x2)) || (yb != max (y1, y2)) ||
                     (xa != min (x1, x2)) || (ya != min (y1, y2)))
@@ -352,7 +351,7 @@
                                         XRaiseWindow (dpy, pop);
                                 continue; /* go to top of while loop */
                         case Expose:
-                                changed = TRUE;
+                                changed = true;
                                 break; /* but go to next if statement */
                         default:
                                 break; /* ignore it */
@@ -370,7 +369,7 @@
                          * len
                          */
 
-                        changed = FALSE;
+                        changed = false;
                         n = digits = 0;
                         if (Hsize > 999)
                         {
@@ -459,14 +458,14 @@
                                 y1 = y2 = ((XButtonEvent *) &e)->y;
                                 chosen = ((XButtonEvent *) &e)->button;
                                 if (chosen == Button2)
-                                        change_cursor = TRUE;
+                                        change_cursor = true;
                         }
                         else if ((e.type == ButtonRelease) &&
                                  ((((XButtonEvent *) &e)->button) == chosen))
                         {
                                 x2 = ((XButtonEvent *) &e)->x;
                                 y2 = ((XButtonEvent *) &e)->y;
-                                stop = TRUE;
+                                stop = true;
                         }
                         else
                                 XQueryPointer (dpy,
@@ -603,12 +602,12 @@
                 if (dx != hsize)
                 {
                         hsize = dx;
-                        changed = TRUE;
+                        changed = true;
                 }
                 if (dy != vsize)
                 {
                         vsize = dy;
-                        changed = TRUE;
+                        changed = true;
                 }
                 if (x2 < x1)
                         x2 = x1 - dx;
@@ -635,5 +634,5 @@
         *y = min (y1, y2);
         *width = hsize - two_borders;
         *height = vsize - two_borders;
-        XSync (dpy, False);
+        XSync (dpy, false);
 }
--- a/colormap.c	Fri Oct 11 16:08:06 2019 +0000
+++ b/colormap.c	Fri Dec 20 10:13:54 2019 +0000
@@ -17,7 +17,6 @@
  */
 
 #include <stdlib.h>
-#include <stdbool.h>
 #include "uwm.h"
 
 static void
@@ -56,22 +55,21 @@
         for (i = 0; i < ncolormaps; i++)
                 noteInstalledColormap (colormaps[i]);
         expressWindowInterest (initColormapTrack, colormapTrack);
-        focusPointerRoot = TRUE;
+        focusPointerRoot = true;
 }
 
-initColormapTrack (wi, wa) WindowInfo *wi;
-XWindowAttributes *wa;
+initColormapTrack (WindowInfo *wi, XWindowAttributes *wa)
 {
         if (wa)
         {
                 wi->colormap = wa->colormap;
                 wi->event_mask |= EnterWindowMask | LeaveWindowMask |
                                   ColormapChangeMask | FocusChangeMask;
-                wi->in_window = FALSE;
+                wi->in_window = false;
                 noteWindowAttached (wi->window, wi->colormap);
                 if (getMouse () == wi->window)
                 {
-                        wi->in_window = TRUE;
+                        wi->in_window = true;
                         installColormap (wi->colormap);
                 }
         }
@@ -85,8 +83,7 @@
         }
 }
 
-colormapTrack (wi, ev) WindowInfo *wi;
-XAnyEvent *ev;
+colormapTrack (WindowInfo *wi, XAnyEvent *ev)
 {
         XColormapEvent *cev;
         XCrossingEvent *eev;
@@ -140,15 +137,15 @@
                 case NotifyPointer:
                 focusIn:
                         if (fev->window == RootWindow (dpy, scr))
-                                focusPointerRoot = TRUE;
+                                focusPointerRoot = true;
 #ifdef DEBUG
                         printf ("FocusIn ");
 #endif /* DEBUG */
-                        wi->in_window = TRUE;
+                        wi->in_window = true;
                         installColormap (wi->colormap);
                         break;
                 case NotifyPointerRoot:
-                        focusPointerRoot = TRUE;
+                        focusPointerRoot = true;
                         break;
                 case NotifyDetailNone:
                         XSetInputFocus (dpy,
@@ -171,15 +168,15 @@
                 case NotifyAncestor:
                 case NotifyPointer:
                         if (fev->window == RootWindow (dpy, scr))
-                                focusPointerRoot = FALSE;
+                                focusPointerRoot = false;
 #ifdef DEBUG
                         printf ("FocusOut %x %d ", fev->window, fev->detail);
 #endif /* DEBUG */
-                        wi->in_window = FALSE;
+                        wi->in_window = false;
                         uninstallColormap (wi->colormap);
                         break;
                 case NotifyPointerRoot:
-                        focusPointerRoot = FALSE;
+                        focusPointerRoot = false;
                         break;
                 case NotifyDetailNone:
                         break;
@@ -205,7 +202,7 @@
                         case NotifyAncestor:
                         case NotifyNonlinear:
                         enter:
-                                wi->in_window = TRUE;
+                                wi->in_window = true;
 #ifdef DEBUG
                                 printf ("EnterNotify %6x %2d ",
                                         eev->window,
@@ -253,7 +250,7 @@
 
 static struct colormapInfo *colormaps;
 
-static struct colormapInfo *lookupColormap (colormap) Colormap colormap;
+static struct colormapInfo *lookupColormap (Colormap colormap)
 {
         struct colormapInfo *ci;
 
@@ -261,8 +258,8 @@
                 if (ci->colormap == colormap)
                         return ci;
         ci = (struct colormapInfo *) malloc (sizeof (*ci));
-        ci->actual = FALSE;
-        ci->desired = FALSE;
+        ci->actual = false;
+        ci->desired = false;
         ci->window_count = 0;
         ci->next = colormaps;
         ci->colormap = colormap;
@@ -270,7 +267,7 @@
         return ci;
 }
 
-deleteColormap (colormap) Colormap colormap;
+deleteColormap (Colormap colormap)
 {
         struct colormapInfo *ci, *prev;
 
@@ -290,8 +287,7 @@
         }
 }
 
-noteWindowAttached (window, colormap) Window window;
-Colormap colormap;
+noteWindowAttached (Window window, Colormap colormap)
 {
         struct colormapInfo *ci;
 
@@ -299,8 +295,7 @@
         ci->window_count++;
 }
 
-noteWindowUnattached (window, colormap) Window window;
-Colormap colormap;
+noteWindowUnattached (Window window, Colormap colormap)
 {
         struct colormapInfo *ci;
 
@@ -309,7 +304,7 @@
                 deleteColormap (colormap);
 }
 
-noteInstalledColormap (colormap) Colormap colormap;
+noteInstalledColormap (Colormap colormap)
 {
         struct colormapInfo *ci;
 
@@ -322,7 +317,7 @@
                         ci->actual ? "installed" : "uninstalled",
                         ci->desired ? "desired" : "not desired");
 #endif /* DEBUG */
-        ci->actual = TRUE;
+        ci->actual = true;
         /* any random colormaps don't get installed  */
         if (ci->window_count == 0)
         {
@@ -332,7 +327,7 @@
         }
 }
 
-noteUninstalledColormap (colormap) Colormap colormap;
+noteUninstalledColormap (Colormap colormap)
 {
         struct colormapInfo *ci;
 
@@ -345,7 +340,7 @@
                         ci->actual ? "installed" : "uninstalled",
                         ci->desired ? "desired" : "not desired");
 #endif /* DEBUG */
-        ci->actual = FALSE;
+        ci->actual = false;
         if (ci->desired)
                 XInstallColormap (dpy, colormap);
 }
@@ -375,12 +370,12 @@
 #endif /* DEBUG */
         if (ci->desired)
                 return;
-        ci->desired = TRUE;
+        ci->desired = true;
         if (! ci->actual)
                 XInstallColormap (dpy, colormap);
 }
 
-uninstallColormap (colormap) Colormap colormap;
+uninstallColormap (Colormap colormap)
 {
         struct colormapInfo *ci;
 
@@ -393,5 +388,5 @@
                         ci->actual ? "installed" : "uninstalled",
                         ci->desired ? "desired" : "not desired");
 #endif /* DEBUG */
-        ci->desired = FALSE;
+        ci->desired = false;
 }
--- a/configure	Fri Oct 11 16:08:06 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-#!/bin/sh
-echo skip me.
\ No newline at end of file
--- a/globals.c	Fri Oct 11 16:08:06 2019 +0000
+++ b/globals.c	Fri Dec 20 10:13:54 2019 +0000
@@ -60,7 +60,6 @@
  */
 
 #include "uwm.h"
-#include <stdbool.h>
 #include <stdint.h>
 
 Window Pop; /* Pop up dimension display window. */
@@ -136,7 +135,7 @@
 int PTextSize = PTEXT_LENGTH; /* Pop-up window dummy text size. */
 
 int Lineno = 1; /* Line count for parser. */
-bool Startup_File_Error = FALSE; /* Startup file error flag. */
+bool Startup_File_Error = false; /* Startup file error flag. */
 char Startup_File[NAME_LEN] = ""; /* Startup file name. */
 char IFontName[NAME_LEN]; /* Icon font name. */
 char PFontName[NAME_LEN]; /* Pop-up font name. */
@@ -280,5 +279,5 @@
                                {"u", ButtonUp},
                                {NULL, (uintptr_t) NULL}};
 
-bool x_error_occurred = FALSE;
+bool x_error_occurred = false;
 XErrorEvent last_error_event;
--- a/uwm.c	Fri Oct 11 16:08:06 2019 +0000
+++ b/uwm.c	Fri Dec 20 10:13:54 2019 +0000
@@ -77,7 +77,6 @@
 LoadXDefaults (void);
 
 #include <stdlib.h>
-#include <stdbool.h>
 #include <X11/Xproto.h>
 
 #ifdef PROFIL
@@ -117,7 +116,7 @@
                            0x55, 0x55, 0xaa, 0xaa, 0x55, 0x55, 0xaa, 0xaa};
 
 
-bool NeedRootInput = FALSE;
+bool NeedRootInput = false;
 bool
 ChkMline ();
 char *sfilename;
@@ -141,7 +140,7 @@
         int ptrmask; /* for QueryPointer */
         bool func_stat; /* If true, function swallowed a ButtonUp. */
         bool delta_done; /* If true, then delta functions are done. */
-        bool local = FALSE; /* If true, then do not use system defaults. */
+        bool local = false; /* If true, then do not use system defaults. */
         register Binding *bptr; /* Pointer to Bindings list. */
         char *root_name; /* Root window name. */
         char *display = NULL; /* Display name pointer. */
@@ -157,9 +156,9 @@
         XID font_ID;
         XImage grayimage; /* for gray background */
         XGCValues xgc; /* to create font GCs */
-        bool fallbackMFont = False, /* using default GC font for menus, */
-          fallbackPFont = False, /* popups, */
-          fallbackIFont = False; /* icons */
+        bool fallbackMFont = false, /* using default GC font for menus, */
+          fallbackPFont = false, /* popups, */
+          fallbackIFont = false; /* icons */
         XSetWindowAttributes attr; /* for setting save under flag */
         unsigned long whitepix, blackpix, borderpix, popborderpix;
 
@@ -204,7 +203,7 @@
                                 strncpy (Startup_File, *argv, NAME_LEN);
                         }
                         else if (strcmp (*argv, "-b") == 0)
-                                local = TRUE;
+                                local = true;
                         else
                                 Usage ();
                 }
@@ -312,7 +311,7 @@
          */
 
         {
-                bool whiteset = False, blackset = False, borderset = False;
+                bool whiteset = false, blackset = false, borderset = false;
                 Colormap cmap = DefaultColormap (dpy, scr);
                 XColor cdef;
 
@@ -331,7 +330,7 @@
                                     XAllocColor (dpy, cmap, &cdef))
                                 {
                                         whitepix = cdef.pixel;
-                                        whiteset = True;
+                                        whiteset = true;
                                 }
                         }
                         if (PForegroundName[0])
@@ -343,7 +342,7 @@
                                     XAllocColor (dpy, cmap, &cdef))
                                 {
                                         blackpix = cdef.pixel;
-                                        blackset = True;
+                                        blackset = true;
                                 }
                         }
                         if (PBorderColor[0])
@@ -355,7 +354,7 @@
                                     XAllocColor (dpy, cmap, &cdef))
                                 {
                                         borderpix = cdef.pixel;
-                                        borderset = True;
+                                        borderset = true;
                                 }
                         }
                 }
@@ -449,7 +448,7 @@
                 /*
                  * watch for initial window mapping and window destruction
                  */
-                x_error_occurred = FALSE;
+                x_error_occurred = false;
                 (void) uwmExpressInterest (RootWindow (dpy, scr),
                                            SubstructureNotifyMask |
                                              SubstructureRedirectMask |
@@ -510,7 +509,7 @@
                   IFontName);
                 IFontInfo =
                   XQueryFont (dpy, XGContextFromGC (DefaultGC (dpy, scr)));
-                fallbackIFont = True;
+                fallbackIFont = true;
         }
         PFontInfo = XLoadQueryFont (dpy, PFontName);
         if (PFontInfo == NULL)
@@ -525,7 +524,7 @@
                         PFontInfo =
                           XQueryFont (dpy,
                                       XGContextFromGC (DefaultGC (dpy, scr)));
-                fallbackPFont = True;
+                fallbackPFont = true;
         }
         MFontInfo = XLoadQueryFont (dpy, MFontName);
         if (MFontInfo == NULL)
@@ -540,7 +539,7 @@
                         MFontInfo =
                           XQueryFont (dpy,
                                       XGContextFromGC (DefaultGC (dpy, scr)));
-                fallbackMFont = True;
+                fallbackMFont = true;
         }
 
         /*
@@ -567,7 +566,7 @@
                                    PBackground);
         if (Pop == FAILURE)
                 Error ("Can't create pop-up dimension display window.");
-        attr.save_under = True;
+        attr.save_under = true;
         XChangeWindowAttributes (dpy, Pop, CWSaveUnder, &attr);
 
         /*
@@ -581,7 +580,7 @@
         xgc.foreground = ITextForeground;
         xgc.background = ITextBackground;
         xgc.font = IFontInfo->fid;
-        xgc.graphics_exposures = FALSE;
+        xgc.graphics_exposures = false;
         IconGC = XCreateGC (dpy,
                             RootWindow (dpy, scr),
                             GCForeground + GCBackground + GCGraphicsExposures +
@@ -628,10 +627,10 @@
         /*
          * Main command loop.
          */
-        while (TRUE)
+        while (true)
         {
 
-                delta_done = func_stat = FALSE;
+                delta_done = func_stat = false;
 
                 /*
                  * Get the next mouse button event.  Spin our wheels until
@@ -640,7 +639,7 @@
                  * in the "GetButton" function or by the icon's owner if
                  * it is not uwm.
                  */
-                while (TRUE)
+                while (true)
                 {
                         if (! GetButton (&button_event))
                                 continue;
@@ -680,7 +679,7 @@
                 }
                 else
                 {
-                        if (IsIcon (event_win, 0, 0, FALSE, NULL))
+                        if (IsIcon (event_win, 0, 0, false, NULL))
                                 context = ICON;
                         else
                                 context = WINDOW;
@@ -718,7 +717,7 @@
                                            y,
                                            bptr->menu))
                         {
-                                func_stat = TRUE;
+                                func_stat = true;
                                 break;
                         }
                 }
@@ -730,7 +729,7 @@
                 if (func_stat)
                         continue;
 
-                while (TRUE)
+                while (true)
                 {
                         /*
                          * Wait for the next button event.
@@ -785,7 +784,7 @@
                                         if (IsIcon (event_win,
                                                     0,
                                                     0,
-                                                    FALSE,
+                                                    false,
                                                     NULL))
                                                 context = ICON;
                                         else
@@ -840,7 +839,7 @@
                                  * Delta functions are done once (and only
                                  * once.)
                                  */
-                                delta_done = TRUE;
+                                delta_done = true;
 
                                 /*
                                  * Determine the new event window's coordinates.
@@ -871,7 +870,7 @@
                                         if (IsIcon (event_win,
                                                     0,
                                                     0,
-                                                    FALSE,
+                                                    false,
                                                     NULL))
                                                 context = ICON;
                                         else
@@ -907,7 +906,7 @@
                                                            y,
                                                            bptr->menu))
                                         {
-                                                func_stat = TRUE;
+                                                func_stat = true;
                                                 break;
                                         }
                                 }
@@ -1034,7 +1033,7 @@
                                   stderr,
                                   "uwm: non-existent menu reference: \"%s\"\n",
                                   bptr->menuname);
-                                Startup_File_Error = TRUE;
+                                Startup_File_Error = true;
                         }
                 }
         }
@@ -1063,12 +1062,12 @@
 CheckMenus ()
 {
         MenuLink *ptr;
-        bool errflag = FALSE;
+        bool errflag = false;
 
         for (ptr = Menus; ptr; ptr = ptr->next)
         {
                 if (ChkMline (ptr->menu))
-                        errflag = TRUE;
+                        errflag = true;
         }
         if (errflag)
                 Error ("Nested menu inconsistency");
@@ -1079,7 +1078,7 @@
 {
         MenuLine *ptr;
         MenuLink *lptr;
-        bool errflag = FALSE;
+        bool errflag = false;
 
         for (ptr = menu->line; ptr; ptr = ptr->next)
         {
@@ -1099,7 +1098,7 @@
                                   stderr,
                                   "uwm: non-existent menu reference: \"%s\"\n",
                                   ptr->text);
-                                errflag = TRUE;
+                                errflag = true;
                         }
                 }
         }
@@ -1121,7 +1120,7 @@
                         application access to buttons unless context includes
                         window or icon */
 
-                        NeedRootInput = TRUE;
+                        NeedRootInput = true;
                 }
                 else
                 {
@@ -1144,7 +1143,7 @@
                              LeftButton,
                              mask & ModMask,
                              RootWindow (dpy, scr),
-                             TRUE,
+                             true,
                              EVENTMASK,
                              GrabModeAsync,
                              GrabModeAsync,
@@ -1157,7 +1156,7 @@
                              MiddleButton,
                              mask & ModMask,
                              RootWindow (dpy, scr),
-                             TRUE,
+                             true,
                              EVENTMASK,
                              GrabModeAsync,
                              GrabModeAsync,
@@ -1170,7 +1169,7 @@
                              RightButton,
                              mask & ModMask,
                              RootWindow (dpy, scr),
-                             TRUE,
+                             true,
                              EVENTMASK,
                              GrabModeAsync,
                              GrabModeAsync,
@@ -1218,7 +1217,7 @@
 yyerror (char *s)
 {
         fprintf (stderr, "uwm: %s: %d: %s\n", sfilename, Lineno, s);
-        Startup_File_Error = TRUE;
+        Startup_File_Error = true;
 }
 
 /*
@@ -1259,7 +1258,7 @@
         VMenuPad = DEF_MENU_PADDING;
         Volume = DEF_VOLUME;
         Pushval = DEF_PUSH;
-        FocusSetByUser = FALSE;
+        FocusSetByUser = false;
         PBackgroundName[0] = '\0'; /* so that default is computed */
         PForegroundName[0] = '\0'; /* so that default is computed */
         PBorderColor[0] = '\0'; /* so that default is computed */
@@ -1340,10 +1339,10 @@
                                 switch (parse_boolean (option))
                                 {
                                 case 0:
-                                        *(k->bptr) = FALSE;
+                                        *(k->bptr) = false;
                                         break;
                                 case 1:
-                                        *(k->bptr) = TRUE;
+                                        *(k->bptr) = true;
                                         break;
                                 }
                         }
@@ -1355,10 +1354,10 @@
                                 switch (parse_boolean (option))
                                 {
                                 case 0:
-                                        *(k->bptr) = TRUE;
+                                        *(k->bptr) = true;
                                         break;
                                 case 1:
-                                        *(k->bptr) = FALSE;
+                                        *(k->bptr) = false;
                                         break;
                                 }
                         }
--- a/uwm.h	Fri Oct 11 16:08:06 2019 +0000
+++ b/uwm.h	Fri Dec 20 10:13:54 2019 +0000
@@ -44,11 +44,32 @@
 #ifndef X_NOT_STDC_ENV
 #include <stdlib.h>
 #endif
+#ifndef _SYS_STDBOOL_H_
+#define false 1
+#define true 0
+#define bool _Bool
+#else
+#ifdef _SYS_STDBOOL_H_
 #include <stdbool.h>
+#endif
+#endif
 #include <X11/Xos.h>
 #include <X11/Xlib.h>
+/*
+ In file included from uwm.h:50,
+                  from windowinfo.c:23:
+ windowinfo.c: In function ‘getWindowInfo’:
+ /usr/X11R7/include/X11/Xutil.h:359:44: error: implicit declaration of function ‘XrmUniqueQuark’ [-Werror=implicit-function-declaration]
+  #define XUniqueContext()       ((XContext) XrmUniqueQuark())
+                                             ^~~~~~~~~~~~~~
+ windowinfo.c:141:30: note: in expansion of macro ‘XUniqueContext’
+                  windowInfo = XUniqueContext ();
+                               ^~~~~~~~~~~~~~
+*/
+#include <X11/Xresource.h>
 #include <X11/Xutil.h>
 
+
 #define MIN(x, y) ((x) <= (y) ? (x) : (y))
 #define MAX(x, y) ((x) >= (y) ? (x) : (y))
 #define VOLUME_PERCENTAGE(x) ((x) *14)
@@ -57,8 +78,6 @@
         (((b) == Button1) ? Button1Mask \
                           : (((b) == Button2) ? Button2Mask : Button3Mask))
 
-#define FALSE False
-#define TRUE True
 
 
 #define DEF_DELTA 1
@@ -449,8 +468,10 @@
 Error ();
 extern int
 XError ();
-extern int
-CreateMenus ();
+extern void
+Warning ();
+//extern int CreateMenus ();
+extern void CreateMenus (void);
 
 extern char *
 stash ();
@@ -459,4 +480,17 @@
 extern bool x_error_occurred;
 extern XErrorEvent last_error_event;
 
-#define clear_x_errors() (x_error_occurred = FALSE)
+/* This probably belongs elsewhere but
+   fixes forward-declarations for now */
+extern Window MakeIcon (Window window, int x, int y, bool mousePositioned);
+extern Window AddIcon (Window window, Window icon, bool own, int mask, Pixmap background);
+extern void RemoveIcon (Window window);
+extern bool IsIcon (Window icon, int x, int y, int mousePositioned, Window *assoc);
+extern int uwmExpressInterest (Window w, long eventMask);
+extern int Configure (XConfigureRequestEvent *event);
+extern int deleteWindowInfo (Window w);
+extern int Circulate (XCirculateEvent *event);
+extern void CheckConsistency (XSizeHints *hints);
+/* end forward-declaration fixes */
+
+#define clear_x_errors() (x_error_occurred = false)
--- a/windowinfo.c	Fri Oct 11 16:08:06 2019 +0000
+++ b/windowinfo.c	Fri Dec 20 10:13:54 2019 +0000
@@ -18,7 +18,8 @@
 
 #include <stdlib.h>
 /* #include <sys/types.h> */ /* caddr_t ? */
-#include "caddr.h"
+#include <sys/types.h>
+/* #include "caddr.h" */ /* conflicts with ansi.h */
 #include "uwm.h"
 
 XContext windowInfo;
@@ -33,9 +34,7 @@
 static WindowInterest *interests;
 
 void
-expressWindowInterest (int *initAndDone,
-                       int *eventHandler) int (*initAndDone) ();
-int (*eventHandler) ();
+expressWindowInterest (int (*initAndDone) (), int (*eventHandler) ())
 {
         WindowInterest *wi;
 
@@ -69,7 +68,8 @@
         }
 }
 
-processInterestEvent (ev) XAnyEvent *ev;
+int
+processInterestEvent (XAnyEvent *ev)
 {
         WindowInfo *i;
         WindowInterest *wi;
@@ -113,12 +113,16 @@
         return 0;
 }
 
-deleteWindowInfo (w) Window w;
+int
+deleteWindowInfo (Window w)
 {
         WindowInfo *i;
         WindowInterest *wi;
 
-        if (XFindContext (dpy, w, windowInfo, &i) == XCSUCCESS)
+        // does argument 4 predate a change in X11 or was
+        // this wrong even before X11 updates? argument 4
+        // should be of type XPointer, which is a typedef for char*.
+        if (XFindContext (dpy, w, windowInfo, (XPointer *) &i) == XCSUCCESS)
         {
                 for (wi = interests; wi; wi = wi->next)
                         (*wi->initAndDone) (i, (XWindowAttributes *) 0);
@@ -127,7 +131,8 @@
         }
 }
 
-WindowInfo *getWindowInfo (w) Window w;
+WindowInfo *
+getWindowInfo (Window w)
 {
         WindowInfo *i = NULL;
 
@@ -140,8 +145,8 @@
         return i;
 }
 
-uwmExpressInterest (w, eventMask) Window w;
-long eventMask;
+int
+uwmExpressInterest (Window w, long eventMask)
 {
         WindowInfo *i;