]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
gindent
authorwessels <>
Wed, 16 Jul 1997 05:23:14 +0000 (05:23 +0000)
committerwessels <>
Wed, 16 Jul 1997 05:23:14 +0000 (05:23 +0000)
17 files changed:
src/acl.cc
src/cache_cf.cc
src/cachemgr.cc
src/client.cc
src/client_side.cc
src/comm.cc
src/globals.h
src/gopher.cc
src/ident.cc
src/main.cc
src/neighbors.cc
src/refresh.cc
src/stmem.cc
src/store.cc
src/structs.h
src/tools.cc
src/typedefs.h

index d7566d224b6bf5618c44d030890eb507994ca3fa..1209a37e9ff4a2109d41cb71c38d72826efb5663 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: acl.cc,v 1.103 1997/07/14 03:33:34 wessels Exp $
+ * $Id: acl.cc,v 1.104 1997/07/15 23:23:14 wessels Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -477,12 +477,12 @@ aclParseRegexList(void *curlist)
     for (Tail = curlist; *Tail; Tail = &((*Tail)->next));
     while ((t = strtokFile())) {
        if (strcmp(t, "-i") == 0) {
-               flags |= REG_ICASE;
-               continue;
+           flags |= REG_ICASE;
+           continue;
        }
        if (strcmp(t, "+i") == 0) {
-               flags &= ~REG_ICASE;
-               continue;
+           flags &= ~REG_ICASE;
+           continue;
        }
        if ((errcode = regcomp(&comp, t, flags)) != 0) {
            char errbuf[256];
@@ -570,7 +570,7 @@ aclParseDomainList(void *curlist)
 #endif /* USE_SPLAY_TREE */
 
 void
-aclParseAclLine(acl **head)
+aclParseAclLine(acl ** head)
 {
     /* we're already using strtok() to grok the line */
     char *t = NULL;
@@ -1352,7 +1352,7 @@ aclDestroyRegexList(struct _relist *data)
 }
 
 void
-aclDestroyAcls(acl **head)
+aclDestroyAcls(acl ** head)
 {
     struct _acl *a = NULL;
     struct _acl *next = NULL;
index decb0b935ee676cd64ac5d9ef8b30d115939925a..36af67be25ca69d57567669aad86aeb203e1d0bf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: cache_cf.cc,v 1.206 1997/07/15 23:15:34 wessels Exp $
+ * $Id: cache_cf.cc,v 1.207 1997/07/15 23:23:15 wessels Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -54,14 +54,14 @@ static void wordlistAdd _PARAMS((wordlist **, const char *));
 static void configDoConfigure _PARAMS((void));
 static void parse_refreshpattern _PARAMS((refresh_t **));
 static int parseTimeUnits _PARAMS((const char *unit));
-static void parseTimeLine _PARAMS((time_t *tptr, const char *units));
+static void parseTimeLine _PARAMS((time_t * tptr, const char *units));
 
 static void parse_string _PARAMS((char **));
 static void parse_wordlist _PARAMS((wordlist **));
 static void default_all _PARAMS((void));
 static int parse_line _PARAMS((char *));
 static cache_peer *configFindPeer _PARAMS((const char *name));
-static void parseBytesLine _PARAMS((size_t *bptr, const char *units));
+static void parseBytesLine _PARAMS((size_t * bptr, const char *units));
 static size_t parseBytesUnits _PARAMS((const char *unit));
 
 /* These come from cf_gen.c */
@@ -216,9 +216,9 @@ configDoConfigure(void)
     cache_peer *p;
     memset(&Config2, '\0', sizeof(SquidConfig2));
     if (Config.Accel.host) {
-        snprintf(buf, BUFSIZ, "http://%s:%d", Config.Accel.host, Config.Accel.port);
-        Config2.Accel.prefix = xstrdup(buf);
-        Config2.Accel.on = 1;
+       snprintf(buf, BUFSIZ, "http://%s:%d", Config.Accel.host, Config.Accel.port);
+       Config2.Accel.prefix = xstrdup(buf);
+       Config2.Accel.on = 1;
     }
     if (Config.appendDomain)
        if (*Config.appendDomain != '.')
@@ -243,21 +243,21 @@ configDoConfigure(void)
     safe_free(debug_options)
        debug_options = xstrdup(Config.debugOptions);
     /* ICK */
-    for (p = Config.peers; p; p=p->next) {
+    for (p = Config.peers; p; p = p->next) {
        neighborAdd(p->host,
-               p->type,        
-               p->http,
-               p->icp,
-               p->options,
-               p->weight,
-               p->mcast_ttl);
+           p->type,
+           p->http,
+           p->icp,
+           p->options,
+           p->weight,
+           p->mcast_ttl);
     }
 }
 
 /* Parse a time specification from the config file.  Store the
  * result in 'tptr', after converting it to 'units' */
 static void
-parseTimeLine(time_t *tptr, const char *units)
+parseTimeLine(time_t * tptr, const char *units)
 {
     char *token;
     double d;
@@ -270,10 +270,10 @@ parseTimeLine(time_t *tptr, const char *units)
     d = atof(token);
     m = u;                     /* default to 'units' if none specified */
     if ((token = strtok(NULL, w_space)) == NULL)
-       debug(3,0)("WARNING: No units on '%s', assuming %f %s\n",
-               config_input_line, d, units);
+       debug(3, 0) ("WARNING: No units on '%s', assuming %f %s\n",
+           config_input_line, d, units);
     else if ((m = parseTimeUnits(token)) == 0)
-           self_destruct();
+       self_destruct();
     *tptr = m * d / u;
 }
 
@@ -329,11 +329,11 @@ parseBytesUnits(const char *unit)
     if (!strncasecmp(unit, B_BYTES_STR, strlen(B_BYTES_STR)))
        return 1;
     if (!strncasecmp(unit, B_KBYTES_STR, strlen(B_KBYTES_STR)))
-       return 1<<10;
+       return 1 << 10;
     if (!strncasecmp(unit, B_MBYTES_STR, strlen(B_MBYTES_STR)))
-       return 1<<20;
+       return 1 << 20;
     if (!strncasecmp(unit, B_GBYTES_STR, strlen(B_GBYTES_STR)))
-       return 1<<30;
+       return 1 << 30;
     debug(3, 1) ("parseBytesUnits: unknown bytes unit '%s'\n", unit);
     return 0;
 }
@@ -343,19 +343,19 @@ parseBytesUnits(const char *unit)
  *****************************************************************************/
 
 static void
-dump_acl(acl *acl)
+dump_acl(acl * acl)
 {
     assert(0);
 }
 
 static void
-parse_acl(acl **acl)
+parse_acl(acl ** acl)
 {
     aclParseAclLine(acl);
 }
 
 static void
-free_acl(acl **acl)
+free_acl(acl ** acl)
 {
     aclDestroyAcls(acl);
 }
@@ -375,7 +375,7 @@ parse_acl_access(struct _acl_access **head)
 static void
 free_acl_access(struct _acl_access **head)
 {
-       aclDestroyAccessList(head);
+    aclDestroyAccessList(head);
 }
 
 static void
@@ -403,7 +403,7 @@ parse_address(struct in_addr *addr)
 static void
 free_address(struct in_addr *addr)
 {
-       memset(addr, '\0', sizeof(struct in_addr));
+    memset(addr, '\0', sizeof(struct in_addr));
 }
 
 static void
@@ -437,11 +437,11 @@ parse_cachedir(struct _cacheSwap *swap)
        if (!strcasecmp(token, "read-only"))
            readonly = 1;
     for (i = 0; i < swap->n_configured; i++) {
-       tmp = swap->swapDirs+i;
+       tmp = swap->swapDirs + i;
        if (!strcmp(path, tmp->path)) {
            /* just reconfigure it */
-            tmp->max_size = size;
-            tmp->read_only = readonly;
+           tmp->max_size = size;
+           tmp->read_only = readonly;
            return;
        }
     }
@@ -472,27 +472,27 @@ parse_cachedir(struct _cacheSwap *swap)
 static void
 free_cachedir(struct _cacheSwap *swap)
 {
-       SwapDir *s;
-       int i;
-       for (i = 0; i<swap->n_configured; i++) {
-               s = swap->swapDirs+i;
-               xfree(s->path); 
-               filemapFreeMemory(s->map);
-       }
-       safe_free(swap->swapDirs);
-       swap->swapDirs = NULL;
-       swap->n_allocated = 0;
-       swap->n_configured = 0;
+    SwapDir *s;
+    int i;
+    for (i = 0; i < swap->n_configured; i++) {
+       s = swap->swapDirs + i;
+       xfree(s->path);
+       filemapFreeMemory(s->map);
+    }
+    safe_free(swap->swapDirs);
+    swap->swapDirs = NULL;
+    swap->n_allocated = 0;
+    swap->n_configured = 0;
 }
 
 static void
-dump_cache_peer(cache_peer *p)
+dump_cache_peer(cache_peer * p)
 {
     assert(0);
 }
 
 static void
-parse_cache_peer(cache_peer **head)
+parse_cache_peer(cache_peer ** head)
 {
     char *token = NULL;
     cache_peer peer;
@@ -502,7 +502,7 @@ parse_cache_peer(cache_peer **head)
     peer.http = CACHE_HTTP_PORT;
     peer.icp = CACHE_ICP_PORT;
     peer.weight = 1;
-    if (!(peer.host = strtok(NULL, w_space))) 
+    if (!(peer.host = strtok(NULL, w_space)))
        self_destruct();
     if (!(peer.type = strtok(NULL, w_space)))
        self_destruct();
@@ -546,25 +546,25 @@ parse_cache_peer(cache_peer **head)
 }
 
 static void
-free_cache_peer(cache_peer **P)
+free_cache_peer(cache_peer ** P)
 {
-       cache_peer *p;
-       while ((p = *P)) {
-               *P = p->next;
-               xfree(p->host);
-               xfree(p->type);
-               xfree(p);
-       }
+    cache_peer *p;
+    while ((p = *P)) {
+       *P = p->next;
+       xfree(p->host);
+       xfree(p->type);
+       xfree(p);
+    }
 }
 
 static void
-dump_cachemgrpasswd(cachemgr_passwd *list)
+dump_cachemgrpasswd(cachemgr_passwd * list)
 {
     assert(0);
 }
 
 static void
-parse_cachemgrpasswd(cachemgr_passwd **head)
+parse_cachemgrpasswd(cachemgr_passwd ** head)
 {
     char *passwd = NULL;
     wordlist *actions = NULL;
@@ -575,14 +575,14 @@ parse_cachemgrpasswd(cachemgr_passwd **head)
 }
 
 static void
-free_cachemgrpasswd(cachemgr_passwd **head)
+free_cachemgrpasswd(cachemgr_passwd ** head)
 {
-       cachemgr_passwd *p;
-       while ((p = *head)) {
-               *head = p->next;
-               xfree(p->passwd);
-               xfree(p);
-       }
+    cachemgr_passwd *p;
+    while ((p = *head)) {
+       *head = p->next;
+       xfree(p->passwd);
+       xfree(p);
+    }
 }
 
 
@@ -599,19 +599,19 @@ parse_denyinfo(struct _acl_deny_info_list **var)
 }
 
 void
-free_denyinfo(acl_deny_info_list **list)
+free_denyinfo(acl_deny_info_list ** list)
 {
     struct _acl_deny_info_list *a = NULL;
     struct _acl_deny_info_list *a_next = NULL;
     struct _acl_name_list *l = NULL;
     struct _acl_name_list *l_next = NULL;
     for (a = *list; a; a = a_next) {
-        for (l = a->acl_list; l; l = l_next) {
-            l_next = l->next;
-            safe_free(l);
-        }
-        a_next = a->next;
-        safe_free(a);
+       for (l = a->acl_list; l; l = l_next) {
+           l_next = l->next;
+           safe_free(l);
+       }
+       a_next = a->next;
+       safe_free(a);
     }
     *list = NULL;
 }
@@ -655,12 +655,12 @@ parse_peeracl(void)
 }
 
 static cache_peer *
-configFindPeer (const char *name)
+configFindPeer(const char *name)
 {
     cache_peer *p = NULL;
     for (p = Config.peers; p; p = p->next) {
-        if (!strcasecmp(name, p->host))
-            break;
+       if (!strcasecmp(name, p->host))
+           break;
     }
     return p;
 }
@@ -753,7 +753,7 @@ parse_httpanonymizer(int *var)
 
 
 static void
-dump_ushortlist(ushortlist *u)
+dump_ushortlist(ushortlist * u)
 {
     while (u) {
        printf("%d ", (int) u->i);
@@ -781,13 +781,13 @@ parse_ushortlist(ushortlist ** P)
 }
 
 static void
-free_ushortlist(ushortlist **P)
+free_ushortlist(ushortlist ** P)
 {
-       ushortlist *u;
-       while ((u = *P)) {
-               *P = u->next;
-               xfree(u);
-       }
+    ushortlist *u;
+    while ((u = *P)) {
+       *P = u->next;
+       xfree(u);
+    }
 }
 
 static void
@@ -809,7 +809,7 @@ parse_int(int *var)
 static void
 free_int(int *var)
 {
-       *var = 0;
+    *var = 0;
 }
 
 static void
@@ -850,7 +850,7 @@ parse_pathname_stat(char **path)
 }
 
 static void
-dump_refreshpattern(refresh_t *head)
+dump_refreshpattern(refresh_t * head)
 {
     assert(0);
 }
@@ -911,7 +911,7 @@ parse_refreshpattern(refresh_t ** head)
 }
 
 static void
-free_refreshpattern(refresh_t **head)
+free_refreshpattern(refresh_t ** head)
 {
     refresh_t *t;
     while ((t = *head)) {
@@ -960,8 +960,8 @@ parse_string(char **var)
 static void
 free_string(char **var)
 {
-       xfree(*var);
-       *var = NULL;
+    xfree(*var);
+    *var = NULL;
 }
 
 static void
@@ -981,15 +981,15 @@ dump_time_t(time_t var)
 }
 
 static void
-parse_time_t(time_t *var)
+parse_time_t(time_t * var)
 {
     parseTimeLine(var, T_SECOND_STR);
 }
 
 static void
-free_time_t(time_t *var)
+free_time_t(time_t * var)
 {
-       *var = 0;
+    *var = 0;
 }
 
 static void
@@ -1005,21 +1005,21 @@ dump_kb_size_t(size_t var)
 }
 
 static void
-parse_size_t(size_t *var)
+parse_size_t(size_t * var)
 {
     parseBytesLine(var, B_BYTES_STR);
 }
 
 static void
-parse_kb_size_t(size_t *var)
+parse_kb_size_t(size_t * var)
 {
     parseBytesLine(var, B_KBYTES_STR);
 }
 
 static void
-free_size_t(size_t *var)
+free_size_t(size_t * var)
 {
-       *var = 0;
+    *var = 0;
 }
 
 #define free_kb_size_t free_size_t
@@ -1033,7 +1033,7 @@ dump_ushort(u_short var)
 }
 
 static void
-free_ushort(u_short *u)
+free_ushort(u_short * u)
 {
     *u = 0;
 }
@@ -1090,4 +1090,3 @@ parseNeighborType(const char *s)
     debug(15, 0) ("WARNING: Unknown neighbor type: %s\n", s);
     return PEER_SIBLING;
 }
-
index 115801ceedba3228ad15ba70e113edeec960e434..418dad062f5108522843df15903e2d48059e4998 100644 (file)
@@ -1,6 +1,7 @@
 
+
 /*
- * $Id: cachemgr.cc,v 1.54 1997/04/28 04:22:59 wessels Exp $
+ * $Id: cachemgr.cc,v 1.55 1997/07/15 23:23:16 wessels Exp $
  *
  * DEBUG: section 0     CGI Cache Manager
  * AUTHOR: Harvest Derived
index 3b8832f6047f6ced5556f185f68b68e23ddcc58f..cbd163b9cc6e08ceeef430865d0eb6f8f9d8cc0c 100644 (file)
@@ -1,7 +1,8 @@
 
 
+
 /*
- * $Id: client.cc,v 1.18 1997/06/26 22:35:40 wessels Exp $
+ * $Id: client.cc,v 1.19 1997/07/15 23:23:18 wessels Exp $
  *
  * DEBUG: section 0     WWW Client
  * AUTHOR: Harvest Derived
index 5b09f1396330d7b5833bf378132459a9834553d9..3b0917d6417041aef6ceeb83489bad2bee9ef0ff 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.116 1997/07/07 05:29:41 wessels Exp $
+ * $Id: client_side.cc,v 1.117 1997/07/15 23:23:19 wessels Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -405,9 +405,9 @@ icpHandleIMSReply(void *data, char *buf, ssize_t size)
        /* We have an existing entry, but failed to validate it */
        if (BIT_SET(entry->flag, ENTRY_REVALIDATE)) {
            /* We can't send the old one, so send the abort message */
-            http->log_type = LOG_TCP_REFRESH_MISS;
-            storeUnregister(http->old_entry, http);
-            storeUnlockObject(http->old_entry);
+           http->log_type = LOG_TCP_REFRESH_MISS;
+           storeUnregister(http->old_entry, http);
+           storeUnlockObject(http->old_entry);
        } else {
            /* Its okay to send the old one anyway */
            http->log_type = entry->mem_obj->abort_code;
index b0322ccc30035488b451eb4558dc06d41d0129f1..c335cf56b7cbc10e8678ff4ef3cd4ccca33c2fc6 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm.cc,v 1.178 1997/07/15 04:03:09 wessels Exp $
+ * $Id: comm.cc,v 1.179 1997/07/15 23:23:21 wessels Exp $
  *
  * DEBUG: section 5     Socket Functions
  * AUTHOR: Harvest Derived
@@ -576,7 +576,7 @@ comm_close(int fd)
     assert(fd < Squid_MaxFD);
     F = &fd_table[fd];
     if (!F->open) {
-       debug(5,1)("comm_close: FD %d is not open!\n", fd);
+       debug(5, 1) ("comm_close: FD %d is not open!\n", fd);
        return;
     }
     assert(F->type != FD_FILE);
index 5ca29f8efa0ace019a7b839792b442bd28c619da..00b8b10d28d22b270da9b39d1274e21b519e8050 100644 (file)
@@ -1,6 +1,6 @@
 
-extern FILE *debug_log; /* NULL */
-extern FILE *cache_useragent_log; /* NULL */
+extern FILE *debug_log;                /* NULL */
+extern FILE *cache_useragent_log;      /* NULL */
 extern Meta_data meta_data;
 extern SquidConfig Config;
 extern SquidConfig2 Config2;
@@ -8,25 +8,25 @@ extern cacheinfo *HTTPCacheInfo;
 extern cacheinfo *ICPCacheInfo;
 extern char *ConfigFile;       /* NULL */
 extern char *IcpOpcodeStr[];
-extern char *dns_error_message; /* NULL */
+extern char *dns_error_message;        /* NULL */
 extern char *log_tags[];
-extern char *tmp_error_buf; /* NULL */
-extern char *volatile debug_options; /* NULL */
+extern char *tmp_error_buf;    /* NULL */
+extern char *volatile debug_options;   /* NULL */
 extern char ThisCache[SQUIDHOSTNAMELEN << 1];
 extern char config_input_line[BUFSIZ];
-extern const char *AclMatchedName; /* NULL */
+extern const char *AclMatchedName;     /* NULL */
 extern const char *DefaultConfigFile;  /* DEFAULT_CONFIG_FILE */
 extern const char *DefaultSwapDir;     /* DEFAULT_SWAP_DIR */
 extern const char *RequestMethodStr[];
 extern const char *cfg_filename;       /* NULL */
-extern const char *const appname; /* "squid" */
-extern const char *const close_bracket; /* "}\n" */
-extern const char *const dash_str; /* "-" */
-extern const char *const localhost; /* "127.0.0.1" */
-extern const char *const null_string; /* "" */
-extern const char *const open_bracket; /* "{\n" */
-extern const char *const version_string ; /* SQUID_VERSION */
-extern const char *const w_space; /* " \t\n\r" */
+extern const char *const appname;      /* "squid" */
+extern const char *const close_bracket;                /* "}\n" */
+extern const char *const dash_str;     /* "-" */
+extern const char *const localhost;    /* "127.0.0.1" */
+extern const char *const null_string;  /* "" */
+extern const char *const open_bracket; /* "{\n" */
+extern const char *const version_string;       /* SQUID_VERSION */
+extern const char *const w_space;      /* " \t\n\r" */
 extern const char *fdstatTypeStr[];
 extern const char *hier_strings[];
 extern const char *memStatusStr[];
@@ -34,60 +34,59 @@ extern const char *pingStatusStr[];
 extern const char *storeStatusStr[];
 extern const char *swapStatusStr[];
 extern dnsStatData DnsStats;
-extern fde *fd_table; /* NULL */
-extern int Biggest_FD; /* -1 */
+extern fde *fd_table;          /* NULL */
+extern int Biggest_FD;         /* -1 */
 extern int HttpSockets[MAXHTTPPORTS];
 extern int NDnsServersAlloc;   /* 0 */
-extern int NHttpSockets; /* 0 */
+extern int NHttpSockets;       /* 0 */
 extern int RESERVED_FD;
-extern int Squid_MaxFD; /* SQUID_MAXFD */
+extern int Squid_MaxFD;                /* SQUID_MAXFD */
 extern int config_lineno;      /* 0 */
-extern int configured_once; /* 0 */
+extern int configured_once;    /* 0 */
 extern int debugLevels[MAX_DEBUG_SECTIONS];
-extern int do_mallinfo; /* 0 */
-extern int do_reuse; /* 1 */
+extern int do_mallinfo;                /* 0 */
+extern int do_reuse;           /* 1 */
 extern int hash_links_allocated;
-extern int icmp_sock; /* -1 */
-extern int neighbors_do_private_keys; /* 1 */
-extern int opt_accel_uses_host; /* 0 */
-extern int opt_catch_signals; /* 1 */
-extern int opt_debug_stderr; /* 0 */
-extern int opt_dns_tests; /* 1 */
-extern int opt_foreground_rebuild; /* 0 */
-extern int opt_forwarded_for; /* 1 */
-extern int opt_mem_pools; /* 1 */
-extern int opt_reload_hit_only; /* 0 */
-extern int opt_syslog_enable; /* 0 */
-extern int opt_udp_hit_obj; /* 0 */
-extern int opt_zap_disk_store; /* 0 */
-extern int select_loops; /* 0 */
-extern int syslog_enable; /* 0 */
-extern int theInIcpConnection; /* -1 */
-extern int theOutIcpConnection; /* -1 */
-extern int vhost_mode; /* 0 */
-extern int vizSock; /* -1 */
+extern int icmp_sock;          /* -1 */
+extern int neighbors_do_private_keys;  /* 1 */
+extern int opt_accel_uses_host;        /* 0 */
+extern int opt_catch_signals;  /* 1 */
+extern int opt_debug_stderr;   /* 0 */
+extern int opt_dns_tests;      /* 1 */
+extern int opt_foreground_rebuild;     /* 0 */
+extern int opt_forwarded_for;  /* 1 */
+extern int opt_mem_pools;      /* 1 */
+extern int opt_reload_hit_only;        /* 0 */
+extern int opt_syslog_enable;  /* 0 */
+extern int opt_udp_hit_obj;    /* 0 */
+extern int opt_zap_disk_store; /* 0 */
+extern int select_loops;       /* 0 */
+extern int syslog_enable;      /* 0 */
+extern int theInIcpConnection; /* -1 */
+extern int theOutIcpConnection;        /* -1 */
+extern int vhost_mode;         /* 0 */
+extern int vizSock;            /* -1 */
 extern iostats IOStats;
 extern stmem_stats disk_stats;
 extern stmem_stats mem_obj_pool;
 extern stmem_stats request_pool;
 extern stmem_stats sm_stats;
-extern struct _acl_deny_info_list *DenyInfoList; /* NULL */
+extern struct _acl_deny_info_list *DenyInfoList;       /* NULL */
 extern struct in_addr any_addr;
 extern struct in_addr local_addr;
 extern struct in_addr no_addr;
 extern struct in_addr theOutICPAddr;
 extern struct timeval current_time;
-extern time_t squid_curtime; /* 0 */
-extern time_t squid_starttime; /* 0 */
-extern volatile int reconfigure_pending; /* 0 */
-extern volatile int shutdown_pending; /* 0 */
+extern time_t squid_curtime;   /* 0 */
+extern time_t squid_starttime; /* 0 */
+extern volatile int reconfigure_pending;       /* 0 */
+extern volatile int shutdown_pending;  /* 0 */
 extern volatile int unbuffered_logs;   /* 0 */
-extern volatile unsigned long nudpconn; /* 0 */
-extern volatile unsigned long ntcpconn; /* 0 */
-extern int unlinkd_count; /* 0 */
-extern int fileno_stack_count; /* 0 */
+extern volatile unsigned long nudpconn;                /* 0 */
+extern volatile unsigned long ntcpconn;                /* 0 */
+extern int unlinkd_count;      /* 0 */
+extern int fileno_stack_count; /* 0 */
 
 #ifdef HAVE_SYSLOG
 extern int _db_level;
 #endif
-
index ccc7b3f841fcccdeaa2fe913f387a0b661be3afc..8657e59a1344757417d66b36a6ce3b75ec82f9ad 100644 (file)
@@ -1,5 +1,6 @@
+
 /*
- * $Id: gopher.cc,v 1.89 1997/07/15 03:29:02 wessels Exp $
+ * $Id: gopher.cc,v 1.90 1997/07/15 23:23:23 wessels Exp $
  *
  * DEBUG: section 10    Gopher
  * AUTHOR: Harvest Derived
@@ -770,28 +771,28 @@ gopherSendComplete(int fd, char *buf, int size, int errflag, void *data)
      * stuff.  Do it anyway even though request is not HTML type.
      */
     gopherMimeCreate(gopherState);
-       switch (gopherState->type_id) {
-       case GOPHER_DIRECTORY:
-           /* we got to convert it first */
-           BIT_SET(entry->flag, DELAY_SENDING);
-           gopherState->conversion = HTML_DIR;
-           gopherState->HTML_header_added = 0;
-           break;
-       case GOPHER_INDEX:
-           /* we got to convert it first */
-           BIT_SET(entry->flag, DELAY_SENDING);
-           gopherState->conversion = HTML_INDEX_RESULT;
-           gopherState->HTML_header_added = 0;
-           break;
-       case GOPHER_CSO:
-           /* we got to convert it first */
-           BIT_SET(entry->flag, DELAY_SENDING);
-           gopherState->conversion = HTML_CSO_RESULT;
-           gopherState->cso_recno = 0;
-           gopherState->HTML_header_added = 0;
-           break;
-       default:
-           gopherState->conversion = NORMAL;
+    switch (gopherState->type_id) {
+    case GOPHER_DIRECTORY:
+       /* we got to convert it first */
+       BIT_SET(entry->flag, DELAY_SENDING);
+       gopherState->conversion = HTML_DIR;
+       gopherState->HTML_header_added = 0;
+       break;
+    case GOPHER_INDEX:
+       /* we got to convert it first */
+       BIT_SET(entry->flag, DELAY_SENDING);
+       gopherState->conversion = HTML_INDEX_RESULT;
+       gopherState->HTML_header_added = 0;
+       break;
+    case GOPHER_CSO:
+       /* we got to convert it first */
+       BIT_SET(entry->flag, DELAY_SENDING);
+       gopherState->conversion = HTML_CSO_RESULT;
+       gopherState->cso_recno = 0;
+       gopherState->HTML_header_added = 0;
+       break;
+    default:
+       gopherState->conversion = NORMAL;
     }
     /* Schedule read reply. */
     commSetSelect(fd, COMM_SELECT_READ, gopherReadReply, gopherState, 0);
index 2cf21b7522f8f115b674f7b7294f641c0b91da78..38d55747276f33ae0be5b2d16bbde6ea404a844c 100644 (file)
@@ -1,5 +1,6 @@
+
 /*
- * $Id: ident.cc,v 1.31 1997/07/14 23:45:01 wessels Exp $
+ * $Id: ident.cc,v 1.32 1997/07/15 23:23:27 wessels Exp $
  *
  * DEBUG: section 30    Ident (RFC 931)
  * AUTHOR: Duane Wessels
index 99242184a71933cd051d278efb4793cadc578343..89a3a39e090300696240aff562b2ba79989d29df 100644 (file)
@@ -1,5 +1,6 @@
+
 /*
- * $Id: main.cc,v 1.162 1997/07/15 05:34:11 wessels Exp $
+ * $Id: main.cc,v 1.163 1997/07/15 23:23:28 wessels Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -311,7 +312,7 @@ serverConnectionsOpen(void)
     int x;
     int fd;
     wordlist *s;
-    for (u = Config.Port.http; u; u=u->next) {
+    for (u = Config.Port.http; u; u = u->next) {
        enter_suid();
        fd = comm_open(SOCK_STREAM,
            0,
index 6871e649cf33305ef58608dcd7b3142e4ec378e4..a47cd25a6bdefec1f1f31e345a3c17b101318df1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: neighbors.cc,v 1.150 1997/07/15 23:15:36 wessels Exp $
+ * $Id: neighbors.cc,v 1.151 1997/07/15 23:23:30 wessels Exp $
  *
  * DEBUG: section 15    Neighbor Routines
  * AUTHOR: Harvest Derived
@@ -730,11 +730,11 @@ neighborAdd(const char *host,
     ushortlist *u;
     const char *me = getMyHostname();
     if (!strcmp(host, me)) {
-       for (u=Config.Port.http; u; u=u->next) {
+       for (u = Config.Port.http; u; u = u->next) {
            if (http_port != u->i)
                continue;
            debug(15, 0) ("neighborAdd: skipping cache_host %s %s/%d/%d\n",
-               type, host, http_port, icp_port);
+               type, host, http_port, icp_port);
            return;
        }
     }
index f81808cb20d39f7b4f7e12cbd66e4859ae5ee447..758862e716bbc0c3f93b488b00af674e8a514436 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: refresh.cc,v 1.14 1997/07/07 05:29:52 wessels Exp $
+ * $Id: refresh.cc,v 1.15 1997/07/15 23:23:31 wessels Exp $
  *
  * DEBUG: section 22    Refresh Calculation
  * AUTHOR: Harvest Derived
@@ -62,7 +62,7 @@ refreshCheck(const StoreEntry * entry, const request_t * request, time_t delta)
     time_t check_time = squid_curtime + delta;
     debug(22, 3) ("refreshCheck: '%s'\n", entry->url);
     if (BIT_TEST(entry->flag, ENTRY_REVALIDATE)) {
-       debug(22, 3)("refreshCheck: YES: Required Authorization\n");
+       debug(22, 3) ("refreshCheck: YES: Required Authorization\n");
        return 1;
     }
     for (R = Config.Refresh; R; R = R->next) {
index 6c7edfe0663f14dbb26683e6f6081b2e172af1f0..a39d03eecabe4d744158587c1606e1346e6e7617 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: stmem.cc,v 1.46 1997/07/14 03:33:40 wessels Exp $
+ * $Id: stmem.cc,v 1.47 1997/07/15 23:23:33 wessels Exp $
  *
  * DEBUG: section 19    Memory Primitives
  * AUTHOR: Harvest Derived
@@ -137,7 +137,7 @@ memFree(mem_hdr * mem)
            safe_free(p);
        }
     }
-    memset(mem, '\0', sizeof(mem_hdr *));              /* nuke in case ref'ed again */
+    memset(mem, '\0', sizeof(mem_hdr *));      /* nuke in case ref'ed again */
     safe_free(mem);
 }
 
@@ -291,7 +291,7 @@ memCopy(const mem_hdr * mem, off_t offset, char *buf, size_t size)
 mem_hdr *
 memInit(void)
 {
-    mem_hdr * new = xcalloc(1, sizeof(mem_hdr));
+    mem_hdr *new = xcalloc(1, sizeof(mem_hdr));
     new->tail = new->head = NULL;
     return new;
 }
index 0df16f8eadd3661a103d284ee56390047554f249..be0fec01b8e74251bd039a30d8fbc483b48670f7 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.cc,v 1.272 1997/07/15 15:46:27 wessels Exp $
+ * $Id: store.cc,v 1.273 1997/07/15 23:23:34 wessels Exp $
  *
  * DEBUG: section 20    Storeage Manager
  * AUTHOR: Harvest Derived
@@ -197,6 +197,7 @@ struct storeRebuildState {
     int clashcount;            /* # swapfile clashes avoided */
     int dupcount;              /* # duplicates purged */
     int invalid;               /* # bad lines */
+    int badflags;              /* # bad e->flags */
     int need_to_validate;
     time_t start;
     time_t stop;
@@ -765,15 +766,10 @@ static StoreEntry *
 storeAddDiskRestore(const char *url, int file_number, int size, time_t expires, time_t timestamp, time_t lastmod, u_num32 refcount, u_num32 flags, int clean)
 {
     StoreEntry *e = NULL;
-
-    debug(20, 5) ("StoreAddDiskRestore: '%s': size %d: expires %d: fileno=%08X\n",
-       url, size, expires, file_number);
-
+    debug(20, 5) ("StoreAddDiskRestore: %s, fileno=%08X\n", url, file_number);
     /* if you call this you'd better be sure file_number is not 
      * already in use! */
-
     meta_data.url_strings += strlen(url);
-
     e = new_StoreEntry(WITHOUT_MEMOBJ);
     e->url = xstrdup(url);
     e->method = METHOD_GET;
@@ -868,10 +864,10 @@ InvokeHandlers(StoreEntry * e)
     struct _store_client *sc;
     ssize_t size;
     assert(mem->clients != NULL || mem->nclients == 0);
-    debug(20,3)("InvokeHandlers: %s\n", e->key);
+    debug(20, 3) ("InvokeHandlers: %s\n", e->key);
     /* walk the entire list looking for valid callbacks */
     for (i = 0; i < mem->nclients; i++) {
-        debug(20,3)("InvokeHandlers: checking client #%d\n", i);
+       debug(20, 3) ("InvokeHandlers: checking client #%d\n", i);
        sc = &mem->clients[i];
        if (sc->callback_data == NULL)
            continue;
@@ -883,7 +879,7 @@ InvokeHandlers(StoreEntry * e)
            sc->copy_offset,
            sc->copy_buf,
            sc->copy_size);
-        debug(20,3)("InvokeHandlers: calling handler: %p\n", callback);
+       debug(20, 3) ("InvokeHandlers: calling handler: %p\n", callback);
        callback(sc->callback_data, sc->copy_buf, size);
     }
 }
@@ -1343,6 +1339,10 @@ storeDoRebuildFromDisk(void *data)
            RB->invalid++;
            continue;
        }
+       if (BIT_TEST(scan6, KEY_PRIVATE)) {
+           RB->badflags++;
+           continue;
+       }
        sfileno = storeDirProperFileno(d->dirn, sfileno);
        timestamp = (time_t) scan1;
        expires = (time_t) scan2;
@@ -1551,6 +1551,7 @@ storeRebuiltFromDisk(struct storeRebuildState *data)
     debug(20, 1) ("Finished rebuilding storage from disk image.\n");
     debug(20, 1) ("  %7d Lines read from previous logfile.\n", data->linecount);
     debug(20, 1) ("  %7d Invalid lines.\n", data->invalid);
+    debug(20, 1) ("  %7d With invalid flags.\n", data->badflags);
     debug(20, 1) ("  %7d Objects loaded.\n", data->objcount);
     debug(20, 1) ("  %7d Objects expired.\n", data->expcount);
     debug(20, 1) ("  %7d Duplicate URLs purged.\n", data->dupcount);
@@ -2144,7 +2145,7 @@ storeClientCopy(StoreEntry * e,
     assert(seen_offset <= mem->e_current_len);
     assert(copy_offset >= mem->e_lowest_offset);
     assert(recurse_detect < 3);        /* could == 1 for IMS not modified's */
-    debug(20,3)("storeClientCopy: %s, seen %d want %d, size %d, cb %p, cbdata %p\n",
+    debug(20, 3) ("storeClientCopy: %s, seen %d want %d, size %d, cb %p, cbdata %p\n",
        e->key,
        (int) seen_offset,
        (int) copy_offset,
@@ -2267,8 +2268,8 @@ storeInitHashValues(void)
        store_maintain_buckets == 1 ? null_string : "s",
        store_maintain_rate,
        store_maintain_rate == 1 ? null_string : "s");
-    debug(20,1)("Max Mem  size: %d KB\n", Config.Mem.maxSize>>10);
-    debug(20,1)("Max Swap size: %d KB\n", Config.Swap.maxSize);
+    debug(20, 1) ("Max Mem  size: %d KB\n", Config.Mem.maxSize >> 10);
+    debug(20, 1) ("Max Swap size: %d KB\n", Config.Swap.maxSize);
 }
 
 void
index 16f2444afa6591fa0533dddb4671e47673da4892..e6f5f509b26e2201ba2d9695722ab1cf4beab500 100644 (file)
@@ -241,9 +241,9 @@ struct _SquidConfig {
     } Ftp;
     refresh_t *Refresh;
     struct _cacheSwap {
-        SwapDir *swapDirs;
-        int n_allocated;
-        int n_configured;
+       SwapDir *swapDirs;
+       int n_allocated;
+       int n_configured;
     } cacheSwap;
 };
 
index 9cbe14fcf5ab0d345b617382b7fca7cdeaf989fc..0a4ccbf2f18df4d030da7004464e25bdf556cb31 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: tools.cc,v 1.115 1997/07/15 05:34:13 wessels Exp $
+ * $Id: tools.cc,v 1.116 1997/07/15 23:23:37 wessels Exp $
  *
  * DEBUG: section 21    Misc Functions
  * AUTHOR: Harvest Derived
@@ -384,7 +384,7 @@ fatal_common(const char *message)
 #endif
     fprintf(debug_log, "FATAL: %s\n", message);
     if (opt_debug_stderr && debug_log != stderr)
-       fprintf(stderr, "FATAL: %s\n", message);
+       fprintf(stderr, "FATAL: %s\n", message);
     fprintf(debug_log, "Squid Cache (Version %s): Terminated abnormally.\n",
        version_string);
     fflush(debug_log);
index fc2d7ba1b06ff5380b9a910072a26ec74cc9cde5..31faec20285050437aee6dbb3da6be3b8075fc54 100644 (file)
@@ -5,9 +5,9 @@ typedef unsigned int ping_status_t;
 typedef unsigned int swap_status_t;
 
 /*
   grep '^struct' structs.h \
   | perl -ne '($a,$b)=split;$c=$b;$c=~s/^_//; print "typedef struct $b $c;\n";'
-*/
* grep '^struct' structs.h \
* | perl -ne '($a,$b)=split;$c=$b;$c=~s/^_//; print "typedef struct $b $c;\n";'
+ */
 
 typedef struct _acl_ip_data acl_ip_data;
 typedef struct _acl_time_data acl_time_data;