cvs: /php4/ext/imap php_imap.c
| From: | Zeev Suraski | Date: | Thu, 20 Apr 2000 14:53:24 +0000 |
| Subject: | cvs: /php4/ext/imap php_imap.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-13799@lists.php.net to get a copy of this message | ||
zeev Thu Apr 20 07:53:24 2000 EDT
Modified files:
/php4/ext/imap php_imap.c
Log:
- CHange macro names from Z to Z_
Index: php4/ext/imap/php_imap.c
diff -u php4/ext/imap/php_imap.c:1.14 php4/ext/imap/php_imap.c:1.15
--- php4/ext/imap/php_imap.c:1.14 Thu Apr 20 07:23:35 2000
+++ php4/ext/imap/php_imap.c Thu Apr 20 07:52:54 2000
@@ -23,7 +23,7 @@
| PHP 4.0 updates: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_imap.c,v 1.14 2000/04/20 14:23:35 zeev Exp $ */
+/* $Id: php_imap.c,v 1.15 2000/04/20 14:52:54 zeev Exp $ */
#define IMAP41
@@ -616,14 +616,14 @@
convert_to_string_ex(passwd);
if (myargc ==4) {
convert_to_long_ex(options);
- flags = ZLVAL_PP(options);
+ flags = Z_LVAL_PP(options);
if (flags & PHP_EXPUNGE) {
cl_flags = CL_EXPUNGE;
flags ^= PHP_EXPUNGE;
}
}
- strcpy(IMAPG(imap_user), ZSTRVAL_PP(user));
- strcpy(IMAPG(imap_password), ZSTRVAL_PP(passwd));
+ strcpy(IMAPG(imap_user), Z_STRVAL_PP(user));
+ strcpy(IMAPG(imap_password), Z_STRVAL_PP(passwd));
#ifdef OP_RELOGIN
/* AJS: persistent connection handling */
@@ -823,7 +823,7 @@
}
convert_to_long_ex(streamind);
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
php_error(E_WARNING, "Unable to find stream pointer");
@@ -833,7 +833,7 @@
convert_to_string_ex(mailbox);
if (myargc == 3) {
convert_to_long_ex(options);
- flags = ZLVAL_PP(options);
+ flags = Z_LVAL_PP(options);
if (flags & PHP_EXPUNGE) {
cl_flags = CL_EXPUNGE;
flags ^= PHP_EXPUNGE;
@@ -871,7 +871,7 @@
if (myargc == 4) {
convert_to_string_ex(flags);
}
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
@@ -903,7 +903,7 @@
convert_to_long_ex(streamind);
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
@@ -930,7 +930,7 @@
}
convert_to_long_ex(streamind);
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
@@ -954,7 +954,7 @@
ZEND_WRONG_PARAM_COUNT();
}
convert_to_long_ex(streamind);
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
php_error(E_WARNING, "Unable to find stream pointer");
@@ -979,7 +979,7 @@
convert_to_long_ex(streamind);
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
@@ -1009,7 +1009,7 @@
ZEND_WRONG_PARAM_COUNT();
}
convert_to_long_ex(streamind);
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
php_error(E_WARNING, "Unable to find stream pointer");
@@ -1017,7 +1017,7 @@
}
if (myargcount==2) {
convert_to_long_ex(options);
- flags = ZLVAL_PP(options);
+ flags = Z_LVAL_PP(options);
/* Do the translation from PHP's internal PHP_EXPUNGE define to c-client's CL_EXPUNGE
*/
if (flags & PHP_EXPUNGE) {
flags ^= PHP_EXPUNGE;
@@ -1049,7 +1049,7 @@
convert_to_long_ex(streamind);
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
php_error(E_WARNING, "Unable to find stream pointer");
@@ -1109,14 +1109,14 @@
if (myargc == 3) {
convert_to_long_ex(flags);
}
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
php_error(E_WARNING, "Unable to find stream pointer");
RETURN_FALSE;
}
- RETVAL_STRING(mail_fetchtext_full (imap_le_struct->imap_stream, ZLVAL_PP(msgno), NIL, myargc==3
? ZLVAL_PP(flags) : NIL), 1);
+ RETVAL_STRING(mail_fetchtext_full (imap_le_struct->imap_stream, Z_LVAL_PP(msgno), NIL,
myargc==3 ? Z_LVAL_PP(flags) : NIL), 1);
}
/* }}} */
@@ -1138,14 +1138,14 @@
if (myargcount == 3) {
convert_to_long_ex(flags);
}
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
php_error(E_WARNING, "Unable to find stream pointer");
RETURN_FALSE;
}
- RETVAL_STRING(mail_fetchtext_full(imap_le_struct->imap_stream, ZLVAL_PP(msgno), NIL,
myargcount==3 ? ZLVAL_PP(flags) : NIL), 1);
+ RETVAL_STRING(mail_fetchtext_full(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), NIL,
myargcount==3 ? Z_LVAL_PP(flags) : NIL), 1);
}
/* }}} */
@@ -1170,14 +1170,14 @@
if (myargcount == 4) {
convert_to_long_ex(options);
}
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
php_error(E_WARNING, "Unable to find stream pointer");
RETURN_FALSE;
}
- if (mail_copy_full(imap_le_struct->imap_stream, ZSTRVAL_PP(seq), ZSTRVAL_PP(folder),
myargcount==4 ? ZLVAL_PP(options) : NIL)==T) {
+ if (mail_copy_full(imap_le_struct->imap_stream, Z_STRVAL_PP(seq), Z_STRVAL_PP(folder),
myargcount==4 ? Z_LVAL_PP(options) : NIL)==T) {
RETURN_TRUE;
} else {
RETURN_FALSE;
@@ -1207,14 +1207,14 @@
convert_to_long_ex(options);
}
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
php_error(E_WARNING, "Unable to find stream pointer");
RETURN_FALSE;
}
- if (mail_copy_full(imap_le_struct->imap_stream, ZSTRVAL_PP(seq), ZSTRVAL_PP(folder),
myargcount==4 ? (ZLVAL_PP(options) | CP_MOVE) : CP_MOVE) == T) {
+ if (mail_copy_full(imap_le_struct->imap_stream, Z_STRVAL_PP(seq), Z_STRVAL_PP(folder),
myargcount==4 ? (Z_LVAL_PP(options) | CP_MOVE) : CP_MOVE) == T) {
RETURN_TRUE;
} else {
RETURN_FALSE;
@@ -1238,14 +1238,14 @@
convert_to_long_ex(streamind);
convert_to_string_ex(folder);
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
php_error(E_WARNING, "Unable to find stream pointer");
RETURN_FALSE;
}
- if (mail_create(imap_le_struct->imap_stream, ZSTRVAL_PP(folder))==T) {
+ if (mail_create(imap_le_struct->imap_stream, Z_STRVAL_PP(folder))==T) {
RETURN_TRUE;
} else {
RETURN_FALSE;
@@ -1270,14 +1270,14 @@
convert_to_string_ex(old_mailbox);
convert_to_string_ex(new_mailbox);
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
php_error(E_WARNING, "Unable to find stream pointer");
RETURN_FALSE;
}
- if (mail_rename(imap_le_struct->imap_stream, ZSTRVAL_PP(old_mailbox),
ZSTRVAL_PP(new_mailbox))==T) {
+ if (mail_rename(imap_le_struct->imap_stream, Z_STRVAL_PP(old_mailbox),
Z_STRVAL_PP(new_mailbox))==T) {
RETURN_TRUE;
} else {
RETURN_FALSE;
@@ -1301,14 +1301,14 @@
convert_to_long_ex(streamind);
convert_to_string_ex(folder);
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
php_error(E_WARNING, "Unable to find stream pointer");
RETURN_FALSE;
}
- if (mail_delete(imap_le_struct->imap_stream, ZSTRVAL_PP(folder))==T) {
+ if (mail_delete(imap_le_struct->imap_stream, Z_STRVAL_PP(folder))==T) {
RETURN_TRUE;
} else {
RETURN_FALSE;
@@ -1339,7 +1339,7 @@
convert_to_string_ex(ref);
convert_to_string_ex(pat);
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
@@ -1347,7 +1347,7 @@
RETURN_FALSE;
}
IMAPG(imap_folders) = NIL;
- mail_list(imap_le_struct->imap_stream, ZSTRVAL_PP(ref), ZSTRVAL_PP(pat));
+ mail_list(imap_le_struct->imap_stream, Z_STRVAL_PP(ref), Z_STRVAL_PP(pat));
if (IMAPG(imap_folders) == NIL) {
RETURN_FALSE;
}
@@ -1387,7 +1387,7 @@
convert_to_string_ex(ref);
convert_to_string_ex(pat);
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
php_error(E_WARNING, "Unable to find stream pointer");
@@ -1395,7 +1395,7 @@
}
IMAPG(imap_folder_objects) = NIL;
- mail_list(imap_le_struct->imap_stream, ZSTRVAL_PP(ref), ZSTRVAL_PP(pat));
+ mail_list(imap_le_struct->imap_stream, Z_STRVAL_PP(ref), Z_STRVAL_PP(pat));
if (IMAPG(imap_folder_objects) == NIL) {
RETURN_FALSE;
}
@@ -1444,7 +1444,7 @@
convert_to_string_ex(pat);
convert_to_string_ex(content);
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
@@ -1452,7 +1452,7 @@
RETURN_FALSE;
}
IMAPG(imap_folders) = NIL;
- mail_scan(imap_le_struct->imap_stream, ZSTRVAL_PP(ref), ZSTRVAL_PP(pat), ZSTRVAL_PP(content));
+ mail_scan(imap_le_struct->imap_stream, Z_STRVAL_PP(ref), Z_STRVAL_PP(pat),
Z_STRVAL_PP(content));
if (IMAPG(imap_folders) == NIL) {
RETURN_FALSE;
}
@@ -1483,7 +1483,7 @@
convert_to_long_ex(streamind);
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
@@ -1528,7 +1528,7 @@
convert_to_long_ex(flags);
}
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
@@ -1536,7 +1536,7 @@
RETURN_FALSE;
}
- mail_setflag_full(imap_le_struct->imap_stream, ZSTRVAL_PP(sequence), "\\DELETED",
myargc==3 ? ZLVAL_PP(flags) : NIL);
+ mail_setflag_full(imap_le_struct->imap_stream, Z_STRVAL_PP(sequence), "\\DELETED",
myargc==3 ? Z_LVAL_PP(flags) : NIL);
RETVAL_TRUE;
}
/* }}} */
@@ -1561,7 +1561,7 @@
convert_to_long_ex(flags);
}
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
@@ -1569,7 +1569,7 @@
RETURN_FALSE;
}
- mail_clearflag_full(imap_le_struct->imap_stream, ZSTRVAL_PP(sequence), "\\DELETED",
myargc==3 ? ZLVAL_PP(flags) : NIL);
+ mail_clearflag_full(imap_le_struct->imap_stream, Z_STRVAL_PP(sequence), "\\DELETED",
myargc==3 ? Z_LVAL_PP(flags) : NIL);
RETVAL_TRUE;
}
/* }}} */
@@ -1610,27 +1610,27 @@
convert_to_string_ex(defaulthost);
}
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
php_error(E_WARNING, "Unable to find stream pointer");
RETURN_FALSE;
}
- if (!ZLVAL_PP(msgno) || ZLVAL_PP(msgno) < 1 || (unsigned) ZLVAL_PP(msgno) >
imap_le_struct->imap_stream->nmsgs) {
+ if (!Z_LVAL_PP(msgno) || Z_LVAL_PP(msgno) < 1 || (unsigned) Z_LVAL_PP(msgno) >
imap_le_struct->imap_stream->nmsgs) {
php_error(E_WARNING, "Bad message number");
RETURN_FALSE;
}
- if (mail_fetchstructure(imap_le_struct->imap_stream, ZLVAL_PP(msgno), NIL)) {
- cache = mail_elt(imap_le_struct->imap_stream, ZLVAL_PP(msgno));
+ if (mail_fetchstructure(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), NIL)) {
+ cache = mail_elt(imap_le_struct->imap_stream, Z_LVAL_PP(msgno));
} else {
RETURN_FALSE;
}
- mystring = mail_fetchheader_full(imap_le_struct->imap_stream, ZLVAL_PP(msgno), NIL,
&length, NIL);
+ mystring = mail_fetchheader_full(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), NIL,
&length, NIL);
if (myargc == 5) {
- rfc822_parse_msg(&en, NULL, mystring, length, NULL, ZSTRVAL_PP(defaulthost), NIL);
+ rfc822_parse_msg(&en, NULL, mystring, length, NULL, Z_STRVAL_PP(defaulthost), NIL);
} else {
rfc822_parse_msg(&en, NULL, mystring, length, NULL, "UNKNOWN", NIL);
}
@@ -1661,12 +1661,12 @@
if (en->from && fromlength) {
fulladdress[0] = 0x00;
- mail_fetchfrom(fulladdress, imap_le_struct->imap_stream, ZLVAL_PP(msgno),
ZLVAL_PP(fromlength));
+ mail_fetchfrom(fulladdress, imap_le_struct->imap_stream, Z_LVAL_PP(msgno),
Z_LVAL_PP(fromlength));
add_property_string(return_value, "fetchfrom", fulladdress, 1);
}
if (en->subject && subjectlength) {
fulladdress[0] = 0x00;
- mail_fetchsubject(fulladdress, imap_le_struct->imap_stream, ZLVAL_PP(msgno),
ZLVAL_PP(subjectlength));
+ mail_fetchsubject(fulladdress, imap_le_struct->imap_stream, Z_LVAL_PP(msgno),
Z_LVAL_PP(subjectlength));
add_property_string(return_value, "fetchsubject", fulladdress, 1);
}
mail_free_envelope(&en);
@@ -1728,7 +1728,7 @@
convert_to_string_ex(ref);
convert_to_string_ex(pat);
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
@@ -1736,7 +1736,7 @@
RETURN_FALSE;
}
IMAPG(imap_sfolders) = NIL;
- mail_lsub(imap_le_struct->imap_stream, ZSTRVAL_PP(ref), ZSTRVAL_PP(pat));
+ mail_lsub(imap_le_struct->imap_stream, Z_STRVAL_PP(ref), Z_STRVAL_PP(pat));
if (IMAPG(imap_sfolders) == NIL) {
RETURN_FALSE;
}
@@ -1776,7 +1776,7 @@
convert_to_string_ex(ref);
convert_to_string_ex(pat);
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
php_error(E_WARNING, "Unable to find stream pointer");
@@ -1784,7 +1784,7 @@
}
IMAPG(imap_sfolder_objects) = NIL;
- mail_lsub(imap_le_struct->imap_stream, ZSTRVAL_PP(ref), ZSTRVAL_PP(pat));
+ mail_lsub(imap_le_struct->imap_stream, Z_STRVAL_PP(ref), Z_STRVAL_PP(pat));
if (IMAPG(imap_sfolder_objects) == NIL) {
RETURN_FALSE;
}
@@ -1828,14 +1828,14 @@
convert_to_long_ex(streamind);
convert_to_string_ex(folder);
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
php_error(E_WARNING, "Unable to find stream pointer");
RETURN_FALSE;
}
- if (mail_subscribe(imap_le_struct->imap_stream, ZSTRVAL_PP(folder))==T) {
+ if (mail_subscribe(imap_le_struct->imap_stream, Z_STRVAL_PP(folder))==T) {
RETURN_TRUE;
} else {
RETURN_FALSE;
@@ -1858,14 +1858,14 @@
convert_to_long_ex(streamind);
convert_to_string_ex(folder);
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
php_error(E_WARNING, "Unable to find stream pointer");
RETURN_FALSE;
}
- if (mail_unsubscribe(imap_le_struct->imap_stream, ZSTRVAL_PP(folder))==T) {
+ if (mail_unsubscribe(imap_le_struct->imap_stream, Z_STRVAL_PP(folder))==T) {
RETURN_TRUE;
} else {
RETURN_FALSE;
@@ -1890,7 +1890,7 @@
convert_to_long_ex(streamind);
convert_to_long_ex(msgno);
- if (ZLVAL_PP(msgno) < 1) {
+ if (Z_LVAL_PP(msgno) < 1) {
RETURN_FALSE;
}
if (myargc == 3) {
@@ -1898,7 +1898,7 @@
}
object_init(return_value);
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
@@ -1907,7 +1907,7 @@
RETURN_FALSE;
}
- mail_fetchstructure_full(imap_le_struct->imap_stream, ZLVAL_PP(msgno), &body ,myargc == 3 ?
ZLVAL_PP(flags) : NIL);
+ mail_fetchstructure_full(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), &body ,myargc == 3
? Z_LVAL_PP(flags) : NIL);
if (!body) {
php_error(E_WARNING, "No body information available");
@@ -1940,7 +1940,7 @@
if (myargc == 4) {
convert_to_long_ex(flags);
}
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
@@ -1949,7 +1949,7 @@
RETURN_FALSE;
}
- body = mail_fetchbody_full(imap_le_struct->imap_stream, ZLVAL_PP(msgno), ZSTRVAL_PP(sec),
&len, myargc==4 ? ZLVAL_PP(flags) : NIL);
+ body = mail_fetchbody_full(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), Z_STRVAL_PP(sec),
&len, myargc==4 ? Z_LVAL_PP(flags) : NIL);
if (!body) {
php_error(E_WARNING, "No body information available");
@@ -1976,7 +1976,7 @@
convert_to_string_ex(text);
object_init(return_value);
- decode = (char *) rfc822_base64((unsigned char *) ZSTRVAL_PP(text), ZSTRLEN_PP(text),
&newlength);
+ decode = (char *) rfc822_base64((unsigned char *) Z_STRVAL_PP(text), Z_STRLEN_PP(text),
&newlength);
RETVAL_STRINGL(decode, newlength, 1);
fs_give(&decode);
}
@@ -1998,7 +1998,7 @@
convert_to_string_ex(text);
object_init(return_value);
- decode = (char *) rfc822_qprint((unsigned char *) ZSTRVAL_PP(text), ZSTRLEN_PP(text),
&newlength);
+ decode = (char *) rfc822_qprint((unsigned char *) Z_STRVAL_PP(text), Z_STRLEN_PP(text),
&newlength);
RETVAL_STRINGL(decode, newlength, 1);
fs_give(&decode);
}
@@ -2020,7 +2020,7 @@
convert_to_string_ex(text);
object_init(return_value);
- decode = (char *) rfc822_8bit((unsigned char *) ZSTRVAL_PP(text), ZSTRLEN_PP(text),
&newlength);
+ decode = (char *) rfc822_8bit((unsigned char *) Z_STRVAL_PP(text), Z_STRLEN_PP(text),
&newlength);
RETVAL_STRINGL(decode, newlength, 1);
fs_give(&decode);
}
@@ -2039,7 +2039,7 @@
ZEND_WRONG_PARAM_COUNT();
}
convert_to_string_ex(text);
- decode = rfc822_binary(ZSTRVAL_PP(text), ZSTRLEN_PP(text), &len);
+ decode = rfc822_binary(Z_STRVAL_PP(text), Z_STRLEN_PP(text), &len);
RETVAL_STRINGL(decode, len, 1);
fs_give(&decode);
}
@@ -2063,7 +2063,7 @@
convert_to_long_ex(streamind);
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
@@ -2116,13 +2116,13 @@
convert_to_string_ex(personal);
addr=mail_newaddr();
if (mailbox) {
- addr->mailbox = cpystr(ZSTRVAL_PP(mailbox));
+ addr->mailbox = cpystr(Z_STRVAL_PP(mailbox));
}
if (host) {
- addr->host = cpystr(ZSTRVAL_PP(host));
+ addr->host = cpystr(Z_STRVAL_PP(host));
}
if (personal) {
- addr->personal = cpystr(ZSTRVAL_PP(personal));
+ addr->personal = cpystr(Z_STRVAL_PP(personal));
}
addr->next=NIL;
addr->error=NIL;
@@ -2151,7 +2151,7 @@
}
convert_to_string_ex(str);
convert_to_string_ex(defaulthost);
- rfc822_parse_adrlist(&env->to, ZSTRVAL_PP(str), ZSTRVAL_PP(defaulthost));
+ rfc822_parse_adrlist(&env->to, Z_STRVAL_PP(str), Z_STRVAL_PP(defaulthost));
if (array_init(return_value) == FAILURE) {
RETURN_FALSE;
}
@@ -2196,7 +2196,7 @@
}
convert_to_string_ex(str);
- cpytxt(&src, ZSTRVAL_PP(str), ZSTRLEN_PP(str));
+ cpytxt(&src, Z_STRVAL_PP(str), Z_STRLEN_PP(str));
utf8_mime2text(&src, &dest);
RETURN_STRINGL(dest.data, strlen(dest.data), 1);
}
@@ -2242,8 +2242,8 @@
}
convert_to_writable_string_ex(arg); /* Is this string really modified? */
- in = (const unsigned char *) ZSTRVAL_PP(arg);
- inlen = ZSTRLEN_PP(arg);
+ in = (const unsigned char *) Z_STRVAL_PP(arg);
+ inlen = Z_STRLEN_PP(arg);
/* validate and compute length of output string */
outlen = 0;
@@ -2395,8 +2395,8 @@
ZEND_WRONG_PARAM_COUNT();
}
convert_to_writable_string_ex(arg); /* Is this string really modified? */
- in = (const unsigned char *) ZSTRVAL_PP(arg);
- inlen = ZSTRLEN_PP(arg);
+ in = (const unsigned char *) Z_STRVAL_PP(arg);
+ inlen = Z_STRLEN_PP(arg);
/* compute the length of the result string */
outlen = 0;
@@ -2532,13 +2532,13 @@
convert_to_long_ex(flags);
}
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
php_error(E_WARNING, "Unable to find stream pointer");
RETURN_FALSE;
}
- mail_setflag_full(imap_le_struct->imap_stream, ZSTRVAL_PP(sequence), ZSTRVAL_PP(flag),
myargc==4 ? ZLVAL_PP(flags) : NIL);
+ mail_setflag_full(imap_le_struct->imap_stream, Z_STRVAL_PP(sequence), Z_STRVAL_PP(flag),
myargc==4 ? Z_LVAL_PP(flags) : NIL);
RETURN_TRUE;
}
/* }}} */
@@ -2562,13 +2562,13 @@
if (myargc==4) {
convert_to_long_ex(flags);
}
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
php_error(E_WARNING, "Unable to find stream pointer");
RETURN_FALSE;
}
- mail_clearflag_full(imap_le_struct->imap_stream, ZSTRVAL_PP(sequence), ZSTRVAL_PP(flag),
myargc==4 ? ZLVAL_PP(flags) : NIL);
+ mail_clearflag_full(imap_le_struct->imap_stream, Z_STRVAL_PP(sequence), Z_STRVAL_PP(flag),
myargc==4 ? Z_LVAL_PP(flags) : NIL);
RETURN_TRUE;
}
/* }}} */
@@ -2592,7 +2592,7 @@
convert_to_long_ex(streamind);
convert_to_long_ex(rev);
convert_to_long_ex(pgm);
- if (ZLVAL_PP(pgm)>SORTSIZE) {
+ if (Z_LVAL_PP(pgm)>SORTSIZE) {
php_error(E_WARNING, "Unrecognized sort criteria");
RETURN_FALSE;
}
@@ -2600,7 +2600,7 @@
convert_to_long_ex(flags);
}
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
php_error(E_WARNING, "Unable to find stream pointer");
@@ -2608,12 +2608,12 @@
}
spg = mail_newsearchpgm();
mypgm = mail_newsortpgm();
- mypgm->reverse = ZLVAL_PP(rev);
- mypgm->function = (short) ZLVAL_PP(pgm);
+ mypgm->reverse = Z_LVAL_PP(rev);
+ mypgm->function = (short) Z_LVAL_PP(pgm);
mypgm->next = NIL;
array_init(return_value);
- slst = mail_sort(imap_le_struct->imap_stream, NIL, spg, mypgm, myargc==4 ? ZLVAL_PP(flags) :
NIL);
+ slst = mail_sort(imap_le_struct->imap_stream, NIL, spg, mypgm, myargc==4 ? Z_LVAL_PP(flags) :
NIL);
for (sl = slst; *sl; sl++) {
add_next_index_long(return_value, *sl);
@@ -2641,7 +2641,7 @@
if (myargc == 3) {
convert_to_long_ex(flags);
}
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
@@ -2649,20 +2649,20 @@
RETURN_FALSE;
}
- if ((myargc == 3) && (ZLVAL_PP(flags) & FT_UID)) {
+ if ((myargc == 3) && (Z_LVAL_PP(flags) & FT_UID)) {
/* This should be cached; if it causes an extra RTT to the
IMAP server, then that's the price we pay for making sure
we don't crash. */
- msgindex = mail_msgno(imap_le_struct->imap_stream, ZLVAL_PP(msgno));
+ msgindex = mail_msgno(imap_le_struct->imap_stream, Z_LVAL_PP(msgno));
} else {
- msgindex = ZLVAL_PP(msgno);
+ msgindex = Z_LVAL_PP(msgno);
}
if ((msgindex < 1) || ((unsigned) msgindex > imap_le_struct->imap_stream->nmsgs)) {
php_error(E_WARNING, "Bad message number");
RETURN_FALSE;
}
- RETVAL_STRING(mail_fetchheader_full(imap_le_struct->imap_stream, ZLVAL_PP(msgno), NIL, NIL,
myargc==3 ? ZLVAL_PP(flags) : NIL), 1);
+ RETVAL_STRING(mail_fetchheader_full(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), NIL, NIL,
myargc==3 ? Z_LVAL_PP(flags) : NIL), 1);
}
/* }}} */
@@ -2682,7 +2682,7 @@
convert_to_long_ex(streamind);
convert_to_long_ex(msgno);
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
@@ -2691,7 +2691,7 @@
RETURN_FALSE;
}
- RETURN_LONG(mail_uid(imap_le_struct->imap_stream, ZLVAL_PP(msgno)));
+ RETURN_LONG(mail_uid(imap_le_struct->imap_stream, Z_LVAL_PP(msgno)));
}
/* }}} */
@@ -2711,7 +2711,7 @@
convert_to_long_ex(streamind);
convert_to_long_ex(msgno);
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
@@ -2720,7 +2720,7 @@
RETURN_FALSE;
}
- RETURN_LONG(mail_msgno(imap_le_struct->imap_stream, ZLVAL_PP(msgno)));
+ RETURN_LONG(mail_msgno(imap_le_struct->imap_stream, Z_LVAL_PP(msgno)));
}
/* }}} */
@@ -2742,7 +2742,7 @@
convert_to_long_ex(streamind);
convert_to_string_ex(mbx);
convert_to_long_ex(flags);
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
@@ -2754,7 +2754,7 @@
if (object_init(return_value) == FAILURE) {
RETURN_FALSE;
}
- if (mail_status(imap_le_struct->imap_stream, ZSTRVAL_PP(mbx), ZLVAL_PP(flags))) {
+ if (mail_status(imap_le_struct->imap_stream, Z_STRVAL_PP(mbx), Z_LVAL_PP(flags))) {
add_property_long(return_value, "flags", IMAPG(status_flags));
if (IMAPG(status_flags) & SA_MESSAGES) {
add_property_long(return_value, "messages", IMAPG(status_messages));
@@ -2807,7 +2807,7 @@
convert_to_long_ex(streamind);
convert_to_long_ex(msg);
convert_to_string_ex(section);
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
@@ -2820,7 +2820,7 @@
RETURN_FALSE;
}
- body=mail_body(imap_le_struct->imap_stream, ZLVAL_PP(msg), ZSTRVAL_PP(section));
+ body=mail_body(imap_le_struct->imap_stream, Z_LVAL_PP(msg), Z_STRVAL_PP(section));
if (body->type) {
add_property_long(return_value, "type", body->type);
}
@@ -2931,7 +2931,7 @@
ZEND_WRONG_PARAM_COUNT();
} else {
convert_to_long_ex(pflags);
- flags = ZLVAL_PP(pflags);
+ flags = Z_LVAL_PP(pflags);
}
break;
default:
@@ -2942,7 +2942,7 @@
convert_to_long_ex(streamind);
convert_to_string_ex(sequence);
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
@@ -2952,8 +2952,8 @@
array_init(return_value);
status = (flags & FT_UID)
- ? mail_uid_sequence (imap_le_struct->imap_stream, ZSTRVAL_PP(sequence))
- : mail_sequence (imap_le_struct->imap_stream, ZSTRVAL_PP(sequence))
+ ? mail_uid_sequence (imap_le_struct->imap_stream, Z_STRVAL_PP(sequence))
+ : mail_sequence (imap_le_struct->imap_stream, Z_STRVAL_PP(sequence))
;
@@ -3024,88 +3024,88 @@
convert_to_writable_array_ex(envelope);
convert_to_writable_array_ex(body);
env=mail_newenvelope();
- if (zend_hash_find(ZARRVAL_PP(envelope), "remail", sizeof("remail"), (void **)
&pvalue)== SUCCESS) {
+ if (zend_hash_find(Z_ARRVAL_PP(envelope), "remail", sizeof("remail"), (void
**) &pvalue)== SUCCESS) {
convert_to_string_ex(pvalue);
- env->remail=cpystr(ZSTRVAL_PP(pvalue));
+ env->remail=cpystr(Z_STRVAL_PP(pvalue));
}
- if (zend_hash_find(ZARRVAL_PP(envelope), "return_path", sizeof("return_path"),
(void **) &pvalue)== SUCCESS) {
+ if (zend_hash_find(Z_ARRVAL_PP(envelope), "return_path",
sizeof("return_path"), (void **) &pvalue)== SUCCESS) {
convert_to_string_ex(pvalue)
- rfc822_parse_adrlist(&env->return_path, ZSTRVAL_PP(pvalue), "NO HOST");
+ rfc822_parse_adrlist(&env->return_path, Z_STRVAL_PP(pvalue), "NO HOST");
}
- if (zend_hash_find(ZARRVAL_PP(envelope), "date", sizeof("date"), (void **)
&pvalue)== SUCCESS) {
+ if (zend_hash_find(Z_ARRVAL_PP(envelope), "date", sizeof("date"), (void **)
&pvalue)== SUCCESS) {
convert_to_string_ex(pvalue);
- env->date=cpystr(ZSTRVAL_PP(pvalue));
+ env->date=cpystr(Z_STRVAL_PP(pvalue));
}
- if (zend_hash_find(ZARRVAL_PP(envelope), "from", sizeof("from"), (void **)
&pvalue)== SUCCESS) {
+ if (zend_hash_find(Z_ARRVAL_PP(envelope), "from", sizeof("from"), (void **)
&pvalue)== SUCCESS) {
convert_to_string_ex(pvalue);
- rfc822_parse_adrlist (&env->from, ZSTRVAL_PP(pvalue), "NO HOST");
+ rfc822_parse_adrlist (&env->from, Z_STRVAL_PP(pvalue), "NO HOST");
}
- if (zend_hash_find(ZARRVAL_PP(envelope), "reply_to", sizeof("reply_to"), (void
**) &pvalue)== SUCCESS) {
+ if (zend_hash_find(Z_ARRVAL_PP(envelope), "reply_to", sizeof("reply_to"),
(void **) &pvalue)== SUCCESS) {
convert_to_string_ex(pvalue);
- rfc822_parse_adrlist (&env->reply_to, ZSTRVAL_PP(pvalue), "NO HOST");
+ rfc822_parse_adrlist (&env->reply_to, Z_STRVAL_PP(pvalue), "NO HOST");
}
- if (zend_hash_find(ZARRVAL_PP(envelope), "to", sizeof("to"), (void **)
&pvalue)== SUCCESS) {
+ if (zend_hash_find(Z_ARRVAL_PP(envelope), "to", sizeof("to"), (void **)
&pvalue)== SUCCESS) {
convert_to_string_ex(pvalue);
- rfc822_parse_adrlist (&env->to, ZSTRVAL_PP(pvalue), "NO HOST");
+ rfc822_parse_adrlist (&env->to, Z_STRVAL_PP(pvalue), "NO HOST");
}
- if (zend_hash_find(ZARRVAL_PP(envelope), "cc", sizeof("cc"), (void **)
&pvalue)== SUCCESS) {
+ if (zend_hash_find(Z_ARRVAL_PP(envelope), "cc", sizeof("cc"), (void **)
&pvalue)== SUCCESS) {
convert_to_string_ex(pvalue);
- rfc822_parse_adrlist (&env->cc, ZSTRVAL_PP(pvalue), "NO HOST");
+ rfc822_parse_adrlist (&env->cc, Z_STRVAL_PP(pvalue), "NO HOST");
}
- if (zend_hash_find(ZARRVAL_PP(envelope), "bcc", sizeof("bcc"), (void **)
&pvalue)== SUCCESS) {
+ if (zend_hash_find(Z_ARRVAL_PP(envelope), "bcc", sizeof("bcc"), (void **)
&pvalue)== SUCCESS) {
convert_to_string_ex(pvalue);
- rfc822_parse_adrlist (&env->bcc, ZSTRVAL_PP(pvalue), "NO HOST");
+ rfc822_parse_adrlist (&env->bcc, Z_STRVAL_PP(pvalue), "NO HOST");
}
- if (zend_hash_find(ZARRVAL_PP(envelope), "message_id", sizeof("message_id"),
(void **) &pvalue)== SUCCESS) {
+ if (zend_hash_find(Z_ARRVAL_PP(envelope), "message_id", sizeof("message_id"),
(void **) &pvalue)== SUCCESS) {
convert_to_string_ex(pvalue);
- env->message_id=cpystr(ZSTRVAL_PP(pvalue));
+ env->message_id=cpystr(Z_STRVAL_PP(pvalue));
}
- zend_hash_internal_pointer_reset(ZARRVAL_PP(body));
+ zend_hash_internal_pointer_reset(Z_ARRVAL_PP(body));
for (;;) {
- if (zend_hash_get_current_data(ZARRVAL_PP(body), (void **) &data)==FAILURE) {
+ if (zend_hash_get_current_data(Z_ARRVAL_PP(body), (void **) &data)==FAILURE) {
break;
}
- zend_hash_get_current_key(ZARRVAL_PP(body), &key, &ind);
- if (ZTYPE_PP(data) == IS_ARRAY) {
+ zend_hash_get_current_key(Z_ARRVAL_PP(body), &key, &ind);
+ if (Z_TYPE_PP(data) == IS_ARRAY) {
bod=mail_newbody();
topbod=bod;
- if (zend_hash_find(ZARRVAL_PP(data), "type", sizeof("type"), (void **)
&pvalue)== SUCCESS) {
+ if (zend_hash_find(Z_ARRVAL_PP(data), "type", sizeof("type"), (void **)
&pvalue)== SUCCESS) {
convert_to_long_ex(pvalue);
- bod->type = (short) ZLVAL_PP(pvalue);
+ bod->type = (short) Z_LVAL_PP(pvalue);
}
- if (zend_hash_find(ZARRVAL_PP(data), "encoding", sizeof("encoding"), (void
**) &pvalue)== SUCCESS) {
+ if (zend_hash_find(Z_ARRVAL_PP(data), "encoding", sizeof("encoding"), (void
**) &pvalue)== SUCCESS) {
convert_to_long_ex(pvalue);
- bod->encoding = (short) ZLVAL_PP(pvalue);
+ bod->encoding = (short) Z_LVAL_PP(pvalue);
}
- if (zend_hash_find(ZARRVAL_PP(data), "subtype", sizeof("subtype"), (void **)
&pvalue)== SUCCESS) {
+ if (zend_hash_find(Z_ARRVAL_PP(data), "subtype", sizeof("subtype"), (void
**) &pvalue)== SUCCESS) {
convert_to_string_ex(pvalue);
- bod->subtype = cpystr(ZSTRVAL_PP(pvalue));
+ bod->subtype = cpystr(Z_STRVAL_PP(pvalue));
}
- if (zend_hash_find(ZARRVAL_PP(data), "id", sizeof("id"), (void **)
&pvalue)== SUCCESS) {
+ if (zend_hash_find(Z_ARRVAL_PP(data), "id", sizeof("id"), (void **)
&pvalue)== SUCCESS) {
convert_to_string_ex(pvalue);
- bod->id = cpystr(ZSTRVAL_PP(pvalue));
+ bod->id = cpystr(Z_STRVAL_PP(pvalue));
}
- if (zend_hash_find(ZARRVAL_PP(data), "contents.data",
sizeof("contents.data"), (void **) &pvalue)== SUCCESS) {
+ if (zend_hash_find(Z_ARRVAL_PP(data), "contents.data",
sizeof("contents.data"), (void **) &pvalue)== SUCCESS) {
convert_to_string_ex(pvalue);
- bod->contents.text.data = (char *) fs_get(ZSTRLEN_PP(pvalue));
- memcpy(bod->contents.text.data, ZSTRVAL_PP(pvalue), ZSTRLEN_PP(pvalue)+1);
- bod->contents.text.size = ZSTRLEN_PP(pvalue);
+ bod->contents.text.data = (char *) fs_get(Z_STRLEN_PP(pvalue));
+ memcpy(bod->contents.text.data, Z_STRVAL_PP(pvalue), Z_STRLEN_PP(pvalue)+1);
+ bod->contents.text.size = Z_STRLEN_PP(pvalue);
}
- if (zend_hash_find(ZARRVAL_PP(data), "lines", sizeof("lines"), (void **)
&pvalue)== SUCCESS) {
+ if (zend_hash_find(Z_ARRVAL_PP(data), "lines", sizeof("lines"), (void **)
&pvalue)== SUCCESS) {
convert_to_long_ex(pvalue);
- bod->size.lines = ZLVAL_PP(pvalue);
+ bod->size.lines = Z_LVAL_PP(pvalue);
}
- if (zend_hash_find(ZARRVAL_PP(data), "bytes", sizeof("bytes"), (void **)
&pvalue)== SUCCESS) {
+ if (zend_hash_find(Z_ARRVAL_PP(data), "bytes", sizeof("bytes"), (void **)
&pvalue)== SUCCESS) {
convert_to_long_ex(pvalue);
- bod->size.bytes = ZLVAL_PP(pvalue);
+ bod->size.bytes = Z_LVAL_PP(pvalue);
}
- if (zend_hash_find(ZARRVAL_PP(data), "md5", sizeof("md5"), (void **)
&pvalue)== SUCCESS) {
+ if (zend_hash_find(Z_ARRVAL_PP(data), "md5", sizeof("md5"), (void **)
&pvalue)== SUCCESS) {
convert_to_string_ex(pvalue);
- bod->md5 = cpystr(ZSTRVAL_PP(pvalue));
+ bod->md5 = cpystr(Z_STRVAL_PP(pvalue));
}
}
- zend_hash_move_forward(ZARRVAL_PP(body));
+ zend_hash_move_forward(Z_ARRVAL_PP(body));
if (!toppart) {
bod->nested.part=mail_newbody_part();
mypart=bod->nested.part;
@@ -3321,10 +3321,10 @@
flags = SE_FREE;
} else {
convert_to_long_ex(search_flags);
- flags = ZLVAL_PP(search_flags);
+ flags = Z_LVAL_PP(search_flags);
}
- ind = ZLVAL_PP(streamind);
+ ind = Z_LVAL_PP(streamind);
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
if (!imap_le_struct || !IS_STREAM(ind_type)) {
php_error(E_WARNING, "Unable to find stream pointer");
@@ -3332,7 +3332,7 @@
}
IMAPG(imap_messages) = NIL;
- mail_search_full(imap_le_struct->imap_stream, NIL, mail_criteria(ZSTRVAL_PP(criteria)), flags);
+ mail_search_full(imap_le_struct->imap_stream, NIL, mail_criteria(Z_STRVAL_PP(criteria)),
flags);
if (IMAPG(imap_messages) == NIL) {
RETURN_FALSE;
}