]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/border.c
Indented with src/scripts/indent-emp.
[empserver] / src / lib / subs / border.c
index 4dbb2b478bcd6fe767c654884b4922efa7332e3a..2046959e3d85fdb257ec187919614ae7247c49d3 100644 (file)
 
 void
 border(struct range *rp, s_char *prefstr, s_char *sep)
-                         
-                               /* prefixes each line */
-                               /* separates the numbers */
+
+                               /* prefixes each line */
+                               /* separates the numbers */
 {
-       register int posi;
-       register int n;
-       register int x;
-       
-       if ((WORLD_X / 2) >= 100) {
-           if (rp->lx + rp->width > 99 || rp->hx - rp->width < -99) {
-                       /*
-                        * hundreds
-                        */
-                       pr(prefstr);
-                       for (x=rp->lx, n=0; n < rp->width; n++, x++) {
-                               if (x >= WORLD_X/2)
-                                       x -= WORLD_X;
-                               pr(sep);
-                               if (x < 0 && x > -100) {
-                                       pr("-");
-                               } else {
-                                       posi = (x < 0 ? -x : x) / 100;
-                                       pr("%d", posi % 10);
-                               }
-                       }
-                       pr("\n");
-           }
-       }
-       /*
-        * tens
-        */
-       pr(prefstr);
-       for (x=rp->lx, n=0; n < rp->width; n++, x++) {
-               if (x >= WORLD_X/2)
-                       x -= WORLD_X;
+    register int posi;
+    register int n;
+    register int x;
+
+    if ((WORLD_X / 2) >= 100) {
+       if (rp->lx + rp->width > 99 || rp->hx - rp->width < -99) {
+           /*
+            * hundreds
+            */
+           pr(prefstr);
+           for (x = rp->lx, n = 0; n < rp->width; n++, x++) {
+               if (x >= WORLD_X / 2)
+                   x -= WORLD_X;
                pr(sep);
-               if (x < 0 && x > -10) {
-                       pr("-");
+               if (x < 0 && x > -100) {
+                   pr("-");
                } else {
-                       posi = (x < 0 ? -x : x) / 10;
-                       pr("%d", posi % 10);
+                   posi = (x < 0 ? -x : x) / 100;
+                   pr("%d", posi % 10);
                }
+           }
+           pr("\n");
        }
-       pr("\n");
-       /*
-        * units...
-        */
-       pr(prefstr);
-       for (x=rp->lx, n=0; n < rp->width; n++, x++) {
-               if (x >= WORLD_X/2)
-                       x -= WORLD_X;
-               posi = (x < 0 ? -x : x);
-               pr("%s%d", sep, posi % 10);
+    }
+    /*
+     * tens
+     */
+    pr(prefstr);
+    for (x = rp->lx, n = 0; n < rp->width; n++, x++) {
+       if (x >= WORLD_X / 2)
+           x -= WORLD_X;
+       pr(sep);
+       if (x < 0 && x > -10) {
+           pr("-");
+       } else {
+           posi = (x < 0 ? -x : x) / 10;
+           pr("%d", posi % 10);
        }
-       pr("\n");
+    }
+    pr("\n");
+    /*
+     * units...
+     */
+    pr(prefstr);
+    for (x = rp->lx, n = 0; n < rp->width; n++, x++) {
+       if (x >= WORLD_X / 2)
+           x -= WORLD_X;
+       posi = (x < 0 ? -x : x);
+       pr("%s%d", sep, posi % 10);
+    }
+    pr("\n");
 }