httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: apache-2.0/src CHANGES
Date Thu, 26 Oct 2000 10:48:29 GMT
trawick     00/10/26 03:48:29

  Modified:    src/include util_ebcdic.h
               src/main http_core.c rfc1413.c util_ebcdic.c
               src      CHANGES
  Log:
   Introduce ap_xlate_proto_{to|from}_ascii() to clean up some of
  the EBCDIC support.  They are noops on ASCII machines, so this
  type of translation doesn't have to be surrounded by #ifdef
  CHARSET_EBCDIC.
  
  Revision  Changes    Path
  1.8       +21 -0     apache-2.0/src/include/util_ebcdic.h
  
  Index: util_ebcdic.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/include/util_ebcdic.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- util_ebcdic.h	2000/10/05 11:21:12	1.7
  +++ util_ebcdic.h	2000/10/26 10:48:27	1.8
  @@ -79,9 +79,30 @@
    */
   apr_status_t ap_init_ebcdic(apr_pool_t *pool);
   
  +/**
  + * Convert protocol data from the implementation character
  + * set to ASCII.
  + * @param buffer buffer to translate
  + * @param len number of bytes to translate
  + */
  +void ap_xlate_proto_to_ascii(char *buffer, apr_size_t len);
  +
  +/**
  + * Convert protocol data to the implementation character
  + * set from ASCII.
  + * @param buffer buffer to translate
  + * @param len number of bytes to translate
  + */
  +void ap_xlate_proto_from_ascii(char *buffer, apr_size_t len);
  +
   #ifdef __cplusplus
   }
   #endif
  +
  +#else   /* CHARSET_EBCDIC */
  +
  +#define ap_xlate_proto_to_ascii(x,y)          /* NOOP */
  +#define ap_xlate_proto_from_ascii(x,y)        /* NOOP */
   
   #endif  /* CHARSET_EBCDIC */
       
  
  
  
  1.189     +1 -9      apache-2.0/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_core.c,v
  retrieving revision 1.188
  retrieving revision 1.189
  diff -u -r1.188 -r1.189
  --- http_core.c	2000/10/25 18:54:20	1.188
  +++ http_core.c	2000/10/26 10:48:27	1.189
  @@ -3279,15 +3279,7 @@
               /* XXX might be nice to have APR_OFF_T_FMT_HEX */
               hdr_len = apr_snprintf(chunk_hdr, sizeof(chunk_hdr),
                                      "%qx" CRLF, (apr_uint64_t)bytes);
  -#ifdef CHARSET_EBCDIC
  -            {
  -                apr_size_t inbytes_left = hdr_len, outbytes_left = hdr_len;
  -
  -                apr_xlate_conv_buffer(ap_hdrs_to_ascii,
  -                                      chunk_hdr, &inbytes_left,
  -                                      chunk_hdr, &outbytes_left);
  -            }
  -#endif
  +            ap_xlate_proto_to_ascii(chunk_hdr, hdr_len);
               e = ap_bucket_create_transient(chunk_hdr, hdr_len);
               AP_BRIGADE_INSERT_HEAD(b, e);
   
  
  
  
  1.23      +3 -14     apache-2.0/src/main/rfc1413.c
  
  Index: rfc1413.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/rfc1413.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- rfc1413.c	2000/10/05 17:32:53	1.22
  +++ rfc1413.c	2000/10/26 10:48:28	1.23
  @@ -119,9 +119,6 @@
       char *cp;
       char buffer[RFC1413_MAXDATA + 1];
       int buflen;
  -#ifdef CHARSET_EBCDIC
  -    apr_size_t inbytes_left, outbytes_left;
  -#endif
   
       /*
        * Bind the local and remote ends of the query socket to the same
  @@ -156,11 +153,7 @@
   /* send the data */
       buflen = apr_snprintf(buffer, sizeof(buffer), "%u,%u\r\n", sav_rmt_port,
   		sav_our_port);
  -#ifdef CHARSET_EBCDIC
  -    inbytes_left = outbytes_left = buflen;
  -    apr_xlate_conv_buffer(ap_hdrs_to_ascii, buffer, &inbytes_left,
  -                          buffer, &outbytes_left);
  -#endif
  +    ap_xlate_proto_to_ascii(buffer, buflen);
   
       /* send query to server. Handle short write. */
       i = 0;
  @@ -180,7 +173,7 @@
   
       /*
        * Read response from server. - the response should be newline 
  -     * terminated according to rfc - make sure it doesn't stomp it's
  +     * terminated according to rfc - make sure it doesn't stomp its
        * way out of the buffer.
        */
   
  @@ -209,11 +202,7 @@
       }
   
   /* RFC1413_USERLEN = 512 */
  -#ifdef CHARSET_EBCDIC
  -    inbytes_left = outbytes_left = i;
  -    apr_xlate_conv_buffer(ap_hdrs_from_ascii, buffer, &inbytes_left,
  -                          buffer, &outbytes_left);
  -#endif
  +    ap_xlate_proto_from_ascii(buffer, i);
       if (sscanf(buffer, "%u , %u : USERID :%*[^:]:%512s", &rmt_port, &our_port,
   	       user) != 3 || sav_rmt_port != rmt_port
   	|| sav_our_port != our_port)
  
  
  
  1.14      +18 -0     apache-2.0/src/main/util_ebcdic.c
  
  Index: util_ebcdic.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/util_ebcdic.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- util_ebcdic.c	2000/10/05 11:21:22	1.13
  +++ util_ebcdic.c	2000/10/26 10:48:28	1.14
  @@ -123,4 +123,22 @@
       return APR_SUCCESS;
   }
   
  +void ap_xlate_proto_to_ascii(char *buffer, apr_size_t len)
  +{
  +    apr_size_t inbytes_left, outbytes_left;
  +
  +    inbytes_left = outbytes_left = len;
  +    apr_xlate_conv_buffer(ap_hdrs_to_ascii, buffer, &inbytes_left,
  +                          buffer, &outbytes_left);
  +}
  +
  +void ap_xlate_proto_from_ascii(char *buffer, apr_size_t len)
  +{
  +    apr_size_t inbytes_left, outbytes_left;
  +
  +    inbytes_left = outbytes_left = len;
  +    apr_xlate_conv_buffer(ap_hdrs_from_ascii, buffer, &inbytes_left,
  +                          buffer, &outbytes_left);
  +}
  +
   #endif /* CHARSET_EBCDIC */
  
  
  
  1.298     +5 -0      apache-2.0/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/CHANGES,v
  retrieving revision 1.297
  retrieving revision 1.298
  diff -u -r1.297 -r1.298
  --- CHANGES	2000/10/25 18:54:16	1.297
  +++ CHANGES	2000/10/26 10:48:29	1.298
  @@ -1,4 +1,9 @@
   Changes with Apache 2.0a8
  +  *) Introduce ap_xlate_proto_{to|from}_ascii() to clean up some of
  +     the EBCDIC support.  They are noops on ASCII machines, so this
  +     type of translation doesn't have to be surrounded by #ifdef
  +     CHARSET_EBCDIC.  [Jeff Trawick]
  +
     *) Fix mod_include.  tag commands work again, and the server will
        send the FAQ again.  This also allows mod_include to set aside
        buckets that include partial buckets.
  
  
  

Mime
View raw message