#include <config.h>
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <isc/parseint.h>
#include <isc/result.h>
#include <isc/stdlib.h>
Go to the source code of this file.
Functions | |
isc_result_t | isc_parse_uint32 (isc_uint32_t *uip, const char *string, int base) |
isc_result_t | isc_parse_uint16 (isc_uint16_t *uip, const char *string, int base) |
isc_result_t | isc_parse_uint8 (isc_uint8_t *uip, const char *string, int base) |
Parse the null-terminated string 'string' containing a base 'base' integer, storing the result in '*uip'. The base is interpreted as in strtoul(). Unlike strtoul(), leading whitespace, minus or plus signs are not accepted, and all errors (including overflow) are reported uniformly through the return value. |
Definition in file parseint.c.
isc_result_t isc_parse_uint32 | ( | isc_uint32_t * | uip, | |
const char * | string, | |||
int | base | |||
) |
Definition at line 33 of file parseint.c.
References ISC_R_BADNUMBER, ISC_R_RANGE, ISC_R_SUCCESS, and r.
Referenced by ATF_TC_BODY(), bind_ttl(), evaluate_ttl(), isc_lex_gettoken(), isc_parse_uint16(), isc_parse_uint8(), maybe_numeric(), ns_server_signing(), parse_args(), parse_netprefix(), parse_uint_helper(), and update_addordelete().
isc_result_t isc_parse_uint16 | ( | isc_uint16_t * | uip, | |
const char * | string, | |||
int | base | |||
) |
Definition at line 56 of file parseint.c.
References isc_parse_uint32(), ISC_R_RANGE, and ISC_R_SUCCESS.
Referenced by bind9_check_key(), ns_config_getkeyalgorithm2(), parse_args(), and parse_hmac().
isc_result_t isc_parse_uint8 | ( | isc_uint8_t * | uip, | |
const char * | string, | |||
int | base | |||
) |
Parse the null-terminated string 'string' containing a base 'base' integer, storing the result in '*uip'. The base is interpreted as in strtoul(). Unlike strtoul(), leading whitespace, minus or plus signs are not accepted, and all errors (including overflow) are reported uniformly through the return value.
Requires:
Definition at line 69 of file parseint.c.
References isc_parse_uint32(), ISC_R_RANGE, and ISC_R_SUCCESS.
Referenced by disable_algorithms(), and fromtext_in_apl().