yucky patch

From: Duane Wessels <wessels@dont-contact.us>
Date: Wed, 10 Feb 1999 17:06:21 -0700

Should I apply this yucky thing?

It eliminates the following warnings from some compilers:

gcc -g -O2 -Wall -I. -I../include -I../include -c cf_gen.c
cf_gen.c: In function `main':
cf_gen.c:180: warning: subscript has type `char'
cf_gen.c:185: warning: subscript has type `char'
cf_gen.c:190: warning: subscript has type `char'

Index: include/config.h.in
===================================================================
RCS file: /surf1/CVS/squid/include/config.h.in,v
retrieving revision 1.43
diff -c -r1.43 config.h.in
*** config.h.in 1999/01/13 23:24:27 1.43
--- config.h.in 1999/02/10 22:41:06
***************
*** 154,159 ****
--- 154,167 ----
  #define xmemmove(d,s,n) bcopy((s),(d),(n))
  #endif
  
+ #define xisspace(x) isspace((int)x)
+ #define xtoupper(x) toupper((int)x)
+ #define xtolower(x) tolower((int)x)
+ #define xisdigit(x) isdigit((int)x)
+ #define xisascii(x) isascii((int)x)
+ #define xislower(x) islower((int)x)
+ #define xisalpha(x) isalpha((int)x)
+
  #if defined(O_NONBLOCK) && !defined(_SQUID_SUNOS_) && !defined(_SQUID_SOLARIS_)
  #define SQUID_NONBLOCK O_NONBLOCK
  #else
Index: lib/rfc1123.c
===================================================================
RCS file: /surf1/CVS/squid/lib/rfc1123.c,v
retrieving revision 1.21
diff -c -r1.21 rfc1123.c
*** rfc1123.c 1998/11/12 06:30:15 1.21
--- rfc1123.c 1999/02/10 22:41:06
***************
*** 93,101 ****
      int i;
      char month[3];
  
! month[0] = toupper(*s);
! month[1] = tolower(*(s + 1));
! month[2] = tolower(*(s + 2));
  
      for (i = 0; i < 12; i++)
          if (!strncmp(month_names[i], month, 3))
--- 93,101 ----
      int i;
      char month[3];
  
! month[0] = xtoupper(*s);
! month[1] = xtolower(*(s + 1));
! month[2] = xtolower(*(s + 2));
  
      for (i = 0; i < 12; i++)
          if (!strncmp(month_names[i], month, 3))
***************
*** 119,125 ****
          s++; /* or: Thu, 10 Jan 1993 01:29:59 GMT */
          while (*s == ' ')
              s++;
! if (isdigit(*s) && !isdigit(*(s+1))) /* backoff if only one digit */
              s--;
          if (strchr(s, '-')) { /* First format */
              if ((int) strlen(s) < 18)
--- 119,125 ----
          s++; /* or: Thu, 10 Jan 1993 01:29:59 GMT */
          while (*s == ' ')
              s++;
! if (xisdigit(*s) && !xisdigit(*(s+1))) /* backoff if only one digit */
              s--;
          if (strchr(s, '-')) { /* First format */
              if ((int) strlen(s) < 18)
Index: lib/snprintf.c
===================================================================
RCS file: /surf1/CVS/squid/lib/snprintf.c,v
retrieving revision 1.16
diff -c -r1.16 snprintf.c
*** snprintf.c 1998/09/29 16:47:53 1.16
--- snprintf.c 1999/02/10 22:41:06
***************
*** 302,308 ****
  
  #define STR_TO_DEC( str, num ) \
      num = NUM( *str++ ) ; \
! while ( isdigit( *str ) ) \
      { \
          num *= 10 ; \
          num += NUM( *str++ ) ; \
--- 302,308 ----
  
  #define STR_TO_DEC( str, num ) \
      num = NUM( *str++ ) ; \
! while ( xisdigit( *str ) ) \
      { \
          num *= 10 ; \
          num += NUM( *str++ ) ; \
***************
*** 422,428 ****
      /*
       * Check for Infinity and NaN
       */
! if (isalpha(*p)) {
          *len = strlen(strcpy(buf, p));
          *is_negative = FALSE;
          return (buf);
--- 422,428 ----
      /*
       * Check for Infinity and NaN
       */
! if (xisalpha(*p)) {
          *len = strlen(strcpy(buf, p));
          *is_negative = FALSE;
          return (buf);
***************
*** 577,583 ****
              /*
               * Try to avoid checking for flags, width or precision
               */
! if (isascii(*fmt) && !islower(*fmt)) {
                  /*
                   * Recognize flags: -, #, BLANK, +
                   */
--- 577,583 ----
              /*
               * Try to avoid checking for flags, width or precision
               */
! if (xisascii(*fmt) && !xislower(*fmt)) {
                  /*
                   * Recognize flags: -, #, BLANK, +
                   */
***************
*** 599,605 ****
                  /*
                   * Check if a width was specified
                   */
! if (isdigit(*fmt)) {
                      STR_TO_DEC(fmt, min_width);
                      adjust_width = YES;
                  } else if (*fmt == '*') {
--- 599,605 ----
                  /*
                   * Check if a width was specified
                   */
! if (xisdigit(*fmt)) {
                      STR_TO_DEC(fmt, min_width);
                      adjust_width = YES;
                  } else if (*fmt == '*') {
***************
*** 623,629 ****
                  if (*fmt == '.') {
                      adjust_precision = YES;
                      fmt++;
! if (isdigit(*fmt)) {
                          STR_TO_DEC(fmt, precision);
                      } else if (*fmt == '*') {
                          precision = va_arg(ap, int);
--- 623,629 ----
                  if (*fmt == '.') {
                      adjust_precision = YES;
                      fmt++;
! if (xisdigit(*fmt)) {
                          STR_TO_DEC(fmt, precision);
                      } else if (*fmt == '*') {
                          precision = va_arg(ap, int);
Index: lib/util.c
===================================================================
RCS file: /surf1/CVS/squid/lib/util.c,v
retrieving revision 1.65
diff -c -r1.65 util.c
*** util.c 1998/11/12 06:30:16 1.65
--- util.c 1999/02/10 22:41:06
***************
*** 678,684 ****
  {
      size_t count = 0;
      if (str) {
! while (isspace(*str)) {
              str++;
              count++;
          }
--- 678,684 ----
  {
      size_t count = 0;
      if (str) {
! while (xisspace(*str)) {
              str++;
              count++;
          }
Index: src/HttpHdrExtField.c
===================================================================
RCS file: /surf1/CVS/squid/src/HttpHdrExtField.c,v
retrieving revision 1.6
diff -c -r1.6 HttpHdrExtField.c
*** HttpHdrExtField.c 1998/07/22 20:36:44 1.6
--- HttpHdrExtField.c 1999/02/10 22:41:07
***************
*** 73,79 ****
  
      value_start = name_end + 1; /* skip ':' */
      /* skip white space */
! while (value_start < field_end && isspace(*value_start))
          value_start++;
  
      return httpHdrExtFieldDoCreate(
--- 73,79 ----
  
      value_start = name_end + 1; /* skip ':' */
      /* skip white space */
! while (value_start < field_end && xisspace(*value_start))
          value_start++;
  
      return httpHdrExtFieldDoCreate(
Index: src/HttpHeader.c
===================================================================
RCS file: /surf1/CVS/squid/src/HttpHeader.c,v
retrieving revision 1.61
diff -c -r1.61 HttpHeader.c
*** HttpHeader.c 1999/01/24 02:26:19 1.61
--- HttpHeader.c 1999/02/10 22:41:07
***************
*** 819,825 ****
      if (!l || strncasecmp(field, authScheme, l)) /* wrong scheme */
          return NULL;
      field += l;
! if (!isspace(*field)) /* wrong scheme */
          return NULL;
      /* skip white space */
      field += xcountws(field);
--- 819,825 ----
      if (!l || strncasecmp(field, authScheme, l)) /* wrong scheme */
          return NULL;
      field += l;
! if (!xisspace(*field)) /* wrong scheme */
          return NULL;
      /* skip white space */
      field += xcountws(field);
***************
*** 933,939 ****
      else
          e->name = Headers[id].name;
      /* trim field value */
! while (value_start < field_end && isspace(*value_start))
          value_start++;
      /* set field value */
      stringLimitInit(&e->value, value_start, field_end - value_start);
--- 933,939 ----
      else
          e->name = Headers[id].name;
      /* trim field value */
! while (value_start < field_end && xisspace(*value_start))
          value_start++;
      /* set field value */
      stringLimitInit(&e->value, value_start, field_end - value_start);
Index: src/HttpHeaderTools.c
===================================================================
RCS file: /surf1/CVS/squid/src/HttpHeaderTools.c,v
retrieving revision 1.24
diff -c -r1.24 HttpHeaderTools.c
*** HttpHeaderTools.c 1999/01/24 02:26:20 1.24
--- HttpHeaderTools.c 1999/02/10 22:41:07
***************
*** 241,247 ****
          *pos = *item + strlen(*item);
      len = *pos - *item; /* *pos points to del or '\0' */
      /* rtrim */
! while (len > 0 && isspace((*item)[len - 1]))
          len--;
      if (ilen)
          *ilen = len;
--- 241,247 ----
          *pos = *item + strlen(*item);
      len = *pos - *item; /* *pos points to del or '\0' */
      /* rtrim */
! while (len > 0 && xisspace((*item)[len - 1]))
          len--;
      if (ilen)
          *ilen = len;
***************
*** 268,274 ****
  {
      assert(value);
      *value = atoi(start);
! if (!*value && !isdigit(*start)) {
          debug(66, 2) ("failed to parse an int header field near '%s'\n", start);
          return 0;
      }
--- 268,274 ----
  {
      assert(value);
      *value = atoi(start);
! if (!*value && !xisdigit(*start)) {
          debug(66, 2) ("failed to parse an int header field near '%s'\n", start);
          return 0;
      }
***************
*** 308,314 ****
              hstr = p + 1;
      }
      /* skip invalid first line if any */
! if (isspace(*hstr)) {
          const char *p = strchr(hstr, '\n');
          if (p)
              hstr = p + 1;
--- 308,314 ----
              hstr = p + 1;
      }
      /* skip invalid first line if any */
! if (xisspace(*hstr)) {
          const char *p = strchr(hstr, '\n');
          if (p)
              hstr = p + 1;
***************
*** 353,360 ****
      if (!strncasecmp(h1, h2, len))
          return 0;
      while (1) {
! const char c1 = toupper(h1[len1 += xcountws(h1 + len1)]);
! const char c2 = toupper(h2[len2 += xcountws(h2 + len2)]);
          if (c1 < c2)
              return -len1;
          if (c1 > c2)
--- 353,360 ----
      if (!strncasecmp(h1, h2, len))
          return 0;
      while (1) {
! const char c1 = xtoupper(h1[len1 += xcountws(h1 + len1)]);
! const char c2 = xtoupper(h2[len2 += xcountws(h2 + len2)]);
          if (c1 < c2)
              return -len1;
          if (c1 > c2)
Index: src/HttpStatusLine.c
===================================================================
RCS file: /surf1/CVS/squid/src/HttpStatusLine.c,v
retrieving revision 1.17
diff -c -r1.17 HttpStatusLine.c
*** HttpStatusLine.c 1998/08/14 19:25:12 1.17
--- HttpStatusLine.c 1999/02/10 22:41:07
***************
*** 83,89 ****
      if (strncasecmp(start, "HTTP/", 5))
          return 0;
      start += 5;
! if (!isdigit(*start))
          return 0;
      sline->version = atof(start);
      if (!(start = strchr(start, ' ')))
--- 83,89 ----
      if (strncasecmp(start, "HTTP/", 5))
          return 0;
      start += 5;
! if (!xisdigit(*start))
          return 0;
      sline->version = atof(start);
      if (!(start = strchr(start, ' ')))
Index: src/acl.c
===================================================================
RCS file: /surf1/CVS/squid/src/acl.c,v
retrieving revision 1.197.2.1
diff -c -r1.197.2.1 acl.c
*** acl.c 1999/02/10 00:01:21 1.197.2.1
--- acl.c 1999/02/10 22:41:07
***************
*** 996,1002 ****
      /* Trim trailing \n before decoding */
      strtok(sent_auth, "\n");
      /* Trim leading whitespace before decoding */
! while (isspace(*proxy_auth))
          proxy_auth++;
      cleartext = uudecode(sent_auth);
      xfree(sent_auth);
--- 996,1002 ----
      /* Trim trailing \n before decoding */
      strtok(sent_auth, "\n");
      /* Trim leading whitespace before decoding */
! while (xisspace(*proxy_auth))
          proxy_auth++;
      cleartext = uudecode(sent_auth);
      xfree(sent_auth);
***************
*** 1905,1911 ****
      l1 = strlen(h);
      l2 = strlen(d);
      /* h != d */
! while (tolower(h[l1]) == tolower(d[l2])) {
          if (l1 == 0)
              break;
          if (l2 == 0)
--- 1905,1911 ----
      l1 = strlen(h);
      l2 = strlen(d);
      /* h != d */
! while (xtolower(h[l1]) == xtolower(d[l2])) {
          if (l1 == 0)
              break;
          if (l2 == 0)
***************
*** 1918,1924 ****
          return -1; /* domain(h) < d */
      if ((d[l2] == '.') || (l2 == 0))
          return 1; /* domain(h) > d */
! return (tolower(h[l1]) - tolower(d[l2]));
  }
  
  /* compare two network specs
--- 1918,1924 ----
          return -1; /* domain(h) < d */
      if ((d[l2] == '.') || (l2 == 0))
          return 1; /* domain(h) > d */
! return (xtolower(h[l1]) - xtolower(d[l2]));
  }
  
  /* compare two network specs
Index: src/asn.c
===================================================================
RCS file: /surf1/CVS/squid/src/asn.c,v
retrieving revision 1.56
diff -c -r1.56 asn.c
*** asn.c 1999/01/29 21:28:07 1.56
--- asn.c 1999/02/10 22:41:07
***************
*** 238,247 ****
      }
      s = buf;
      while (s - buf < size && *s != '\0') {
! while (*s && isspace(*s))
              s++;
          for (t = s; *t; t++) {
! if (isspace(*t))
                  break;
          }
          if (*t == '\0') {
--- 238,247 ----
      }
      s = buf;
      while (s - buf < size && *s != '\0') {
! while (*s && xisspace(*s))
              s++;
          for (t = s; *t; t++) {
! if (xisspace(*t))
                  break;
          }
          if (*t == '\0') {
Index: src/cachemgr.c
===================================================================
RCS file: /surf1/CVS/squid/src/cachemgr.c,v
retrieving revision 1.84
diff -c -r1.84 cachemgr.c
*** cachemgr.c 1999/01/19 02:24:22 1.84
--- cachemgr.c 1999/02/10 22:41:07
***************
*** 206,214 ****
              *str = NULL;
          /* trim */
          len = strlen(tok);
! while (len && isspace(tok[len - 1]))
              tok[--len] = '\0';
! while (isspace(*tok))
              tok++;
          return tok;
      } else
--- 206,214 ----
              *str = NULL;
          /* trim */
          len = strlen(tok);
! while (len && xisspace(tok[len - 1]))
              tok[--len] = '\0';
! while (xisspace(*tok))
              tok++;
          return tok;
      } else
***************
*** 273,280 ****
          *statusStr = NULL;
      if (strncasecmp(sline, "HTTP/", 5) || !sp)
          return -1;
! while (isspace(*++sp));
! if (!isdigit(*sp))
          return -1;
      if (statusStr)
          *statusStr = sp;
--- 273,280 ----
          *statusStr = NULL;
      if (strncasecmp(sline, "HTTP/", 5) || !sp)
          return -1;
! while (xisspace(*++sp));
! if (!xisdigit(*sp))
          return -1;
      if (statusStr)
          *statusStr = sp;
Index: src/cf_gen.c
===================================================================
RCS file: /surf1/CVS/squid/src/cf_gen.c,v
retrieving revision 1.31
diff -c -r1.31 cf_gen.c
*** cf_gen.c 1999/01/24 04:29:43 1.31
--- cf_gen.c 1999/02/10 22:41:07
***************
*** 177,193 ****
                  (void) 0;
              } else if (!strncmp(buff, "COMMENT:", 8)) {
                  ptr = buff + 8;
! while (isspace(*ptr))
                      ptr++;
                  curr->comment = xstrdup(ptr);
              } else if (!strncmp(buff, "DEFAULT:", 8)) {
                  ptr = buff + 8;
! while (isspace(*ptr))
                      ptr++;
                  curr->default_value = xstrdup(ptr);
              } else if (!strncmp(buff, "DEFAULT_IF_NONE:", 16)) {
                  ptr = buff + 16;
! while (isspace(*ptr))
                      ptr++;
                  curr->default_if_none = xstrdup(ptr);
              } else if (!strncmp(buff, "LOC:", 4)) {
--- 177,193 ----
                  (void) 0;
              } else if (!strncmp(buff, "COMMENT:", 8)) {
                  ptr = buff + 8;
! while (xisspace(*ptr))
                      ptr++;
                  curr->comment = xstrdup(ptr);
              } else if (!strncmp(buff, "DEFAULT:", 8)) {
                  ptr = buff + 8;
! while (xisspace(*ptr))
                      ptr++;
                  curr->default_value = xstrdup(ptr);
              } else if (!strncmp(buff, "DEFAULT_IF_NONE:", 16)) {
                  ptr = buff + 16;
! while (xisspace(*ptr))
                      ptr++;
                  curr->default_if_none = xstrdup(ptr);
              } else if (!strncmp(buff, "LOC:", 4)) {
Index: src/client_side.c
===================================================================
RCS file: /surf1/CVS/squid/src/client_side.c,v
retrieving revision 1.440
diff -c -r1.440 client_side.c
*** client_side.c 1999/01/29 23:39:15 1.440
--- client_side.c 1999/02/10 22:41:07
***************
*** 1947,1965 ****
          debug(33, 1) ("parseHttpRequest: Missing URL\n");
          return parseHttpRequestAbort(conn, "error:missing-url");
      }
! while (isspace(*url))
          url++;
      t = url + strlen(url);
      assert(*t == '\0');
      token = NULL;
      while (t > url) {
          t--;
! if (isspace(*t) && !strncmp(t + 1, "HTTP/", 5)) {
              token = t + 1;
              break;
          }
      }
! while (t > url && isspace(*t))
          *(t--) = '\0';
      debug(33, 5) ("parseHttpRequest: URI is '%s'\n", url);
      if (token == NULL) {
--- 1947,1965 ----
          debug(33, 1) ("parseHttpRequest: Missing URL\n");
          return parseHttpRequestAbort(conn, "error:missing-url");
      }
! while (xisspace(*url))
          url++;
      t = url + strlen(url);
      assert(*t == '\0');
      token = NULL;
      while (t > url) {
          t--;
! if (xisspace(*t) && !strncmp(t + 1, "HTTP/", 5)) {
              token = t + 1;
              break;
          }
      }
! while (t > url && xisspace(*t))
          *(t--) = '\0';
      debug(33, 5) ("parseHttpRequest: URI is '%s'\n", url);
      if (token == NULL) {
***************
*** 2174,2180 ****
      while (conn->in.offset > 0) {
          int nrequests;
          size_t req_line_sz;
! while (conn->in.offset > 0 && isspace(conn->in.buf[0])) {
              xmemmove(conn->in.buf, conn->in.buf + 1, conn->in.offset - 1);
              conn->in.offset--;
          }
--- 2174,2180 ----
      while (conn->in.offset > 0) {
          int nrequests;
          size_t req_line_sz;
! while (conn->in.offset > 0 && xisspace(conn->in.buf[0])) {
              xmemmove(conn->in.buf, conn->in.buf + 1, conn->in.offset - 1);
              conn->in.offset--;
          }
Index: src/ftp.c
===================================================================
RCS file: /surf1/CVS/squid/src/ftp.c,v
retrieving revision 1.280
diff -c -r1.280 ftp.c
*** ftp.c 1999/02/06 08:44:13 1.280
--- ftp.c 1999/02/10 22:41:08
***************
*** 535,541 ****
              /* Directory.. name begins with first printable after <dir> */
              ct = strstr(buf, tokens[2]);
              ct += strlen(tokens[2]);
! while (isspace(*ct))
                  ct++;
              if (!*ct)
                  ct = NULL;
--- 535,541 ----
              /* Directory.. name begins with first printable after <dir> */
              ct = strstr(buf, tokens[2]);
              ct += strlen(tokens[2]);
! while (xisspace(*ct))
                  ct++;
              if (!*ct)
                  ct = NULL;
***************
*** 666,673 ****
      if ((parts = ftpListParseParts(line, ftpState->flags)) == NULL) {
          char *p;
          snprintf(html, 8192, "%s\n", line);
! for (p = line; *p && isspace(*p); p++);
! if (*p && !isspace(*p))
              ftpState->flags.listformat_unknown = 1;
          return html;
      }
--- 666,673 ----
      if ((parts = ftpListParseParts(line, ftpState->flags)) == NULL) {
          char *p;
          snprintf(html, 8192, "%s\n", line);
! for (p = line; *p && xisspace(*p); p++);
! if (*p && !xisspace(*p))
              ftpState->flags.listformat_unknown = 1;
          return html;
      }
Index: src/http.c
===================================================================
RCS file: /surf1/CVS/squid/src/http.c,v
retrieving revision 1.346
diff -c -r1.346 http.c
*** http.c 1999/01/29 23:39:19 1.346
--- http.c 1999/02/10 22:41:08
***************
*** 476,482 ****
      }
      if (!httpState->reply_hdr && len > 0) {
          /* Skip whitespace */
! while (len > 0 && isspace(*buf))
              xmemmove(buf, buf + 1, len--);
          if (len == 0) {
              /* Continue to read... */
--- 476,482 ----
      }
      if (!httpState->reply_hdr && len > 0) {
          /* Skip whitespace */
! while (len > 0 && xisspace(*buf))
              xmemmove(buf, buf + 1, len--);
          if (len == 0) {
              /* Continue to read... */
Index: src/ident.c
===================================================================
RCS file: /surf1/CVS/squid/src/ident.c,v
retrieving revision 1.49
diff -c -r1.49 ident.c
*** ident.c 1999/01/24 05:24:22 1.49
--- ident.c 1999/02/10 22:41:08
***************
*** 159,165 ****
      debug(30, 5) ("identReadReply: FD %d: Read '%s'\n", fd, buf);
      if (strstr(buf, "USERID")) {
          if ((ident = strrchr(buf, ':'))) {
! while (isspace(*++ident));
              identCallback(state, ident);
          }
      }
--- 159,165 ----
      debug(30, 5) ("identReadReply: FD %d: Read '%s'\n", fd, buf);
      if (strstr(buf, "USERID")) {
          if ((ident = strrchr(buf, ':'))) {
! while (xisspace(*++ident));
              identCallback(state, ident);
          }
      }
Index: src/mime.c
===================================================================
RCS file: /surf1/CVS/squid/src/mime.c,v
retrieving revision 1.84
diff -c -r1.84 mime.c
*** mime.c 1998/12/05 00:54:32 1.84
--- mime.c 1999/02/10 22:41:08
***************
*** 84,94 ****
      for (p = mime; *p; p += strcspn(p, "\n\r")) {
          if (strcmp(p, "\r\n\r\n") == 0 || strcmp(p, "\n\n") == 0)
              return NULL;
! while (isspace(*p))
              p++;
          if (strncasecmp(p, name, namelen))
              continue;
! if (!isspace(p[namelen]) && p[namelen] != ':')
              continue;
          l = strcspn(p, "\n\r") + 1;
          if (l > GET_HDR_SZ)
--- 84,94 ----
      for (p = mime; *p; p += strcspn(p, "\n\r")) {
          if (strcmp(p, "\r\n\r\n") == 0 || strcmp(p, "\n\n") == 0)
              return NULL;
! while (xisspace(*p))
              p++;
          if (strncasecmp(p, name, namelen))
              continue;
! if (!xisspace(p[namelen]) && p[namelen] != ':')
              continue;
          l = strcspn(p, "\n\r") + 1;
          if (l > GET_HDR_SZ)
***************
*** 99,110 ****
          q += namelen;
          if (*q == ':')
              q++, got = 1;
! while (isspace(*q))
              q++, got = 1;
          if (got && prefix) {
              /* we could process list entries here if we had strcasestr(). */
              /* make sure we did not match a part of another field-value */
! got = !strncasecmp(q, prefix, preflen) && !isalpha(q[preflen]);
          }
          if (got) {
              debug(25, 5) ("mime_get_header: returning '%s'\n", q);
--- 99,110 ----
          q += namelen;
          if (*q == ':')
              q++, got = 1;
! while (xisspace(*q))
              q++, got = 1;
          if (got && prefix) {
              /* we could process list entries here if we had strcasestr(). */
              /* make sure we did not match a part of another field-value */
! got = !strncasecmp(q, prefix, preflen) && !xisalpha(q[preflen]);
          }
          if (got) {
              debug(25, 5) ("mime_get_header: returning '%s'\n", q);
Index: src/url.c
===================================================================
RCS file: /surf1/CVS/squid/src/url.c,v
retrieving revision 1.113
diff -c -r1.113 url.c
*** url.c 1999/01/19 02:24:35 1.113
--- url.c 1999/02/10 22:41:08
***************
*** 233,239 ****
          }
      }
      for (t = host; *t; t++)
! *t = tolower(*t);
      if (strspn(host, valid_hostname_chars) != strlen(host)) {
          debug(23, 1) ("urlParse: Illegal character in hostname '%s'\n", host);
          return NULL;
--- 233,239 ----
          }
      }
      for (t = host; *t; t++)
! *t = xtolower(*t);
      if (strspn(host, valid_hostname_chars) != strlen(host)) {
          debug(23, 1) ("urlParse: Illegal character in hostname '%s'\n", host);
          return NULL;
Index: src/urn.c
===================================================================
RCS file: /surf1/CVS/squid/src/urn.c,v
retrieving revision 1.52
diff -c -r1.52 urn.c
*** urn.c 1999/01/29 23:39:25 1.52
--- urn.c 1999/02/10 22:41:08
***************
*** 231,237 ****
          errorAppendEntry(e, err);
          return;
      }
! while (isspace(*s))
          s++;
      urls = urnParseReply(s, urnState->request->method);
      for (i = 0; NULL != urls[i].url; i++)
--- 231,237 ----
          errorAppendEntry(e, err);
          return;
      }
! while (xisspace(*s))
          s++;
      urls = urnParseReply(s, urnState->request->method);
      for (i = 0; NULL != urls[i].url; i++)
Received on Tue Jul 29 2003 - 13:15:56 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:04 MST