You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@locus.apache.org on 2000/11/28 04:19:23 UTC

cvs commit: apache-2.0/src/modules/standard mod_include.c mod_include.h

trawick     00/11/27 19:19:23

  Modified:    src/modules/standard mod_include.c mod_include.h
  Log:
  Change some apr_ssize_t uses to apr_size_t.
  Submitted by:	Victor J. Orlikowski
  Reviewed by:	Jeff Trawick
  
  Revision  Changes    Path
  1.79      +12 -10    apache-2.0/src/modules/standard/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_include.c,v
  retrieving revision 1.78
  retrieving revision 1.79
  diff -u -r1.78 -r1.79
  --- mod_include.c	2000/11/27 21:03:11	1.78
  +++ mod_include.c	2000/11/28 03:19:20	1.79
  @@ -194,7 +194,7 @@
               else {
                   if (str[ctx->parse_pos] == '\0') {
                       ap_bucket   *tmp_bkt;
  -                    apr_ssize_t  start_index;
  +                    apr_size_t  start_index;
   
                       /* We want to split the bucket at the '<'. */
                       ctx->state            = PARSE_TAG;
  @@ -1426,7 +1426,7 @@
   #define ZERO_K    "   0k"
   #define ONE_K     "   1k"
   
  -static void generate_size(apr_ssize_t size, char *buff, apr_ssize_t buff_size)
  +static void generate_size(apr_ssize_t size, char *buff, apr_size_t buff_size)
   {
       /* XXX: this -1 thing is a gross hack */
       if (size == (apr_ssize_t)-1) {
  @@ -1764,7 +1764,7 @@
       char buffer[MAX_STRING_LEN];
       apr_pool_t *expr_pool;
       int retval = 0;
  -    apr_ssize_t debug_pos = 0;
  +    apr_size_t debug_pos = 0;
   
       debug[debug_pos] = '\0';
       *was_error       = 0;
  @@ -2130,7 +2130,7 @@
               }
   #ifdef DEBUG_INCLUDE
               debug_pos += sprintf (&debug[debug_pos], "     Left: %c\n",
  -                                  current->left->value ? "1" : "0");
  +                                  current->left->value ? '1' : '0');
               debug_pos += sprintf (&debug[debug_pos], "     Right: %c\n",
                                     current->right->value ? '1' : '0');
   #endif
  @@ -2345,14 +2345,16 @@
   /*-------------------------------------------------------------------------*/
   #ifdef DEBUG_INCLUDE
   
  +/* XXX overlaying the static string pointed to by cond_txt isn't cool */
  +
   #define MAX_DEBUG_SIZE MAX_STRING_LEN
   #define LOG_COND_STATUS(cntx, t_buck, h_ptr, ins_head, tag_text)           \
   {                                                                          \
       char *cond_txt = "**** X     conditional_status=\"0\"\n";              \
  -    apr_ssize_t c_wrt;                                                     \
  +    apr_size_t c_wrt;                                                      \
                                                                              \
       if (cntx->flags & FLAG_COND_TRUE) {                                    \
  -        cont_txt[31] = '1';                                                \
  +        cond_txt[31] = '1';                                                \
       }                                                                      \
       memcpy(&cond_txt[5], tag_text, sizeof(tag_text));                      \
       t_buck = ap_bucket_create_heap(cond_txt, sizeof(cond_txt), 1, &c_wrt); \
  @@ -2364,7 +2366,7 @@
   }
   #define DUMP_PARSE_EXPR_DEBUG(t_buck, h_ptr, d_buf, ins_head)            \
   {                                                                        \
  -    apr_ssize_t b_wrt;                                                   \
  +    apr_size_t b_wrt;                                                    \
       if (d_buf[0] != '\0') {                                              \
           t_buck = ap_bucket_create_heap(d_buf, strlen(d_buf), 1, &b_wrt); \
           AP_BUCKET_INSERT_BEFORE(h_ptr, t_buck);                          \
  @@ -2433,7 +2435,7 @@
                   expr = tag_val;
   #ifdef DEBUG_INCLUDE
                   if (1) {
  -                    apr_ssize_t d_len = 0, d_wrt = 0;
  +                    apr_size_t d_len = 0, d_wrt = 0;
                       d_len = sprintf(debug_buf, "**** if expr=\"%s\"\n", expr);
                       tmp_buck = ap_bucket_create_heap(debug_buf, d_len, 1, &d_wrt);
                       AP_BUCKET_INSERT_BEFORE(head_ptr, tmp_buck);
  @@ -2506,7 +2508,7 @@
                   expr = tag_val;
   #ifdef DEBUG_INCLUDE
                   if (1) {
  -                    apr_ssize_t d_len = 0, d_wrt = 0;
  +                    apr_size_t d_len = 0, d_wrt = 0;
                       d_len = sprintf(debug_buf, "**** elif expr=\"%s\"\n", expr);
                       tmp_buck = ap_bucket_create_heap(debug_buf, d_len, 1, &d_wrt);
                       AP_BUCKET_INSERT_BEFORE(head_ptr, tmp_buck);
  @@ -2710,7 +2712,7 @@
           /* State to check for the STARTING_SEQUENCE. */
           if ((ctx->state == PRE_HEAD) || (ctx->state == PARSE_HEAD)) {
               int do_cleanup = 0;
  -            apr_ssize_t cleanup_bytes = ctx->parse_pos;
  +            apr_size_t cleanup_bytes = ctx->parse_pos;
   
               tmp_dptr = find_start_sequence(dptr, ctx, *bb, &do_cleanup);
   
  
  
  
  1.3       +6 -6      apache-2.0/src/modules/standard/mod_include.h
  
  Index: mod_include.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_include.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- mod_include.h	2000/11/27 21:03:08	1.2
  +++ mod_include.h	2000/11/28 03:19:21	1.3
  @@ -144,22 +144,22 @@
       states       state;
       long         flags;    /* See the FLAG_XXXXX definitions. */
       int          if_nesting_level;
  -    apr_ssize_t  parse_pos;
  +    apr_size_t   parse_pos;
       
       ap_bucket   *head_start_bucket;
  -    apr_ssize_t  head_start_index;
  +    apr_size_t   head_start_index;
   
       ap_bucket   *tag_start_bucket;
  -    apr_ssize_t  tag_start_index;
  +    apr_size_t   tag_start_index;
   
       ap_bucket   *tail_start_bucket;
  -    apr_ssize_t  tail_start_index;
  +    apr_size_t   tail_start_index;
   
       char        *combined_tag;
       char        *curr_tag_pos;
  -    apr_ssize_t  tag_length;
  +    apr_size_t   tag_length;
   
  -    apr_ssize_t  error_length;
  +    apr_size_t   error_length;
       char         error_str[MAX_STRING_LEN];
       char         time_str[MAX_STRING_LEN];