#include "acl/Arp.h"
#include "acl/FilledChecklist.h"
-#include "cache_cf.h"
#include "Debug.h"
#include "eui/Eui48.h"
#include "globals.h"
void
ACLARP::parse()
{
- while (const char *t = strtokFile()) {
+ while (const char *t = ConfigParser::strtokFile()) {
if (Eui::Eui48 *q = aclParseArpData(t)) {
aclArpData.insert(*q);
delete q;
#include "acl/DestinationAsn.h"
#include "acl/DestinationIp.h"
#include "acl/SourceAsn.h"
-#include "cache_cf.h"
#include "FwdState.h"
#include "HttpReply.h"
#include "HttpRequest.h"
#include "SquidConfig.h"
#include "Store.h"
#include "StoreClient.h"
-#include "StoreClient.h"
#define WHOIS_PORT 43
#define AS_REQBUF_SZ 4096
char *t = NULL;
for (Tail = curlist; *Tail; Tail = &((*Tail)->next));
- while ((t = strtokFile())) {
+ while ((t = ConfigParser::strtokFile())) {
q = new CbDataList<int> (atoi(t));
*(Tail) = q;
Tail = &q->next;
#include "acl/AtStepData.h"
#include "acl/Checklist.h"
#include "cache_cf.h"
+#include "ConfigParser.h"
#include "Debug.h"
#include "wordlist.h"
void
ACLAtStepData::parse()
{
- while (const char *t = strtokFile()) {
+ while (const char *t = ConfigParser::strtokFile()) {
if (strcasecmp(t, "SslBump1") == 0) {
values.push_back(Ssl::bumpStep1);
} else if (strcasecmp(t, "SslBump2") == 0) {
#include "acl/CertificateData.h"
#include "acl/Checklist.h"
#include "cache_cf.h"
+#include "ConfigParser.h"
#include "Debug.h"
#include "wordlist.h"
ACLCertificateData::parse()
{
if (validAttributesStr) {
- char *newAttribute = strtokFile();
+ char *newAttribute = ConfigParser::strtokFile();
if (!newAttribute) {
if (attributeIsOptional)
#include "acl/Checklist.h"
#include "acl/DomainData.h"
#include "cache_cf.h"
+#include "ConfigParser.h"
#include "Debug.h"
#include "src/URL.h"
#include "util.h"
void
ACLDomainData::parse()
{
- char *t = NULL;
-
if (!domains)
domains = new Splay<char *>();
- while ((t = strtokFile())) {
+ while (char *t = ConfigParser::strtokFile()) {
Tolower(t);
domains->insert(xstrdup(t), aclDomainCompare);
}
#include "acl/Eui64.h"
#include "acl/FilledChecklist.h"
-#include "cache_cf.h"
#include "Debug.h"
#include "eui/Eui64.h"
#include "globals.h"
void
ACLEui64::parse()
{
- while (const char * t = strtokFile()) {
+ while (const char * t = ConfigParser::strtokFile()) {
if (Eui::Eui64 * q = aclParseEuiData(t)) {
eui64Data.insert(*q);
delete q;
#include "squid.h"
#include "acl/Checklist.h"
#include "acl/HierCodeData.h"
-#include "cache_cf.h"
+#include "ConfigParser.h"
#include "fatal.h"
#include "hier_code.h"
{
char *t = NULL;
- while ((t = strtokFile())) {
+ while ((t = ConfigParser::strtokFile())) {
for (hier_code iter = HIER_NONE; iter <= HIER_MAX; ++iter) {
if (iter == HIER_MAX) {
fatalf("ERROR: No such hier_code '%s'",t);
#include "acl/Checklist.h"
#include "acl/HttpHeaderData.h"
#include "acl/RegexData.h"
-#include "cache_cf.h"
#include "ConfigParser.h"
#include "Debug.h"
#include "HttpHeaderTools.h"
void
ACLHTTPHeaderData::parse()
{
- char* t = strtokFile();
+ char* t = ConfigParser::strtokFile();
assert (t != NULL);
hdrName = t;
hdrId = httpHeaderIdByNameDef(hdrName.rawBuf(), hdrName.size());
#include "squid.h"
#include "acl/FilledChecklist.h"
#include "acl/HttpStatus.h"
-#include "cache_cf.h"
#include "Debug.h"
#include "HttpReply.h"
void
aclParseHTTPStatusList(Splay<acl_httpstatus_data *> **curlist)
{
- char *t = NULL;
- acl_httpstatus_data *q = NULL;
-
- while ((t = strtokFile())) {
- if ((q = aclParseHTTPStatusData(t)) == NULL)
- continue;
-
- (*curlist)->insert(q, acl_httpstatus_data::compare);
+ while (char *t = ConfigParser::strtokFile()) {
+ if (acl_httpstatus_data *q = aclParseHTTPStatusData(t))
+ (*curlist)->insert(q, acl_httpstatus_data::compare);
}
}
#include "squid.h"
#include "acl/IntRange.h"
#include "cache_cf.h"
+#include "ConfigParser.h"
#include "Debug.h"
#include "fatal.h"
#include "Parsing.h"
void
ACLIntRange::parse()
{
- char *a;
-
- while ((a = strtokFile())) {
+ while (char *a = ConfigParser::strtokFile()) {
char *b = strchr(a, '-');
unsigned short port1, port2;
#include "acl/Checklist.h"
#include "acl/Ip.h"
#include "cache_cf.h"
+#include "ConfigParser.h"
#include "Debug.h"
#include "ip/tools.h"
#include "MemBuf.h"
flags.parseFlags();
- while (char *t = strtokFile()) {
+ while (char *t = ConfigParser::strtokFile()) {
acl_ip_data *q = acl_ip_data::FactoryParse(t);
while (q != NULL) {
#include "squid.h"
#include "acl/FilledChecklist.h"
#include "acl/MaxConnection.h"
-#include "cache_cf.h"
#include "client_db.h"
#include "Debug.h"
#include "SquidConfig.h"
void
ACLMaxConnection::parse()
{
- char *t = strtokFile();
+ char *t = ConfigParser::strtokFile();
if (!t)
return;
/* suck out file contents */
// ignore comments
bool ignore = false;
- while ((t = strtokFile())) {
+ while ((t = ConfigParser::strtokFile())) {
ignore |= (*t != '#');
if (ignore)
#include "squid.h"
#include "acl/Checklist.h"
#include "acl/MethodData.h"
-#include "cache_cf.h"
+#include "ConfigParser.h"
#include "http/RequestMethod.h"
int ACLMethodData::ThePurgeCount = 0;
void
ACLMethodData::parse()
{
- while (char *t = strtokFile()) {
+ while (char *t = ConfigParser::strtokFile()) {
HttpRequestMethod m;
m.HttpRequestMethodXXX(t);
values.push_back(m);
#include "acl/Checklist.h"
#include "acl/NoteData.h"
#include "acl/StringData.h"
-#include "cache_cf.h"
#include "ConfigParser.h"
#include "Debug.h"
#include "HttpRequest.h"
void
ACLNoteData::parse()
{
- char* t = strtokFile();
+ char* t = ConfigParser::strtokFile();
assert (t != NULL);
name = t;
values->parse();
#include "squid.h"
#include "acl/Checklist.h"
#include "acl/ProtocolData.h"
-#include "cache_cf.h"
+#include "ConfigParser.h"
#include "Debug.h"
#include "wordlist.h"
void
ACLProtocolData::parse()
{
- while (char *t = strtokFile()) {
+ while (char *t = ConfigParser::strtokFile()) {
int p = AnyP::PROTO_NONE;
for (; p < AnyP::PROTO_UNKNOWN; ++p) {
if (strcasecmp(t, AnyP::ProtocolType_str[p]) == 0) {
/* DEBUG: section 28 Access Control */
#include "squid.h"
-
#include "acl/FilledChecklist.h"
#include "acl/Random.h"
-#include "cache_cf.h"
#include "Debug.h"
#include "Parsing.h"
#include "wordlist.h"
void
ACLRandom::parse()
{
- char *t;
char bufa[256], bufb[256];
- t = strtokFile();
+ char *t = ConfigParser::strtokFile();
if (!t) {
debugs(28, DBG_PARSE_NOTE(DBG_IMPORTANT), "ACL random missing pattern");
return;
#include "squid.h"
#include "acl/Checklist.h"
#include "acl/SslErrorData.h"
-#include "cache_cf.h"
#include "wordlist.h"
ACLSslErrorData::ACLSslErrorData() : values (NULL)
ACLSslErrorData::parse()
{
Ssl::Errors **Tail;
- char *t = NULL;
for (Tail = &values; *Tail; Tail = &((*Tail)->next));
- while ((t = strtokFile())) {
+ while (char *t = ConfigParser::strtokFile()) {
Ssl::Errors *q = Ssl::ParseErrorString(t);
*(Tail) = q;
Tail = &q->tail()->next;
#include "squid.h"
#include "acl/Checklist.h"
#include "acl/StringData.h"
-#include "cache_cf.h"
+#include "ConfigParser.h"
#include "Debug.h"
ACLStringData::ACLStringData(ACLStringData const &old) : stringValues(old.stringValues)
void
ACLStringData::parse()
{
- char *t;
- while ((t = strtokFile()))
+ while (const char *t = ConfigParser::strtokFile())
stringValues.insert(SBuf(t));
}
#include "acl/Checklist.h"
#include "acl/TimeData.h"
#include "cache_cf.h"
+#include "ConfigParser.h"
#include "Debug.h"
#include "wordlist.h"
int h1, m1, h2, m2;
- char *t = NULL;
-
- while ((t = strtokFile())) {
+ while (char *t = ConfigParser::strtokFile()) {
if (*t < '0' || *t > '9') {
/* assume its day-of-week spec */
}
}
-char *
-strtokFile(void)
-{
- return ConfigParser::strtokFile();
-}
-
#include "AccessLogEntry.h"
/**
void parse_wordlist(wordlist ** list);
void requirePathnameExists(const char *name, const char *path);
void parse_time_t(time_t * var);
-char *strtokFile(void);
#endif /* SQUID_CACHE_CF_H_ */
void
ACLExternal::parse()
{
- char *token;
-
if (data)
self_destruct();
data = cbdataAlloc(external_acl_data);
- token = strtokFile();
+ char *token = ConfigParser::strtokFile();
if (!token)
self_destruct();
// this is the name of the 'acl' directive being tested
data->name = xstrdup(AclMatchedName);
- while ((token = strtokFile())) {
+ while ((token = ConfigParser::strtokFile())) {
wordlistAdd(&data->arguments, token);
}
}
#define STUB_API "cache_cf.cc"
#include "tests/STUB.h"
+#include "cache_cf.h"
void self_destruct(void) STUB
void parse_int(int *var) STUB
void parse_onoff(int *var) STUB
void parse_wordlist(wordlist ** list) STUB
void requirePathnameExists(const char *name, const char *path) STUB_NOP
void parse_time_t(time_t * var) STUB
-char * strtokFile(void) STUB_RETVAL(NULL)
void ConfigParser::ParseUShort(unsigned short *var) STUB
void dump_acl_access(StoreEntry * entry, const char *name, acl_access * head) STUB
void dump_acl_list(StoreEntry*, ACLList*) STUB