Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jan 2001 07:12:39 -0800
From:      Julian Elischer <julian@elischer.org>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        "Justin T. Gibbs" <gibbs@scsiguy.com>, Dag-Erling Smorgrav <des@ofug.org>, freebsd-arch@FreeBSD.ORG
Subject:   Re: Proposed chage to sbuf semantics.
Message-ID:  <3A5DCD67.66539A@elischer.org>
References:  <8607.979224359@critter>

next in thread | previous in thread | raw e-mail | index | archive | help
Poul-Henning Kamp wrote:
> 
> As original perpetrator of the sbufs, I'd like to chime in briefly.
> 
> I agree with Justin about being able to succesfully retreive an
> overflowed sbuf.
> 
> I would even suggest that finish replaces the final characters in
> an overflowed sbuf with "[...]" as a generic marker that overflow
> happened.

I would like to set an sbuf with a 'potential' buffersize.
So long as I have not reached the 'potential' maximum, an 
operation will not overlflow, though it may not have origianlly
allocated so much memeory, or at least it may not always have that much...
e.g. I would like to guarantee that a bunch of operations succeed, 
and then when I close the string maybe, it uses an appropriatly
sized buffer. An operation to truncate back to some know size, 
after I have successfully completed the operations
and an sbuf_getpos() would also be in my wishlist, as well as the ability
to work WITHIN a longer already filled out string..
(e.g. insert, delete, replace :-)


> 
> I also agree with Dag-Erling that the API should be entirely function
> based.
> 
> --
> Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
> phk@FreeBSD.ORG         | TCP/IP since RFC 956
> FreeBSD committer       | BSD since 4.3-tahoe
> Never attribute to malice what can adequately be explained by incompetence.
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-arch" in the body of the message

-- 
      __--_|\  Julian Elischer
     /       \ julian@elischer.org
    (   OZ    ) World tour 2000
---> X_.---._/  from Perth, presently in:  Budapest
            v




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?3A5DCD67.66539A>