]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/format/Config.cc
3 #include "format/Config.h"
7 Format::FmtConfig
Format::TheConfig
;
10 Format::FmtConfig::parseFormats()
14 if ((name
= strtok(NULL
, w_space
)) == NULL
)
17 if ((def
= strtok(NULL
, "\r\n")) == NULL
) {
22 debugs(3, 2, "Custom Format for '" << name
<< "' is '" << def
<< "'");
24 Format
*nlf
= new Format(name
);
26 if (!nlf
->parse(def
)) {
31 // add to global config list
37 Format::FmtConfig::registerTokens(const String
&nsName
, TokenTableEntry
const *tokenArray
)
39 debugs(46, 2, HERE
<< " register format tokens for '" << nsName
<< "'");
40 if (tokenArray
!= NULL
)
41 tokens
.push_back(TokenNamespace(nsName
, tokenArray
));
43 debugs(0, DBG_CRITICAL
, "BUG: format tokens for '" << nsName
<< "' missing!");