1explain_strtoull_or_die(3) Library Functions Manual explain_strtoull_or_die(3)
2
3
4

NAME

6       explain_strtoull_or_die - convert string to integer and report errors
7

SYNOPSIS

9       #include <libexplain/strtoull.h>
10       unsigned  long  long  explain_strtoull_or_die(const  char  *nptr,  char
11       **endptr, int base);
12       unsigned long long  explain_strtoull_on_error(const  char  *nptr,  char
13       **endptr, int base))
14

DESCRIPTION

16       The  explain_strtoull_or_die  function  is used to call the strtoull(3)
17       system call. On failure an  explanation  will  be  printed  to  stderr,
18       obtained  from  the  explain_strtoull(3) function, and then the process
19       terminates by calling exit(EXIT_FAILURE).
20
21       The explain_strtoull_on_error function is used to call the  strtoull(3)
22       system  call.  On  failure  an  explanation  will be printed to stderr,
23       obtained from the explain_strtoull(3) function, but  still  returns  to
24       the caller.
25
26       nptr    The  nptr,  exactly  as  to be passed to the strtoull(3) system
27               call.
28
29       endptr  The endptr, exactly as to be passed to the  strtoull(3)  system
30               call.
31
32       base    The  base,  exactly  as  to be passed to the strtoull(3) system
33               call.
34

RETURN VALUE

36       The explain_strtoull_or_die function only returns on success, see  str‐
37       toull(3)  for  more  information. On failure, prints an explanation and
38       exits, it does not return.
39
40       The explain_strtoull_on_error function always returns the value  return
41       by the wrapped strtoull(3) system call.
42

EXAMPLE

44       The  explain_strtoull_or_die function is intended to be used in a fash‐
45       ion similar to the following example:
46              unsigned long long result = explain_strtoull_or_die(nptr, endptr, base);
47

SEE ALSO

49       strtoull(3)
50               convert a string to an unsigned long integer
51
52       explain_strtoull(3)
53               explain strtoull(3) errors
54
55       exit(2) terminate the calling process
56
58       libexplain version 0.40
59       Copyright (C) 2009 Peter Miller
60
61
62
63                                                    explain_strtoull_or_die(3)
Impressum