httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@locus.apache.org
Subject cvs commit: apache-2.0/src/main util_xml.c
Date Thu, 16 Nov 2000 00:40:49 GMT
gstein      00/11/15 16:40:49

  Modified:    src/include util_xml.h
               src/main util_xml.c
  Log:
  use apr_size_t
  
  Revision  Changes    Path
  1.6       +2 -1      apache-2.0/src/include/util_xml.h
  
  Index: util_xml.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/include/util_xml.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- util_xml.h	2000/10/16 06:04:35	1.5
  +++ util_xml.h	2000/11/16 00:40:49	1.6
  @@ -261,7 +261,8 @@
    */
   AP_DECLARE(void) ap_xml_to_text(apr_pool_t *p, const ap_xml_elem *elem,
   				int style, apr_array_header_t *namespaces,
  -				int *ns_map, const char **pbuf, size_t *psize);
  +				int *ns_map, const char **pbuf,
  +                                apr_size_t *psize);
   
   /* style argument values: */
   #define AP_XML_X2T_FULL		0	/* start tag, contents, end tag */
  
  
  
  1.11      +15 -15    apache-2.0/src/main/util_xml.c
  
  Index: util_xml.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/util_xml.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- util_xml.c	2000/10/16 06:04:53	1.10
  +++ util_xml.c	2000/11/16 00:40:49	1.11
  @@ -361,8 +361,7 @@
   AP_DECLARE(int) ap_xml_parse_input(request_rec * r, ap_xml_doc **pdoc)
   {
       int result;
  -    ap_xml_ctx ctx =
  -    {0};
  +    ap_xml_ctx ctx = { 0 };
       XML_Parser parser;
   
       if ((result = ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK)) != OK)
  @@ -396,8 +395,8 @@
   	char *buffer;
   	char end;
   	int rv;
  -	size_t total_read = 0;
  -	size_t limit_xml_body = ap_get_limit_xml_body(r);
  +	apr_size_t total_read = 0;
  +	apr_size_t limit_xml_body = ap_get_limit_xml_body(r);
   
   	/* allocate our working buffer */
   	buffer = apr_palloc(r->pool, AP_XML_READ_BLOCKSIZE);
  @@ -512,8 +511,8 @@
                                                int quotes)
   {
       const char *scan;
  -    int len = 0;
  -    int extra = 0;
  +    apr_size_t len = 0;
  +    apr_size_t extra = 0;
       char *qstr;
       char *qscan;
       char c;
  @@ -575,19 +574,19 @@
   			 (ns) < 1000000 ? 6 : (ns) < 10000000 ? 7 : \
   			 (ns) < 100000000 ? 8 : (ns) < 1000000000 ? 9 : 10)
   
  -static int text_size(const ap_text *t)
  +static apr_size_t text_size(const ap_text *t)
   {
  -    int size = 0;
  +    apr_size_t size = 0;
   
       for (; t; t = t->next)
   	size += strlen(t->text);
       return size;
   }
   
  -static size_t elem_size(const ap_xml_elem *elem, int style,
  -			apr_array_header_t *namespaces, int *ns_map)
  +static apr_size_t elem_size(const ap_xml_elem *elem, int style,
  +                            apr_array_header_t *namespaces, int *ns_map)
   {
  -    size_t size;
  +    apr_size_t size;
   
       if (style == AP_XML_X2T_FULL || style == AP_XML_X2T_FULL_NS_LANG) {
   	const ap_xml_attr *attr;
  @@ -685,7 +684,7 @@
   static char *write_text(char *s, const ap_text *t)
   {
       for (; t; t = t->next) {
  -	size_t len = strlen(t->text);
  +	apr_size_t len = strlen(t->text);
   	memcpy(s, t->text, len);
   	s += len;
       }
  @@ -696,7 +695,7 @@
   			apr_array_header_t *namespaces, int *ns_map)
   {
       const ap_xml_elem *child;
  -    size_t len;
  +    apr_size_t len;
       int ns;
   
       if (style == AP_XML_X2T_FULL || style == AP_XML_X2T_FULL_NS_LANG) {
  @@ -817,10 +816,11 @@
   /* convert an element to a text string */
   AP_DECLARE(void) ap_xml_to_text(apr_pool_t * p, const ap_xml_elem *elem,
                                   int style, apr_array_header_t *namespaces,
  -                                int *ns_map, const char **pbuf, size_t *psize)
  +                                int *ns_map, const char **pbuf,
  +                                apr_size_t *psize)
   {
       /* get the exact size, plus a null terminator */
  -    size_t size = elem_size(elem, style, namespaces, ns_map) + 1;
  +    apr_size_t size = elem_size(elem, style, namespaces, ns_map) + 1;
       char *s = apr_palloc(p, size);
   
       (void) write_elem(s, elem, style, namespaces, ns_map);
  
  
  

Mime
View raw message