summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorbrueffer <brueffer@FreeBSD.org>2009-05-17 21:28:37 +0000
committerbrueffer <brueffer@FreeBSD.org>2009-05-17 21:28:37 +0000
commitf0d016550feee579b48b741fce35d050dfcdefda (patch)
treec7955f492076d1a6688e8b221942bf252536489b /share
parent68731e73fd9f16d8c2ed9369717b085da5498538 (diff)
downloadFreeBSD-src-f0d016550feee579b48b741fce35d050dfcdefda.zip
FreeBSD-src-f0d016550feee579b48b741fce35d050dfcdefda.tar.gz
Document sbuf_new_auto().
While here, add a missing `-' in phk's name. MFC after: 3 days
Diffstat (limited to 'share')
-rw-r--r--share/man/man9/sbuf.920
1 files changed, 18 insertions, 2 deletions
diff --git a/share/man/man9/sbuf.9 b/share/man/man9/sbuf.9
index 1a752db..58efce0 100644
--- a/share/man/man9/sbuf.9
+++ b/share/man/man9/sbuf.9
@@ -1,5 +1,5 @@
.\"-
-.\" Copyright (c) 2000 Poul Henning Kamp and Dag-Erling Coïdan Smørgrav
+.\" Copyright (c) 2000 Poul-Henning Kamp and Dag-Erling Coïdan Smørgrav
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -25,12 +25,13 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 9, 2004
+.Dd May 17, 2009
.Dt SBUF 9
.Os
.Sh NAME
.Nm sbuf ,
.Nm sbuf_new ,
+.Nm sbuf_new_auto ,
.Nm sbuf_clear ,
.Nm sbuf_setpos ,
.Nm sbuf_bcat ,
@@ -55,6 +56,8 @@
.In sys/sbuf.h
.Ft struct sbuf *
.Fn sbuf_new "struct sbuf *s" "char *buf" "int length" "int flags"
+.Ft struct sbuf *
+.Fn sbuf_new_auto
.Ft void
.Fn sbuf_clear "struct sbuf *s"
.Ft int
@@ -148,6 +151,19 @@ The result of accessing that array directly while it is in use by the
sbuf is undefined.
.Pp
The
+.Fn sbuf_new_auto
+function is a shortcut for creating a completely dynamic
+.Nm .
+It is the equivalent of calling
+.Fn sbuf_new
+with values
+.Dv NULL ,
+.Dv NULL ,
+.Dv 0 ,
+and
+.Dv SBUF_AUTOEXTEND .
+.Pp
+The
.Fn sbuf_delete
function clears the
.Fa sbuf
OpenPOWER on IntegriCloud