cvs: /php4/ext/imap php_imap.c

From: Date: Fri, 07 Apr 2000 15:08:26 +0000
Subject: cvs: /php4/ext/imap php_imap.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-13299@lists.php.net to get a copy of this message
tedp Fri Apr 7 08:08:26 2000 EDT Modified files: /php4/ext/imap php_imap.c Log: Removed some compiler warnings. Index: php4/ext/imap/php_imap.c diff -u php4/ext/imap/php_imap.c:1.8 php4/ext/imap/php_imap.c:1.9 --- php4/ext/imap/php_imap.c:1.8 Thu Apr 6 21:43:26 2000 +++ php4/ext/imap/php_imap.c Fri Apr 7 08:07:56 2000 @@ -22,7 +22,7 @@ | PHP 4.0 updates: Zeev Suraski <zeev@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_imap.c,v 1.8 2000/04/07 04:43:26 chagenbu Exp $ */ +/* $Id: php_imap.c,v 1.9 2000/04/07 15:07:56 tedp Exp $ */ #define IMAP41 @@ -3406,8 +3406,8 @@ if((charset=((char *)emalloc((end+1)*2)))) { text=&charset[end+1]; while(offset<end) { // Reached end of the string? - if((charset_token=php_memnstr(&string[offset],"=?",2,string+end))) { // Is there anything encoded in the string? - charset_token -= (unsigned long)string; + if((charset_token=(long) php_memnstr(&string[offset],"=?",2,string+end))) { // Is there anything encoded in the string? + charset_token -= (long)string; if(offset!=charset_token) { // Is there anything before the encoded data? // Retrieve unencoded data that is found at the beginning memcpy(text,&string[offset],charset_token-offset); @@ -3418,10 +3418,10 @@ add_property_string(myobject,"text",text,1); zend_hash_next_index_insert(return_value->value.ht,(void *)&myobject,sizeof(zval *),NULL); } - if((encoding_token=php_memnstr(&string[charset_token+2],"?",1,string+end))) { // Find token for encoding - encoding_token-=(unsigned long)string; - if((end_token=php_memnstr(&string[encoding_token+1],"?=",2,string+end))) { // Find token for end of encoded data - end_token-=(unsigned long)string; + if((encoding_token=(long)php_memnstr(&string[charset_token+2],"?",1,string+end))) { // Find token for encoding + encoding_token-=(long)string; + if((end_token=(long)php_memnstr(&string[encoding_token+1],"?=",2,string+end))) { // Find token for end of encoded data + end_token-=(long)string; memcpy(charset,&string[charset_token+2],encoding_token-(charset_token+2)); // Extract charset encoding charset[encoding_token-(charset_token+2)]=0x00; encoding=string[encoding_token+1]; // Extract encoding from string

« previous php.version4 (#13299) next »