Parsing.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2025 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 /* DEBUG: section 03 Configuration File Parsing */
10 
11 #ifndef SQUID_SRC_PARSING_H
12 #define SQUID_SRC_PARSING_H
13 
14 #include "ip/Address.h"
15 
16 double xatof(const char *token);
17 int xatoi(const char *token);
18 unsigned int xatoui(const char *token, char eov = '\0');
19 long xatol(const char *token);
20 int64_t xatoll(const char *token, int base, char eov = '\0');
21 uint64_t xatoull(const char *token, int base, char eov = '\0');
22 unsigned short xatos(const char *token);
23 
27 int64_t GetInteger64(void);
28 
34 int GetInteger(void);
35 
47 double GetPercentage(bool limit = true);
48 
49 unsigned short GetShort(void);
50 
51 // on success, returns true and sets *p (if any) to the end of the integer
52 bool StringToInt(const char *str, int &result, const char **p, int base);
53 bool StringToInt64(const char *str, int64_t &result, const char **p, int base);
54 
61 bool GetHostWithPort(char *token, Ip::Address *ipa);
62 
63 #endif /* SQUID_SRC_PARSING_H */
64 
bool StringToInt(const char *str, int &result, const char **p, int base)
Definition: Parsing.cc:217
int GetInteger(void)
Definition: Parsing.cc:148
int64_t xatoll(const char *token, int base, char eov='\0')
Definition: Parsing.cc:86
bool StringToInt64(const char *str, int64_t &result, const char **p, int base)
Definition: Parsing.cc:237
unsigned short xatos(const char *token)
Definition: Parsing.cc:114
unsigned int xatoui(const char *token, char eov='\0')
Definition: Parsing.cc:58
double GetPercentage(bool limit=true)
Definition: Parsing.cc:178
unsigned short GetShort(void)
Definition: Parsing.cc:205
int xatoi(const char *token)
Definition: Parsing.cc:44
long xatol(const char *token)
Definition: Parsing.cc:72
double xatof(const char *token)
Definition: Parsing.cc:25
uint64_t xatoull(const char *token, int base, char eov='\0')
Definition: Parsing.cc:105
int64_t GetInteger64(void)
Definition: Parsing.cc:132
bool GetHostWithPort(char *token, Ip::Address *ipa)
Definition: Parsing.cc:257

 

Introduction

Documentation

Support

Miscellaneous