From owner-freebsd-arch Thu Jan 11 7:55:34 2001 Delivered-To: freebsd-arch@freebsd.org Received: from mail.interware.hu (mail.interware.hu [195.70.32.130]) by hub.freebsd.org (Postfix) with ESMTP id 3736037B402 for ; Thu, 11 Jan 2001 07:55:12 -0800 (PST) Received: from luanda-56.budapest.interware.hu ([195.70.51.56] helo=elischer.org) by mail.interware.hu with esmtp (Exim 3.16 #1 (Debian)) id 14Gk4A-0005uq-00; Thu, 11 Jan 2001 16:55:07 +0100 Message-ID: <3A5DCD67.66539A@elischer.org> Date: Thu, 11 Jan 2001 07:12:39 -0800 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en, hu MIME-Version: 1.0 To: Poul-Henning Kamp Cc: "Justin T. Gibbs" , Dag-Erling Smorgrav , freebsd-arch@FreeBSD.ORG Subject: Re: Proposed chage to sbuf semantics. References: <8607.979224359@critter> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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