Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
LIBXO(3)		    Library Functions Manual		      LIBXO(3)

NAME
       xo_emit_err,  xo_emit_errc,  xo_emit_errx  xo_emit_warn,	xo_emit_warnx,
       xo_emit_warn_c, xo_emit_warn_hc -- emit errors and warnings in multiple
       output styles

LIBRARY
       library "libxo"

SYNOPSIS
       #include	<libxo/xo.h>

       void
       xo_emit_warn(const char *fmt, ...);

       void
       xo_emit_warnx(const char	*fmt, ...);

       void
       xo_emit_warn_c(int code,	const char *fmt, ...);

       void
       xo_emit_warn_hc(xo_handle_t *xop, int code, const char *fmt, ...);

       void
       xo_emit_err(int eval, const char	*fmt, ...);

       void
       xo_emit_errc(int	eval, int code,	const char *fmt, ...);

       void
       xo_emit_errx(int	eval, const char *fmt, ...);

DESCRIPTION
       Many programs make use of the standard  library	functions  err(3)  and
       warn(3)	to  generate errors and	warnings for the user.	libxo wants to
       pass that information via the current output style, and	provides  com-
       patible functions to allow this.

       The  fmt	 argument is one compatible with xo_emit(3) which allows these
       functions make structured data.	To generate unstructured data, use the
       xo_err(3) functions.

       These functions display the program name, a colon, a formatted  message
       based  on  the arguments, and then optionally a colon and an error mes-
       sage associated with either errno or the	code parameter.

		 EXAMPLE:
		     if	(open(filename,	O_RDONLY) < 0)
			 xo_err(1, "cannot open	file '%s'", filename);

SEE ALSO
       xo_emit(3), xo_format(5), xo_err(3), libxo(3)

ADDITIONAL DOCUMENTATION
       FreeBSD uses libxo version 0.6.1.  Complete documentation can be	 found
       on github:

	     http://juniper.github.io/libxo/0.6.1/libxo-manual.html

       libxo lives on github as:

	     https://github.com/Juniper/libxo

       The latest release of libxo is available	at:

	     https://github.com/Juniper/libxo/releases

HISTORY
       The libxo library was added in FreeBSD 11.0.

AUTHOR
       Phil Shafer

FreeBSD	ports 15.0	       December	4, 2014			      LIBXO(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=xo_emit_err&sektion=3&manpath=FreeBSD+Ports+15.0>

home | help