.TH "IXP_ERRBUF" 3 "2012 Dec" "libixp Manual" .SH NAME .P ixp_errbuf, ixp_errstr, ixp_rerrstr, ixp_werrstr, ixp_vsnprint .SH SYNOPSIS .nf #include char *ixp_errbuf(void); void ixp_errstr(char *buf, int nbuf); void ixp_rerrstr(char *buf, int nbuf); void ixp_werrstr(const char *fmt, ...); int (*ixp_vsnprint)(char *buf, int nbuf, const char *fmt, va_list); .fi .SH PARAMETERS .TP buf The buffer to read and/or fill. .TP nbuf The size of the buffer. .TP fmt A format string with which to write the errstr. .TP .RB ... Arguments to \fIfmt\fR. .SH DESCRIPTION .P These functions simulate Plan 9's errstr functionality. They replace errno in libixp. Note that these functions are not internationalized. .P \fBixp_errbuf(3)\fR returns the errstr buffer for the current thread. \fBixp_rerrstr(3)\fR fills \fIbuf\fR with the data from the current thread's error buffer, while \fBixp_errstr(3)\fR exchanges \fIbuf\fR's contents with those of the current thread's error buffer. \fBixp_werrstr(3)\fR formats the given format string, \fIfmt\fR, via \fBixp_vsnprint(3)\fR and writes it to the error buffer. .P \fBixp_vsnprint(3)\fR may be set to a function which will format its arguments write the result to the \fInbuf\fR length buffer \fBbuf(3)\fR. The default value is \fBvsnprintf(3)\fR. The function must format '%s' as a nul\-terminated string and may not consume any arguments not indicated by a %\-prefixed format specifier, but may otherwise behave in any manner chosen by the user. .SH SEE ALSO .P ixp_vsmprint(3) .\" man code generated by txt2tags 2.6 (http://txt2tags.org) .\" cmdline: txt2tags -o- ixp_errbuf.man3