/*
- * $Id: acl.cc,v 1.263 2001/10/17 12:41:49 hno Exp $
+ * $Id: acl.cc,v 1.264 2001/10/17 19:43:39 hno Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
intlist **Tail;
intlist *q = NULL;
char *t = NULL;
+ protocol_t protocol;
for (Tail = curlist; *Tail; Tail = &((*Tail)->next));
while ((t = strtokFile())) {
+ protocol = urlParseProtocol(t);
q = memAllocate(MEM_INTLIST);
- q->i = (int) urlParseProtocol(t);
+ q->i = (int) protocol;
*(Tail) = q;
Tail = &q->next;
}
/*
- * $Id: asn.cc,v 1.73 2001/10/17 12:41:49 hno Exp $
+ * $Id: asn.cc,v 1.74 2001/10/17 19:43:39 hno Exp $
*
* DEBUG: section 53 AS Number handling
* AUTHOR: Duane Wessels, Kostas Anagnostakis
/* initialize the radix tree structure */
+extern int max_keylen; /* yuck.. this is in lib/radix.c */
+
CBDATA_TYPE(ASState);
void
asnInit(void)
{
- extern int max_keylen;
static int inited = 0;
max_keylen = 40;
CBDATA_INIT_TYPE(ASState);
/*
- * $Id: auth_basic.cc,v 1.12 2001/10/17 12:41:50 hno Exp $
+ * $Id: auth_basic.cc,v 1.13 2001/10/17 19:43:40 hno Exp $
*
* DEBUG: section 29 Authenticator
* AUTHOR: Duane Wessels
}
static basic_data *
-authBasicDataNew()
+authBasicDataNew(void)
{
basic_data *temp;
temp = memPoolAlloc(basic_data_pool);
/*
- * $Id: auth_digest.cc,v 1.8 2001/10/17 17:09:08 hno Exp $
+ * $Id: auth_digest.cc,v 1.9 2001/10/17 19:43:41 hno Exp $
*
* DEBUG: section 29 Authenticator
* AUTHOR: Robert Collins
static void authenticateDigestNonceCacheCleanup(void *data);
static digest_nonce_h *authenticateDigestNonceFindNonce(const char *nonceb64);
-static digest_nonce_h *authenticateDigestNonceNew();
+static digest_nonce_h *authenticateDigestNonceNew(void);
static void authenticateDigestNonceDelete(digest_nonce_h * nonce);
-static void authenticateDigestNonceSetup();
-static void authenticateDigestNonceShutdown();
-static void authenticateDigestNonceReconfigure();
+static void authenticateDigestNonceSetup(void);
+static void authenticateDigestNonceShutdown(void);
+static void authenticateDigestNonceReconfigure(void);
static const char *authenticateDigestNonceNonceb64(digest_nonce_h * nonce);
static int authDigestNonceIsValid(digest_nonce_h * nonce, char nc[9]);
static int authDigestNonceIsStale(digest_nonce_h * nonce);
}
static digest_nonce_h *
-authenticateDigestNonceNew()
+authenticateDigestNonceNew(void)
{
digest_nonce_h *newnonce = memPoolAlloc(digest_nonce_pool);
digest_nonce_h *temp;
}
static void
-authenticateDigestNonceSetup()
+authenticateDigestNonceSetup(void)
{
if (!digest_nonce_pool)
digest_nonce_pool = memPoolCreate("Digest Scheme nonce's", sizeof(digest_nonce_h));
}
static void
-authenticateDigestNonceShutdown()
+authenticateDigestNonceShutdown(void)
{
/*
* We empty the cache of any nonces left in there.
}
static void
-authenticateDigestNonceReconfigure()
+authenticateDigestNonceReconfigure(void)
{
}
}
static digest_user_h *
-authDigestUserNew()
+authDigestUserNew(void)
{
return memPoolAlloc(digest_user_pool);
}
static void
-authDigestUserSetup()
+authDigestUserSetup(void)
{
if (!digest_user_pool)
digest_user_pool = memPoolCreate("Digest Scheme User Data", sizeof(digest_user_h));
}
static void
-authDigestUserShutdown()
+authDigestUserShutdown(void)
{
/*
* Future work: the auth framework could flush it's cache
}
static digest_request_h *
-authDigestRequestNew()
+authDigestRequestNew(void)
{
digest_request_h *tmp;
tmp = memPoolAlloc(digest_request_pool);
}
static void
-authDigestRequestSetup()
+authDigestRequestSetup(void)
{
if (!digest_request_pool)
digest_request_pool = memPoolCreate("Digest Scheme Request Data", sizeof(digest_request_h));
}
static void
-authDigestRequestShutdown()
+authDigestRequestShutdown(void)
{
/* No requests should be in progress when we get here */
if (digest_request_pool) {
}
static int
-authenticateDigestActive()
+authenticateDigestActive(void)
{
return (authdigest_initialised == 1) ? 1 : 0;
}
static int
-authDigestConfigured()
+authDigestConfigured(void)
{
if ((digestConfig != NULL) && (digestConfig->authenticate != NULL) &&
(digestConfig->authenticateChildren != 0) &&
/*
- * $Id: cache_cf.cc,v 1.392 2001/10/17 13:43:06 hno Exp $
+ * $Id: cache_cf.cc,v 1.393 2001/10/17 19:43:39 hno Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
static void
dump_uri_whitespace(StoreEntry * entry, const char *name, int var)
{
- char *s;
+ const char *s;
if (var == URI_WHITESPACE_ALLOW)
s = "allow";
else if (var == URI_WHITESPACE_ENCODE)
/*
- * $Id: cbdata.cc,v 1.41 2001/04/09 21:55:50 hno Exp $
+ * $Id: cbdata.cc,v 1.42 2001/10/17 19:43:39 hno Exp $
*
* DEBUG: section 45 Callback Data Registry
* ORIGINAL AUTHOR: Duane Wessels
#define OFFSET_OF(type, member) ((int)(char *)&((type *)0L)->member)
void
-cbdataInitType(cbdata_type type, char *name, int size, FREE * free_func)
+cbdataInitType(cbdata_type type, const char *name, int size, FREE * free_func)
{
char *label;
if (type >= cbdata_types) {
}
cbdata_type
-cbdataAddType(cbdata_type type, char *name, int size, FREE * free_func)
+cbdataAddType(cbdata_type type, const char *name, int size, FREE * free_func)
{
if (type)
return type;
/*
- * $Id: cf_gen.cc,v 1.42 2001/08/23 13:20:46 robertc Exp $
+ * $Id: cf_gen.cc,v 1.43 2001/10/17 19:43:39 hno Exp $
*
* DEBUG: none Generate squid.conf.default and cf_parser.h
* AUTHOR: Max Okumoto
static void gen_default_if_none(Entry *, FILE *);
static void
-lineAdd(Line ** L, char *str)
+lineAdd(Line ** L, const char *str)
{
while (*L)
L = &(*L)->next;
{
FILE *fp;
char *input_filename = argv[1];
- char *output_filename = _PATH_PARSER;
- char *conf_filename = _PATH_SQUID_CONF;
+ const char *output_filename = _PATH_PARSER;
+ const char *conf_filename = _PATH_SQUID_CONF;
int linenum = 0;
Entry *entries = NULL;
Entry *curr = NULL;
print "/* Generated automatically from cf.data.pre"
print " * DO NOT EDIT"
print "*/"
- print "struct { char *name; char *enable; int defined;} defines[] = {"
+ print "struct { const char *name; const char *enable; int defined;} defines[] = {"
define["DELAY_POOLS"]="--enable-delay-pools"
define["HTTP_VIOLATIONS"]="--enable-http-violations"
define["SQUID_SNMP"]="--enable-snmp"
/*
- * $Id: ipc.cc,v 1.24 2001/09/27 21:59:22 hno Exp $
+ * $Id: ipc.cc,v 1.25 2001/10/17 19:43:39 hno Exp $
*
* DEBUG: section 54 Interprocess Communication
* AUTHOR: Duane Wessels
}
int
-ipcCreate(int type, const char *prog, char *const args[], const char *name, int *rfd, int *wfd)
+ipcCreate(int type, const char *prog, const char *const args[], const char *name, int *rfd, int *wfd)
{
pid_t pid;
struct sockaddr_in CS;
/*
- * $Id: protos.h,v 1.416 2001/10/17 12:41:49 hno Exp $
+ * $Id: protos.h,v 1.417 2001/10/17 19:43:39 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
/* Note: Allocations is done using the cbdataAlloc macro */
extern void *cbdataInternalFree(void *p);
extern int cbdataValid(const void *p);
-extern void cbdataInitType(cbdata_type type, char *label, int size, FREE * free_func);
-extern cbdata_type cbdataAddType(cbdata_type type, char *label, int size, FREE * free_func);
+extern void cbdataInitType(cbdata_type type, const char *label, int size, FREE * free_func);
+extern cbdata_type cbdataAddType(cbdata_type type, const char *label, int size, FREE * free_func);
extern int cbdataLocked(const void *p);
extern void clientdbInit(void);
*/
extern int ipcCreate(int type,
const char *prog,
- char *const args[],
+ const char *const args[],
const char *name,
int *rfd,
int *wfd);
/*
- * $Id: store_repl_heap.cc,v 1.7 2001/03/14 22:28:44 wessels Exp $
+ * $Id: store_repl_heap.cc,v 1.8 2001/10/17 19:43:41 hno Exp $
*
* DEBUG: section ? HEAP based removal policies
* AUTHOR: Henrik Nordstrom
{
RemovalPolicy *policy;
HeapPolicyData *heap_data;
- char *keytype;
+ const char *keytype;
/* Allocate the needed structures */
policy = cbdataAlloc(RemovalPolicy);
heap_data = xcalloc(1, sizeof(*heap_data));
/*
- * $Id: structs.h,v 1.403 2001/10/10 15:17:42 adrian Exp $
+ * $Id: structs.h,v 1.404 2001/10/17 19:43:39 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
};
struct _RemovalPolicy {
- char *_type;
+ const char *_type;
void *_data;
void (*Free) (RemovalPolicy * policy);
void (*Add) (RemovalPolicy * policy, StoreEntry * entry, RemovalPolicyNode * node);
};
struct cache_dir_option {
- char *name;
+ const char *name;
void (*parse) (SwapDir * sd, const char *option, const char *value, int reconfiguring);
void (*dump) (StoreEntry * e, const char *option, SwapDir * sd);
};