/*
- * $Id: Parsing.h,v 1.4 2007/08/13 17:20:51 hno Exp $
+ * $Id$
*
- * DEBUG: section 3 Configuration File Parsing
+ * DEBUG: section 03 Configuration File Parsing
* AUTHOR: Harvest Derived
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
#ifndef SQUID_PARSING_H
#define SQUID_PARSING_H
-#include "squid.h"
+#include "squid-old.h"
extern double xatof(const char *token);
extern int xatoi(const char *token);
extern long xatol(const char *token);
extern unsigned short xatos(const char *token);
+
+/**
+ * Parse a 64-bit integer value.
+ */
+extern int64_t GetInteger64(void);
+
+/**
+ * Parses an integer value.
+ * Uses a method that obeys hexadecimal 0xN syntax needed for certain bitmasks.
+ */
extern int GetInteger(void);
-extern u_short GetShort(void);
+
+extern unsigned short GetShort(void);
// on success, returns true and sets *p (if any) to the end of the integer
extern bool StringToInt(const char *str, int &result, const char **p, int base);
extern bool StringToInt64(const char *str, int64_t &result, const char **p, int base);
+/**
+ * Parse a socket address (host:port), fill the given Ip::Address object
+ * \retval false Failure.
+ * \retval true Success.
+ * Destroys token during parse.
+ */
+extern bool GetHostWithPort(char *token, Ip::Address *ipa);
+
#endif /* SQUID_PARSING_H */