]> granicus.if.org Git - php/commitdiff
Removed some compiler warnings.
authorTed Rolle Jr <tedp@php.net>
Fri, 7 Apr 2000 15:07:56 +0000 (15:07 +0000)
committerTed Rolle Jr <tedp@php.net>
Fri, 7 Apr 2000 15:07:56 +0000 (15:07 +0000)
ext/imap/php_imap.c

index 8af9b615c2ca4c4f427f56127d3fe12504d6b09e..335be57bf7bdb69fcfa72dcd71091a52b7c51029 100644 (file)
@@ -3406,8 +3406,8 @@ PHP_FUNCTION(imap_mime_header_decode)
        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 @@ PHP_FUNCTION(imap_mime_header_decode)
                                        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