diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2014-11-20 01:49:21 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2014-11-20 01:49:21 +0000 |
commit | 5a372f607be2a682096fb2c49173830faae8fcd6 (patch) | |
tree | 4beef3ea3adeb1e2241588bd3a777bbdfda44c8d /lib/libevent | |
parent | c10038a3068a4f819e27209e899017b8c239f1d1 (diff) |
document the only macro i find useful when working with evbuffers.
Diffstat (limited to 'lib/libevent')
-rw-r--r-- | lib/libevent/evbuffer_new.3 | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/libevent/evbuffer_new.3 b/lib/libevent/evbuffer_new.3 index 3820522694b..b15e44463d9 100644 --- a/lib/libevent/evbuffer_new.3 +++ b/lib/libevent/evbuffer_new.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: evbuffer_new.3,v 1.8 2014/11/20 00:01:55 dlg Exp $ +.\" $OpenBSD: evbuffer_new.3,v 1.9 2014/11/20 01:49:20 dlg Exp $ .\" .\" Copyright (c) 2014 David Gwynne <dlg@openbsd.org> .\" @@ -73,6 +73,8 @@ .Fa "size_t *read_out" .Fa "enum evbuffer_eol_style eol_style" .Fc +.Ft size_t +.Fn "EVBUFFER_LENGTH" "const struct evbuffer *buf" .Sh DESCRIPTION The evbuffer API provides an implementation of buffering for use with libevent. @@ -195,6 +197,10 @@ A carriage return followed by a new line character. .It Dv EVBUFFER_EOL_LF A new line character. .El +.Pp +.Fn EVBUFFER_LENGTH +reports how many bytes are stored in the evbuffer +.Fa buf . .Sh RETURN VALUES .Fn evbuffer_new returns a pointer to a newly allocated buffer on success, @@ -247,6 +253,9 @@ return a pointer to the line on success, or .Dv NULL on failure. +.Pp +.Fn EVBUFFER_LENGTH +returns the number of bytes available in the evbuffer. .Sh SEE ALSO .Xr errno 2 , .Xr event 3 , |