httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: httpd-2.0/modules/experimental mod_deflate.c
Date Sat, 08 Dec 2001 13:05:56 GMT
trawick     01/12/08 05:05:56

  Modified:    modules/experimental mod_deflate.c
  Log:
  clean up some signed/unsigned discrepancies, hopefully with the absolute
  minimum of casting; it wouldn't compile with AIX xlc otherwise (experience
  says that Tru64 and HP-UX native compilers would be extremely unhappy too,
  though I didn't try yet)
  
  get rid of unused function deflate_insert_filter (trivial to put back
  so no reason to #if 0)
  
  Revision  Changes    Path
  1.2       +5 -9      httpd-2.0/modules/experimental/mod_deflate.c
  
  Index: mod_deflate.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_deflate.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mod_deflate.c	2001/11/21 22:26:07	1.1
  +++ mod_deflate.c	2001/12/08 13:05:56	1.2
  @@ -198,18 +198,13 @@
       return NULL;
   }
   
  -static void deflate_insert_filter(request_rec * r)
  -{
  -    ap_add_output_filter(deflateFilterName, NULL, r, r->connection);
  -}
  -
   /* magic header */
   static int deflate_magic[2] = { 0x1f, 0x8b };        
   
   typedef struct deflate_ctx_t
   {
       z_stream stream;
  -    char buffer[FILTER_BUFSIZE];
  +    unsigned char buffer[FILTER_BUFSIZE];
       unsigned long crc;
       apr_bucket_brigade *bb;
   } deflate_ctx;
  @@ -321,7 +316,7 @@
                   deflate_len = FILTER_BUFSIZE - ctx->stream.avail_out;
   
                   if (deflate_len != 0) {
  -                    b = apr_bucket_heap_create(ctx->buffer, deflate_len, 1);
  +                    b = apr_bucket_heap_create((char *)ctx->buffer, deflate_len, 1);
                       APR_BRIGADE_INSERT_TAIL(ctx->bb, b);
                       ctx->stream.next_out = ctx->buffer;
                       ctx->stream.avail_out = FILTER_BUFSIZE;
  @@ -399,7 +394,8 @@
           ctx->crc = crc32(ctx->crc, (const Bytef *)data, len);
   
           /* write */
  -        ctx->stream.next_in = (char *)data;
  +        ctx->stream.next_in = (unsigned char *)data; /* we just lost const-ness,
  +                                              but we'll just have to trust zlib */
           ctx->stream.avail_in = len;
           ctx->stream.next_out = ctx->buffer;
           ctx->stream.avail_out = FILTER_BUFSIZE;
  @@ -410,7 +406,7 @@
                   ctx->stream.next_out = ctx->buffer;
                   len = FILTER_BUFSIZE - ctx->stream.avail_out;
   
  -                b = apr_bucket_heap_create(ctx->buffer, len, 1);
  +                b = apr_bucket_heap_create((char *)ctx->buffer, len, 1);
                   APR_BRIGADE_INSERT_TAIL(ctx->bb, b);
                   ctx->stream.avail_out = FILTER_BUFSIZE;
               }
  
  
  

Mime
View raw message