2 .\" # Copyright (c) 2014, Juniper Networks, Inc.
3 .\" # All rights reserved.
4 .\" # This SOFTWARE is licensed under the LICENSE provided in the
5 .\" # ../Copyright file. By downloading, installing, copying, or
6 .\" # using the SOFTWARE, you agree to be bound by the terms of that
8 .\" # Phil Shafer, July 2014
15 .Nd emit errors and warnings in multiple formats
21 .Fn xo_warn "const char *fmt" "..."
23 .Fn xo_warnx "const char *fmt" "..."
25 .Fn xo_warn_c "int code" "const char *fmt" "..."
27 .Fn xo_warn_hc "xo_handle_t *xop" "int code, const char *fmt" "..."
29 .Fn xo_err "int eval" "const char *fmt" "..."
31 .Fn xo_errc "int eval" "int code" "const char *fmt" "..."
33 .Fn xo_errx "int eval" "const char *fmt" "..."
35 .Fn xo_message "const char *fmt" "..."
37 .Fn xo_message_c "int code" "const char *fmt" "..."
39 .Fn xo_message_hc "xo_handle_t *xop" "int code, const char *fmt" "..."
41 .Fn xo_message_hcv "xo_handle_t *xop" "int code" "const char *fmt" "va_list vap"
43 Many programs make use of the standard library functions
47 to generate errors and warnings for the user.
50 pass that information via the current output style, and provides
51 compatible functions to allow this.
53 These functions display the program name, a colon, a formatted message
54 based on the arguments, and then optionally a colon and an error
55 message associated with either
60 .Bd -literal -offset indent
62 if (open(filename, O_RDONLY) < 0)
63 xo_err(1, "cannot open file '%s'", filename);
65 .Sh ADDITIONAL DOCUMENTATION
66 Complete documentation can be found on github:
67 .Bd -literal -offset indent
68 http://juniper.github.io/libxo/libxo-manual.html
73 .Bd -literal -offset indent
74 https://github.com/Juniper/libxo
80 .Bd -literal -offset indent
81 https://github.com/Juniper/libxo/releases