CVS update: php3/functions

From: Date: Fri, 06 Nov 1998 08:56:51 +0000
Subject: CVS update: php3/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-2241@lists.php.net to get a copy of this message
Date: Friday November 6, 1998 @ 3:56 Author: rasmus Update of /repository/php3/functions In directory asf:/u2/tmp/cvs-serv3709/functions Modified Files: imap.c Log Message: Do a couple of the IMAP functions Index: php3/functions/imap.c diff -c php3/functions/imap.c:1.43 php3/functions/imap.c:1.44 *** php3/functions/imap.c:1.43 Tue Nov 3 10:52:38 1998 --- php3/functions/imap.c Fri Nov 6 03:56:50 1998 *************** *** 31,37 **** | Rasmus Lerdorf <rasmus@lerdorf.on.ca> | +----------------------------------------------------------------------+ */ ! /* $Id: imap.c,v 1.43 1998/11/03 15:52:38 rasmus Exp $ */ #define IMAP41 --- 31,37 ---- | Rasmus Lerdorf <rasmus@lerdorf.on.ca> | +----------------------------------------------------------------------+ */ ! /* $Id: imap.c,v 1.44 1998/11/06 08:56:50 rasmus Exp $ */ #define IMAP41 *************** *** 406,411 **** --- 406,413 ---- return SUCCESS; } + /* {{{ proto int imap_open(string mailbox, string user, string password [, int options]) + Open an IMAP stream to a mailbox */ void php3_imap_open(INTERNAL_FUNCTION_PARAMETERS) { pval *mailbox; *************** *** 453,461 **** RETURN_LONG(ind); } return; ! } ! void php3_imap_reopen(INTERNAL_FUNCTION_PARAMETERS) { pval *streamind; --- 455,464 ---- RETURN_LONG(ind); } return; ! } /* }}} */ + /* {{{ proto int imap_reopen(int stream_id, string mailbox [, int options]) + Reopen IMAP stream to new mailbox */ void php3_imap_reopen(INTERNAL_FUNCTION_PARAMETERS) { pval *streamind; *************** *** 496,503 **** RETURN_FALSE; } RETURN_TRUE; ! } void php3_imap_append(INTERNAL_FUNCTION_PARAMETERS) { pval *streamind,*folder, *message,*flags; --- 499,508 ---- RETURN_FALSE; } RETURN_TRUE; ! } /* }}} */ + /* {{{ proto int imap_append(int stream_id, string folder, string message [, string flags]) + Append a string message to a specified mailbox */ void php3_imap_append(INTERNAL_FUNCTION_PARAMETERS) { pval *streamind,*folder, *message,*flags; *************** *** 531,538 **** { RETURN_FALSE; } ! } void php3_imap_num_msg(INTERNAL_FUNCTION_PARAMETERS) { pval *streamind; --- 536,545 ---- { RETURN_FALSE; } ! } /* }}} */ + /* {{{ proto imap_num_msg(int stream_id) + Gives the number of messages in the current mailbox */ void php3_imap_num_msg(INTERNAL_FUNCTION_PARAMETERS) { pval *streamind; *************** *** 555,562 **** } RETURN_LONG(imap_le_struct->imap_stream->nmsgs); ! } void php3_imap_ping(INTERNAL_FUNCTION_PARAMETERS) { pval *streamind; --- 562,571 ---- } RETURN_LONG(imap_le_struct->imap_stream->nmsgs); ! } /* }}} */ + /* {{{ proto int imap_ping(int stream_id) + Check if the IMAP stream is still active */ void php3_imap_ping(INTERNAL_FUNCTION_PARAMETERS) { pval *streamind; *************** *** 576,582 **** RETURN_FALSE; } RETURN_LONG( mail_ping( imap_le_struct->imap_stream ) ); ! } void php3_imap_num_recent(INTERNAL_FUNCTION_PARAMETERS) --- 585,591 ---- RETURN_FALSE; } RETURN_LONG( mail_ping( imap_le_struct->imap_stream ) ); ! } /* }}} */ void php3_imap_num_recent(INTERNAL_FUNCTION_PARAMETERS) *************** *** 1675,1680 **** --- 1684,1691 ---- RETVAL_STRINGL( body ,len,1); } + /* {{{ proto string imap_base64(string text) + Decode BASE64 encoded text */ void php3_imap_base64(INTERNAL_FUNCTION_PARAMETERS) { pval *text; *************** *** 1689,1695 **** decode = (char *) rfc822_base64((unsigned char *) text->value.str.val, text->value.str.len,&newlength); RETVAL_STRINGL(decode,newlength,1); ! } void php3_imap_qprint(INTERNAL_FUNCTION_PARAMETERS) { --- 1700,1706 ---- decode = (char *) rfc822_base64((unsigned char *) text->value.str.val, text->value.str.len,&newlength); RETVAL_STRINGL(decode,newlength,1); ! } /* }}} */ void php3_imap_qprint(INTERNAL_FUNCTION_PARAMETERS) { *************** *** 1707,1712 **** --- 1718,1725 ---- RETVAL_STRINGL(decode,newlength,1); } + /* {{{ proto string imap_8bit(string text) + Convert an 8bit string to a quoted-printable string */ void php3_imap_8bit(INTERNAL_FUNCTION_PARAMETERS) { pval *text; *************** *** 1721,1728 **** decode = (char *) rfc822_8bit((unsigned char *) text->value.str.val, text->value.str.len,&newlength); RETVAL_STRINGL(decode,newlength,1); ! } void php3_imap_binary(INTERNAL_FUNCTION_PARAMETERS) { pval *text; --- 1734,1743 ---- decode = (char *) rfc822_8bit((unsigned char *) text->value.str.val, text->value.str.len,&newlength); RETVAL_STRINGL(decode,newlength,1); ! } /* }}} */ + /* {{{ proto string imap_binary(string text) + Convert an 8bit string to a base64 string */ void php3_imap_binary(INTERNAL_FUNCTION_PARAMETERS) { pval *text; *************** *** 1731,1739 **** WRONG_PARAM_COUNT; } convert_to_string(text); ! RETVAL_STRINGL(rfc822_binary(text->value.str.val,text->value.str.len,&len),len,1); ! ! } void php3_imap_mailboxmsginfo(INTERNAL_FUNCTION_PARAMETERS) --- 1746,1753 ---- WRONG_PARAM_COUNT; } convert_to_string(text); ! RETVAL_STRINGL(rfc822_binary(text->value.str.val,text->value.str.len,&len),len,1); ! } /* }}} */ void php3_imap_mailboxmsginfo(INTERNAL_FUNCTION_PARAMETERS) -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#2241) next »