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

NAME

6       explain_strcoll_or_die  -  compare  strings  using  current  locale and
7       report errors
8

SYNOPSIS

10       #include <libexplain/strcoll.h>
11       int explain_strcoll_or_die(const char *s1, const char *s2);
12       int explain_strcoll_on_error(const char *s1, const char *s2);
13

DESCRIPTION

15       The explain_strcoll_or_die function is used to call the strcoll(3) sys‐
16       tem call. On failure an explanation will be printed to stderr, obtained
17       from the explain_strcoll(3) function, and then the  process  terminates
18       by calling exit(EXIT_FAILURE).
19
20       The  explain_strcoll_on_error  function  is used to call the strcoll(3)
21       system call. On failure an  explanation  will  be  printed  to  stderr,
22       obtained from the explain_strcoll(3) function, but still returns to the
23       caller.
24
25       s1      The s1, exactly as to be passed to the strcoll(3) system call.
26
27       s2      The s2, exactly as to be passed to the strcoll(3) system call.
28

RETURN VALUE

30       The explain_strcoll_or_die function only returns on success,  see  str‐
31       coll(3)  for  more  information.  On failure, prints an explanation and
32       exits, it does not return.
33
34       The explain_strcoll_on_error function always returns the  value  return
35       by the wrapped strcoll(3) system call.
36

EXAMPLE

38       The explain_strcoll_or_die function is intended to be used in a fashion
39       similar to the following example:
40              int result = explain_strcoll_or_die(s1, s2);
41

SEE ALSO

43       strcoll(3)
44               compare two strings using the current locale
45
46       explain_strcoll(3)
47               explain strcoll(3) errors
48
49       exit(2) terminate the calling process
50
52       libexplain version 1.4
53       Copyright (C) 2013 Peter Miller
54
55
56
57                                                     explain_strcoll_or_die(3)
Impressum