libixp

git clone git://oldgit.suckless.org/libixp/
Log | Files | Refs | LICENSE

ixp_errbuf.3 (1658B)


      1 .TH "IXP_ERRBUF" 3 "2010 Jun" "libixp Manual"
      2 
      3 .SH NAME
      4 .P
      5 ixp_errbuf, ixp_errstr, ixp_rerrstr, ixp_werrstr, ixp_vsnprint
      6 
      7 .SH SYNOPSIS
      8 .nf
      9   #include <ixp.h>
     10   
     11   char *ixp_errbuf(void);
     12   
     13   void ixp_errstr(char *buf, int nbuf);
     14   
     15   void ixp_rerrstr(char *buf, int nbuf);
     16   
     17   void ixp_werrstr(const char *fmt, ...);
     18   
     19   int      (*ixp_vsnprint)(char *buf, int nbuf, const char *fmt, va_list);
     20 .fi
     21 
     22 .SH PARAMETERS
     23 .TP
     24 buf
     25 The buffer to read and/or fill.
     26 .TP
     27 nbuf
     28 The size of the buffer.
     29 .TP
     30 fmt
     31 A format string with which to write the errstr.
     32 .TP
     33 .RB ...
     34 Arguments to IfmtR.
     35 
     36 .SH DESCRIPTION
     37 .P
     38 These functions simulate Plan 9's errstr functionality.
     39 They replace errno in libixp. Note that these functions
     40 are not internationalized.
     41 
     42 .P
     43 \fBixp_errbuf(3)\fR returns the errstr buffer for the current
     44 thread. \fBixp_rerrstr(3)\fR fills IbufR with the data from
     45 the current thread's error buffer, while \fBixp_errstr(3)\fR
     46 exchanges IbufR's contents with those of the current
     47 thread's error buffer. \fBixp_werrstr(3)\fR formats the given
     48 format string, IfmtR, via \fBixp_vsnprint(3)\fR and writes it to
     49 the error buffer.
     50 
     51 .P
     52 \fBixp_vsnprint(3)\fR may be set to a function which will format
     53 its arguments write the result to the InbufR length buffer
     54 \fBbuf(3)\fR. The default value is \fBvsnprintf(3)\fR. The function must
     55 format '%s' as a nul\-terminated string and may not consume
     56 any arguments not indicated by a %\-prefixed format specifier,
     57 but may otherwise behave in any manner chosen by the user.
     58 
     59 .SH SEE ALSO
     60 .P
     61 ixp_vsmprint(3)
     62 
     63 
     64 .\" man code generated by txt2tags 2.5 (http://txt2tags.sf.net)
     65 .\" cmdline: txt2tags -o- ixp_errbuf.man3
     66