Re: cvs: php4(PHP_4_2_0) /ext/standard mail.c
| From: | Zeev Suraski | Date: | Sat, 24 Aug 2002 11:39:11 +0000 |
| Subject: | Re: cvs: php4(PHP_4_2_0) /ext/standard mail.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-13637@lists.php.net to get a copy of this message | ||
Please add a NEWS entry for every MFH you make!
At 14:38 24/08/2002, Stefan Esser wrote:
sesser Sat Aug 24 07:38:13 2002 EDTModified files: (Branch: PHP_4_2_0) /php4/ext/standard mail.cLog: MFH Index: php4/ext/standard/mail.c diff -u php4/ext/standard/mail.c:1.48.2.2 php4/ext/standard/mail.c:1.48.2.3 --- php4/ext/standard/mail.c:1.48.2.2 Fri Aug 23 19:48:48 2002+++ php4/ext/standard/mail.c Sat Aug 24 07:38:13 2002@@ -16,7 +16,7 @@+----------------------------------------------------------------------+*/ -/* $Id: mail.c,v 1.48.2.2 2002/08/23 23:48:48 zeev Exp $ */ +/* $Id: mail.c,v 1.48.2.3 2002/08/24 11:38:13 sesser Exp $ */ #include <stdlib.h> #include <ctype.h> @@ -88,21 +88,27 @@}if (to_len > 0) { - for(to_len--;to_len;to_len--) { - if(!isspace((unsigned char)to[to_len]))break; - to[to_len]='\0'; + for(;to_len;to_len--) { + if(!isspace((unsigned char)to[to_len-1]))break; + to[to_len-1]='\0'; + } + for(i=0;to[i];i++) { + if (iscntrl((unsigned char)to[i])) { + to[i]=' '; + } } - for(i=0;!iscntrl((unsigned char)to[i]);i++) {} - to[i]='\0'; }if (subject_len > 0) { - for(subject_len--;subject_len;subject_len--) { - if(!isspace((unsigned char)subject[subject_len]))break; - subject[subject_len]='\0'; + for(;subject_len;subject_len--) { + if(!isspace((unsigned char)subject[subject_len-1]))break; + subject[subject_len-1]='\0'; + } + for(i=0;subject[i];i++) { + if (iscntrl((unsigned char)subject[i])) { + subject[i]=' '; + } } - for(i=0;!iscntrl((unsigned char)subject[i]);i++) {} - subject[i]='\0'; }if(extra_cmd)-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php