cvs: /php4/ext/imap php_imap.c
| From: | Zeev Suraski | Date: | Wed, 19 Apr 2000 13:16:27 +0000 |
| Subject: | cvs: /php4/ext/imap php_imap.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-13732@lists.php.net to get a copy of this message | ||
zeev Wed Apr 19 06:16:27 2000 EDT
Modified files:
/php4/ext/imap php_imap.c
Log:
Fix a couple of _ex()'s
Index: php4/ext/imap/php_imap.c
diff -u php4/ext/imap/php_imap.c:1.12 php4/ext/imap/php_imap.c:1.13
--- php4/ext/imap/php_imap.c:1.12 Tue Apr 18 15:22:48 2000
+++ php4/ext/imap/php_imap.c Wed Apr 19 06:15:57 2000
@@ -5,8 +5,7 @@
| Copyright (c) 1997, 1998, 1999, 2000 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.01 of the PHP license, |
- | that is
- bundled with this package in the file LICENSE, and is |
+ | that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_01.txt.
|
| If you did not receive a copy of the PHP license and are unable to |
@@ -24,7 +23,7 @@
| PHP 4.0 updates: Zeev Suraski <zeev@zend.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_imap.c,v 1.12 2000/04/18 22:22:48 zeev Exp $ */
+/* $Id: php_imap.c,v 1.13 2000/04/19 13:15:57 zeev Exp $ */
#define IMAP41
@@ -602,10 +601,10 @@
int hashed_details_length = 0;
#endif
int ind;
- int myargc=ARG_COUNT(ht);
+ int myargc=ZEND_NUM_ARGS();
IMAPLS_FETCH();
- if (myargc <3 || myargc >4 || zend_get_parameters_ex(ht, myargc, &mailbox, &user,
&passwd, &options) == FAILURE) {
+ if (myargc <3 || myargc >4 || zend_get_parameters_ex(myargc, &mailbox, &user,
&passwd, &options) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -812,9 +811,9 @@
int ind, ind_type;
long flags=NIL;
long cl_flags=NIL;
- int myargc=ARG_COUNT(ht);
+ int myargc=ZEND_NUM_ARGS();
- if (myargc<2 || myargc>3 || zend_get_parameters_ex(ht, myargc, &streamind, &mailbox,
&options) == FAILURE) {
+ if (myargc<2 || myargc>3 || zend_get_parameters_ex(myargc, &streamind, &mailbox,
&options) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -854,9 +853,9 @@
int ind, ind_type;
pils *imap_le_struct;
STRING st;
- int myargc=ARG_COUNT(ht);
+ int myargc=ZEND_NUM_ARGS();
- if (myargc < 3 || myargc > 4 || zend_get_parameters_ex(ht, myargc, &streamind,
&folder, &message,&flags) == FAILURE) {
+ if (myargc < 3 || myargc > 4 || zend_get_parameters_ex(myargc, &streamind, &folder,
&message,&flags) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -891,7 +890,7 @@
int ind, ind_type;
pils *imap_le_struct;
- if (ARG_COUNT(ht) != 1 || zend_get_parameters(ht, 1, &streamind) == FAILURE) {
+ if (ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht, 1, &streamind) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -918,7 +917,7 @@
int ind, ind_type;
pils *imap_le_struct;
- if (ARG_COUNT(ht) != 1 || zend_get_parameters(ht, 1, &streamind) == FAILURE) {
+ if (ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht, 1, &streamind) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -941,7 +940,7 @@
pval *streamind;
int ind, ind_type;
pils *imap_le_struct;
- if (ARG_COUNT(ht) != 1 || zend_get_parameters(ht, 1, &streamind) == FAILURE) {
+ if (ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht, 1, &streamind) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_long(streamind);
@@ -963,7 +962,7 @@
int ind, ind_type;
pils *imap_le_struct;
- if (ARG_COUNT(ht) != 1 || zend_get_parameters(ht, 1, &streamind) == FAILURE) {
+ if (ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht, 1, &streamind) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -991,7 +990,7 @@
pval *options, *streamind;
int ind, ind_type;
pils *imap_le_struct=NULL;
- int myargcount=ARG_COUNT(ht);
+ int myargcount=ZEND_NUM_ARGS();
long flags = NIL;
if (myargcount < 1 || myargcount > 2 || zend_get_parameters(ht, myargcount, &streamind,
&options) == FAILURE) {
@@ -1031,7 +1030,7 @@
pils *imap_le_struct;
char tmp[MAILTMPLEN];
- if (ARG_COUNT(ht) != 1 || zend_get_parameters(ht, 1, &streamind) == FAILURE) {
+ if (ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht, 1, &streamind) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -1086,7 +1085,7 @@
pval *streamind, * msgno, *flags;
int ind, ind_type;
pils *imap_le_struct;
- int myargc=ARG_COUNT(ht);
+ int myargc=ZEND_NUM_ARGS();
if (myargc <2 || myargc > 3 ||
zend_get_parameters(ht,myargc,&streamind,&msgno,&flags) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -1114,7 +1113,7 @@
pval *streamind, * msgno, *flags;
int ind, ind_type;
pils *imap_le_struct;
- int myargcount = ARG_COUNT(ht);
+ int myargcount = ZEND_NUM_ARGS();
if (myargcount >3 || myargcount <2 ||
zend_get_parameters(ht,myargcount,&streamind,&msgno,&flags) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -1140,7 +1139,7 @@
pval *streamind,*seq, *folder, *options;
int ind, ind_type;
pils *imap_le_struct;
- int myargcount = ARG_COUNT(ht);
+ int myargcount = ZEND_NUM_ARGS();
if (myargcount > 4 || myargcount < 3
|| zend_get_parameters(ht,myargcount,&streamind,&seq,&folder,&options) ==
FAILURE) {
WRONG_PARAM_COUNT;
@@ -1174,7 +1173,7 @@
pval *streamind, *seq, *folder, *options;
int ind, ind_type;
pils *imap_le_struct;
- int myargcount = ARG_COUNT(ht);
+ int myargcount = ZEND_NUM_ARGS();
if (myargcount > 4 || myargcount < 3
|| zend_get_parameters(ht,myargcount,&streamind,&seq,&folder,&options) ==
FAILURE) {
WRONG_PARAM_COUNT;
@@ -1210,7 +1209,7 @@
int ind, ind_type;
pils *imap_le_struct;
- if (ARG_COUNT(ht)!=2 || zend_get_parameters(ht,2,&streamind,&folder) == FAILURE) {
+ if (ZEND_NUM_ARGS()!=2 || zend_get_parameters(ht,2,&streamind,&folder) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -1240,7 +1239,7 @@
int ind, ind_type;
pils *imap_le_struct;
- if (ARG_COUNT(ht)!=3 || zend_get_parameters(ht, 3, &streamind, &old_mailbox,
&new_mailbox)==FAILURE) {
+ if (ZEND_NUM_ARGS()!=3 || zend_get_parameters(ht, 3, &streamind, &old_mailbox,
&new_mailbox)==FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -1271,7 +1270,7 @@
int ind, ind_type;
pils *imap_le_struct;
- if (ARG_COUNT(ht)!=2 || zend_get_parameters(ht,2,&streamind,&folder) == FAILURE) {
+ if (ZEND_NUM_ARGS()!=2 || zend_get_parameters(ht,2,&streamind,&folder) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -1306,7 +1305,7 @@
/* set flag for normal, old mailbox list */
IMAPG(folderlist_style) = FLIST_ARRAY;
- if (ARG_COUNT(ht)!=3
+ if (ZEND_NUM_ARGS()!=3
|| zend_get_parameters(ht,3,&streamind,&ref,&pat) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -1353,7 +1352,7 @@
/* set flag for new, improved array of objects mailbox list */
IMAPG(folderlist_style) = FLIST_OBJECT;
- if (ARG_COUNT(ht)!=3
+ if (ZEND_NUM_ARGS()!=3
|| zend_get_parameters(ht,3,&streamind,&ref,&pat) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -1409,7 +1408,7 @@
STRINGLIST *cur=NIL;
IMAPLS_FETCH();
- if (ARG_COUNT(ht)!=4 || zend_get_parameters(ht,4,&streamind,&ref,&pat,&content) ==
FAILURE) {
+ if (ZEND_NUM_ARGS()!=4 || zend_get_parameters(ht,4,&streamind,&ref,&pat,&content)
== FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -1450,7 +1449,7 @@
pils *imap_le_struct;
char date[100];
- if (ARG_COUNT(ht)!=1 || zend_get_parameters(ht,1,&streamind) == FAILURE) {
+ if (ZEND_NUM_ARGS()!=1 || zend_get_parameters(ht,1,&streamind) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -1488,7 +1487,7 @@
pval *streamind, *sequence, *flags;
int ind, ind_type;
pils *imap_le_struct;
- int myargc=ARG_COUNT(ht);
+ int myargc=ZEND_NUM_ARGS();
if (myargc < 2 || myargc > 3 ||
zend_get_parameters(ht,myargc,&streamind,&sequence,&flags) == FAILURE) {
WRONG_PARAM_COUNT;
@@ -1520,7 +1519,7 @@
pval *streamind, *sequence, *flags;
int ind, ind_type;
pils *imap_le_struct;
- int myargc=ARG_COUNT(ht);
+ int myargc=ZEND_NUM_ARGS();
if (myargc < 2 || myargc > 3 ||
zend_get_parameters(ht,myargc,&streamind,&sequence,&flags) == FAILURE) {
WRONG_PARAM_COUNT;
@@ -1559,7 +1558,7 @@
ENVELOPE *en;
char fulladdress[MAILTMPLEN];
- int myargc = ARG_COUNT(ht);
+ int myargc = ZEND_NUM_ARGS();
if (myargc < 2 || myargc > 5 ||
zend_get_parameters(ht,myargc,&streamind,&msgno,&fromlength,&subjectlength,&defaulthost)==FAILURE)
{
WRONG_PARAM_COUNT;
}
@@ -1650,7 +1649,7 @@
zval **headers, **defaulthost;
ENVELOPE *en;
- int myargc = ARG_COUNT(ht);
+ int myargc = ZEND_NUM_ARGS();
if (myargc < 1 || myargc > 2 || zend_get_parameters_ex(myargc, &headers,
&defaulthost) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -1688,7 +1687,7 @@
/* set flag for normal, old mailbox list */
IMAPG(folderlist_style) = FLIST_ARRAY;
- if (ARG_COUNT(ht)!=3 || zend_get_parameters(ht,3,&streamind,&ref,&pat) == FAILURE) {
+ if (ZEND_NUM_ARGS()!=3 || zend_get_parameters(ht,3,&streamind,&ref,&pat) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -1735,7 +1734,7 @@
/* set flag for new, improved array of objects list */
IMAPG(folderlist_style) = FLIST_OBJECT;
- if (ARG_COUNT(ht)!=3 || zend_get_parameters(ht,3,&streamind,&ref,&pat) == FAILURE) {
+ if (ZEND_NUM_ARGS()!=3 || zend_get_parameters(ht,3,&streamind,&ref,&pat) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -1787,7 +1786,7 @@
int ind, ind_type;
pils *imap_le_struct;
- if (ARG_COUNT(ht)!=2 || zend_get_parameters(ht,2,&streamind,&folder) == FAILURE) {
+ if (ZEND_NUM_ARGS()!=2 || zend_get_parameters(ht,2,&streamind,&folder) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -1816,7 +1815,7 @@
pval *streamind, *folder;
int ind, ind_type;
pils *imap_le_struct;
- int myargc=ARG_COUNT(ht);
+ int myargc=ZEND_NUM_ARGS();
if (myargc !=2 || zend_get_parameters(ht,myargc,&streamind,&folder) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -1846,7 +1845,7 @@
int ind, ind_type;
pils *imap_le_struct;
BODY *body;
- int myargc=ARG_COUNT(ht);
+ int myargc=ZEND_NUM_ARGS();
if (myargc < 2 || myargc > 3 || zend_get_parameters(ht, myargc, &streamind, &msgno
,&flags) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -1890,7 +1889,7 @@
pils *imap_le_struct;
char *body;
unsigned long len;
- int myargc=ARG_COUNT(ht);
+ int myargc=ZEND_NUM_ARGS();
if (myargc < 3 || myargc >4 || zend_get_parameters(ht, myargc, &streamind, &msgno,
&sec, &flags) == FAILURE) {
WRONG_PARAM_COUNT;
@@ -1930,7 +1929,7 @@
char *decode;
unsigned long newlength;
- if (ARG_COUNT(ht) != 1 || zend_get_parameters(ht, 1, &text) == FAILURE) {
+ if (ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht, 1, &text) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -1951,7 +1950,7 @@
char *decode;
unsigned long newlength;
- if (ARG_COUNT(ht) != 1 || zend_get_parameters(ht, 1, &text) == FAILURE) {
+ if (ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht, 1, &text) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -1972,7 +1971,7 @@
char *decode;
unsigned long newlength;
- if (ARG_COUNT(ht) != 1 || zend_get_parameters(ht, 1, &text) == FAILURE) {
+ if (ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht, 1, &text) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -1993,7 +1992,7 @@
unsigned long len;
char *decode;
- if (ARG_COUNT(ht) != 1 || zend_get_parameters(ht, 1, &text) == FAILURE) {
+ if (ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht, 1, &text) == FAILURE) {
WRONG_PARAM_COUNT;
}
convert_to_string(text);
@@ -2014,7 +2013,7 @@
pils *imap_le_struct;
unsigned unreadmsg,msize;
- if (ARG_COUNT(ht) != 1 || zend_get_parameters(ht, 1, &streamind) == FAILURE) {
+ if (ZEND_NUM_ARGS() != 1 || zend_get_parameters(ht, 1, &streamind) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -2062,7 +2061,7 @@
ADDRESS *addr;
char string[MAILTMPLEN];
int argc;
- argc=ARG_COUNT(ht);
+ argc=ZEND_NUM_ARGS();
if (argc != 3 || zend_get_parameters(ht, argc, &mailbox,&host,&personal) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -2099,7 +2098,7 @@
int argc;
env=mail_newenvelope();
- argc=ARG_COUNT(ht);
+ argc=ZEND_NUM_ARGS();
if (argc != 2 || zend_get_parameters(ht, argc, &str,&defaulthost) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -2143,7 +2142,7 @@
dest.data = NULL;
dest.size = 0;
- argc = ARG_COUNT(ht);
+ argc = ZEND_NUM_ARGS();
if (argc != 1 || zend_get_parameters(ht, argc, &str) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -2188,7 +2187,7 @@
} state;
/* collect arguments */
- argc = ARG_COUNT(ht);
+ argc = ZEND_NUM_ARGS();
if (argc != 1 || zend_get_parameters(ht, argc, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -2347,7 +2346,7 @@
} state;
/* collect arguments */
- argc = ARG_COUNT(ht);
+ argc = ZEND_NUM_ARGS();
if (argc != 1 || zend_get_parameters(ht, argc, &arg) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -2486,7 +2485,7 @@
pval *flags;
int ind,ind_type;
pils *imap_le_struct;
- int myargc=ARG_COUNT(ht);
+ int myargc=ZEND_NUM_ARGS();
if (myargc < 3 || myargc > 4 || zend_get_parameters(ht, myargc,
&streamind,&sequence,&flag,&flags) ==FAILURE) {
WRONG_PARAM_COUNT;
@@ -2519,7 +2518,7 @@
pval *flags;
int ind,ind_type;
pils *imap_le_struct;
- int myargc=ARG_COUNT(ht);
+ int myargc=ZEND_NUM_ARGS();
if (myargc < 3 || myargc > 4 || zend_get_parameters(ht, myargc,
&streamind,&sequence,&flag,&flags) ==FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -2553,7 +2552,7 @@
SORTPGM *mypgm=NIL;
SEARCHPGM *spg=NIL;
pils *imap_le_struct;
- int myargc=ARG_COUNT(ht);
+ int myargc=ZEND_NUM_ARGS();
if (myargc < 3 || myargc > 4 || zend_get_parameters(ht, myargc,
&streamind,&pgm,&rev,&flags) ==FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -2595,7 +2594,7 @@
pval *streamind, *msgno, *flags;
int ind, ind_type, msgindex;
pils *imap_le_struct;
- int myargc = ARG_COUNT(ht);
+ int myargc = ZEND_NUM_ARGS();
if (myargc < 2 || myargc > 3 ||
zend_get_parameters(ht,myargc,&streamind,&msgno,&flags) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -2636,7 +2635,7 @@
int ind, ind_type;
pils *imap_le_struct;
- if (ARG_COUNT(ht) != 2 || zend_get_parameters(ht,2,&streamind,&msgno) == FAILURE) {
+ if (ZEND_NUM_ARGS() != 2 || zend_get_parameters(ht,2,&streamind,&msgno) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -2664,7 +2663,7 @@
int ind, ind_type;
pils *imap_le_struct;
- if (ARG_COUNT(ht) != 2 || zend_get_parameters(ht,2,&streamind,&msgno) == FAILURE) {
+ if (ZEND_NUM_ARGS() != 2 || zend_get_parameters(ht,2,&streamind,&msgno) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -2691,7 +2690,7 @@
pval *streamind, *mbx, *flags;
int ind, ind_type;
pils *imap_le_struct;
- int myargc=ARG_COUNT(ht);
+ int myargc=ZEND_NUM_ARGS();
IMAPLS_FETCH();
if (myargc != 3 || zend_get_parameters(ht,myargc,&streamind,&mbx,&flags) == FAILURE)
{
@@ -2756,7 +2755,7 @@
pval *parametres, *param, *dparametres, *dparam;
PARAMETER *par, *dpar;
BODY *body;
- int myargc=ARG_COUNT(ht);
+ int myargc=ZEND_NUM_ARGS();
if (myargc != 3 || zend_get_parameters(ht,myargc,&streamind,&msg,§ion) == FAILURE)
{
WRONG_PARAM_COUNT;
@@ -2972,7 +2971,7 @@
PARAMETER *param;
char tmp[8*MAILTMPLEN], *mystring=NULL, *t, *tempstring;
- int myargc = ARG_COUNT(ht);
+ int myargc = ZEND_NUM_ARGS();
if (myargc != 2 || zend_get_parameters(ht,myargc,&envelope,&body) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -3250,7 +3249,7 @@
char *to=NULL, *message=NULL, *headers=NULL, *subject=NULL, *cc=NULL, *bcc=NULL, *rpath=NULL;
int argc;
- argc = ARG_COUNT(ht);
+ argc = ZEND_NUM_ARGS();
if (argc < 3 || argc > 7 || zend_get_parameters_array(ht, argc, argv) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -3326,7 +3325,7 @@
MESSAGELIST *cur;
IMAPLS_FETCH();
- args = ARG_COUNT(ht);
+ args = ZEND_NUM_ARGS();
if (args < 2 || args > 3 || zend_get_parameters(ht, args, &streamind, &criteria,
&search_flags) == FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -3370,7 +3369,7 @@
PHP_FUNCTION(imap_alerts)
{
STRINGLIST *cur=NIL;
- int arg_count = ARG_COUNT(ht);
+ int arg_count = ZEND_NUM_ARGS();
IMAPLS_FETCH();
if (arg_count > 0) {
@@ -3398,7 +3397,7 @@
PHP_FUNCTION(imap_errors)
{
ERRORLIST *cur=NIL;
- int arg_count = ARG_COUNT(ht);
+ int arg_count = ZEND_NUM_ARGS();
IMAPLS_FETCH();
if (arg_count > 0) {
@@ -3426,7 +3425,7 @@
PHP_FUNCTION(imap_last_error)
{
ERRORLIST *cur=NIL;
- int arg_count = ARG_COUNT(ht);
+ int arg_count = ZEND_NUM_ARGS();
IMAPLS_FETCH();
if (arg_count > 0) {
@@ -3456,7 +3455,7 @@
long charset_token,encoding_token,end_token,end,offset=0,i;
unsigned long newlength;
- if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
+ if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
WRONG_PARAM_COUNT;
}