From owner-freebsd-arch Wed Dec 13 4: 2:38 2000 From owner-freebsd-arch@FreeBSD.ORG Wed Dec 13 04:02:31 2000 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id D9AE437B400 for ; Wed, 13 Dec 2000 04:02:19 -0800 (PST) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.0/8.11.0) id eBDC0Tm95032; Wed, 13 Dec 2000 14:00:29 +0200 (EET) (envelope-from ru) Date: Wed, 13 Dec 2000 14:00:29 +0200 From: Ruslan Ermilov To: Dag-Erling Smorgrav Cc: arch@FreeBSD.ORG Subject: Re: New sbuf patch on freefall Message-ID: <20001213140029.A94874@sunbay.com> Mail-Followup-To: Dag-Erling Smorgrav , arch@FreeBSD.ORG References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Nq2Wo0NMKNjxTN9z" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from des@ofug.org on Tue, Dec 12, 2000 at 10:40:07PM +0100 Sender: ru@whale.sunbay.crimea.ua Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Dec 12, 2000 at 10:40:07PM +0100, Dag-Erling Smorgrav wrote: > http://people.freebsd.org/~des/software/sbuf-20001212.diff > > I've cleaned up the code, fixed a bug or two, removed some unnecessary > code, added some more assertions, and incorporated most of the > suggestions I've gotten so far, as well as cleaned up the man page. > This patch to sbuf.9 manpage: - Fixes the .Dd call - Removes trailing whitespaces - Adds two missing .Ns calls - .Fa -> .Dv in one place - Removes extraneous duplication of your email address Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age --Nq2Wo0NMKNjxTN9z Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="sbuf.9.patch" --- sbuf.9~ Wed Dec 13 13:41:16 2000 +++ sbuf.9 Wed Dec 13 13:56:08 2000 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 10th, 2000 +.Dd December 10, 2000 .Dt sbuf 9 .Os FreeBSD .Sh NAME @@ -42,25 +42,25 @@ .Nd safe string formatting .Sh SYNOPSIS .Fd #include -.Ft int +.Ft int .Fn sbuf_new "struct sbuf *s" "char *buf" "size_t length" "int flags" -.Ft int +.Ft int .Fn sbuf_setpos "struct sbuf *s" "size_t pos" -.Ft int +.Ft int .Fn sbuf_cat "struct sbuf *s" "char *str" -.Ft int +.Ft int .Fn sbuf_cpy "struct sbuf *s" "char *str" -.Ft int +.Ft int .Fn sbuf_printf "struct sbuf *s" "char *fmt" "..." -.Ft int +.Ft int .Fn sbuf_putc "struct sbuf *s" "int c" -.Ft int +.Ft int .Fn sbuf_finish "struct sbuf *s" .Ft char * .Fn sbuf_data "struct sbuf *s" -.Ft size_t +.Ft size_t .Fn sbuf_len "struct sbuf *s" -.Ft void +.Ft void .Fn sbuf_delete "struct sbuf *s" .Sh DESCRIPTION The @@ -104,7 +104,7 @@ The .Fn sbuf_setpos function sets the -.Fa sbuf 's +.Fa sbuf Ns 's current position to .Fa pos , which is a value between zero and one less than the size of the @@ -172,7 +172,7 @@ Finally, the .Fn sbuf_delete function clears the -.Fa sbuf +.Fa sbuf and frees its storage buffer if it was allocated by .Fn sbuf_new . .Sh NOTES @@ -181,7 +181,7 @@ to overflow, most subsequent operations (including .Fn sbuf_finish ) on it will fail until the -.Fa sbuf 's +.Fa sbuf Ns 's position is reset to a value between 0 and one less than the size of its storage buffer using .Fn sbuf_setpos , @@ -209,7 +209,7 @@ and .Fn sbuf_len return -.Fa NULL +.Dv NULL and 0, respectively, if the buffer overflowed. .Sh SEE ALSO .Xr printf 3 , @@ -230,4 +230,4 @@ .An Dag-Erling Co\(:idan Sm\(/orgrav Aq des@FreeBSD.org . .Pp This manual page was written by -.An Dag-Erling Co\(:idan Sm\(/orgrav Aq des@FreeBSD.org . +.An Dag-Erling Co\(:idan Sm\(/orgrav . --Nq2Wo0NMKNjxTN9z-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message