]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
gindent
authorwessels <>
Mon, 12 Jan 1998 11:30:35 +0000 (11:30 +0000)
committerwessels <>
Mon, 12 Jan 1998 11:30:35 +0000 (11:30 +0000)
13 files changed:
src/asn.cc
src/cbdata.cc
src/client.cc
src/debug.cc
src/dns.cc
src/enums.h
src/fqdncache.cc
src/ftp.cc
src/globals.h
src/http.cc
src/icp_v2.cc
src/main.cc
src/mime.cc

index 25fe528d6881ebfc248db6ac0b399524b53b9dd2..83cc9ba234d23d134737261bb479c9159586611d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: asn.cc,v 1.13 1998/01/12 04:29:55 wessels Exp $
+ * $Id: asn.cc,v 1.14 1998/01/12 04:30:35 wessels Exp $
  *
  * DEBUG: section 53    AS Number handling
  * AUTHOR: Duane Wessels, Kostas Anagnostakis
@@ -108,7 +108,7 @@ asnMatchIp(void *data, struct in_addr addr)
     lh = ntohl(addr.s_addr);
     debug(53, 4) ("asnMatchIp: Called for %s.\n", inet_ntoa(addr));
 
-    if (AS_tree_head == 0 || !memcmp(&addr, &no_addr,sizeof(addr)))
+    if (AS_tree_head == 0 || !memcmp(&addr, &no_addr, sizeof(addr)))
        return 0;
     store_m_int(lh, m_addr);
     rn = rn_match(m_addr, AS_tree_head);
@@ -158,7 +158,7 @@ asnFreeMemory(void)
 {
     debug(0, 0) ("asnFreeMemory: Calling asnCleanup()!\n");
 
-       /* XXX - Cleanup is enough.   */ 
+    /* XXX - Cleanup is enough.   */
 
     asnCleanup();
 }
@@ -246,7 +246,7 @@ asHandleReply(void *data, char *buf, ssize_t size)
        while (*s && isspace(*s))
            s++;
     }
-       /* XXX why assert that ? */
+    /* XXX why assert that ? */
 #if 0
     assert(e->mem_obj->reply);
 #endif
index da3ff0747095c3ec035db64bd962da6064c46827..47b16cda3f7e110dfddece34d1db7d1317f5a5c6 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cbdata.cc,v 1.13 1998/01/12 04:29:56 wessels Exp $
+ * $Id: cbdata.cc,v 1.14 1998/01/12 04:30:35 wessels Exp $
  *
  * DEBUG: section 45    Callback Data Registry
  * AUTHOR: Duane Wessels
@@ -145,7 +145,7 @@ cbdataFree(void *p)
     xfree(c);
     debug(45, 3) ("cbdataFree: freeing %p\n", p);
     if (mem_type == MEM_NONE)
-        xfree(p);
+       xfree(p);
     else
        memFree(mem_type, p);
 }
@@ -179,7 +179,7 @@ cbdataUnlock(const void *p)
     cbdataCount--;
     xfree(c);
     debug(45, 3) ("cbdataUnlock: Freeing %p\n", p);
-    xfree((void *)p);
+    xfree((void *) p);
 }
 
 int
index 4477ac582518b7709df05b89ddc806b79b63829d..10115aecddfcd9c67418a369cd70be55b78cd74d 100644 (file)
@@ -1,5 +1,6 @@
+
 /*
- * $Id: client.cc,v 1.48 1998/01/06 00:27:56 wessels Exp $
+ * $Id: client.cc,v 1.49 1998/01/12 04:30:36 wessels Exp $
  *
  * DEBUG: section 0     WWW Client
  * AUTHOR: Harvest Derived
index 5d1ffdbe1f3b2ebc8a7f380df8b0c2d94bb2899d..6e18f31c24af2ff17b4845ffc033545f3e1d5802 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: debug.cc,v 1.56 1998/01/07 22:45:25 wessels Exp $
+ * $Id: debug.cc,v 1.57 1998/01/12 04:30:36 wessels Exp $
  *
  * DEBUG: section 0     Debug Routines
  * AUTHOR: Harvest Derived
@@ -164,7 +164,7 @@ _db_print(va_alist)
        fflush(debug_log);
     if (opt_debug_stderr && debug_log != stderr) {
 #if defined(__QNX__)
-      vfprintf(stderr, f, eargs);
+       vfprintf(stderr, f, eargs);
 #else
        vfprintf(stderr, f, args);
 #endif
index 9d20d356dc138f8e58e0205799dd17c714daf67b..7e2d97798e9d5c5aa4df97bf88941bf4543e903b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: dns.cc,v 1.50 1998/01/12 04:29:59 wessels Exp $
+ * $Id: dns.cc,v 1.51 1998/01/12 04:30:36 wessels Exp $
  *
  * DEBUG: section 34    Dnsserver interface
  * AUTHOR: Harvest Derived
@@ -202,7 +202,7 @@ dnsOpenServer(const char *command)
      * -- Michael O'Reilly <michael@metal.iinet.net.au>
      */
     if (fd > 2)
-        close(fd);
+       close(fd);
     close(cfd);
     if (Config.onoff.res_defnames)
        execlp(command, "(dnsserver)", "-D", NULL);
index 3ef94dc29eda31b1e3e2096aea9334328194175e..f4d8622f7bdf68085644504f48746e48cdf30693 100644 (file)
@@ -376,80 +376,81 @@ enum {
     SNMP_C_USER,
     SNMP_C_COMMUNITY
 };
+
 #endif
 
 typedef enum {
-       MEM_NONE,
-       MEM_DISK_BUF,
-       MEM_STMEM_BUF,
-       MEM_4K_BUF,
-       MEM_8K_BUF,
-       MEM_ACL_IP_DATA,
-       MEM_ACL_TIME_DATA,
-       MEM_ACL_NAME_LIST,
-       MEM_ACL_DENY_INFO_LIST,
-       MEM_ACL,
+    MEM_NONE,
+    MEM_DISK_BUF,
+    MEM_STMEM_BUF,
+    MEM_4K_BUF,
+    MEM_8K_BUF,
+    MEM_ACL_IP_DATA,
+    MEM_ACL_TIME_DATA,
+    MEM_ACL_NAME_LIST,
+    MEM_ACL_DENY_INFO_LIST,
+    MEM_ACL,
 #if SQUID_SNMP
-       MEM_SNMPCONF,
+    MEM_SNMPCONF,
 #endif
-       MEM_ACL_LIST,
-       MEM_ACL_ACCESS,
-       MEM_ACLCHECK_T,
-       MEM_AIO_RESULT_T,
-       MEM_WORDLIST,
-       MEM_INTLIST,
-       MEM_USHORTLIST,
-       MEM_RELIST,
-       MEM_SQUIDCONFIG,
-       MEM_SQUIDCONFIG2,
-       MEM_CLOSE_HANDLER,
-       MEM_DREAD_CTRL,
-       MEM_DNSSERVER_T,
-       MEM_DNSSTATDATA,
-       MEM_DWRITE_Q,
-       MEM_FILEMAP,
-       MEM_FQDNCACHE_ENTRY,
-       MEM_HASH_LINK,
-       MEM_HASH_TABLE,
-       MEM_HTTP_REPLY,
-       MEM_HTTPSTATEDATA,
-       MEM_ICPUDPDATA,
-       MEM_CLIENTHTTPREQUEST,
-       MEM_CONNSTATEDATA,
-       MEM_IPCACHE_ADDRS,
-       MEM_IPCACHE_ENTRY,
-       MEM_DOMAIN_PING,
-       MEM_DOMAIN_TYPE,
-       MEM_PEER,
-       MEM_NET_DB_NAME,
-       MEM_NET_DB_PEER,
-       MEM_NETDBENTRY,
-       MEM_ICP_PING_DATA,
-       MEM_PS_STATE,
-       MEM_HIERARCHYLOGENTRY,
-       MEM_PINGERECHODATA,
-       MEM_PINGERREPLYDATA,
-       MEM_ICP_COMMON_T,
-       MEM_PROTO_STAT,
-       MEM_META_DATA,
-       MEM_CACHEINFO,
-       MEM_IOSTATS,
-       MEM_MEM_NODE,
-       MEM_MEM_HDR,
-       MEM_STORE_CLIENT,
-       MEM_MEMOBJECT,
-       MEM_STOREENTRY,
-       MEM_SWAPDIR,
-       MEM_REQUEST_T,
-       MEM_ACCESSLOGENTRY,
-       MEM_CACHEMGR_PASSWD,
-       MEM_REFRESH_T,
-       MEM_COMMWRITESTATEDATA,
-       MEM_ERRORSTATE,
-       MEM_DLINK_NODE,
-       MEM_DLINK_LIST,
-       MEM_STATCOUNTERS,
-       MEM_MAX
+    MEM_ACL_LIST,
+    MEM_ACL_ACCESS,
+    MEM_ACLCHECK_T,
+    MEM_AIO_RESULT_T,
+    MEM_WORDLIST,
+    MEM_INTLIST,
+    MEM_USHORTLIST,
+    MEM_RELIST,
+    MEM_SQUIDCONFIG,
+    MEM_SQUIDCONFIG2,
+    MEM_CLOSE_HANDLER,
+    MEM_DREAD_CTRL,
+    MEM_DNSSERVER_T,
+    MEM_DNSSTATDATA,
+    MEM_DWRITE_Q,
+    MEM_FILEMAP,
+    MEM_FQDNCACHE_ENTRY,
+    MEM_HASH_LINK,
+    MEM_HASH_TABLE,
+    MEM_HTTP_REPLY,
+    MEM_HTTPSTATEDATA,
+    MEM_ICPUDPDATA,
+    MEM_CLIENTHTTPREQUEST,
+    MEM_CONNSTATEDATA,
+    MEM_IPCACHE_ADDRS,
+    MEM_IPCACHE_ENTRY,
+    MEM_DOMAIN_PING,
+    MEM_DOMAIN_TYPE,
+    MEM_PEER,
+    MEM_NET_DB_NAME,
+    MEM_NET_DB_PEER,
+    MEM_NETDBENTRY,
+    MEM_ICP_PING_DATA,
+    MEM_PS_STATE,
+    MEM_HIERARCHYLOGENTRY,
+    MEM_PINGERECHODATA,
+    MEM_PINGERREPLYDATA,
+    MEM_ICP_COMMON_T,
+    MEM_PROTO_STAT,
+    MEM_META_DATA,
+    MEM_CACHEINFO,
+    MEM_IOSTATS,
+    MEM_MEM_NODE,
+    MEM_MEM_HDR,
+    MEM_STORE_CLIENT,
+    MEM_MEMOBJECT,
+    MEM_STOREENTRY,
+    MEM_SWAPDIR,
+    MEM_REQUEST_T,
+    MEM_ACCESSLOGENTRY,
+    MEM_CACHEMGR_PASSWD,
+    MEM_REFRESH_T,
+    MEM_COMMWRITESTATEDATA,
+    MEM_ERRORSTATE,
+    MEM_DLINK_NODE,
+    MEM_DLINK_LIST,
+    MEM_STATCOUNTERS,
+    MEM_MAX
 } mem_type;
 
 enum {
index c2b250daebaf7c0fc080590d5f912f46d4c7e0c1..d8184ee9427ec80433f12010f7625a220c7a0d7a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: fqdncache.cc,v 1.77 1998/01/06 05:15:40 wessels Exp $
+ * $Id: fqdncache.cc,v 1.78 1998/01/12 04:30:37 wessels Exp $
  *
  * DEBUG: section 35    FQDN Cache
  * AUTHOR: Harvest Derived
@@ -488,19 +488,19 @@ fqdncache_dnsHandleRead(int fd, void *data)
        }
        fqdncacheUnlockEntry(f);        /* unlock from FQDN_DISPATCHED */
     } else {
-        debug(14, 5) ("fqdncache_dnsHandleRead: Incomplete reply\n");
-        commSetSelect(fd,
-            COMM_SELECT_READ,
-            fqdncache_dnsHandleRead,
-            dnsData,
-            0);
+       debug(14, 5) ("fqdncache_dnsHandleRead: Incomplete reply\n");
+       commSetSelect(fd,
+           COMM_SELECT_READ,
+           fqdncache_dnsHandleRead,
+           dnsData,
+           0);
     }
     if (dnsData->offset == 0) {
        dnsData->data = NULL;
        EBIT_CLR(dnsData->flags, HELPER_BUSY);
-        if (EBIT_TEST(dnsData->flags, HELPER_SHUTDOWN))
-            dnsShutdownServer(dnsData);
-        cbdataUnlock(dnsData);
+       if (EBIT_TEST(dnsData->flags, HELPER_SHUTDOWN))
+           dnsShutdownServer(dnsData);
+       cbdataUnlock(dnsData);
     }
     fqdncacheNudgeQueue();
 }
index 41d9cbdefd6eef12e548759c6db8c7d9052b97e4..1d0073b823365db6986c2bd9896703a0d46fad55 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ftp.cc,v 1.186 1998/01/12 04:30:01 wessels Exp $
+ * $Id: ftp.cc,v 1.187 1998/01/12 04:30:38 wessels Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -564,7 +564,6 @@ ftpHtmlifyListEntry(char *line, int flags)
            *(parts->showname + width - 0) = '\0';
        }
     }
-    
     switch (parts->type) {
     case 'd':
        snprintf(icon, 2048, "<IMG SRC=\"%s%s\" ALT=\"%-6s\">",
index ee1642c541bd54111db44681a2fe5705d91548a6..ce42ca8d15760162abf0d25eeca1ca72a70c0ebb 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: globals.h,v 1.26 1998/01/12 04:30:01 wessels Exp $
+ * $Id: globals.h,v 1.27 1998/01/12 04:30:39 wessels Exp $
  */
 
 extern FILE *debug_log;                /* NULL */
@@ -99,7 +99,7 @@ extern StatCounters Counter;
 extern char *err_type_str[];
 extern char *icp_opcode_str[];
 extern struct radix_node_head *AS_tree_head;
-extern double request_failure_ratio; /* 0.0 */
+extern double request_failure_ratio;   /* 0.0 */
 
 #ifdef HAVE_SYSLOG
 extern int _db_level;
index 0af047baa836028ba4f5106e28ed1add52723ca2..c95492e9d1a54dbf3ce76bfdd22255b7c9975d76 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: http.cc,v 1.233 1998/01/12 04:30:03 wessels Exp $
+ * $Id: http.cc,v 1.234 1998/01/12 04:30:39 wessels Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -815,9 +815,9 @@ httpBuildRequestHeader(request_t * request,
            if (EBIT_TEST(request->flags, REQ_USED_PROXY_AUTH))
                continue;
        if (strncasecmp(xbuf, "Connection:", 11) == 0) {
-            handleConnectionHeader(0, no_forward, &xbuf[11]);
+           handleConnectionHeader(0, no_forward, &xbuf[11]);
            continue;
-        }
+       }
        if (strncasecmp(xbuf, "Host:", 5) == 0) {
            EBIT_SET(hdr_flags, HDR_HOST);
        } else if (strncasecmp(xbuf, "Cache-Control:", 14) == 0) {
@@ -846,7 +846,7 @@ httpBuildRequestHeader(request_t * request,
                snprintf(xbuf, 4096, "Max-Forwards: %d", n - 1);
            }
        }
-        if (!handleConnectionHeader(1, no_forward, xbuf))
+       if (!handleConnectionHeader(1, no_forward, xbuf))
            httpAppendRequestHeader(hdr_out, xbuf, &len, out_sz - 512, 1);
     }
     hdr_len = t - hdr_in;
index b99f401e1b057c8519f8901d765c46790fafccd0..7277ae010dfaa4af67af710baca64ecad078be5b 100644 (file)
@@ -191,9 +191,9 @@ icpHandleIcpV2(int fd, struct sockaddr_in from, char *buf, int len)
        debug(12, 5) ("icpHandleIcpV2: OPCODE %s\n", icp_opcode_str[header.opcode]);
        if (icpCheckUdpHit(entry, icp_request)) {
            pkt_len = sizeof(icp_common_t) + strlen(url) + 1 + 2 + entry->object_len;
-               reply = icpCreateMessage(ICP_HIT, flags, url, header.reqnum, src_rtt);
-               icpUdpSend(fd, &from, reply, LOG_UDP_HIT, icp_request->protocol);
-               break;
+           reply = icpCreateMessage(ICP_HIT, flags, url, header.reqnum, src_rtt);
+           icpUdpSend(fd, &from, reply, LOG_UDP_HIT, icp_request->protocol);
+           break;
        }
        /* if store is rebuilding, return a UDP_HIT, but not a MISS */
        if (store_rebuilding && opt_reload_hit_only) {
index 427254c49c83b2342deec5337364893a0ce7a8bb..d80ce02febc2f9a310f82379ecf47c2bff091e64 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: main.cc,v 1.207 1998/01/12 04:30:05 wessels Exp $
+ * $Id: main.cc,v 1.208 1998/01/12 04:30:40 wessels Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -383,7 +383,7 @@ mainReconfigure(void)
     debug(1, 0) ("Ready to serve requests.\n");
 }
 
-static void 
+static void
 setEffectiveUser(void)
 {
     leave_suid();              /* Run as non privilegied user */
@@ -547,15 +547,15 @@ main(int argc, char **argv)
        /* NOTREACHED */
     }
     if (opt_create_swap_dirs) {
-        if (ConfigFile == NULL)
-            ConfigFile = xstrdup(DefaultConfigFile);
-        cbdataInit();
-        parseConfigFile(ConfigFile);
-        setEffectiveUser();
-        debug(0, 0)("Creating Swap Directories\n");
-        storeCreateSwapDirectories();
-        return 0;
-    }   
+       if (ConfigFile == NULL)
+           ConfigFile = xstrdup(DefaultConfigFile);
+       cbdataInit();
+       parseConfigFile(ConfigFile);
+       setEffectiveUser();
+       debug(0, 0) ("Creating Swap Directories\n");
+       storeCreateSwapDirectories();
+       return 0;
+    }
     if (!opt_no_daemon)
        watch_child(argv);
     setMaxFD();
index 0d46ebb88524caf1cfe1fa7010c12cc0f8654d31..70380d93373b20ba6e17de1430c56d30b2ee5641 100644 (file)
@@ -1,5 +1,6 @@
+
 /*
- * $Id: mime.cc,v 1.45 1998/01/12 04:30:05 wessels Exp $
+ * $Id: mime.cc,v 1.46 1998/01/12 04:30:41 wessels Exp $
  *
  * DEBUG: section 25    MIME Parsing
  * AUTHOR: Harvest Derived