Date: Wed, 20 May 2009 10:07:20 +0000 (UTC) From: Christian Brueffer <brueffer@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r192436 - stable/7/share/man/man9 Message-ID: <200905201007.n4KA7KiJ026768@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: brueffer Date: Wed May 20 10:07:20 2009 New Revision: 192436 URL: http://svn.freebsd.org/changeset/base/192436 Log: MFC: r192265 Document sbuf_new_auto(). While here, add a missing `-' in phk's name. Modified: stable/7/share/man/man9/ (props changed) stable/7/share/man/man9/sbuf.9 Modified: stable/7/share/man/man9/sbuf.9 ============================================================================== --- stable/7/share/man/man9/sbuf.9 Wed May 20 10:05:44 2009 (r192435) +++ stable/7/share/man/man9/sbuf.9 Wed May 20 10:07:20 2009 (r192436) @@ -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 direc 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905201007.n4KA7KiJ026768>