#include "squid.h"
#include "cache_cf.h"
#include "compat/strtoll.h"
+#include "ConfigParser.h"
#include "Parsing.h"
#include "globals.h"
#include "Debug.h"
}
unsigned int
-xatoui(const char *token)
+xatoui(const char *token, char eov)
{
- int64_t input = xatoll(token, 10);
+ int64_t input = xatoll(token, 10, eov);
if (input < 0) {
debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "ERROR: The input value '" << token << "' cannot be less than 0.");
self_destruct();
}
int64_t
-xatoll(const char *token, int base)
+xatoll(const char *token, int base, char eov)
{
char *end = NULL;
int64_t ret = strtoll(token, &end, base);
self_destruct();
}
- if (*end) {
+ if (*end != eov) {
debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "ERROR: Invalid value: '" << token << "' is supposed to be a number.");
self_destruct();
}
int
GetInteger(void)
{
- char *token = strtok(NULL, w_space);
+ char *token = ConfigParser::strtokFile();
int i;
if (token == NULL)