httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwool...@apache.org
Subject cvs commit: httpd-2.0/server core.c protocol.c util_filter.c util_xml.c
Date Sun, 16 Nov 2003 02:09:14 GMT
jwoolley    2003/11/15 18:09:14

  Modified:    modules/dav/main mod_dav.c
               modules/experimental mod_cache.c mod_case_filter.c
                        mod_disk_cache.c mod_mem_cache.c
               modules/filters mod_deflate.c mod_ext_filter.c
               modules/generators mod_cgi.c mod_cgid.c
               modules/http http_core.c http_protocol.c
               modules/test mod_bucketeer.c
               server   core.c protocol.c util_filter.c util_xml.c
  Log:
  get rid of _FOREACH
  
  Revision  Changes    Path
  1.100     +4 -1      httpd-2.0/modules/dav/main/mod_dav.c
  
  Index: mod_dav.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/dav/main/mod_dav.c,v
  retrieving revision 1.99
  retrieving revision 1.100
  diff -u -d -u -r1.99 -r1.100
  --- mod_dav.c	6 Aug 2003 21:38:58 -0000	1.99
  +++ mod_dav.c	16 Nov 2003 02:09:13 -0000	1.100
  @@ -997,7 +997,10 @@
                   break;
               }
   
  -            APR_BRIGADE_FOREACH(b, bb) {
  +            for (b = APR_BRIGADE_FIRST(bb);
  +                 b != APR_BRIGADE_SENTINEL(bb);
  +                 b = APR_BUCKET_NEXT(b))
  +            {
                   const char *data;
                   apr_size_t len;
   
  
  
  
  1.78      +4 -1      httpd-2.0/modules/experimental/mod_cache.c
  
  Index: mod_cache.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_cache.c,v
  retrieving revision 1.77
  retrieving revision 1.78
  diff -u -d -u -r1.77 -r1.78
  --- mod_cache.c	12 Sep 2003 19:28:47 -0000	1.77
  +++ mod_cache.c	16 Nov 2003 02:09:13 -0000	1.78
  @@ -643,7 +643,10 @@
           int all_buckets_here=0;
           int unresolved_length = 0;
           size=0;
  -        APR_BRIGADE_FOREACH(e, in) {
  +        for (e = APR_BRIGADE_FIRST(in);
  +             e != APR_BRIGADE_SENTINEL(in);
  +             e = APR_BUCKET_NEXT(e))
  +        {
               if (APR_BUCKET_IS_EOS(e)) {
                   all_buckets_here=1;
                   break;
  
  
  
  1.16      +4 -2      httpd-2.0/modules/experimental/mod_case_filter.c
  
  Index: mod_case_filter.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_case_filter.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -d -u -r1.15 -r1.16
  --- mod_case_filter.c	5 Feb 2003 10:19:28 -0000	1.15
  +++ mod_case_filter.c	16 Nov 2003 02:09:13 -0000	1.16
  @@ -99,8 +99,10 @@
       apr_bucket_brigade *pbbOut;
   
       pbbOut=apr_brigade_create(r->pool, c->bucket_alloc);
  -    APR_BRIGADE_FOREACH(pbktIn,pbbIn)
  -	{
  +    for (pbktIn = APR_BRIGADE_FIRST(pbbIn);
  +         pbktIn != APR_BRIGADE_SENTINEL(pbbIn);
  +         pbktIn = APR_BUCKET_NEXT(pbktIn))
  +    {
   	const char *data;
   	apr_size_t len;
   	char *buf;
  
  
  
  1.48      +4 -1      httpd-2.0/modules/experimental/mod_disk_cache.c
  
  Index: mod_disk_cache.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_disk_cache.c,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -d -u -r1.47 -r1.48
  --- mod_disk_cache.c	11 Sep 2003 14:56:03 -0000	1.47
  +++ mod_disk_cache.c	16 Nov 2003 02:09:13 -0000	1.48
  @@ -679,7 +679,10 @@
               return rv;
           }
       }
  -    APR_BRIGADE_FOREACH(e, b) {
  +    for (e = APR_BRIGADE_FIRST(b);
  +         e != APR_BRIGADE_SENTINEL(b);
  +         e = APR_BUCKET_NEXT(e))
  +    {
           const char *str;
           apr_size_t length;
           apr_bucket_read(e, &str, &length, APR_BLOCK_READ);
  
  
  
  1.96      +8 -2      httpd-2.0/modules/experimental/mod_mem_cache.c
  
  Index: mod_mem_cache.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_mem_cache.c,v
  retrieving revision 1.95
  retrieving revision 1.96
  diff -u -d -u -r1.95 -r1.96
  --- mod_mem_cache.c	16 Nov 2003 01:51:27 -0000	1.95
  +++ mod_mem_cache.c	16 Nov 2003 02:09:13 -0000	1.96
  @@ -957,7 +957,10 @@
            * - the brigade is complete &&
            * - the file_bucket is the last data bucket in the brigade
            */
  -        APR_BRIGADE_FOREACH(e, b) {
  +        for (e = APR_BRIGADE_FIRST(b);
  +             e != APR_BRIGADE_SENTINEL(b);
  +             e = APR_BUCKET_NEXT(e))
  +        {
               if (APR_BUCKET_IS_EOS(e)) {
                   eos = 1;
               }
  @@ -1010,7 +1013,10 @@
       cur = (char*) mobj->m + obj->count;
   
       /* Iterate accross the brigade and populate the cache storage */
  -    APR_BRIGADE_FOREACH(e, b) {
  +    for (e = APR_BRIGADE_FIRST(b);
  +         e != APR_BRIGADE_SENTINEL(b);
  +         e = APR_BUCKET_NEXT(e))
  +    {
           const char *s;
           apr_size_t len;
   
  
  
  
  1.39      +8 -2      httpd-2.0/modules/filters/mod_deflate.c
  
  Index: mod_deflate.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_deflate.c,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -d -u -r1.38 -r1.39
  --- mod_deflate.c	19 Aug 2003 14:56:12 -0000	1.38
  +++ mod_deflate.c	16 Nov 2003 02:09:13 -0000	1.39
  @@ -452,7 +452,10 @@
           ctx->stream.avail_out = c->bufferSize;
       }
       
  -    APR_BRIGADE_FOREACH(e, bb) {
  +    for (e = APR_BRIGADE_FIRST(bb);
  +         e != APR_BRIGADE_SENTINEL(bb);
  +         e = APR_BUCKET_NEXT(e))
  +    {
           const char *data;
           apr_bucket *b;
           apr_size_t len;
  @@ -724,7 +727,10 @@
               return rv;
           }
   
  -        APR_BRIGADE_FOREACH(bkt, ctx->bb) {
  +        for (bkt = APR_BRIGADE_FIRST(ctx->bb);
  +             bkt != APR_BRIGADE_SENTINEL(ctx->bb);
  +             bkt = APR_BUCKET_NEXT(bkt))
  +        {
               const char *data;
               apr_size_t len;
   
  
  
  
  1.8       +4 -2      httpd-2.0/modules/filters/mod_ext_filter.c
  
  Index: mod_ext_filter.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_ext_filter.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -d -u -r1.7 -r1.8
  --- mod_ext_filter.c	14 Jul 2003 15:08:07 -0000	1.7
  +++ mod_ext_filter.c	16 Nov 2003 02:09:13 -0000	1.8
  @@ -789,8 +789,10 @@
       dc = ctx->dc;
       bb_tmp = apr_brigade_create(r->pool, c->bucket_alloc);
   
  -    APR_BRIGADE_FOREACH(b, bb) {
  -
  +    for (b = APR_BRIGADE_FIRST(bb);
  +         b != APR_BRIGADE_SENTINEL(bb);
  +         b = APR_BUCKET_NEXT(b))
  +    {
           if (APR_BUCKET_IS_EOS(b)) {
               eos = b;
               break;
  
  
  
  1.156     +13 -3     httpd-2.0/modules/generators/mod_cgi.c
  
  Index: mod_cgi.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/generators/mod_cgi.c,v
  retrieving revision 1.155
  retrieving revision 1.156
  diff -u -d -u -r1.155 -r1.156
  --- mod_cgi.c	3 Sep 2003 19:27:05 -0000	1.155
  +++ mod_cgi.c	16 Nov 2003 02:09:13 -0000	1.156
  @@ -314,7 +314,10 @@
           apr_file_printf(f, "%s\n", sbuf);
   
       first = 1;
  -    APR_BRIGADE_FOREACH(e, bb) {
  +    for (e = APR_BRIGADE_FIRST(bb);
  +         e != APR_BRIGADE_SENTINEL(bb);
  +         e = APR_BUCKET_NEXT(e))
  +    {
           if (APR_BUCKET_IS_EOS(e)) {
               break;
           }
  @@ -564,7 +567,11 @@
       const char *buf;
       apr_size_t len;
       apr_status_t rv;
  -    APR_BRIGADE_FOREACH(e, bb) {
  +
  +    for (e = APR_BRIGADE_FIRST(bb);
  +         e != APR_BRIGADE_SENTINEL(bb);
  +         e = APR_BUCKET_NEXT(e))
  +    {
           if (APR_BUCKET_IS_EOS(e)) {
               break;
           }
  @@ -690,7 +697,10 @@
               return rv;
           }
   
  -        APR_BRIGADE_FOREACH(bucket, bb) {
  +        for (bucket = APR_BRIGADE_FIRST(bb);
  +             bucket != APR_BRIGADE_SENTINEL(bb);
  +             bucket = APR_BUCKET_NEXT(bucket))
  +        {
               const char *data;
               apr_size_t len;
   
  
  
  
  1.160     +14 -3     httpd-2.0/modules/generators/mod_cgid.c
  
  Index: mod_cgid.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/generators/mod_cgid.c,v
  retrieving revision 1.159
  retrieving revision 1.160
  diff -u -d -u -r1.159 -r1.160
  --- mod_cgid.c	7 Nov 2003 15:26:34 -0000	1.159
  +++ mod_cgid.c	16 Nov 2003 02:09:13 -0000	1.160
  @@ -1058,7 +1058,11 @@
           apr_file_printf(f, "%s\n", sbuf); 
   
       first = 1;
  -    APR_BRIGADE_FOREACH(e, bb) {
  +
  +    for (e = APR_BRIGADE_FIRST(bb);
  +         e != APR_BRIGADE_SENTINEL(bb);
  +         e = APR_BUCKET_NEXT(e))
  +    {
           if (APR_BUCKET_IS_EOS(e)) {
               break;
           }
  @@ -1159,7 +1163,11 @@
       const char *buf;
       apr_size_t len;
       apr_status_t rv;
  -    APR_BRIGADE_FOREACH(e, bb) {
  +
  +    for (e = APR_BRIGADE_FIRST(bb);
  +         e != APR_BRIGADE_SENTINEL(bb);
  +         e = APR_BUCKET_NEXT(e))
  +    {
           if (APR_BUCKET_IS_EOS(e)) {
               break;
           }
  @@ -1398,7 +1406,10 @@
               return rv;
           }
    
  -        APR_BRIGADE_FOREACH(bucket, bb) {
  +        for (bucket = APR_BRIGADE_FIRST(bb);
  +             bucket != APR_BRIGADE_SENTINEL(bb);
  +             bucket = APR_BUCKET_NEXT(bucket))
  +        {
               const char *data;
               apr_size_t len;
   
  
  
  
  1.311     +5 -1      httpd-2.0/modules/http/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/http/http_core.c,v
  retrieving revision 1.310
  retrieving revision 1.311
  diff -u -d -u -r1.310 -r1.311
  --- http_core.c	15 Apr 2003 22:47:58 -0000	1.310
  +++ http_core.c	16 Nov 2003 02:09:13 -0000	1.311
  @@ -158,7 +158,11 @@
            */
           char chunk_hdr[20]; /* enough space for the snprintf below */
   
  -        APR_BRIGADE_FOREACH(e, b) {
  +
  +        for (e = APR_BRIGADE_FIRST(b);
  +             e != APR_BRIGADE_SENTINEL(b);
  +             e = APR_BUCKET_NEXT(e))
  +        {
               if (APR_BUCKET_IS_EOS(e)) {
                   /* there shouldn't be anything after the eos */
                   eos = e;
  
  
  
  1.473     +8 -2      httpd-2.0/modules/http/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/http/http_protocol.c,v
  retrieving revision 1.472
  retrieving revision 1.473
  diff -u -d -u -r1.472 -r1.473
  --- http_protocol.c	15 Nov 2003 21:42:17 -0000	1.472
  +++ http_protocol.c	16 Nov 2003 02:09:13 -0000	1.473
  @@ -1583,7 +1583,10 @@
           }
       }
   
  -    APR_BRIGADE_FOREACH(e, b) {
  +    for (e = APR_BRIGADE_FIRST(b);
  +         e != APR_BRIGADE_SENTINEL(b);
  +         e = APR_BUCKET_NEXT(e))
  +    {
           if (e->type == &ap_bucket_type_error) {
               ap_bucket_error *eb = e->data;
   
  @@ -2025,7 +2028,10 @@
               }
           }
   
  -        APR_BRIGADE_FOREACH(bucket, bb) {
  +        for (bucket = APR_BRIGADE_FIRST(bb);
  +             bucket != APR_BRIGADE_SENTINEL(bb);
  +             bucket = APR_BUCKET_NEXT(bucket))
  +        {
               const char *data;
               apr_size_t len;
   
  
  
  
  1.16      +4 -1      httpd-2.0/modules/test/mod_bucketeer.c
  
  Index: mod_bucketeer.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/test/mod_bucketeer.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -d -u -r1.15 -r1.16
  --- mod_bucketeer.c	3 Feb 2003 17:53:14 -0000	1.15
  +++ mod_bucketeer.c	16 Nov 2003 02:09:14 -0000	1.16
  @@ -119,7 +119,10 @@
           apr_table_unset(f->r->headers_out, "Content-Length");
       }
   
  -    APR_BRIGADE_FOREACH(e, bb) {
  +    for (e = APR_BRIGADE_FIRST(bb);
  +         e != APR_BRIGADE_SENTINEL(bb);
  +         e = APR_BUCKET_NEXT(e))
  +    {
           const char *data;
           apr_size_t len, i, lastpos;
   
  
  
  
  1.249     +9 -2      httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.248
  retrieving revision 1.249
  diff -u -d -u -r1.248 -r1.249
  --- core.c	13 Nov 2003 15:18:35 -0000	1.248
  +++ core.c	16 Nov 2003 02:09:14 -0000	1.249
  @@ -3794,7 +3794,11 @@
           }
           else if (mode == AP_MODE_SPECULATIVE) {
               apr_bucket *copy_bucket;
  -            APR_BRIGADE_FOREACH(e, ctx->b) {
  +
  +            for (e = APR_BRIGADE_FIRST(ctx->b);
  +                 e != APR_BRIGADE_SENTINEL(ctx->b);
  +                 e = APR_BUCKET_NEXT(e))
  +            {
                   rv = apr_bucket_copy(e, &copy_bucket);
                   if (rv != APR_SUCCESS) {
                       return rv;
  @@ -3869,7 +3873,10 @@
           more = NULL;
   
           /* Iterate over the brigade: collect iovecs and/or a file */
  -        APR_BRIGADE_FOREACH(e, b) {
  +        for (e = APR_BRIGADE_FIRST(b);
  +             e != APR_BRIGADE_SENTINEL(b);
  +             e = APR_BUCKET_NEXT(e))
  +        {
               /* keep track of the last bucket processed */
               last_e = e;
               if (APR_BUCKET_IS_EOS(e)) {
  
  
  
  1.139     +4 -1      httpd-2.0/server/protocol.c
  
  Index: protocol.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/protocol.c,v
  retrieving revision 1.138
  retrieving revision 1.139
  diff -u -d -u -r1.138 -r1.139
  --- protocol.c	22 Oct 2003 16:45:53 -0000	1.138
  +++ protocol.c	16 Nov 2003 02:09:14 -0000	1.139
  @@ -266,7 +266,10 @@
           return APR_EGENERAL;
       }
   
  -    APR_BRIGADE_FOREACH(e, bb) {
  +    for (e = APR_BRIGADE_FIRST(bb);
  +         e != APR_BRIGADE_SENTINEL(bb);
  +         e = APR_BUCKET_NEXT(e))
  +    {
           const char *str;
           apr_size_t len;
   
  
  
  
  1.96      +4 -1      httpd-2.0/server/util_filter.c
  
  Index: util_filter.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/util_filter.c,v
  retrieving revision 1.95
  retrieving revision 1.96
  diff -u -d -u -r1.95 -r1.96
  --- util_filter.c	18 Feb 2003 00:23:20 -0000	1.95
  +++ util_filter.c	16 Nov 2003 02:09:14 -0000	1.96
  @@ -566,7 +566,10 @@
           *saveto = apr_brigade_create(p, f->c->bucket_alloc);
       }
       
  -    APR_RING_FOREACH(e, &(*b)->list, apr_bucket, link) {
  +    for (e = APR_BRIGADE_FIRST(*b);
  +         e != APR_BRIGADE_SENTINEL(*b);
  +         e = APR_BUCKET_NEXT(e))
  +    {
           rv = apr_bucket_setaside(e, p);
           if (rv != APR_SUCCESS
               /* ### this ENOTIMPL will go away once we implement setaside
  
  
  
  1.25      +4 -1      httpd-2.0/server/util_xml.c
  
  Index: util_xml.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/util_xml.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -d -u -r1.24 -r1.25
  --- util_xml.c	18 Feb 2003 20:55:03 -0000	1.24
  +++ util_xml.c	16 Nov 2003 02:09:14 -0000	1.25
  @@ -94,7 +94,10 @@
               goto read_error;
           }
   
  -        APR_BRIGADE_FOREACH(bucket, brigade) {
  +        for (bucket = APR_BRIGADE_FIRST(brigade);
  +             bucket != APR_BRIGADE_SENTINEL(brigade);
  +             bucket = APR_BUCKET_NEXT(bucket))
  +        {
               const char *data;
               apr_size_t len;
   
  
  
  

Mime
View raw message