changeset 64:fe5752c3c6cd

StoreBox.c, StoreZap.c: clang-format
author ng0@n0.is
date Fri, 03 May 2019 21:19:48 +0000
parents 397666ff0c19
children 160fad18b8be
files StoreBox.c StoreZap.c
diffstat 2 files changed, 119 insertions(+), 81 deletions(-) [+]
line wrap: on
line diff
--- a/StoreBox.c	Fri May 03 21:19:21 2019 +0000
+++ b/StoreBox.c	Fri May 03 21:19:48 2019 +0000
@@ -1,6 +1,7 @@
 #ifndef lint
-static char *rcsid_StoreBox_c = "$XConsortium: StoreBox.c,v 1.4 88/09/06 17:28:43 jim Exp $";
-#endif	/* lint */
+static char *rcsid_StoreBox_c =
+  "$XConsortium: StoreBox.c,v 1.4 88/09/06 17:28:43 jim Exp $";
+#endif /* lint */
 
 /*
  * Copyright 1985, 1986, 1987, 1988, 1989 by the
@@ -41,7 +42,6 @@
  * SOFTWARE.
  */
 
- 
 
 /*
  * MODIFICATION HISTORY
@@ -64,54 +64,69 @@
 /*
  * Store the vertices for the resize movement box in a vertex list.
  */
-int StoreBox(box, ulx, uly, lrx, lry)
-register XSegment box[];
-int ulx;			/* Upper left X coordinate. */
-int uly;			/* Upper left Y coordinate. */
-int lrx;			/* Lower right X coordinate. */
-int lry;			/* Lower right Y coordinate. */
+int StoreBox (box, ulx, uly, lrx, lry) register XSegment box[];
+int ulx; /* Upper left X coordinate. */
+int uly; /* Upper left Y coordinate. */
+int lrx; /* Lower right X coordinate. */
+int lry; /* Lower right Y coordinate. */
 {
-    /*
-     * Xor in.
-     */
+        /*
+         * Xor in.
+         */
+
+        box[0].x1 = ulx;
+        box[0].y1 = uly;
+        box[0].x2 = lrx;
+        box[0].y2 = uly;
 
-    box[0].x1 = ulx; box[0].y1 = uly;
-    box[0].x2 = lrx; box[0].y2 = uly;
-
-    box[1].x1 = lrx; box[1].y1 = uly;
-    box[1].x2 = lrx; box[1].y2 = lry;
+        box[1].x1 = lrx;
+        box[1].y1 = uly;
+        box[1].x2 = lrx;
+        box[1].y2 = lry;
 
-    box[2].x1 = lrx; box[2].y1 = lry;
-    box[2].x2 = ulx; box[2].y2 = lry;
+        box[2].x1 = lrx;
+        box[2].y1 = lry;
+        box[2].x2 = ulx;
+        box[2].y2 = lry;
 
-    box[3].x1 = ulx; box[3].y1 = lry;
-    box[3].x2 = ulx; box[3].y2 = uly;
+        box[3].x1 = ulx;
+        box[3].y1 = lry;
+        box[3].x2 = ulx;
+        box[3].y2 = uly;
 
 
-    /*
-     * If we freeze the screen, don't bother to xor out.
-     */
-    if (Freeze)
-        return(4);
+        /*
+         * If we freeze the screen, don't bother to xor out.
+         */
+        if (Freeze)
+                return (4);
+
+        /*
+         * Xor out.
+         */
+        box[4].x1 = ulx;
+        box[4].y1 = uly;
+        box[4].x2 = lrx;
+        box[4].y2 = uly;
 
-    /*
-     * Xor out.
-     */
-    box[4].x1 = ulx; box[4].y1 = uly;
-    box[4].x2 = lrx; box[4].y2 = uly;
+        box[5].x1 = lrx;
+        box[5].y1 = uly;
+        box[5].x2 = lrx;
+        box[5].y2 = lry;
 
-    box[5].x1 = lrx; box[5].y1 = uly;
-    box[5].x2 = lrx; box[5].y2 = lry;
+        box[6].x1 = lrx;
+        box[6].y1 = lry;
+        box[6].x2 = ulx;
+        box[6].y2 = lry;
 
-    box[6].x1 = lrx; box[6].y1 = lry;
-    box[6].x2 = ulx; box[6].y2 = lry;
-
-    box[7].x1 = ulx; box[7].y1 = lry;
-    box[7].x2 = ulx; box[7].y2 = uly;
+        box[7].x1 = ulx;
+        box[7].y1 = lry;
+        box[7].x2 = ulx;
+        box[7].y2 = uly;
 
 
-    /*
-     * Total number of vertices is 8.
-     */
-    return(8);
+        /*
+         * Total number of vertices is 8.
+         */
+        return (8);
 }
--- a/StoreZap.c	Fri May 03 21:19:21 2019 +0000
+++ b/StoreZap.c	Fri May 03 21:19:48 2019 +0000
@@ -1,6 +1,7 @@
 #ifndef lint
-static char *rcsid_StoreZap_c = "$XConsortium: StoreZap.c,v 1.4 88/09/06 17:28:44 jim Exp $";
-#endif	/* lint */
+static char *rcsid_StoreZap_c =
+  "$XConsortium: StoreZap.c,v 1.4 88/09/06 17:28:44 jim Exp $";
+#endif /* lint */
 
 /*
  * Copyright 1985, 1986, 1987, 1988, 1989 by the
@@ -41,7 +42,6 @@
  * SOFTWARE.
  */
 
- 
 
 /*
  * MODIFICATION HISTORY
@@ -65,49 +65,72 @@
 /*
  * Store the vertices for the zap effect.
  */
-int StoreZap(zap, ulx_1, uly_1, lrx_1, lry_1, ulx_2, uly_2, lrx_2, lry_2)
-    register XSegment zap[];
-    int ulx_1;		/* From window, upper left X coordinate. */
-    int uly_1;		/* From window, upper left Y coordinate. */
-    int lrx_1;		/* From window, lower right X coordinate. */
-    int lry_1;		/* From window, lower right Y coordinate. */
-    int ulx_2;		/* To window, upper left X coordinate. */
-    int uly_2;		/* To window, upper left Y coordinate. */
-    int lrx_2;		/* To window, lower right X coordinate. */
-    int lry_2;		/* To window, lower right Y coordinate. */
+int StoreZap (zap,
+              ulx_1,
+              uly_1,
+              lrx_1,
+              lry_1,
+              ulx_2,
+              uly_2,
+              lrx_2,
+              lry_2) register XSegment zap[];
+int ulx_1; /* From window, upper left X coordinate. */
+int uly_1; /* From window, upper left Y coordinate. */
+int lrx_1; /* From window, lower right X coordinate. */
+int lry_1; /* From window, lower right Y coordinate. */
+int ulx_2; /* To window, upper left X coordinate. */
+int uly_2; /* To window, upper left Y coordinate. */
+int lrx_2; /* To window, lower right X coordinate. */
+int lry_2; /* To window, lower right Y coordinate. */
 {
 
-    /*
-     * Xor in.
-     */
-    zap[0].x1 = ulx_1;	zap[0].y1 = uly_1;
-    zap[0].x2 = ulx_2;	zap[0].y2 = uly_2;
+        /*
+         * Xor in.
+         */
+        zap[0].x1 = ulx_1;
+        zap[0].y1 = uly_1;
+        zap[0].x2 = ulx_2;
+        zap[0].y2 = uly_2;
 
-    zap[1].x1 = lrx_1;	zap[1].y1 = uly_1;
-    zap[1].x2 = lrx_2;	zap[1].y2 = uly_2;
+        zap[1].x1 = lrx_1;
+        zap[1].y1 = uly_1;
+        zap[1].x2 = lrx_2;
+        zap[1].y2 = uly_2;
 
-    zap[2].x1 = lrx_1;	zap[2].y1 = lry_1;
-    zap[2].x2 = lrx_2;	zap[2].y2 = lry_2;
+        zap[2].x1 = lrx_1;
+        zap[2].y1 = lry_1;
+        zap[2].x2 = lrx_2;
+        zap[2].y2 = lry_2;
 
-    zap[3].x1 = ulx_1;	zap[3].y1 = lry_1;
-    zap[3].x2 = ulx_2;	zap[3].y2 = lry_2;
+        zap[3].x1 = ulx_1;
+        zap[3].y1 = lry_1;
+        zap[3].x2 = ulx_2;
+        zap[3].y2 = lry_2;
 
-    /*
-     * Xor out.
-     */
-    zap[4].x1 = ulx_1;	zap[4].y1 = uly_1;
-    zap[4].x2 = ulx_2;	zap[4].y2 = uly_2;
+        /*
+         * Xor out.
+         */
+        zap[4].x1 = ulx_1;
+        zap[4].y1 = uly_1;
+        zap[4].x2 = ulx_2;
+        zap[4].y2 = uly_2;
 
-    zap[5].x1 = lrx_1;	zap[5].y1 = uly_1;
-    zap[5].x2 = lrx_2;	zap[5].y2 = uly_2;
+        zap[5].x1 = lrx_1;
+        zap[5].y1 = uly_1;
+        zap[5].x2 = lrx_2;
+        zap[5].y2 = uly_2;
 
-    zap[6].x1 = lrx_1;	zap[6].y1 = lry_1;
-    zap[6].x2 = lrx_2;	zap[6].y2 = lry_2;
+        zap[6].x1 = lrx_1;
+        zap[6].y1 = lry_1;
+        zap[6].x2 = lrx_2;
+        zap[6].y2 = lry_2;
 
-    zap[7].x1 = ulx_1;	zap[7].y1 = lry_1;
-    zap[7].x2 = ulx_2;	zap[7].y2 = lry_2;
-    /*
-     * Total number of vertices is 8.
-     */
-    return(8);
+        zap[7].x1 = ulx_1;
+        zap[7].y1 = lry_1;
+        zap[7].x2 = ulx_2;
+        zap[7].y2 = lry_2;
+        /*
+         * Total number of vertices is 8.
+         */
+        return (8);
 }