]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
gindent and 2.2 branch merge
authorwessels <>
Wed, 5 May 1999 03:20:36 +0000 (03:20 +0000)
committerwessels <>
Wed, 5 May 1999 03:20:36 +0000 (03:20 +0000)
lib/Array.cc
lib/Stack.c
lib/drand48.c
lib/hash.c
lib/md5.c
lib/rfc1035.c
lib/rfc1738.c
lib/safe_inet_addr.c
lib/splay.c
lib/stub_memaccount.c
lib/util.c

index b63901db5be8e33e330c2f7d75f24579b6bd64a1..ef795156678266095901cf69c3f0f91ca6ec4383 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: Array.cc,v 1.3 1998/07/22 20:36:32 wessels Exp $
+ * $Id: Array.cc,v 1.4 1999/05/04 21:20:36 wessels Exp $
  *
  * AUTHOR: Alex Rousskov
  *
@@ -89,7 +89,7 @@ arrayAppend(Array * a, void *obj)
 {
     assert(a);
     if (a->count >= a->capacity)
-       arrayGrow(a, a->count+1);
+       arrayGrow(a, a->count + 1);
     a->items[a->count++] = obj;
 }
 
@@ -111,15 +111,15 @@ arrayGrow(Array * a, int min_capacity)
     assert(a->capacity < min_capacity);
     delta = min_capacity;
     /* make delta a multiple of min_delta */
-    delta += min_delta-1;
+    delta += min_delta - 1;
     delta /= min_delta;
     delta *= min_delta;
     /* actual grow */
     assert(delta > 0);
     a->capacity += delta;
     a->items = a->items ?
-       xrealloc(a->items, a->capacity * sizeof(void*)) :
-       xmalloc(a->capacity * sizeof(void*));
+       xrealloc(a->items, a->capacity * sizeof(void *)) :
+         xmalloc(a->capacity * sizeof(void *));
     /* reset, just in case */
-    memset(a->items+a->count, 0, (a->capacity-a->count) * sizeof(void*));
+    memset(a->items + a->count, 0, (a->capacity - a->count) * sizeof(void *));
 }
index beb414b23ad64f077c376a20ab4e2522b670f345..538f5d48aaa5017a42d9c71896fda63ea86140fb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: Stack.c,v 1.8 1998/07/22 20:36:34 wessels Exp $
+ * $Id: Stack.c,v 1.9 1999/05/04 21:20:37 wessels Exp $
  *
  * AUTHOR: Alex Rousskov
  *
@@ -55,8 +55,8 @@ stackPop(Stack * s)
 }
 
 void *
-stackTop(Stack *s)
+stackTop(Stack * s)
 {
     assert(s);
-    return s->count ? s->items[s->count-1] : NULL;
+    return s->count ? s->items[s->count - 1] : NULL;
 }
index 996017f1ed3e522464c30d9ccb89f112dba17b17..0c40f09b15559efafcabffbc698af148f9acab33 100644 (file)
@@ -1,6 +1,8 @@
+
+
 /* borrowed from libc/misc/drand48.c in Linux libc-5.4.46 this quick
  hack by Martin Hamilton <martinh@gnu.org> to make Squid build on
  Win32 with GNU-Win32 - sorry, folks! */
* hack by Martin Hamilton <martinh@gnu.org> to make Squid build on
* Win32 with GNU-Win32 - sorry, folks! */
 
 #ifndef HAVE_DRAND48
 
 #define A2     0x5
 #define C      0xB
 
-static void next( void );
-static unsigned x[3] = { X0, X1, X2 }, a[3] = { A0, A1, A2 }, c = C;
+static void next(void);
+static unsigned x[3] =
+{X0, X1, X2}, a[3] =
+{A0, A1, A2}, c = C;
 
-double drand48( void );
+double drand48(void);
 
 double
-drand48( void )
+drand48(void)
 {
-       static double two16m = 1.0 / (1L << N);
-       next();
-       return (two16m * (two16m * (two16m * x[0] + x[1]) + x[2]));
+    static double two16m = 1.0 / (1L << N);
+    next();
+    return (two16m * (two16m * (two16m * x[0] + x[1]) + x[2]));
 }
 
 static void
-next( void )
+next(void)
 {
-       unsigned p[2], q[2], r[2], carry0, carry1;
-
-       MUL(a[0], x[0], p);
-       ADDEQU(p[0], c, carry0);
-       ADDEQU(p[1], carry0, carry1);
-       MUL(a[0], x[1], q);
-       ADDEQU(p[1], q[0], carry0);
-       MUL(a[1], x[0], r);
-       x[2] = LOW(carry0 + carry1 + CARRY(p[1], r[0]) + q[1] + r[1] +
-               a[0] * x[2] + a[1] * x[1] + a[2] * x[0]);
-       x[1] = LOW(p[1] + r[0]);
-       x[0] = LOW(p[0]);
+    unsigned p[2], q[2], r[2], carry0, carry1;
+
+    MUL(a[0], x[0], p);
+    ADDEQU(p[0], c, carry0);
+    ADDEQU(p[1], carry0, carry1);
+    MUL(a[0], x[1], q);
+    ADDEQU(p[1], q[0], carry0);
+    MUL(a[1], x[0], r);
+    x[2] = LOW(carry0 + carry1 + CARRY(p[1], r[0]) + q[1] + r[1] +
+       a[0] * x[2] + a[1] * x[1] + a[2] * x[0]);
+    x[1] = LOW(p[1] + r[0]);
+    x[0] = LOW(p[0]);
 }
 
 #endif /* HAVE_DRAND48 */
index 8eecb1748a198910fa4ded5730fdc67bbe7b0e72..44d3a2d0666ebd1777fc3fc583547ec956522268 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: hash.c,v 1.7 1999/01/24 04:07:01 wessels Exp $
+ * $Id: hash.c,v 1.8 1999/05/04 21:20:38 wessels Exp $
  *
  * DEBUG: section 0     Hash Tables
  * AUTHOR: Harvest Derived
@@ -309,7 +309,7 @@ hashFreeMemory(hash_table * hid)
 {
     assert(hid);
     if (hid->buckets)
-        xfree(hid->buckets);
+       xfree(hid->buckets);
     xfree(hid);
 }
 
index b92efabe1d707a392f788148332c9d8d32f53a44..ef95a437fc361ad9721a7a4a948ac175be757766 100644 (file)
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -1,5 +1,5 @@
 /*
- * $Id: md5.c,v 1.8 1998/09/23 17:14:21 wessels Exp $
+ * $Id: md5.c,v 1.9 1999/05/04 21:20:39 wessels Exp $
  */
 
 /* taken from RFC-1321/Appendix A.3 */
@@ -358,4 +358,5 @@ MD5_memset(char *output, int value, unsigned int len)
     for (i = 0; i < len; i++)
        output[i] = (char) value;
 }
+
 #endif
index 83009d11f3f7a8bdee2a1b4599da9ad0bda2679b..fb333f9baa95f87cc5a1d274e6ddb6ab5a8f81ee 100644 (file)
@@ -1,5 +1,6 @@
+
 /*
- * $Id: rfc1035.c,v 1.8 1999/04/18 06:02:55 wessels Exp $
+ * $Id: rfc1035.c,v 1.9 1999/05/04 21:20:40 wessels Exp $
  *
  * Low level DNS protocol routines
  * AUTHOR: Duane Wessels
index 3b7e5481ba603308735b7f22c5f1d0a178c12050..becc651a5c9fefb927184cdb19c198bcb03c82d1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: rfc1738.c,v 1.18 1998/08/12 16:08:05 wessels Exp $
+ * $Id: rfc1738.c,v 1.19 1999/05/04 21:20:40 wessels Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
@@ -138,16 +138,16 @@ rfc1738_unescape(char *s)
        s[i] = s[j];
        if (s[i] != '%')
            continue;
-       if (s[j+1] == '%') {    /* %% case */
+       if (s[j + 1] == '%') {  /* %% case */
            j++;
            continue;
        }
-       if (s[j+1] && s[j+2]) {
-           hexnum[0] = s[j+1];
-           hexnum[1] = s[j+2];
+       if (s[j + 1] && s[j + 2]) {
+           hexnum[0] = s[j + 1];
+           hexnum[1] = s[j + 2];
            hexnum[2] = '\0';
            if (1 == sscanf(hexnum, "%x", &x)) {
-               s[i] = (char) (0x0ff & x);
+               s[i] = (char) (0x0ff & x);
                j += 2;
            }
        }
index 5d77be7405252a29e9996b3538e116590a569808..1d0756a8cd9e7ccfc78b97426d0dfa5d9c6a9ca0 100644 (file)
@@ -1,5 +1,6 @@
+
 /*
- * $Id: safe_inet_addr.c,v 1.10 1999/04/26 21:52:17 wessels Exp $
+ * $Id: safe_inet_addr.c,v 1.11 1999/05/04 21:20:41 wessels Exp $
  */
 
 #include "config.h"
index 26ee01be2d85400eeca3165e0e1478504c339f82..78a207b2f8b2a38704caba01037d8c75a8fbf480 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: splay.c,v 1.10 1998/09/23 17:14:23 wessels Exp $
+ * $Id: splay.c,v 1.11 1999/05/04 21:20:42 wessels Exp $
  */
 
 #include "config.h"
@@ -100,7 +100,7 @@ splay_splay(const void *data, splayNode * top, SPLAYCMP * compare)
 }
 
 void
-splay_destroy(splayNode * top, SPLAYFREE *free_func)
+splay_destroy(splayNode * top, SPLAYFREE * free_func)
 {
     if (top->left)
        splay_destroy(top->left, free_func);
@@ -111,7 +111,7 @@ splay_destroy(splayNode * top, SPLAYFREE *free_func)
 }
 
 void
-splay_walk(splayNode *top, SPLAYWALKEE *walkee, void *state)
+splay_walk(splayNode * top, SPLAYWALKEE * walkee, void *state)
 {
     if (top->left)
        splay_walk(top->left, walkee, state);
index 5924b08eac1dc566290caf3ee014ddbf3f72c3eb..d576dbce2c5a8c5535f1061d5f47c0c00775a5a3 100644 (file)
@@ -1,10 +1,10 @@
 /*
- * $Id: stub_memaccount.c,v 1.3 1998/09/23 17:16:13 wessels Exp $
+ * $Id: stub_memaccount.c,v 1.4 1999/05/04 21:20:42 wessels Exp $
  */
 
 /* Stub function for programs not implementing statMemoryAccounted */
 #include <config.h>
-int 
+int
 statMemoryAccounted(void)
 {
     return -1;
index 1b378c8e6cdf3029910c289f3cbff0e3f61c9fff..6c4b07d3b20b2a514678aa4103bf7c1eddd445a9 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: util.c,v 1.66 1999/04/15 06:15:39 wessels Exp $
+ * $Id: util.c,v 1.67 1999/05/04 21:20:43 wessels Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
@@ -700,7 +700,7 @@ xpercentInt(double part, double whole)
     return (int) rint(xpercent(part, whole));
 #else
     /* SCO 3.2v4.2 doesn't have rint() -- mauri@mbp.ee */
-    return (int) floor(xpercent(part, whole)+0.5);
+    return (int) floor(xpercent(part, whole) + 0.5);
 #endif
 }
 
@@ -715,7 +715,7 @@ xdiv(double nom, double denom)
 const char *
 xitoa(int num)
 {
-    static char buf[24]; /* 2^64 = 18446744073709551616 */
+    static char buf[24];       /* 2^64 = 18446744073709551616 */
     snprintf(buf, sizeof(buf), "%d", num);
     return buf;
 }