httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexei Kosut <ako...@hyperreal.com>
Subject cvs commit: apache/src util.c
Date Sun, 22 Jun 1997 20:35:27 GMT
akosut      97/06/22 13:35:27

  Modified:    src       util.c
  Log:
  Fix pregsub to check the correct value, and not try and substitute
  matches that didn't occur.
  
  Reviewed by: Ralf S. Engelschall, Randy Terbush
  
  Revision  Changes    Path
  1.54      +2 -2      apache/src/util.c
  
  Index: util.c
  ===================================================================
  RCS file: /export/home/cvs/apache/src/util.c,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -c -C3 -r1.53 -r1.54
  *** util.c	1997/06/15 19:22:34	1.53
  --- util.c	1997/06/22 20:35:26	1.54
  ***************
  *** 232,238 ****
    	    if (c == '\\' && (*src == '$' || *src == '&'))
    		c = *src++;
    	    len++;
  ! 	} else if (no <= nmatch && pmatch[no].rm_so < pmatch[no].rm_eo) {
    	    len += pmatch[no].rm_eo - pmatch[no].rm_so;
    	}
    
  --- 232,238 ----
    	    if (c == '\\' && (*src == '$' || *src == '&'))
    		c = *src++;
    	    len++;
  ! 	} else if (no < nmatch && pmatch[no].rm_so < pmatch[no].rm_eo) {
    	    len += pmatch[no].rm_eo - pmatch[no].rm_so;
    	}
    
  ***************
  *** 256,262 ****
    	    if (c == '\\' && (*src == '$' || *src == '&'))
    		c = *src++;
    	    *dst++ = c;
  ! 	} else if (no <= nmatch && pmatch[no].rm_so < pmatch[no].rm_eo) {
    	    len = pmatch[no].rm_eo - pmatch[no].rm_so;
    	    strncpy(dst, source + pmatch[no].rm_so, len);
    	    dst += len;
  --- 256,262 ----
    	    if (c == '\\' && (*src == '$' || *src == '&'))
    		c = *src++;
    	    *dst++ = c;
  ! 	} else if (no < nmatch && pmatch[no].rm_so < pmatch[no].rm_eo) {
    	    len = pmatch[no].rm_eo - pmatch[no].rm_so;
    	    strncpy(dst, source + pmatch[no].rm_so, len);
    	    dst += len;
  
  
  

Mime
View raw message