MFH: arginfo, protos, vim folding

This commit is contained in:
Hannes Magnusson 2006-06-11 01:42:17 +00:00
parent 50de3fd1ce
commit 3104233019
10 changed files with 813 additions and 123 deletions

View File

@ -33,17 +33,87 @@
ZEND_DECLARE_MODULE_GLOBALS(bcmath);
/* {{{ arginfo */
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_bcadd, 0, 0, 2)
ZEND_ARG_INFO(0, left_operand)
ZEND_ARG_INFO(0, right_operand)
ZEND_ARG_INFO(0, scale)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_bcsub, 0, 0, 2)
ZEND_ARG_INFO(0, left_operand)
ZEND_ARG_INFO(0, right_operand)
ZEND_ARG_INFO(0, scale)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_bcmul, 0, 0, 2)
ZEND_ARG_INFO(0, left_operand)
ZEND_ARG_INFO(0, right_operand)
ZEND_ARG_INFO(0, scale)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_bcdiv, 0, 0, 2)
ZEND_ARG_INFO(0, left_operand)
ZEND_ARG_INFO(0, right_operand)
ZEND_ARG_INFO(0, scale)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_bcmod, 0)
ZEND_ARG_INFO(0, left_operand)
ZEND_ARG_INFO(0, right_operand)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_bcpowmod, 0, 0, 3)
ZEND_ARG_INFO(0, x)
ZEND_ARG_INFO(0, y)
ZEND_ARG_INFO(0, mod)
ZEND_ARG_INFO(0, scale)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_bcpow, 0, 0, 2)
ZEND_ARG_INFO(0, x)
ZEND_ARG_INFO(0, y)
ZEND_ARG_INFO(0, scale)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_bcsqrt, 0, 0, 1)
ZEND_ARG_INFO(0, operand)
ZEND_ARG_INFO(0, scale)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_bccomp, 0, 0, 2)
ZEND_ARG_INFO(0, left_operand)
ZEND_ARG_INFO(0, right_operand)
ZEND_ARG_INFO(0, scale)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_bcscale, 0)
ZEND_ARG_INFO(0, scale)
ZEND_END_ARG_INFO()
/* }}} */
zend_function_entry bcmath_functions[] = {
PHP_FE(bcadd, NULL)
PHP_FE(bcsub, NULL)
PHP_FE(bcmul, NULL)
PHP_FE(bcdiv, NULL)
PHP_FE(bcmod, NULL)
PHP_FE(bcpow, NULL)
PHP_FE(bcsqrt, NULL)
PHP_FE(bcscale, NULL)
PHP_FE(bccomp, NULL)
PHP_FE(bcpowmod, NULL)
PHP_FE(bcadd, arginfo_bcadd)
PHP_FE(bcsub, arginfo_bcsub)
PHP_FE(bcmul, arginfo_bcmul)
PHP_FE(bcdiv, arginfo_bcdiv)
PHP_FE(bcmod, arginfo_bcmod)
PHP_FE(bcpow, arginfo_bcpow)
PHP_FE(bcsqrt, arginfo_bcsqrt)
PHP_FE(bcscale, arginfo_bcscale)
PHP_FE(bccomp, arginfo_bccomp)
PHP_FE(bcpowmod, arginfo_bcpowmod)
{NULL, NULL, NULL}
};

View File

@ -40,17 +40,60 @@
#define PHP_BZ_ERRSTR 1
#define PHP_BZ_ERRBOTH 2
/* {{{ arginfo */
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_bzread, 0, 0, 1)
ZEND_ARG_INFO(0, bz)
ZEND_ARG_INFO(0, length)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_bzopen, 0)
ZEND_ARG_INFO(0, file)
ZEND_ARG_INFO(0, mode)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_bzerrno, 0)
ZEND_ARG_INFO(0, bz)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_bzerrstr, 0)
ZEND_ARG_INFO(0, bz)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_bzerror, 0)
ZEND_ARG_INFO(0, bz)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_bzcompress, 0, 0, 2)
ZEND_ARG_INFO(0, source)
ZEND_ARG_INFO(0, blocksize)
ZEND_ARG_INFO(0, workfactor)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_bzdecompress, 0, 0, 1)
ZEND_ARG_INFO(0, source)
ZEND_ARG_INFO(0, small)
ZEND_END_ARG_INFO()
/* }}} */
zend_function_entry bz2_functions[] = {
PHP_FE(bzopen, NULL)
PHP_FE(bzread, NULL)
PHP_FE(bzopen, arginfo_bzopen)
PHP_FE(bzread, arginfo_bzread)
PHP_FALIAS(bzwrite, fwrite, NULL)
PHP_FALIAS(bzflush, fflush, NULL)
PHP_FALIAS(bzclose, fclose, NULL)
PHP_FE(bzerrno, NULL)
PHP_FE(bzerrstr, NULL)
PHP_FE(bzerror, NULL)
PHP_FE(bzcompress, NULL)
PHP_FE(bzdecompress, NULL)
PHP_FE(bzerrno, arginfo_bzerrno)
PHP_FE(bzerrstr, arginfo_bzerrstr)
PHP_FE(bzerror, arginfo_bzerror)
PHP_FE(bzcompress, arginfo_bzcompress)
PHP_FE(bzdecompress, arginfo_bzdecompress)
{NULL, NULL, NULL}
};
@ -262,7 +305,7 @@ PHP_MINFO_FUNCTION(bz2)
php_info_print_table_end();
}
/* {{{ proto string bzread(int bz[, int length])
/* {{{ proto string bzread(resource bz[, int length])
Reads up to length bytes from a BZip2 stream, or 1024 bytes if length is not specified */
PHP_FUNCTION(bzread)
{

View File

@ -35,25 +35,137 @@
#include <stdio.h>
/* {{{ arginfo */
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_unixtojd, 0, 0, 0)
ZEND_ARG_INFO(0, timestamp)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_jdtounix, 0)
ZEND_ARG_INFO(0, jday)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_cal_info, 0, 0, 0)
ZEND_ARG_INFO(0, calendar)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_cal_days_in_month, 0)
ZEND_ARG_INFO(0, calendar)
ZEND_ARG_INFO(0, month)
ZEND_ARG_INFO(0, year)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_cal_to_jd, 0)
ZEND_ARG_INFO(0, calendar)
ZEND_ARG_INFO(0, month)
ZEND_ARG_INFO(0, day)
ZEND_ARG_INFO(0, year)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_cal_from_jd, 0)
ZEND_ARG_INFO(0, jd)
ZEND_ARG_INFO(0, calendar)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_jdtogregorian, 0)
ZEND_ARG_INFO(0, juliandaycount)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_gregoriantojd, 0)
ZEND_ARG_INFO(0, month)
ZEND_ARG_INFO(0, day)
ZEND_ARG_INFO(0, year)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_jdtojulian, 0)
ZEND_ARG_INFO(0, juliandaycount)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_juliantojd, 0)
ZEND_ARG_INFO(0, month)
ZEND_ARG_INFO(0, day)
ZEND_ARG_INFO(0, year)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_jdtojewish, 0, 0, 1)
ZEND_ARG_INFO(0, juliandaycount)
ZEND_ARG_INFO(0, hebrew)
ZEND_ARG_INFO(0, fl)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_jewishtojd, 0)
ZEND_ARG_INFO(0, month)
ZEND_ARG_INFO(0, day)
ZEND_ARG_INFO(0, year)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_jdtofrench, 0)
ZEND_ARG_INFO(0, juliandaycount)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_frenchtojd, 0)
ZEND_ARG_INFO(0, month)
ZEND_ARG_INFO(0, day)
ZEND_ARG_INFO(0, year)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_jddayofweek, 0, 0, 1)
ZEND_ARG_INFO(0, juliandaycount)
ZEND_ARG_INFO(0, mode)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_jdmonthname, 0)
ZEND_ARG_INFO(0, juliandaycount)
ZEND_ARG_INFO(0, mode)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_easter_date, 0, 0, 0)
ZEND_ARG_INFO(0, year)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_easter_days, 0, 0, 0)
ZEND_ARG_INFO(0, year)
ZEND_ARG_INFO(0, method)
ZEND_END_ARG_INFO()
/* }}} */
zend_function_entry calendar_functions[] = {
PHP_FE(jdtogregorian, NULL)
PHP_FE(gregoriantojd, NULL)
PHP_FE(jdtojulian, NULL)
PHP_FE(juliantojd, NULL)
PHP_FE(jdtojewish, NULL)
PHP_FE(jewishtojd, NULL)
PHP_FE(jdtofrench, NULL)
PHP_FE(frenchtojd, NULL)
PHP_FE(jddayofweek, NULL)
PHP_FE(jdmonthname, NULL)
PHP_FE(easter_date, NULL)
PHP_FE(easter_days, NULL)
PHP_FE(unixtojd, NULL)
PHP_FE(jdtounix, NULL)
PHP_FE(cal_to_jd, NULL)
PHP_FE(cal_from_jd, NULL)
PHP_FE(cal_days_in_month, NULL)
PHP_FE(cal_info, NULL)
PHP_FE(jdtogregorian, arginfo_jdtogregorian)
PHP_FE(gregoriantojd, arginfo_gregoriantojd)
PHP_FE(jdtojulian, arginfo_jdtojulian)
PHP_FE(juliantojd, arginfo_juliantojd)
PHP_FE(jdtojewish, arginfo_jdtojewish)
PHP_FE(jewishtojd, arginfo_jewishtojd)
PHP_FE(jdtofrench, arginfo_jdtofrench)
PHP_FE(frenchtojd, arginfo_frenchtojd)
PHP_FE(jddayofweek, arginfo_jddayofweek)
PHP_FE(jdmonthname, arginfo_jdmonthname)
PHP_FE(easter_date, arginfo_easter_date)
PHP_FE(easter_days, arginfo_easter_days)
PHP_FE(unixtojd, arginfo_unixtojd)
PHP_FE(jdtounix, arginfo_jdtounix)
PHP_FE(cal_to_jd, arginfo_cal_to_jd)
PHP_FE(cal_from_jd, arginfo_cal_from_jd)
PHP_FE(cal_days_in_month, arginfo_cal_days_in_month)
PHP_FE(cal_info, arginfo_cal_info)
{NULL, NULL, NULL}
};
@ -189,7 +301,7 @@ static void _php_cal_info(int cal, zval **ret)
}
/* {{{ proto array cal_info(int calendar)
/* {{{ proto array cal_info([int calendar])
Returns information about a particular calendar */
PHP_FUNCTION(cal_info)
{

View File

@ -40,21 +40,79 @@ ZEND_DECLARE_MODULE_GLOBALS(ctype)
/* True global resources - no need for thread safety here */
/* static int le_ctype; */
/* {{{ arginfo */
static
ZEND_BEGIN_ARG_INFO(arginfo_ctype_alnum, 0)
ZEND_ARG_INFO(0, text)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_ctype_alpha, 0)
ZEND_ARG_INFO(0, text)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_ctype_cntrl, 0)
ZEND_ARG_INFO(0, text)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_ctype_digit, 0)
ZEND_ARG_INFO(0, text)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_ctype_lower, 0)
ZEND_ARG_INFO(0, text)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_ctype_graph, 0)
ZEND_ARG_INFO(0, text)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_ctype_print, 0)
ZEND_ARG_INFO(0, text)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_ctype_punct, 0)
ZEND_ARG_INFO(0, text)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_ctype_space, 0)
ZEND_ARG_INFO(0, text)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_ctype_upper, 0)
ZEND_ARG_INFO(0, text)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_ctype_xdigit, 0)
ZEND_ARG_INFO(0, text)
ZEND_END_ARG_INFO()
/* }}} */
/* {{{ ctype_functions[]
* Every user visible function must have an entry in ctype_functions[].
*/
zend_function_entry ctype_functions[] = {
PHP_FE(ctype_alnum, NULL)
PHP_FE(ctype_alpha, NULL)
PHP_FE(ctype_cntrl, NULL)
PHP_FE(ctype_digit, NULL)
PHP_FE(ctype_lower, NULL)
PHP_FE(ctype_graph, NULL)
PHP_FE(ctype_print, NULL)
PHP_FE(ctype_punct, NULL)
PHP_FE(ctype_space, NULL)
PHP_FE(ctype_upper, NULL)
PHP_FE(ctype_xdigit, NULL)
PHP_FE(ctype_alnum, arginfo_ctype_alnum)
PHP_FE(ctype_alpha, arginfo_ctype_alpha)
PHP_FE(ctype_cntrl, arginfo_ctype_cntrl)
PHP_FE(ctype_digit, arginfo_ctype_digit)
PHP_FE(ctype_lower, arginfo_ctype_lower)
PHP_FE(ctype_graph, arginfo_ctype_graph)
PHP_FE(ctype_print, arginfo_ctype_print)
PHP_FE(ctype_punct, arginfo_ctype_punct)
PHP_FE(ctype_space, arginfo_ctype_space)
PHP_FE(ctype_upper, arginfo_ctype_upper)
PHP_FE(ctype_xdigit, arginfo_ctype_xdigit)
{NULL, NULL, NULL} /* Must be the last line in ctype_functions[] */
};
/* }}} */

View File

@ -181,27 +181,128 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC);
php_url_free(tmp_url); \
}
/* {{{ arginfo */
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_version, 0, 0, 0)
ZEND_ARG_INFO(0, version)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_init, 0, 0, 0)
ZEND_ARG_INFO(0, url)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_curl_copy_handle, 0)
ZEND_ARG_INFO(0, ch)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_curl_setopt, 0)
ZEND_ARG_INFO(0, ch)
ZEND_ARG_INFO(0, option)
ZEND_ARG_INFO(0, value)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_curl_setopt_array, 0)
ZEND_ARG_INFO(0, ch)
ZEND_ARG_ARRAY_INFO(0, options, 0)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_curl_exec, 0)
ZEND_ARG_INFO(0, ch)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_getinfo, 0, 0, 1)
ZEND_ARG_INFO(0, ch)
ZEND_ARG_INFO(0, option)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_curl_error, 0)
ZEND_ARG_INFO(0, ch)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_curl_errno, 0)
ZEND_ARG_INFO(0, ch)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_curl_close, 0)
ZEND_ARG_INFO(0, ch)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_curl_multi_init, 0)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_curl_multi_add_handle, 0)
ZEND_ARG_INFO(0, mh)
ZEND_ARG_INFO(0, ch)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_curl_multi_remove_handle, 0)
ZEND_ARG_INFO(0, mh)
ZEND_ARG_INFO(0, ch)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_multi_select, 0, 0, 1)
ZEND_ARG_INFO(0, mh)
ZEND_ARG_INFO(0, timeout)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_multi_exec, 0, 0, 1)
ZEND_ARG_INFO(0, mh)
ZEND_ARG_INFO(1, still_running)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_curl_multi_getcontent, 0)
ZEND_ARG_INFO(0, ch)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_multi_info_read, 0, 0, 1)
ZEND_ARG_INFO(0, mh)
ZEND_ARG_INFO(0, msgs_in_queue)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_curl_multi_close, 0)
ZEND_ARG_INFO(0, mh)
ZEND_END_ARG_INFO()
/* }}} */
/* {{{ curl_functions[]
*/
zend_function_entry curl_functions[] = {
PHP_FE(curl_init, NULL)
PHP_FE(curl_copy_handle, NULL)
PHP_FE(curl_version, NULL)
PHP_FE(curl_setopt, NULL)
PHP_FE(curl_setopt_array, NULL)
PHP_FE(curl_exec, NULL)
PHP_FE(curl_getinfo, NULL)
PHP_FE(curl_error, NULL)
PHP_FE(curl_errno, NULL)
PHP_FE(curl_close, NULL)
PHP_FE(curl_multi_init, NULL)
PHP_FE(curl_multi_add_handle, NULL)
PHP_FE(curl_multi_remove_handle, NULL)
PHP_FE(curl_multi_select, NULL)
PHP_FE(curl_multi_exec, second_arg_force_ref)
PHP_FE(curl_multi_getcontent, NULL)
PHP_FE(curl_multi_info_read, NULL)
PHP_FE(curl_multi_close, NULL)
PHP_FE(curl_init, arginfo_curl_init)
PHP_FE(curl_copy_handle, arginfo_curl_copy_handle)
PHP_FE(curl_version, arginfo_curl_version)
PHP_FE(curl_setopt, arginfo_curl_setopt)
PHP_FE(curl_setopt_array, arginfo_curl_setopt_array)
PHP_FE(curl_exec, arginfo_curl_exec)
PHP_FE(curl_getinfo, arginfo_curl_getinfo)
PHP_FE(curl_error, arginfo_curl_error)
PHP_FE(curl_errno, arginfo_curl_errno)
PHP_FE(curl_close, arginfo_curl_close)
PHP_FE(curl_multi_init, arginfo_curl_multi_init)
PHP_FE(curl_multi_add_handle, arginfo_curl_multi_add_handle)
PHP_FE(curl_multi_remove_handle, arginfo_curl_multi_remove_handle)
PHP_FE(curl_multi_select, arginfo_curl_multi_select)
PHP_FE(curl_multi_exec, arginfo_curl_multi_exec)
PHP_FE(curl_multi_getcontent, arginfo_curl_multi_getcontent)
PHP_FE(curl_multi_info_read, arginfo_curl_multi_info_read)
PHP_FE(curl_multi_close, arginfo_curl_multi_close)
{NULL, NULL, NULL}
};
/* }}} */
@ -1519,7 +1620,7 @@ PHP_FUNCTION(curl_exec)
}
/* }}} */
/* {{{ proto mixed curl_getinfo(resource ch, int opt)
/* {{{ proto mixed curl_getinfo(resource ch [, int option])
Get information regarding a specific transfer */
PHP_FUNCTION(curl_getinfo)
{

View File

@ -68,7 +68,7 @@ PHP_FUNCTION(curl_multi_init)
}
/* }}} */
/* {{{ proto int curl_multi_add_handle(resource multi, resource ch)
/* {{{ proto int curl_multi_add_handle(resource mh, resource ch)
Add a normal cURL handle to a cURL multi handle */
PHP_FUNCTION(curl_multi_add_handle)
{
@ -214,8 +214,9 @@ PHP_FUNCTION(curl_multi_getcontent)
RETURN_STRINGL(ch->handlers->write->buf.c, ch->handlers->write->buf.len, 1);
}
}
/* }}} */
/* {{{ proto array curl_multi_info_read(resource mh)
/* {{{ proto array curl_multi_info_read(resource mh [, long msgs_in_queue])
Get information about the current transfers */
PHP_FUNCTION(curl_multi_info_read)
{

View File

@ -29,24 +29,141 @@
#include "lib/timelib.h"
#include <time.h>
/* {{{ arginfo */
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_date, 0, 0, 1)
ZEND_ARG_INFO(0, format)
ZEND_ARG_INFO(0, timestamp)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_gmdate, 0, 0, 1)
ZEND_ARG_INFO(0, format)
ZEND_ARG_INFO(0, timestamp)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_idate, 0, 0, 1)
ZEND_ARG_INFO(0, format)
ZEND_ARG_INFO(0, timestamp)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_strtotime, 0, 0, 1)
ZEND_ARG_INFO(0, time)
ZEND_ARG_INFO(0, now)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_mktime, 0, 0, 0)
ZEND_ARG_INFO(0, hour)
ZEND_ARG_INFO(0, min)
ZEND_ARG_INFO(0, sec)
ZEND_ARG_INFO(0, mon)
ZEND_ARG_INFO(0, day)
ZEND_ARG_INFO(0, year)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_gmmktime, 0, 0, 0)
ZEND_ARG_INFO(0, hour)
ZEND_ARG_INFO(0, min)
ZEND_ARG_INFO(0, sec)
ZEND_ARG_INFO(0, mon)
ZEND_ARG_INFO(0, day)
ZEND_ARG_INFO(0, year)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_checkdate, 0)
ZEND_ARG_INFO(0, month)
ZEND_ARG_INFO(0, day)
ZEND_ARG_INFO(0, year)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_strftime, 0, 0, 1)
ZEND_ARG_INFO(0, format)
ZEND_ARG_INFO(0, timestamp)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_gmstrftime, 0, 0, 1)
ZEND_ARG_INFO(0, format)
ZEND_ARG_INFO(0, timestamp)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_time, 0)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_localtime, 0, 0, 0)
ZEND_ARG_INFO(0, timestamp)
ZEND_ARG_INFO(0, associative_array)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_getdate, 0, 0, 0)
ZEND_ARG_INFO(0, timestamp)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_date_default_timezone_set, 0)
ZEND_ARG_INFO(0, timezone_identifier)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_date_default_timezone_get, 0)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_date_sunrise, 0, 0, 1)
ZEND_ARG_INFO(0, mixed time)
ZEND_ARG_INFO(0, format)
ZEND_ARG_INFO(0, latitude)
ZEND_ARG_INFO(0, longitude)
ZEND_ARG_INFO(0, zenith)
ZEND_ARG_INFO(0, gmt_offset)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_date_sunset, 0, 0, 1)
ZEND_ARG_INFO(0, mixed time)
ZEND_ARG_INFO(0, format)
ZEND_ARG_INFO(0, latitude)
ZEND_ARG_INFO(0, longitude)
ZEND_ARG_INFO(0, zenith)
ZEND_ARG_INFO(0, gmt_offset)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_date_sun_info, 0)
ZEND_ARG_INFO(0, time)
ZEND_ARG_INFO(0, latitude)
ZEND_ARG_INFO(0, longitude)
ZEND_END_ARG_INFO()
/* }}} */
/* {{{ Function table */
zend_function_entry date_functions[] = {
PHP_FE(strtotime, NULL)
PHP_FE(date, NULL)
PHP_FE(idate, NULL)
PHP_FE(gmdate, NULL)
PHP_FE(mktime, NULL)
PHP_FE(gmmktime, NULL)
PHP_FE(checkdate, NULL)
PHP_FE(strtotime, arginfo_strtotime)
PHP_FE(date, arginfo_date)
PHP_FE(idate, arginfo_idate)
PHP_FE(gmdate, arginfo_gmdate)
PHP_FE(mktime, arginfo_mktime)
PHP_FE(gmmktime, arginfo_gmmktime)
PHP_FE(checkdate, arginfo_checkdate)
#ifdef HAVE_STRFTIME
PHP_FE(strftime, NULL)
PHP_FE(gmstrftime, NULL)
PHP_FE(strftime, arginfo_strtotime)
PHP_FE(gmstrftime, arginfo_gmstrftime)
#endif
PHP_FE(time, NULL)
PHP_FE(localtime, NULL)
PHP_FE(getdate, NULL)
PHP_FE(time, arginfo_time)
PHP_FE(localtime, arginfo_localtime)
PHP_FE(getdate, arginfo_getdate)
#ifdef EXPERIMENTAL_DATE_SUPPORT
/* Advanced Interface */
@ -72,13 +189,13 @@ zend_function_entry date_functions[] = {
#endif
/* Options and Configuration */
PHP_FE(date_default_timezone_set, NULL)
PHP_FE(date_default_timezone_get, NULL)
PHP_FE(date_default_timezone_set, arginfo_date_default_timezone_set)
PHP_FE(date_default_timezone_get, arginfo_date_default_timezone_get)
/* Astronomical functions */
PHP_FE(date_sunrise, NULL)
PHP_FE(date_sunset, NULL)
PHP_FE(date_sun_info, NULL)
PHP_FE(date_sunrise, arginfo_date_sunrise)
PHP_FE(date_sunset, arginfo_date_sunset)
PHP_FE(date_sun_info, arginfo_date_sun_info)
{NULL, NULL, NULL}
};
@ -1061,7 +1178,7 @@ PHPAPI void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gmt)
}
/* }}} */
/* {{{ proto int mktime(int hour, int min, int sec, int mon, int day, int year)
/* {{{ proto int mktime([int hour [, int min [, int sec [, int mon [, int day [, int year]]]]]])
Get UNIX timestamp for a date */
PHP_FUNCTION(mktime)
{
@ -1069,7 +1186,7 @@ PHP_FUNCTION(mktime)
}
/* }}} */
/* {{{ proto int gmmktime(int hour, int min, int sec, int mon, int day, int year)
/* {{{ proto int gmmktime([int hour [, int min [, int sec [, int mon [, int day [, int year]]]]]])
Get UNIX timestamp for a GMT date */
PHP_FUNCTION(gmmktime)
{
@ -1536,6 +1653,7 @@ PHP_FUNCTION(date_parse)
}
timelib_time_dtor(parsed_time);
}
/* }}} */
PHP_FUNCTION(date_format)
{

View File

@ -51,24 +51,115 @@
#include "php_inifile.h"
#include "php_qdbm.h"
/* {{{ arginfo */
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_dba_popen, 0, 0, 2)
ZEND_ARG_INFO(0, path)
ZEND_ARG_INFO(0, mode)
ZEND_ARG_INFO(0, handlername)
ZEND_ARG_INFO(0, ...)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_dba_open, 0, 0, 2)
ZEND_ARG_INFO(0, path)
ZEND_ARG_INFO(0, mode)
ZEND_ARG_INFO(0, handlername)
ZEND_ARG_INFO(0, ...)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_dba_close, 0)
ZEND_ARG_INFO(0, handle)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_dba_exists, 0)
ZEND_ARG_INFO(0, key)
ZEND_ARG_INFO(0, handle)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_dba_fetch, 0, 0, 2)
ZEND_ARG_INFO(0, key)
ZEND_ARG_INFO(0, skip)
ZEND_ARG_INFO(0, handle)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_dba_key_split, 0)
ZEND_ARG_INFO(0, key)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_dba_firstkey, 0)
ZEND_ARG_INFO(0, handle)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_dba_nextkey, 0)
ZEND_ARG_INFO(0, handle)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_dba_delete, 0)
ZEND_ARG_INFO(0, key)
ZEND_ARG_INFO(0, handle)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_dba_insert, 0)
ZEND_ARG_INFO(0, key)
ZEND_ARG_INFO(0, value)
ZEND_ARG_INFO(0, handle)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_dba_replace, 0)
ZEND_ARG_INFO(0, key)
ZEND_ARG_INFO(0, value)
ZEND_ARG_INFO(0, handle)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_dba_optimize, 0)
ZEND_ARG_INFO(0, handle)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_dba_sync, 0)
ZEND_ARG_INFO(0, handle)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_dba_handlers, 0, 0, 0)
ZEND_ARG_INFO(0, full_info)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_dba_list, 0)
ZEND_END_ARG_INFO()
/* }}} */
/* {{{ dba_functions[]
*/
zend_function_entry dba_functions[] = {
PHP_FE(dba_open, NULL)
PHP_FE(dba_popen, NULL)
PHP_FE(dba_close, NULL)
PHP_FE(dba_delete, NULL)
PHP_FE(dba_exists, NULL)
PHP_FE(dba_fetch, NULL)
PHP_FE(dba_insert, NULL)
PHP_FE(dba_replace, NULL)
PHP_FE(dba_firstkey, NULL)
PHP_FE(dba_nextkey, NULL)
PHP_FE(dba_optimize, NULL)
PHP_FE(dba_sync, NULL)
PHP_FE(dba_handlers, NULL)
PHP_FE(dba_list, NULL)
PHP_FE(dba_key_split, NULL)
PHP_FE(dba_open, arginfo_dba_open)
PHP_FE(dba_popen, arginfo_dba_popen)
PHP_FE(dba_close, arginfo_dba_close)
PHP_FE(dba_delete, arginfo_dba_delete)
PHP_FE(dba_exists, arginfo_dba_exists)
PHP_FE(dba_fetch, arginfo_dba_fetch)
PHP_FE(dba_insert, arginfo_dba_insert)
PHP_FE(dba_replace, arginfo_dba_replace)
PHP_FE(dba_firstkey, arginfo_dba_firstkey)
PHP_FE(dba_nextkey, arginfo_dba_nextkey)
PHP_FE(dba_optimize, arginfo_dba_optimize)
PHP_FE(dba_sync, arginfo_dba_sync)
PHP_FE(dba_handlers, arginfo_dba_handlers)
PHP_FE(dba_list, arginfo_dba_list)
PHP_FE(dba_key_split, arginfo_dba_key_split)
{NULL, NULL, NULL}
};
/* }}} */
@ -302,6 +393,7 @@ ZEND_DECLARE_MODULE_GLOBALS(dba)
static int le_db;
static int le_pdb;
/* }}} */
/* {{{ dba_fetch_resource
PHPAPI void dba_fetch_resource(dba_info **pinfo, zval **id TSRMLS_DC)

View File

@ -728,21 +728,92 @@ PHP_FUNCTION(dbase_create)
}
/* }}} */
/* {{{ arginfo */
static
ZEND_BEGIN_ARG_INFO(arginfo_dbase_open, 0)
ZEND_ARG_INFO(0, name)
ZEND_ARG_INFO(0, mode)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_dbase_close, 0)
ZEND_ARG_INFO(0, identifier)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_dbase_numrecords, 0)
ZEND_ARG_INFO(0, identifier)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_dbase_numfields, 0)
ZEND_ARG_INFO(0, identifier)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_dbase_pack, 0)
ZEND_ARG_INFO(0, identifier)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_dbase_add_record, 0)
ZEND_ARG_INFO(0, identifier)
ZEND_ARG_ARRAY_INFO(0, data, 0)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_dbase_replace_record, 0)
ZEND_ARG_INFO(0, identifier)
ZEND_ARG_ARRAY_INFO(0, data, 0)
ZEND_ARG_INFO(0, recnum)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_dbase_delete_record, 0)
ZEND_ARG_INFO(0, identifier)
ZEND_ARG_INFO(0, record)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_dbase_get_record, 0)
ZEND_ARG_INFO(0, identifier)
ZEND_ARG_INFO(0, record)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_dbase_get_record_with_names, 0)
ZEND_ARG_INFO(0, identifier)
ZEND_ARG_INFO(0, record)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_dbase_create, 0)
ZEND_ARG_INFO(0, filename)
ZEND_ARG_ARRAY_INFO(0, fields, 0)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_dbase_get_header_info, 0)
ZEND_ARG_INFO(0, database_handle)
ZEND_END_ARG_INFO()
/* }}} */
/* {{{ dbase_functions[]
*/
zend_function_entry dbase_functions[] = {
PHP_FE(dbase_open, NULL)
PHP_FE(dbase_create, NULL)
PHP_FE(dbase_close, NULL)
PHP_FE(dbase_numrecords, NULL)
PHP_FE(dbase_numfields, NULL)
PHP_FE(dbase_add_record, NULL)
PHP_FE(dbase_replace_record, NULL)
PHP_FE(dbase_get_record, NULL)
PHP_FE(dbase_get_record_with_names, NULL)
PHP_FE(dbase_delete_record, NULL)
PHP_FE(dbase_pack, NULL)
PHP_FE(dbase_get_header_info, NULL)
PHP_FE(dbase_open, arginfo_dbase_open)
PHP_FE(dbase_create, arginfo_dbase_create)
PHP_FE(dbase_close, arginfo_dbase_close)
PHP_FE(dbase_numrecords, arginfo_dbase_numrecords)
PHP_FE(dbase_numfields, arginfo_dbase_numfields)
PHP_FE(dbase_add_record, arginfo_dbase_add_record)
PHP_FE(dbase_replace_record, arginfo_dbase_replace_record)
PHP_FE(dbase_get_record, arginfo_dbase_get_record)
PHP_FE(dbase_get_record_with_names, arginfo_dbase_get_record_with_names)
PHP_FE(dbase_delete_record, arginfo_dbase_delete_record)
PHP_FE(dbase_pack, arginfo_dbase_pack)
PHP_FE(dbase_get_header_info, arginfo_dbase_get_header_info)
{NULL, NULL, NULL}
};
/* }}} */

View File

@ -98,19 +98,43 @@ typedef unsigned char uchar;
#define MAX_IFD_NESTING_LEVEL 100
/* {{{ arginfo */
static
ZEND_BEGIN_ARG_INFO(exif_thumbnail_force_ref, 1)
ZEND_ARG_PASS_INFO(0)
ZEND_END_ARG_INFO();
ZEND_BEGIN_ARG_INFO(arginfo_exif_tagname, 0)
ZEND_ARG_INFO(0, index)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_exif_read_data, 0, 0, 1)
ZEND_ARG_INFO(0, filename)
ZEND_ARG_INFO(0, sections_needed)
ZEND_ARG_INFO(0, sub_arrays)
ZEND_ARG_INFO(0, read_thumbnail)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO_EX(arginfo_exif_thumbnail, 0, 0, 1)
ZEND_ARG_INFO(0, filename)
ZEND_ARG_INFO(1, width)
ZEND_ARG_INFO(1, height)
ZEND_ARG_INFO(1, imagetype)
ZEND_END_ARG_INFO()
static
ZEND_BEGIN_ARG_INFO(arginfo_exif_imagetype, 0)
ZEND_ARG_INFO(0, imagefile)
ZEND_END_ARG_INFO()
/* }}} */
/* {{{ exif_functions[]
*/
zend_function_entry exif_functions[] = {
PHP_FE(exif_read_data, NULL)
PHP_FALIAS(read_exif_data, exif_read_data, NULL)
PHP_FE(exif_tagname, NULL)
PHP_FE(exif_thumbnail, exif_thumbnail_force_ref)
PHP_FE(exif_imagetype, NULL)
PHP_FE(exif_read_data, arginfo_exif_read_data)
PHP_FALIAS(read_exif_data, exif_read_data, arginfo_exif_read_data)
PHP_FE(exif_tagname, arginfo_exif_tagname)
PHP_FE(exif_thumbnail, arginfo_exif_thumbnail)
PHP_FE(exif_imagetype, arginfo_exif_imagetype)
{NULL, NULL, NULL}
};
/* }}} */