httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgau...@hyperreal.org
Subject cvs commit: apachen/src/modules/standard mod_rewrite.c
Date Mon, 27 Oct 1997 19:15:37 GMT
dgaudet     97/10/27 11:15:37

  Modified:    src/modules/standard mod_rewrite.c
  Log:
  Eliminate some manifest constants.
  
  Reviewed by:	Ralf Engelschall
  
  Revision  Changes    Path
  1.55      +8 -5      apachen/src/modules/standard/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===================================================================
  RCS file: /export/home/cvs/apachen/src/modules/standard/mod_rewrite.c,v
  retrieving revision 1.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- mod_rewrite.c	1997/10/22 20:30:27	1.54
  +++ mod_rewrite.c	1997/10/27 19:15:35	1.55
  @@ -234,11 +234,14 @@
       /* whether proxy module is available or not */
   static int proxy_available;
   
  +    /* maximum nmatch parameter for regexec */
  +#define MAX_NMATCH	(10)
  +
       /* the txt mapfile parsing stuff */
   #define MAPFILE_PATTERN "^([^ \t]+)[ \t]+([^ \t]+).*$"
   #define MAPFILE_OUTPUT "$1,$2"
   static regex_t   *lookup_map_txtfile_regexp = NULL;
  -static regmatch_t lookup_map_txtfile_regmatch[10];
  +static regmatch_t lookup_map_txtfile_regmatch[MAX_NMATCH];
   
   
   /*
  @@ -1542,7 +1545,7 @@
       char env[MAX_STRING_LEN];
       char port[32];
       regex_t *regexp;
  -    regmatch_t regmatch[10];
  +    regmatch_t regmatch[MAX_NMATCH];
       backrefinfo *briRR = NULL;
       backrefinfo *briRC = NULL;
       int prefixstrip;
  @@ -1595,7 +1598,7 @@
               briRR->source = pstrdup(r->pool, uri);
               briRR->nsub   = regexp->re_nsub;
               memcpy((void *)(briRR->regmatch), (void *)(regmatch),
  -                   sizeof(regmatch_t)*10);
  +                   sizeof(regmatch));
           }
   
           /* create the RewriteCond backrefinfo, but
  @@ -1835,7 +1838,7 @@
       char input[MAX_STRING_LEN];
       struct stat sb;
       request_rec *rsub;
  -    regmatch_t regmatch[10];
  +    regmatch_t regmatch[MAX_NMATCH];
       int rc;
   
       /*
  @@ -1954,7 +1957,7 @@
               briRC->source = pstrdup(r->pool, input);
               briRC->nsub   = p->regexp->re_nsub;
               memcpy((void *)(briRC->regmatch), (void *)(regmatch),
  -                   sizeof(regmatch_t)*10);
  +                   sizeof(regmatch));
           }
       }
   
  
  
  

Mime
View raw message