httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n.@apache.org
Subject cvs commit: httpd-2.0/modules/generators mod_cgi.c mod_cgid.c
Date Fri, 22 Aug 2003 23:14:30 GMT
nd          2003/08/22 16:14:30

  Modified:    modules/filters mod_include.c mod_include.h
               modules/generators mod_cgi.c mod_cgid.c
  Log:
  drop superfluous argument from ap_ssi_parse_string.
  The new API should now be stable.
  
  Revision  Changes    Path
  1.251     +20 -23    httpd-2.0/modules/filters/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v
  retrieving revision 1.250
  retrieving revision 1.251
  diff -u -r1.250 -r1.251
  --- mod_include.c	22 Aug 2003 23:03:35 -0000	1.250
  +++ mod_include.c	22 Aug 2003 23:14:30 -0000	1.251
  @@ -478,14 +478,14 @@
    * (Note: If out==NULL, this function allocs a buffer for the resulting
    * string from r->pool.  The return value is the parsed string)
    */
  -static char *ap_ssi_parse_string(request_rec *r, include_ctx_t *ctx, 
  -                                 const char *in, char *out,
  +static char *ap_ssi_parse_string(include_ctx_t *ctx, const char *in, char *out,
                                    apr_size_t length, int leave_name)
   {
       char ch;
       char *next;
       char *end_out;
       apr_size_t out_size;
  +    request_rec *r = ctx->intern->r;
   
       /* allocate an output buffer if needed */
       if (!out) {
  @@ -1206,7 +1206,7 @@
                       sizeof ("     Evaluate string\n"));
               debug_pos += sizeof ("     Evaluate string\n");
   #endif
  -            buffer = ap_ssi_parse_string(r, ctx, current->token.value, NULL, 
  +            buffer = ap_ssi_parse_string(ctx, current->token.value, NULL, 
                                            MAX_STRING_LEN, 0);
               current->token.value = buffer;
               current->value = (current->token.value[0] != '\0');
  @@ -1239,7 +1239,7 @@
               if (!current->left->done) {
                   switch (current->left->token.type) {
                   case token_string:
  -                    buffer = ap_ssi_parse_string(r, ctx, current->left->token.value,
  +                    buffer = ap_ssi_parse_string(ctx, current->left->token.value,
                                                    NULL, MAX_STRING_LEN, 0);
                       current->left->token.value = buffer;
                       current->left->value = 
  @@ -1254,7 +1254,7 @@
               if (!current->right->done) {
                   switch (current->right->token.type) {
                   case token_string:
  -                    buffer = ap_ssi_parse_string(r, ctx, current->right->token.value,
  +                    buffer = ap_ssi_parse_string(ctx, current->right->token.value,
                                                    NULL, MAX_STRING_LEN, 0);
                       current->right->token.value = buffer;
                       current->right->value = 
  @@ -1304,10 +1304,10 @@
                   *was_error = 1;
                   return retval;
               }
  -            buffer = ap_ssi_parse_string(r, ctx, current->left->token.value,
  +            buffer = ap_ssi_parse_string(ctx, current->left->token.value,
                                            NULL, MAX_STRING_LEN, 0);
               current->left->token.value = buffer;
  -            buffer = ap_ssi_parse_string(r, ctx, current->right->token.value,
  +            buffer = ap_ssi_parse_string(ctx, current->right->token.value,
                                            NULL, MAX_STRING_LEN, 0);
               current->right->token.value = buffer;
               if (current->right->token.type == token_re) {
  @@ -1361,11 +1361,11 @@
                   *was_error = 1;
                   return retval;
               }
  -            buffer = ap_ssi_parse_string(r, ctx, current->left->token.value,
  -                                         NULL, MAX_STRING_LEN, 0);
  +            buffer = ap_ssi_parse_string(ctx, current->left->token.value, NULL,
  +                                         MAX_STRING_LEN, 0);
               current->left->token.value = buffer;
  -            buffer = ap_ssi_parse_string(r, ctx, current->right->token.value,
  -                                         NULL, MAX_STRING_LEN, 0);
  +            buffer = ap_ssi_parse_string(ctx, current->right->token.value, NULL,
  +                                         MAX_STRING_LEN, 0);
               current->right->token.value = buffer;
   #ifdef DEBUG_INCLUDE
               debug_pos += sprintf (&debug[debug_pos],
  @@ -1666,8 +1666,7 @@
               break;
           }
   
  -        parsed_string = ap_ssi_parse_string(r, ctx, tag_val, NULL,
  -                                            MAX_STRING_LEN,
  +        parsed_string = ap_ssi_parse_string(ctx, tag_val, NULL, MAX_STRING_LEN,
                                               SSI_EXPAND_DROP_NAME);
           if (tag[0] == 'f') {
               /* XXX: Port to apr_filepath_merge
  @@ -1813,7 +1812,7 @@
               apr_size_t e_len;
   
               val = get_include_var(r, ctx,
  -                                  ap_ssi_parse_string(r, ctx, tag_val, NULL,
  +                                  ap_ssi_parse_string(ctx, tag_val, NULL,
                                                         MAX_STRING_LEN,
                                                         SSI_EXPAND_DROP_NAME));
               if (val) {
  @@ -1916,7 +1915,7 @@
                   ctx->error_str = ctx->intern->error_str_override;
               }
   
  -            ap_ssi_parse_string(r, ctx, tag_val,ctx->intern->error_str_override,
  +            ap_ssi_parse_string(ctx, tag_val, ctx->intern->error_str_override,
                                   MAX_STRING_LEN, SSI_EXPAND_DROP_NAME);
           }
           else if (!strcmp(tag, "timefmt")) {
  @@ -1926,7 +1925,7 @@
                                                               MAX_STRING_LEN);
                   ctx->time_str = ctx->intern->time_str_override;
               }
  -            ap_ssi_parse_string(r, ctx, tag_val, ctx->intern->time_str_override,
  +            ap_ssi_parse_string(ctx, tag_val, ctx->intern->time_str_override,
                                   MAX_STRING_LEN, SSI_EXPAND_DROP_NAME);
   
               apr_table_setn(env, "DATE_LOCAL", ap_ht_time(r->pool, date, 
  @@ -1938,7 +1937,7 @@
                              ctx->time_str, 0));
           }
           else if (!strcmp(tag, "sizefmt")) {
  -            parsed_string = ap_ssi_parse_string(r, ctx, tag_val, NULL, 
  +            parsed_string = ap_ssi_parse_string(ctx, tag_val, NULL,
                                                   MAX_STRING_LEN,
                                                   SSI_EXPAND_DROP_NAME);
               if (!strcmp(parsed_string, "bytes")) {
  @@ -2002,8 +2001,7 @@
               break;
           }
   
  -        parsed_string = ap_ssi_parse_string(r, ctx, tag_val, NULL,
  -                                            MAX_STRING_LEN,
  +        parsed_string = ap_ssi_parse_string(ctx, tag_val, NULL, MAX_STRING_LEN,
                                               SSI_EXPAND_DROP_NAME);
   
           if (!find_file(r, "fsize", tag, parsed_string, &finfo)) {
  @@ -2090,8 +2088,7 @@
               break;
           }
   
  -        parsed_string = ap_ssi_parse_string(r, ctx, tag_val, NULL,
  -                                            MAX_STRING_LEN,
  +        parsed_string = ap_ssi_parse_string(ctx, tag_val, NULL, MAX_STRING_LEN,
                                               SSI_EXPAND_DROP_NAME);
   
           if (!find_file(r, "flastmod", tag, parsed_string, &finfo)) {
  @@ -2397,7 +2394,7 @@
           }
   
           if (!strcmp(tag, "var")) {
  -            var = ap_ssi_parse_string(r, ctx, tag_val, NULL, MAX_STRING_LEN,
  +            var = ap_ssi_parse_string(ctx, tag_val, NULL, MAX_STRING_LEN,
                                         SSI_EXPAND_DROP_NAME);
           }
           else if (!strcmp(tag, "value")) {
  @@ -2411,7 +2408,7 @@
                   break;
               }
   
  -            parsed_string = ap_ssi_parse_string(r, ctx, tag_val, NULL,
  +            parsed_string = ap_ssi_parse_string(ctx, tag_val, NULL,
                                                   MAX_STRING_LEN,
                                                   SSI_EXPAND_DROP_NAME);
               apr_table_setn(r->subprocess_env, apr_pstrdup(p, var),
  
  
  
  1.38      +2 -2      httpd-2.0/modules/filters/mod_include.h
  
  Index: mod_include.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.h,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- mod_include.h	22 Aug 2003 02:23:41 -0000	1.37
  +++ mod_include.h	22 Aug 2003 23:14:30 -0000	1.38
  @@ -139,8 +139,8 @@
                            int dodecode));
   
   APR_DECLARE_OPTIONAL_FN(char*, ap_ssi_parse_string,
  -                        (request_rec *r, include_ctx_t *ctx, const char *in,
  -                         char *out, apr_size_t length, int leave_name));
  +                        (include_ctx_t *ctx, const char *in, char *out,
  +                         apr_size_t length, int leave_name));
   
   APR_DECLARE_OPTIONAL_FN(void, ap_register_include_handler, 
                           (char *tag, include_handler_fn_t *func));
  
  
  
  1.154     +4 -4      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.153
  retrieving revision 1.154
  diff -u -r1.153 -r1.154
  --- mod_cgi.c	21 Aug 2003 22:12:08 -0000	1.153
  +++ mod_cgi.c	22 Aug 2003 23:14:30 -0000	1.154
  @@ -985,8 +985,8 @@
           if (!strcmp(tag, "cmd")) {
               apr_status_t rv;
   
  -            cgi_pfn_ps(r, ctx, tag_val, parsed_string,
  -                       sizeof(parsed_string), SSI_EXPAND_LEAVE_NAME);
  +            cgi_pfn_ps(ctx, tag_val, parsed_string, sizeof(parsed_string),
  +                       SSI_EXPAND_LEAVE_NAME);
   
               rv = include_cmd(ctx, f, bb, parsed_string);
               if (!APR_STATUS_IS_SUCCESS(rv)) {
  @@ -1000,8 +1000,8 @@
           else if (!strcmp(tag, "cgi")) {
               apr_status_t rv;
   
  -            cgi_pfn_ps(r, ctx, tag_val, parsed_string,
  -                       sizeof(parsed_string), SSI_EXPAND_DROP_NAME);
  +            cgi_pfn_ps(ctx, tag_val, parsed_string, sizeof(parsed_string),
  +                       SSI_EXPAND_DROP_NAME);
   
               rv = include_cgi(ctx, f, bb, parsed_string);
               if (!APR_STATUS_IS_SUCCESS(rv)) {
  
  
  
  1.155     +2 -2      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.154
  retrieving revision 1.155
  diff -u -r1.154 -r1.155
  --- mod_cgid.c	21 Aug 2003 22:12:08 -0000	1.154
  +++ mod_cgid.c	22 Aug 2003 23:14:30 -0000	1.155
  @@ -1700,7 +1700,7 @@
           if (!strcmp(tag, "cmd")) {
               apr_status_t rv;
   
  -            cgid_pfn_ps(r, ctx, tag_val, parsed_string, sizeof(parsed_string),
  +            cgid_pfn_ps(ctx, tag_val, parsed_string, sizeof(parsed_string),
                           SSI_EXPAND_LEAVE_NAME);
   
               rv = include_cmd(ctx, f, bb, parsed_string);
  @@ -1715,7 +1715,7 @@
           else if (!strcmp(tag, "cgi")) {
               apr_status_t rv;
   
  -            cgid_pfn_ps(r, ctx, tag_val, parsed_string, sizeof(parsed_string),
  +            cgid_pfn_ps(ctx, tag_val, parsed_string, sizeof(parsed_string),
                           SSI_EXPAND_DROP_NAME);
   
               rv = include_cgi(ctx, f, bb, parsed_string);
  
  
  

Mime
View raw message