httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@hyperreal.org
Subject cvs commit: apache-1.3/src/modules/standard mod_mime.c
Date Fri, 10 Dec 1999 14:51:04 GMT
coar        99/12/10 06:51:04

  Modified:    src/modules/standard mod_mime.c
  Log:
  	isascii isn't universal, alas..
  
  Submitted by:	gil <pg@sweng.stortek.com>
  Reviewed by:	Martin Kraemer, Ken Coar
  
  Revision  Changes    Path
  1.51      +11 -3     apache-1.3/src/modules/standard/mod_mime.c
  
  Index: mod_mime.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_mime.c,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- mod_mime.c	1999/12/09 18:10:34	1.50
  +++ mod_mime.c	1999/12/10 14:51:03	1.51
  @@ -68,6 +68,13 @@
   #include "http_config.h"
   #include "http_log.h"
   
  +/*
  + * isascii(c) isn't universal, and even those places where it is
  + * defined it's not always right for our needs.  Roll our own that
  + * we can rely on.
  + */
  +#define ap_isascii(c) ((OS_ASC(c) & ~0177) != 0)
  +
   typedef struct handlers_info {
       char *name;
   } handlers_info;
  @@ -338,7 +345,7 @@
   {
       int res;
   
  -    res = (isascii(c) && isgraph(c)
  +    res = (ap_isascii(c) && isgraph(c)
   	   && (strchr(tspecial, c) == NULL)) ? 1 : -1;
       return res;
   }
  @@ -347,7 +354,8 @@
   {
       int res;
   
  -    res = (isascii(c) && (c != '"') && (c != '\\') && (c != '\n'))
? 1 : -1;
  +    res = (ap_isascii(c) && (c != '"') && (c != '\\') && (c !=
'\n'))
  +	? 1 : -1;
       return res;
   }
   
  @@ -358,7 +366,7 @@
   
       if (((s + 1) != NULL) && (*s == '\\')) {
   	c = (int) *(s + 1);
  -	if (isascii(c)) {
  +	if (ap_isascii(c)) {
   	    res = 1;
   	}
       }
  
  
  

Mime
View raw message