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

NAME

6       explain_strtoll_or_die  - convert a string to a long integer and report
7       errors
8

SYNOPSIS

10       #include <libexplain/strtoll.h>
11       long long explain_strtoll_or_die(const char *nptr, char  **endptr,  int
12       base);
13       long long explain_strtoll_on_error(const char *nptr, char **endptr, int
14       base))
15

DESCRIPTION

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

RETURN VALUE

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

EXAMPLE

45       The explain_strtoll_or_die function is intended to be used in a fashion
46       similar to the following example:
47              long long result = explain_strtoll_or_die(nptr, endptr, base);
48

SEE ALSO

50       strtoll(3)
51               convert a string to a long integer
52
53       explain_strtoll(3)
54               explain strtoll(3) errors
55
56       exit(2) terminate the calling process
57
59       libexplain version 1.4
60       Copyright (C) 2009 Peter Miller
61
62
63
64                                                     explain_strtoll_or_die(3)
Impressum