httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@locus.apache.org
Subject cvs commit: apache-2.0/src/lib/apr/include apr_buf.h
Date Wed, 12 Jul 2000 22:12:50 GMT
rbb         00/07/12 15:12:49

  Modified:    src/lib/apr/buckets ap_buf.c
               src/lib/apr/include apr_buf.h
  Log:
  Add ap_consume_buckets.  This just destroys a specified number of buckets
  off the front of the brigade.
  
  Revision  Changes    Path
  1.8       +16 -0     apache-2.0/src/lib/apr/buckets/ap_buf.c
  
  Index: ap_buf.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/buckets/ap_buf.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ap_buf.c	2000/07/12 22:09:57	1.7
  +++ ap_buf.c	2000/07/12 22:12:48	1.8
  @@ -187,6 +187,22 @@
       }
   }
   
  +APR_EXPORT(void) ap_consume_buckets(ap_bucket_brigade *b, int nvec)
  +{
  +    int i;   
  +
  +    for (i=0; i < nvec; i++) {
  +        if (b->head == b->tail) {
  +            ap_bucket_destroy(b->head->bucket);
  +            b->head = b->tail = NULL;
  +            break;
  +        }
  +        b->head = b->head->next;
  +        ap_bucket_destroy(b->head->prev->bucket);
  +        b->head->prev = NULL;
  +    }
  +}
  +
   APR_EXPORT(ap_status_t) ap_bucket_brigade_to_iol(ap_ssize_t *total_bytes,
                                                    ap_bucket_brigade *b, 
                                                    ap_iol *iol)
  
  
  
  1.9       +4 -2      apache-2.0/src/lib/apr/include/apr_buf.h
  
  Index: apr_buf.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_buf.h,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- apr_buf.h	2000/07/12 22:09:58	1.8
  +++ apr_buf.h	2000/07/12 22:12:49	1.9
  @@ -130,6 +130,9 @@
   APR_EXPORT(void) ap_bucket_brigade_catenate(ap_bucket_brigade *a, 
                                               ap_bucket_brigade *b);
   
  +/* Destroy the first nvec buckets. */
  +APR_EXPORT(void) ap_consume_buckets(ap_bucket_brigade *b, int nvec);
  +
   /* save the buf out to the specified iol.  This can be used to flush the
       data to the disk, or to send it out to the network. */
   APR_EXPORT(ap_status_t) ap_bucket_brigade_to_iol(ap_ssize_t *total_bytes,
  @@ -140,8 +143,7 @@
   
   APR_EXPORT(int) ap_brigade_printf(ap_bucket_brigade *b, const char *fmt, ...);
   
  -APR_EXPORT(int) ap_brigade_vprintf(ap_bucket_brigade *b, const char *fmt, va_lis
  -t va);
  +APR_EXPORT(int) ap_brigade_vprintf(ap_bucket_brigade *b, const char *fmt, va_list va);
   
   /*   ******  Bucket List Functions  *****  */
   
  
  
  

Mime
View raw message