]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/format/Config.cc
SourceFormat Enforcement
[thirdparty/squid.git] / src / format / Config.cc
index 991bcc45d40fa7138657512b6b6468d9b86a1f68..c0cfb2fc98b9c3d915a3903fb3f23356d484b457 100644 (file)
@@ -1,6 +1,8 @@
 #include "squid.h"
+#include "cache_cf.h"
+#include "ConfigParser.h"
+#include "Debug.h"
 #include "format/Config.h"
-#include "protos.h"
 #include <list>
 
 Format::FmtConfig Format::TheConfig;
@@ -10,10 +12,10 @@ Format::FmtConfig::parseFormats()
 {
     char *name, *def;
 
-    if ((name = strtok(NULL, w_space)) == NULL)
+    if ((name = ConfigParser::NextToken()) == NULL)
         self_destruct();
 
-    if ((def = strtok(NULL, "\r\n")) == NULL) {
+    if ((def = ConfigParser::NextQuotedOrToEol()) == NULL) {
         self_destruct();
         return;
     }
@@ -39,5 +41,5 @@ Format::FmtConfig::registerTokens(const String &nsName, TokenTableEntry const *t
     if (tokenArray != NULL)
         tokens.push_back(TokenNamespace(nsName, tokenArray));
     else
-        debugs(0,0, "BUG: format tokens for '" << nsName << "' missing!");
+        debugs(0, DBG_CRITICAL, "BUG: format tokens for '" << nsName << "' missing!");
 }