Skip site navigation (1)Skip section navigation (2)
Date:      28 Jan 2001 00:06:37 +0100
From:      Dag-Erling Smorgrav <des@ofug.org>
To:        "Justin T. Gibbs" <gibbs@scsiguy.com>
Cc:        freebsd-arch@FreeBSD.ORG
Subject:   Re: Proposed change to sbuf semantics
Message-ID:  <xzpwvbgppc2.fsf@flood.ping.uio.no>
In-Reply-To: "Justin T. Gibbs"'s message of "Sat, 27 Jan 2001 15:49:40 -0700"
References:  <200101272249.f0RMneO30798@aslan.scsiguy.com>

next in thread | previous in thread | raw e-mail | index | archive | help
"Justin T. Gibbs" <gibbs@scsiguy.com> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpwvbgppc2.fsf>