xstrto.cc File Reference
#include "squid.h"
#include "compat/xstrto.h"
#include <cerrno>
Include dependency graph for xstrto.cc:

Go to the source code of this file.

Macros

#define SQUID_XSTRTO_C_
 

Functions

bool xstrtoul (const char *s, char **end, unsigned long *value, unsigned long min, unsigned long max)
 
bool xstrtoui (const char *s, char **end, unsigned int *value, unsigned int min, unsigned int max)
 

Macro Definition Documentation

#define SQUID_XSTRTO_C_

Definition at line 10 of file xstrto.cc.

Function Documentation

bool xstrtoui ( const char *  s,
char **  end,
unsigned int value,
unsigned int  min,
unsigned int  max 
)

Definition at line 86 of file xstrto.cc.

References NULL, and xstrtoul().

Referenced by parse_acl_tos(), and Ip::Qos::Config::parseConfigLine().

bool xstrtoul ( const char *  s,
char **  end,
unsigned long *  value,
unsigned long  min,
unsigned long  max 
)

xstrtou{i,l} - string to number conversion

Parameters
sinput string
endlike strtoul's "end" pointer
valuepointer for result. Undefined on failure
minminimum accepted value
maxmaximum accepted value

If is NULL, we assume the caller wants a "strict strtoul", and hence "15a" is rejected. In either case, the value obtained is compared for min-max compliance. Base is always 0, i.e. autodetect depending on .

Returns
true/false whether number was accepted. On failure, *value has undefined contents.

Definition at line 61 of file xstrto.cc.

References NULL.

Referenced by xstrtoui().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors