changeset 61:035c8e172d2d

Refresh.c: clang-format
author ng0@n0.is
date Fri, 03 May 2019 21:18:37 +0000
parents e403b9515091
children ac5ac89c6ae8
files Refresh.c
diffstat 1 files changed, 39 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/Refresh.c	Fri May 03 21:18:00 2019 +0000
+++ b/Refresh.c	Fri May 03 21:18:37 2019 +0000
@@ -1,6 +1,7 @@
 #ifndef lint
-static char *rcsid_Refresh_c = "$XConsortium: Refresh.c,v 1.5 88/09/06 17:28:39 jim Exp $";
-#endif	/* lint */
+static char *rcsid_Refresh_c =
+  "$XConsortium: Refresh.c,v 1.5 88/09/06 17:28:39 jim Exp $";
+#endif /* lint */
 
 /*
  * Copyright 1985, 1986, 1987, 1988, 1989 by the
@@ -41,7 +42,6 @@
  * SOFTWARE.
  */
 
- 
 
 /*
  * MODIFICATION HISTORY
@@ -58,42 +58,47 @@
 #include "uwm.h"
 #include <stdbool.h>
 
-bool Refresh(window, mask, button, x, y)
-Window window;                          /* Event window. */
-int mask;                               /* Button/key mask. */
-int button;                           /* Button event detail. */
-int x, y;                               /* Event mouse position. */
+bool Refresh (window, mask, button, x, y) Window window; /* Event window. */
+int mask; /* Button/key mask. */
+int button; /* Button event detail. */
+int x, y; /* Event mouse position. */
 {
-    return( Redraw(RootWindow(dpy,scr), mask, button, x, y) );
+        return (Redraw (RootWindow (dpy, scr), mask, button, x, y));
 }
 
 
+bool Redraw (window, mask, button, x, y) Window window; /* Event window. */
+int mask; /* Button/key mask. */
+int button; /* Button event detail. */
+int x, y; /* Event mouse position. */
+{
+        XWindowAttributes winfo; /* window info. */
+        Window w; /* Refresh window. */
 
-bool Redraw(window, mask, button, x, y)
-Window window;                          /* Event window. */
-int mask;                               /* Button/key mask. */
-int button;                             /* Button event detail. */
-int x, y;                               /* Event mouse position. */
-{
-    XWindowAttributes winfo;		/* window info. */
-    Window w;				/* Refresh window. */
+        /*
+         * Get info on the target window.
+         */
+        status = XGetWindowAttributes (dpy, window, &winfo);
+        if (status == FAILURE)
+                Error ("Refresh -> Can't query target window.");
 
-    /*
-     * Get info on the target window.
-     */
-    status = XGetWindowAttributes(dpy, window, &winfo);
-    if (status == FAILURE) Error("Refresh -> Can't query target window.");
+        /*
+         * Create and map a window which covers the target window, then destroy
+         * it.
+         */
+        if ((w = XCreateSimpleWindow (dpy,
+                                      window,
+                                      0,
+                                      0,
+                                      winfo.width,
+                                      winfo.height,
+                                      0,
+                                      (Pixmap) 0,
+                                      (Pixmap) 0)) == NULL)
+                Error ("Refresh -> Can't create refresh window.");
+        XMapWindow (dpy, w);
+        XDestroyWindow (dpy, w);
+        XFlush (dpy);
 
-    /*
-     * Create and map a window which covers the target window, then destroy it.
-     */
-    if ((w = XCreateSimpleWindow(dpy, window, 0, 0, 
-    			   winfo.width, winfo.height, 0,
-                           (Pixmap) 0, (Pixmap) 0)) == NULL)
-        Error("Refresh -> Can't create refresh window.");
-    XMapWindow(dpy, w);
-    XDestroyWindow(dpy, w);
-    XFlush(dpy);
-
-    return(FALSE);
+        return (FALSE);
 }