From owner-svn-src-head@FreeBSD.ORG Sun May 17 21:28:37 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4F8310656F4; Sun, 17 May 2009 21:28:37 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1E6B8FC1C; Sun, 17 May 2009 21:28:37 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n4HLSbRA040192; Sun, 17 May 2009 21:28:37 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4HLSb55040191; Sun, 17 May 2009 21:28:37 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200905172128.n4HLSb55040191@svn.freebsd.org> From: Christian Brueffer Date: Sun, 17 May 2009 21:28:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r192265 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2009 21:28:38 -0000 Author: brueffer Date: Sun May 17 21:28:37 2009 New Revision: 192265 URL: http://svn.freebsd.org/changeset/base/192265 Log: Document sbuf_new_auto(). While here, add a missing `-' in phk's name. MFC after: 3 days Modified: head/share/man/man9/sbuf.9 Modified: head/share/man/man9/sbuf.9 ============================================================================== --- head/share/man/man9/sbuf.9 Sun May 17 20:59:09 2009 (r192264) +++ head/share/man/man9/sbuf.9 Sun May 17 21:28:37 2009 (r192265) @@ -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