--------------------- PatchSet 1030 Date: 2001/01/01 12:05:09 Author: rbcollins Branch: auth_rewrite Tag: (none) Log: cleanup some temp code Members: src/cache_cf.c:1.1.1.3.4.1.2.9.2.6->1.1.1.3.4.1.2.9.2.7 src/protos.h:1.1.1.3.12.17.2.12->1.1.1.3.12.17.2.13 src/auth/basic/auth_basic.c:1.1.2.11->1.1.2.12 Index: squid/src/cache_cf.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/cache_cf.c,v retrieving revision 1.1.1.3.4.1.2.9.2.6 retrieving revision 1.1.1.3.4.1.2.9.2.7 diff -u -r1.1.1.3.4.1.2.9.2.6 -r1.1.1.3.4.1.2.9.2.7 --- squid/src/cache_cf.c 1 Jan 2001 10:48:28 -0000 1.1.1.3.4.1.2.9.2.6 +++ squid/src/cache_cf.c 1 Jan 2001 12:05:09 -0000 1.1.1.3.4.1.2.9.2.7 @@ -1,6 +1,6 @@ /* - * $Id: cache_cf.c,v 1.1.1.3.4.1.2.9.2.6 2001/01/01 10:48:28 rbcollins Exp $ + * $Id: cache_cf.c,v 1.1.1.3.4.1.2.9.2.7 2001/01/01 12:05:09 rbcollins Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -65,14 +65,14 @@ static void parseTimeLine(time_t * tptr, const char *units); static void parse_ushort(u_short * var); static void parse_string(char **); -static void parse_wordlist(wordlist **); +void parse_wordlist(wordlist **); static void default_all(void); static void defaults_if_none(void); static int parse_line(char *); static void parseBytesLine(size_t * bptr, const char *units); static size_t parseBytesUnits(const char *unit); static void free_all(void); -static void requirePathnameExists(const char *name, const char *path); +void requirePathnameExists(const char *name, const char *path); static OBJH dump_config; static void dump_http_header(StoreEntry * entry, const char *name, HttpHeaderMask header); static void parse_http_header(HttpHeaderMask * header); @@ -1463,7 +1463,7 @@ storeAppendPrintf(entry, "%s %d\n", name, var); } -static void +void parse_int(int *var) { int i; @@ -1660,7 +1660,7 @@ safe_free(*var); } -static void +void parse_eol(char *volatile *var) { char *token = strtok(NULL, null_string); @@ -1769,7 +1769,7 @@ } } -static void +void parse_wordlist(wordlist ** list) { char *token; @@ -1959,7 +1959,7 @@ free_all(); } -static void +void requirePathnameExists(const char *name, const char *path) { struct stat sb; Index: squid/src/protos.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/protos.h,v retrieving revision 1.1.1.3.12.17.2.12 retrieving revision 1.1.1.3.12.17.2.13 diff -u -r1.1.1.3.12.17.2.12 -r1.1.1.3.12.17.2.13 --- squid/src/protos.h 1 Jan 2001 10:48:28 -0000 1.1.1.3.12.17.2.12 +++ squid/src/protos.h 1 Jan 2001 12:05:09 -0000 1.1.1.3.12.17.2.13 @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.1.1.3.12.17.2.12 2001/01/01 10:48:28 rbcollins Exp $ + * $Id: protos.h,v 1.1.1.3.12.17.2.13 2001/01/01 12:05:09 rbcollins Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -88,6 +88,10 @@ extern int GetInteger(void); /* extra functions from cache_cf.c useful for lib modules */ +extern void parse_int(int *var); +extern void parse_eol(char *volatile *var); +extern void parse_wordlist(wordlist ** list); +extern void requirePathnameExists(const char *name, const char *path); extern void parse_time_t(time_t * var); extern void cbdataInit(void); Index: squid/src/auth/basic/auth_basic.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/auth/basic/auth_basic.c,v retrieving revision 1.1.2.11 retrieving revision 1.1.2.12 diff -u -r1.1.2.11 -r1.1.2.12 --- squid/src/auth/basic/auth_basic.c 1 Jan 2001 10:48:29 -0000 1.1.2.11 +++ squid/src/auth/basic/auth_basic.c 1 Jan 2001 12:05:10 -0000 1.1.2.12 @@ -296,39 +296,6 @@ } static void -parse_int(int *var) -{ - int i; - i = GetInteger(); - *var = i; -} -static void -parse_eol(char *volatile *var) -{ - char *token = strtok(NULL, null_string); - safe_free(*var); - if (token == NULL) - self_destruct(); - *var = xstrdup(token); -} -static void -parse_wordlist(wordlist ** list) -{ - char *token; - while ((token = strtok(NULL, w_space))) - wordlistAdd(list, token); -} - -static void -requirePathnameExists(const char *name, const char *path) -{ - struct stat sb; - assert(path != NULL); - if (stat(path, &sb) < 0) - fatalf("%s: %s", path, xstrerror()); -} - -static void authBasicParse(authScheme *scheme, int n_configured, char *param_str) { if (scheme->scheme_data==NULL)