From owner-freebsd-arch Sat Jan 27 15: 7: 5 2001 Delivered-To: freebsd-arch@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id D7CE737B400 for ; Sat, 27 Jan 2001 15:06:47 -0800 (PST) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.3) id AAA03019; Sun, 28 Jan 2001 00:06:38 +0100 (CET) (envelope-from des@ofug.org) X-URL: http://www.ofug.org/~des/ X-Disclaimer: The views expressed in this message do not necessarily coincide with those of any organisation or company with which I am or have been affiliated. To: "Justin T. Gibbs" Cc: freebsd-arch@FreeBSD.ORG Subject: Re: Proposed change to sbuf semantics References: <200101272249.f0RMneO30798@aslan.scsiguy.com> From: Dag-Erling Smorgrav Date: 28 Jan 2001 00:06:37 +0100 In-Reply-To: "Justin T. Gibbs"'s message of "Sat, 27 Jan 2001 15:49:40 -0700" Message-ID: Lines: 18 User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG "Justin T. Gibbs" writes: > I still need an "sbuf_empty()" type method. 8-) > Or did I miss something in the diff? Ooh, I thought you meant sbuf_clear(). sbuf_empty() as you put it is a predicate, not a method (or "an observer, not a generator" to use the terms I was taught in type theory class) > In otherwords, I'd like to be able to test if an > sbuf has been written to before it has been finalized > so you can do things like: Well, you can use sbuf_len() for that. It returns 0 if the sbuf is empty, -1 if it overflowed, and the length of its contents otherwise. DES -- Dag-Erling Smorgrav - des@ofug.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message