Return-Path: Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Delivered-To: mailing list dev@apr.apache.org Received: (qmail 71507 invoked from network); 11 Dec 2000 23:43:11 -0000 Received: from kurgan.lyra.org (198.144.203.198) by locus.apache.org with SMTP; 11 Dec 2000 23:43:11 -0000 Received: (from gstein@localhost) by kurgan.lyra.org (8.9.3/8.9.3) id PAA08466 for dev@apr.apache.org; Mon, 11 Dec 2000 15:46:19 -0800 X-Authentication-Warning: kurgan.lyra.org: gstein set sender to gstein@lyra.org using -f Date: Mon, 11 Dec 2000 15:46:19 -0800 From: Greg Stein To: dev@apr.apache.org Subject: brigade/bucket splitting (was: Re: cvs commit: apr-util STATUS)x Message-ID: <20001211154618.U7732@lyra.org> Mail-Followup-To: dev@apr.apache.org References: <003201c06212$a3cd7ba0$92c0b0d0@roweclan.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: ; from rbb@covalent.net on Sat, Dec 09, 2000 at 01:14:57PM -0800 X-URL: http://www.lyra.org/greg/ X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N On Sat, Dec 09, 2000 at 01:14:57PM -0800, rbb@covalent.net wrote: >... > I'll buy this. I can see this being somewhat useful. Part of me thinks > this should be implemented as a brigade_seek function. The calling code > would then be responsible for calling ap_bucket_split and > ap_brigade_split, but I am not sure if I agree with that or not yet. I've been thinking of a bucket split at a specified point. That allows you to copy the buckets before/after the split point. This also means we're copying *a* bucket, rather than needing to pass start/end values into a bucket copy. If we go back to my original email, and we have a brigade such as: B1 -> B2 -> B3/4 -> B5 -> B6/7 -> B8 And we want to copy from [4..6], then we split at the correct point within bucket B3/4 and B6/7. That gives us this brigade: B1 -> B2 -> B3 -> B4 -> B5 -> B6 -> B7 -> B8 Now we can copy B4..B6. The reason that I asked for a bucket return value was so that we could split the brigade at point P3/4, and get a pointer to B4 back (the start of the copy). We split at point P6/7 and get P7 back (the bucket after the last to copy). Cheers, -g -- Greg Stein, http://www.lyra.org/