]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/format/Config.cc
3 #include "ConfigParser.h"
5 #include "format/Config.h"
8 Format::FmtConfig
Format::TheConfig
;
11 Format::FmtConfig::parseFormats()
15 if ((name
= ConfigParser::NextToken()) == NULL
)
18 if ((def
= ConfigParser::NextQuotedOrToEol()) == NULL
) {
23 debugs(3, 2, "Custom Format for '" << name
<< "' is '" << def
<< "'");
25 Format
*nlf
= new Format(name
);
27 if (!nlf
->parse(def
)) {
32 // add to global config list
38 Format::FmtConfig::registerTokens(const String
&nsName
, TokenTableEntry
const *tokenArray
)
40 debugs(46, 2, HERE
<< " register format tokens for '" << nsName
<< "'");
41 if (tokenArray
!= NULL
)
42 tokens
.push_back(TokenNamespace(nsName
, tokenArray
));
44 debugs(0, DBG_CRITICAL
, "BUG: format tokens for '" << nsName
<< "' missing!");