You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_dtcl-cvs@tcl.apache.org by da...@apache.org on 2001/02/25 20:52:00 UTC

cvs commit: mod_dtcl apache_multipart_buffer.c

davidw      01/02/25 11:52:00

  Modified:    .        apache_multipart_buffer.c
  Log:
  Update libapreq file.
  
  Revision  Changes    Path
  1.2       +3 -3      mod_dtcl/apache_multipart_buffer.c
  
  Index: apache_multipart_buffer.c
  ===================================================================
  RCS file: /home/cvs/mod_dtcl/apache_multipart_buffer.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- apache_multipart_buffer.c	2000/12/19 11:59:10	1.1
  +++ apache_multipart_buffer.c	2001/02/25 19:51:59	1.2
  @@ -64,17 +64,17 @@
     if partial is true, partial matches are allowed at the end of the buffer.
     returns NULL if not found, or a pointer to the start of the first match.
   */
  -void* my_memstr(void* haystack, int haystacklen, const char* needle,
  +void* my_memstr(char* haystack, int haystacklen, const char* needle,
   		int partial)
   {
       int needlen = strlen(needle);
       int len = haystacklen;
  -    void *ptr = haystack;
  +    char *ptr = haystack;
       
       /* iterate through first character matches */
       while( (ptr = memchr(ptr, needle[0], len)) ) {
   	/* calculate length after match */
  -	len = haystacklen - (ptr - haystack);
  +	len = haystacklen - (ptr - (char *)haystack);
   
   	/* done if matches up to capacity of buffer */
   	if(memcmp(needle, ptr, needlen < len ? needlen : len) == 0 &&