IXP_ERRSTR(3) - man page online | library functions

2012 Dec
IXP_ERRBUF(3)                        Library Functions Manual                       IXP_ERRBUF(3)


ixp_errbuf, ixp_errstr, ixp_rerrstr, ixp_werrstr, ixp_vsnprint


#include <ixp.h> 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);


buf The buffer to read and/or fill. nbuf The size of the buffer. fmt A format string with which to write the errstr. ... Arguments to fmt.


These functions simulate Plan 9's errstr functionality. They replace errno in libixp. Note that these functions are not internationalized. ixp_errbuf(3) returns the errstr buffer for the current thread. ixp_rerrstr(3) fills buf with the data from the current thread's error buffer, while ixp_errstr(3) exchanges buf's contents with those of the current thread's error buffer. ixp_werrstr(3) formats the given format string, fmt, via ixp_vsnprint(3) and writes it to the error buffer. ixp_vsnprint(3) may be set to a function which will format its arguments write the result to the nbuf length buffer buf(3). The default value is vsnprintf(3). 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.


libixp Manual 2012 Dec IXP_ERRBUF(3)
This manual Reference Other manuals
ixp_errstr(3) referred by ixp_errbuf(3) | ixp_rerrstr(3) | ixp_vsnprint(3) | ixp_werrstr(3)
refer to ixp_errbuf(3) | ixp_rerrstr(3) | ixp_vsmprint(3) | ixp_vsnprint(3) | ixp_werrstr(3) | printf(3)