}
/* }}} */
-static void _free_reg_cache(reg_cache *rc)
+static void _free_reg_cache(reg_cache *rc) /* {{{ */
{
regfree(&rc->preg);
}
+/* }}} */
#undef regfree
#define regfree(a);
#undef regcomp
#define regcomp(a, b, c) _php_regcomp(a, b, c)
-static void php_reg_init_globals(zend_reg_globals *reg_globals TSRMLS_DC)
+static void php_reg_init_globals(zend_reg_globals *reg_globals TSRMLS_DC) /* {{{ */
{
zend_hash_init(®_globals->ht_rc, 0, NULL, (void (*)(void *)) _free_reg_cache, 1);
}
+/* }}} */
-static void php_reg_destroy_globals(zend_reg_globals *reg_globals TSRMLS_DC)
+static void php_reg_destroy_globals(zend_reg_globals *reg_globals TSRMLS_DC) /* {{{ */
{
zend_hash_destroy(®_globals->ht_rc);
}
+/* }}} */
-PHP_MINIT_FUNCTION(regex)
+PHP_MINIT_FUNCTION(regex) /* {{{ */
{
ZEND_INIT_MODULE_GLOBALS(reg, php_reg_init_globals, php_reg_destroy_globals);
return SUCCESS;
}
+/* }}} */
-PHP_MSHUTDOWN_FUNCTION(regex)
+PHP_MSHUTDOWN_FUNCTION(regex) /* {{{ */
{
#ifndef ZTS
php_reg_destroy_globals(®_globals TSRMLS_CC);
return SUCCESS;
}
+/* }}} */
-PHP_MINFO_FUNCTION(regex)
+PHP_MINFO_FUNCTION(regex) /* {{{ */
{
#if HSREGEX
php_info_print_table_row(2, "Regex Library", "Bundled library enabled");
php_info_print_table_row(2, "Regex Library", "System library enabled");
#endif
}
-
+/* }}} */
/* {{{ php_reg_eprint
* php_reg_eprint - convert error number to name
}
/* }}} */
-static void php_exec_ex(INTERNAL_FUNCTION_PARAMETERS, int mode)
+static void php_exec_ex(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */
{
char *cmd;
int cmd_len;
efree(cmd);
}
}
+/* }}} */
/* {{{ proto string exec(string command [, array &output [, int &return_value]]) U
Execute an external program */
}
/* }}} */
+
/* {{{ Module-Stuff */
static ZEND_RSRC_DTOR_FUNC(file_context_dtor)
/* }}} */
-PHP_MSHUTDOWN_FUNCTION(file)
+PHP_MSHUTDOWN_FUNCTION(file) /* {{{ */
{
#ifndef ZTS
file_globals_dtor(&file_globals TSRMLS_CC);
#endif
return SUCCESS;
}
-
-
+/* }}} */
/* {{{ proto bool flock(resource fp, int operation [, int &wouldblock]) U
Portable file locking */
}
/* }}} */
-PHPAPI int php_copy_file(char *src, char *dest TSRMLS_DC)
+PHPAPI int php_copy_file(char *src, char *dest TSRMLS_DC) /* {{{ */
{
return php_copy_file_ex(src, dest, 0 TSRMLS_CC);
}
+/* }}} */
/* {{{ php_copy_file
*/
#define PHP_FGETCSV_UNI_CHECK(p, e, m, mlen) ((p) < (e) && (((mlen) == 1 && *(p) == *(m)) || ((mlen) > 1 && (((e) - (p)) >= (mlen)) && memcmp((p), (m), UBYTES(mlen)) == 0)))
/* Unicode mode fgetcsv */
-PHPAPI void php_u_fgetcsv(php_stream *stream,
- UChar *delimiter, int delimiter_len,
- UChar *enclosure, int enclosure_len,
- UChar *escape, int escape_len,
- UChar *buffer, int buffer_len,
- zval *return_value TSRMLS_DC)
+PHPAPI void php_u_fgetcsv(php_stream *stream, UChar *delimiter, int delimiter_len, UChar *enclosure, int enclosure_len, UChar *escape, int escape_len, UChar *buffer, int buffer_len, zval *return_value TSRMLS_DC) /* {{{ */
{
php_fgetcsv_state state = PHP_FGETCSV_READY;
UChar *p = buffer, *e = buffer + buffer_len, *field_start = NULL, *field_end = NULL;
/* }}} */
/* another quickie macro to make defining similar functions easier */
+/* {{{ FileFunction(name, funcnum) */
#define FileFunction(name, funcnum) \
void name(INTERNAL_FUNCTION_PARAMETERS) { \
char *filename; \
} \
}
+/* }}} */
+
/* {{{ proto int fileperms(string filename) U
Get file permissions */
FileFunction(PHP_FN(fileperms), FS_PERMS)
}
#endif /* !defined(HAVE_FLOCK) */
-PHPAPI int php_flock(int fd, int operation)
-#if HAVE_STRUCT_FLOCK
+PHPAPI int php_flock(int fd, int operation)
+#if HAVE_STRUCT_FLOCK /* {{{ */
{
struct flock flck;
int ret;
return ret;
}
-#elif defined(PHP_WIN32)
+/* }}} */
+#elif defined(PHP_WIN32) /* {{{ */
/*
* Program: Unix compatibility routines
*
#endif
return -1;
}
+/* }}} */
#else
#warning no proper flock support for your site
{
php_fsockopen_stream(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
}
/* }}} */
+
/* {{{ proto resource pfsockopen(string hostname, int port [, int errno [, string errstr [, float timeout]]]) U
Open persistent Internet or Unix domain socket connection */
PHP_FUNCTION(pfsockopen)
#include "php_fopen_wrappers.h"
-static inline int get_ftp_result(php_stream *stream, char *buffer, size_t buffer_size TSRMLS_DC)
+static inline int get_ftp_result(php_stream *stream, char *buffer, size_t buffer_size TSRMLS_DC) /* {{{ */
{
while (php_stream_gets(stream, ZSTR(buffer), buffer_size-1) &&
!(isdigit((int) buffer[0]) && isdigit((int) buffer[1]) &&
isdigit((int) buffer[2]) && buffer[3] == ' '));
return strtol(buffer, NULL, 10);
}
+/* }}} */
#define GET_FTP_RESULT(stream) get_ftp_result((stream), tmp_line, sizeof(tmp_line) TSRMLS_CC)
#define FTPS_ENCRYPT_DATA 1
-static int php_stream_ftp_stream_stat(php_stream_wrapper *wrapper,
- php_stream *stream,
- php_stream_statbuf *ssb
- TSRMLS_DC)
+static int php_stream_ftp_stream_stat(php_stream_wrapper *wrapper, php_stream *stream, php_stream_statbuf *ssb TSRMLS_DC) /* {{{ */
{
/* For now, we return with a failure code to prevent the underlying
* file's details from being used instead. */
return -1;
}
+/* }}} */
-
-static int php_stream_ftp_stream_close(php_stream_wrapper *wrapper,
- php_stream *stream
- TSRMLS_DC)
+static int php_stream_ftp_stream_close(php_stream_wrapper *wrapper, php_stream *stream TSRMLS_DC) /* {{{ */
{
php_stream *controlstream = (php_stream *)stream->wrapperdata;
}
return 0;
}
+/* }}} */
/* {{{ php_ftp_fopen_connect
*/
}
/* }}} */
-PHPAPI int php_header(TSRMLS_D)
+PHPAPI int php_header(TSRMLS_D) /* {{{ */
{
if (sapi_send_headers(TSRMLS_C)==FAILURE || SG(request_info).headers_only) {
return 0; /* don't allow output */
return 1; /* allow output */
}
}
+/* }}} */
-PHPAPI int php_setcookie(char *name, int name_len, char *value, int value_len, time_t expires, char *path, int path_len, char *domain, int domain_len, int secure, int url_encode, int httponly TSRMLS_DC)
+PHPAPI int php_setcookie(char *name, int name_len, char *value, int value_len, time_t expires, char *path, int path_len, char *domain, int domain_len, int secure, int url_encode, int httponly TSRMLS_DC) /* {{{ */
{
char *cookie, *encoded_value = NULL;
int len=sizeof("Set-Cookie: ");
efree(cookie);
return result;
}
-
+/* }}} */
/* php_set_cookie(name, value, expires, path, domain, secure) */
/* {{{ proto bool setcookie(string name [, string value [, int expires [, string path [, string domain [, bool secure[, bool httponly]]]]]]) U
}
/* }}} */
-
/* {{{ proto bool headers_sent([string &$file [, int &$line]]) U
Returns true if headers have already been sent, false otherwise */
PHP_FUNCTION(headers_sent)
add_next_index_ascii_string((zval *)arg, (char *)(sapi_header->header), 1);
}
}
+/* }}} */
/* {{{ proto array headers_list(void) U
Return list of headers to be sent / already sent */
}
/* }}} */
-
-
-
/* {{{ php_escape_html_entities
*/
PHPAPI char *php_escape_html_entities_ex(unsigned char *old, int oldlen, int *newlen, int all, int quote_style, char *hint_charset, zend_bool double_encode TSRMLS_DC)
}
/* }}} */
-PHPAPI char *php_escape_html_entities(char *old, int oldlen, int *newlen, int all, int quote_style, char *hint_charset TSRMLS_DC)
+PHPAPI char *php_escape_html_entities(char *old, int oldlen, int *newlen, int all, int quote_style, char *hint_charset TSRMLS_DC) /* {{{ */
{
return php_escape_html_entities_ex((unsigned char*)old, oldlen, newlen, all, quote_style, hint_charset, 1 TSRMLS_CC);
}
+/* }}} */
/* {{{ php_html_entities
*/
}
/* }}} */
-
/* {{{ proto string htmlentities(string string [, int quote_style[, string charset[, bool double_encode]]])
Convert all applicable characters to HTML entities */
PHP_FUNCTION(htmlentities)
#define HTTP_HEADER_CONTENT_LENGTH 16
#define HTTP_HEADER_TYPE 32
-static inline char *php_http_detect_charset(char *http_header_line)
+static inline char *php_http_detect_charset(char *http_header_line) /* {{{ */
{
char *s;
return NULL;
}
+/* }}} */
-php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path, char *mode, int options, char **opened_path, php_stream_context *context, int redirect_max, int header_init STREAMS_DC TSRMLS_DC)
+php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path, char *mode, int options, char **opened_path, php_stream_context *context, int redirect_max, int header_init STREAMS_DC TSRMLS_DC) /* {{{ */
{
php_stream *stream = NULL;
php_url *resource = NULL;
return stream;
}
+/* }}} */
-php_stream *php_stream_url_wrap_http(php_stream_wrapper *wrapper, char *path, char *mode, int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC)
+php_stream *php_stream_url_wrap_http(php_stream_wrapper *wrapper, char *path, char *mode, int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC) /* {{{ */
{
return php_stream_url_wrap_http_ex(wrapper, path, mode, options, opened_path, context, PHP_URL_REDIRECT_MAX, 1 STREAMS_CC TSRMLS_CC);
}
+/* }}} */
-static int php_stream_http_stream_stat(php_stream_wrapper *wrapper,
- php_stream *stream,
- php_stream_statbuf *ssb
- TSRMLS_DC)
+static int php_stream_http_stream_stat(php_stream_wrapper *wrapper, php_stream *stream, php_stream_statbuf *ssb TSRMLS_DC) /* {{{ */
{
/* one day, we could fill in the details based on Date: and Content-Length:
* headers. For now, we return with a failure code to prevent the underlying
* file's details from being used instead. */
return -1;
}
+/* }}} */
static php_stream_wrapper_ops http_stream_wops = {
php_stream_url_wrap_http,
}
/* }}} */
-static zval *incomplete_class_get_property(zval *object, zval *member, int type TSRMLS_DC)
+static zval *incomplete_class_get_property(zval *object, zval *member, int type TSRMLS_DC) /* {{{ */
{
incomplete_class_message(object, E_NOTICE TSRMLS_CC);
if(type == BP_VAR_W || type == BP_VAR_RW) {
return EG(uninitialized_zval_ptr);
}
}
+/* }}} */
-static void incomplete_class_write_property(zval *object, zval *member, zval *value TSRMLS_DC)
+static void incomplete_class_write_property(zval *object, zval *member, zval *value TSRMLS_DC) /* {{{ */
{
incomplete_class_message(object, E_NOTICE TSRMLS_CC);
}
+/* }}} */
-static zval **incomplete_class_get_property_ptr_ptr(zval *object, zval *member TSRMLS_DC)
+static zval **incomplete_class_get_property_ptr_ptr(zval *object, zval *member TSRMLS_DC) /* {{{ */
{
incomplete_class_message(object, E_NOTICE TSRMLS_CC);
return &EG(error_zval_ptr);
}
+/* }}} */
-static void incomplete_class_unset_property(zval *object, zval *member TSRMLS_DC)
+static void incomplete_class_unset_property(zval *object, zval *member TSRMLS_DC) /* {{{ */
{
incomplete_class_message(object, E_NOTICE TSRMLS_CC);
}
+/* }}} */
-static int incomplete_class_has_property(zval *object, zval *member, int check_empty TSRMLS_DC)
+static int incomplete_class_has_property(zval *object, zval *member, int check_empty TSRMLS_DC) /* {{{ */
{
incomplete_class_message(object, E_NOTICE TSRMLS_CC);
return 0;
}
+/* }}} */
-static union _zend_function *incomplete_class_get_method(zval **object, zstr method, int method_len TSRMLS_DC) {
+static union _zend_function *incomplete_class_get_method(zval **object, zstr method, int method_len TSRMLS_DC) /* {{{ */
+{
incomplete_class_message(*object, E_ERROR TSRMLS_CC);
return NULL;
}
+/* }}} */
/* {{{ php_create_incomplete_class
*/
PHPAPI extern char *php_ini_opened_path;
PHPAPI extern char *php_ini_scanned_files;
-static int php_info_print_html_esc(const char *str, int len)
+static int php_info_print_html_esc(const char *str, int len) /* {{{ */
{
int new_len, written;
char *new_str;
efree(new_str);
return written;
}
+/* }}} */
-static int php_info_uprint_html_esc(const UChar *str, int len)
+static int php_info_uprint_html_esc(const UChar *str, int len) /* {{{ */
{
UErrorCode status = U_ZERO_ERROR;
char *new_str = NULL;
efree(new_str);
return written;
}
+/* }}} */
-static int php_info_printf(const char *fmt, ...)
+static int php_info_printf(const char *fmt, ...) /* {{{ */
{
char *buf;
int len, written;
efree(buf);
return written;
}
+/* }}} */
-static void php_info_print_request_uri(TSRMLS_D)
+static void php_info_print_request_uri(TSRMLS_D) /* {{{ */
{
if (SG(request_info).request_uri) {
php_info_print_html_esc(SG(request_info).request_uri, strlen(SG(request_info).request_uri));
}
}
+/* }}} */
-
-static int php_info_print(const char *str)
+static int php_info_print(const char *str) /* {{{ */
{
TSRMLS_FETCH();
return php_output_write_utf8(str, strlen(str) TSRMLS_CC);
}
+/* }}} */
-static int php_info_uprint(const UChar *str, int len)
+static int php_info_uprint(const UChar *str, int len) /* {{{ */
{
TSRMLS_FETCH();
return php_output_write_unicode(str, len TSRMLS_CC);
}
+/* }}} */
-static void php_info_print_stream_hash(const char *name, HashTable *ht TSRMLS_DC)
+static void php_info_print_stream_hash(const char *name, HashTable *ht TSRMLS_DC) /* {{{ */
{
zstr key;
uint len;
php_info_print_table_row(2, name, "disabled");
}
}
+/* }}} */
PHPAPI void php_info_print_module(zend_module_entry *module TSRMLS_DC) /* {{{ */
{
}
/* }}} */
-
/* {{{ php_info_html_esc
*/
PHPAPI char *php_info_html_esc(char *string TSRMLS_DC)
}
/* }}} */
-
/* {{{ php_get_uname
*/
PHPAPI char *php_get_uname(char mode)
}
/* }}} */
-
/* {{{ php_print_info_htmlhead
*/
PHPAPI void php_print_info_htmlhead(TSRMLS_D)
}
/* }}} */
-
-PHPAPI void php_info_print_table_start()
+PHPAPI void php_info_print_table_start() /* {{{ */
{
if (!sapi_module.phpinfo_as_text) {
php_info_print("<table border=\"0\" cellpadding=\"3\" width=\"600\">\n");
php_info_print("\n");
}
}
+/* }}} */
-PHPAPI void php_info_print_table_end()
+PHPAPI void php_info_print_table_end() /* {{{ */
{
if (!sapi_module.phpinfo_as_text) {
php_info_print("</table><br />\n");
}
}
+/* }}} */
-PHPAPI void php_info_print_box_start(int flag)
+PHPAPI void php_info_print_box_start(int flag) /* {{{ */
{
php_info_print_table_start();
if (flag) {
}
}
}
+/* }}} */
-PHPAPI void php_info_print_box_end()
+PHPAPI void php_info_print_box_end() /* {{{ */
{
if (!sapi_module.phpinfo_as_text) {
php_info_print("</td></tr>\n");
}
php_info_print_table_end();
}
+/* }}} */
-PHPAPI void php_info_print_hr()
+PHPAPI void php_info_print_hr() /* {{{ */
{
if (!sapi_module.phpinfo_as_text) {
php_info_print("<hr />\n");
php_info_print("\n\n _______________________________________________________________________\n\n");
}
}
+/* }}} */
-PHPAPI void php_info_print_table_colspan_header(int num_cols, char *header)
+PHPAPI void php_info_print_table_colspan_header(int num_cols, char *header) /* {{{ */
{
int spaces;
php_info_printf("%*s%s%*s\n", (int)(spaces/2), " ", header, (int)(spaces/2), " ");
}
}
+/* }}} */
/* {{{ php_info_print_table_header
*/
}
/* }}} */
-
/* {{{ php_logo_guid
*/
PHPAPI char *php_logo_guid()
static void lcg_seed(TSRMLS_D);
-PHPAPI double php_combined_lcg(TSRMLS_D)
+PHPAPI double php_combined_lcg(TSRMLS_D) /* {{{ */
{
php_int32 q;
php_int32 z;
return z * 4.656613e-10;
}
+/* }}} */
-static void lcg_seed(TSRMLS_D)
+static void lcg_seed(TSRMLS_D) /* {{{ */
{
struct timeval tv;
LCG(seeded) = 1;
}
+/* }}} */
-static void lcg_init_globals(php_lcg_globals *lcg_globals_p TSRMLS_DC)
+static void lcg_init_globals(php_lcg_globals *lcg_globals_p TSRMLS_DC) /* {{{ */
{
LCG(seeded) = 0;
}
+/* }}} */
-PHP_MINIT_FUNCTION(lcg)
+PHP_MINIT_FUNCTION(lcg) /* {{{ */
{
#ifdef ZTS
ts_allocate_id(&lcg_globals_id, sizeof(php_lcg_globals), (ts_allocate_ctor) lcg_init_globals, NULL);
#endif
return SUCCESS;
}
+/* }}} */
/* {{{ proto float lcg_value() U
Returns a value from the combined linear congruential generator */
}
/* }}} */
-
-
/*
* Local variables:
* tab-width: 4
#include "md5.h"
#include "ext/standard/file.h"
-PHPAPI void make_digest(char *md5str, unsigned char *digest)
+PHPAPI void make_digest(char *md5str, unsigned char *digest) /* {{{ */
{
make_digest_ex(md5str, digest, 16);
}
+/* }}} */
-PHPAPI void make_digest_ex(char *md5str, unsigned char *digest, int len)
+PHPAPI void make_digest_ex(char *md5str, unsigned char *digest, int len) /* {{{ */
{
static const char hexits[17] = "0123456789abcdef";
int i;
}
md5str[len * 2] = '\0';
}
+/* }}} */
/* {{{ proto string md5(string str, [ bool raw_output]) U
Calculate the md5 hash of a string */
/* Allows us to safely look ahead an arbitrary # of letters */
/* I probably could have just used strlen... */
-static char Lookahead(char *word, int how_far)
+
+static char Lookahead(char *word, int how_far) /* {{{ */
{
char letter_ahead = '\0'; /* null by default */
int idx;
*/
return letter_ahead;
}
-
+/* }}} */
/* phonize one letter
* We don't know the buffers size in advance. On way to solve this is to just
/* Note is a letter is a 'break' in the word */
#define Isbreak(c) (!isalpha(c))
-/* {{{ metaphone
- */
-static int metaphone(unsigned char *word, int word_len, long max_phonemes, char **phoned_word, int traditional)
+static int metaphone(unsigned char *word, int word_len, long max_phonemes, char **phoned_word, int traditional) /* {{{ */
{
int w_idx = 0; /* point in the phonization we're at. */
int p_idx = 0; /* end of the phoned phrase */
#define SEC_IN_MIN 60
#ifdef HAVE_GETTIMEOFDAY
-static void _php_gettimeofday(INTERNAL_FUNCTION_PARAMETERS, int mode)
+static void _php_gettimeofday(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */
{
zend_bool get_as_float = 0;
struct timeval tp = {0};
RETURN_ASCII_STRING(ret, ZSTR_DUPLICATE);
}
}
+/* }}} */
/* {{{ proto mixed microtime([bool get_as_float]) U
Returns either a string or a float containing the current time in seconds and microseconds */
}
/* }}} */
-long php_getgid(void)
+long php_getgid(void) /* {{{ */
{
TSRMLS_FETCH();
php_statpage(TSRMLS_C);
return (BG(page_gid));
}
+/* }}} */
/* {{{ proto int getmyuid(void) U
Get PHP script owner's UID */
}
/* }}} */
-PHPAPI time_t php_getlastmod(TSRMLS_D)
+PHPAPI time_t php_getlastmod(TSRMLS_D) /* {{{ */
{
php_statpage(TSRMLS_C);
return BG(page_mtime);
}
+/* }}} */
/* {{{ proto int getlastmod(void) U
Get time of last page modification */
#include "php_fopen_wrappers.h"
#include "SAPI.h"
-static size_t php_stream_output_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC)
+static size_t php_stream_output_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC) /* {{{ */
{
PHPWRITE(buf, count);
return count;
}
+/* }}} */
-static size_t php_stream_output_read(php_stream *stream, char *buf, size_t count TSRMLS_DC)
+static size_t php_stream_output_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) /* {{{ */
{
stream->eof = 1;
return 0;
}
+/* }}} */
-static int php_stream_output_close(php_stream *stream, int close_handle TSRMLS_DC)
+static int php_stream_output_close(php_stream *stream, int close_handle TSRMLS_DC) /* {{{ */
{
return 0;
}
+/* }}} */
-static int php_stream_output_flush(php_stream *stream TSRMLS_DC)
+static int php_stream_output_flush(php_stream *stream TSRMLS_DC) /* {{{ */
{
sapi_flush(TSRMLS_C);
return 0;
}
+/* }}} */
php_stream_ops php_stream_output_ops = {
php_stream_output_write,
NULL /* set_option */
};
-static size_t php_stream_input_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC)
+static size_t php_stream_input_write(php_stream *stream, const char *buf, size_t count TSRMLS_DC) /* {{{ */
{
return -1;
}
+/* }}} */
-static size_t php_stream_input_read(php_stream *stream, char *buf, size_t count TSRMLS_DC)
+static size_t php_stream_input_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) /* {{{ */
{
off_t *position = (off_t*)stream->abstract;
size_t read_bytes = 0;
SG(read_post_bytes) += read_bytes;
return read_bytes;
}
+/* }}} */
-static int php_stream_input_close(php_stream *stream, int close_handle TSRMLS_DC)
+static int php_stream_input_close(php_stream *stream, int close_handle TSRMLS_DC) /* {{{ */
{
efree(stream->abstract);
return 0;
}
+/* }}} */
-static int php_stream_input_flush(php_stream *stream TSRMLS_DC)
+static int php_stream_input_flush(php_stream *stream TSRMLS_DC) /* {{{ */
{
return -1;
}
+/* }}} */
php_stream_ops php_stream_input_ops = {
php_stream_input_write,
NULL /* set_option */
};
-static void php_stream_apply_filter_list(php_stream *stream, char *filterlist, int read_chain, int write_chain TSRMLS_DC) {
+static void php_stream_apply_filter_list(php_stream *stream, char *filterlist, int read_chain, int write_chain TSRMLS_DC) /* {{{ */
+{
char *p, *token;
php_stream_filter *temp_filter;
p = php_strtok_r(NULL, "|", &token);
}
}
+/* }}} */
-
-php_stream * php_stream_url_wrap_php(php_stream_wrapper *wrapper, char *path, char *mode, int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC)
+php_stream * php_stream_url_wrap_php(php_stream_wrapper *wrapper, char *path, char *mode, int options, char **opened_path, php_stream_context *context STREAMS_DC TSRMLS_DC) /* {{{ */
{
int fd = -1;
int mode_rw = 0;
return stream;
}
+/* }}} */
static php_stream_wrapper_ops php_stdio_wops = {
php_stream_url_wrap_php,
/*
* Converting HEX char to INT value
*/
-static char php_hex2int(int c)
+static char php_hex2int(int c) /* {{{ */
{
if (isdigit(c)) {
return c - '0';
return -1;
}
}
+/* }}} */
-PHPAPI unsigned char *php_quot_print_decode(const unsigned char *str, size_t length, size_t *ret_length, int replace_us_by_ws)
+PHPAPI unsigned char *php_quot_print_decode(const unsigned char *str, size_t length, size_t *ret_length, int replace_us_by_ws) /* {{{ */
{
register unsigned int i;
register unsigned const char *p1;
*ret_length = decoded_len;
return retval;
}
-
+/* }}} */
/*
*
}
/* }}} */
-static void _free_reg_cache(reg_cache *rc)
+static void _free_reg_cache(reg_cache *rc) /* {{{ */
{
regfree(&rc->preg);
}
+/* }}} */
#undef regfree
#define regfree(a);
#undef regcomp
#define regcomp(a, b, c) _php_regcomp(a, b, c)
-static void php_reg_init_globals(zend_reg_globals *reg_globals TSRMLS_DC)
+static void php_reg_init_globals(zend_reg_globals *reg_globals TSRMLS_DC) /* {{{ */
{
zend_hash_init(®_globals->ht_rc, 0, NULL, (void (*)(void *)) _free_reg_cache, 1);
}
+/* }}} */
-static void php_reg_destroy_globals(zend_reg_globals *reg_globals TSRMLS_DC)
+static void php_reg_destroy_globals(zend_reg_globals *reg_globals TSRMLS_DC) /* {{{ */
{
zend_hash_destroy(®_globals->ht_rc);
}
+/* }}} */
-PHP_MINIT_FUNCTION(regex)
+PHP_MINIT_FUNCTION(regex) /* {{{ */
{
ZEND_INIT_MODULE_GLOBALS(reg, php_reg_init_globals, php_reg_destroy_globals);
return SUCCESS;
}
+/* }}} */
-PHP_MSHUTDOWN_FUNCTION(regex)
+PHP_MSHUTDOWN_FUNCTION(regex) /* {{{ */
{
#ifndef ZTS
php_reg_destroy_globals(®_globals TSRMLS_CC);
return SUCCESS;
}
+/* }}} */
-PHP_MINFO_FUNCTION(regex)
+PHP_MINFO_FUNCTION(regex) /* {{{ */
{
#if HSREGEX
php_info_print_table_row(2, "Regex Library", "Bundled library enabled");
php_info_print_table_row(2, "Regex Library", "System library enabled");
#endif
}
-
+/* }}} */
/* {{{ php_reg_eprint
* php_reg_eprint - convert error number to name
#include "sha1.h"
#include "md5.h"
-PHPAPI void make_sha1_digest(char *sha1str, unsigned char *digest)
+PHPAPI void make_sha1_digest(char *sha1str, unsigned char *digest) /* {{{ */
{
make_digest_ex(sha1str, digest, 20);
}
+/* }}} */
/* {{{ proto string sha1(string str [, bool raw_output]) U
Calculate the sha1 hash of a string */
/* }}} */
-
/* {{{ proto string sha1_file(string filename [, bool raw_output]) U
Calculate the sha1 hash of given filename */
PHP_FUNCTION(sha1_file)
}
/* }}} */
-
static void SHA1Transform(php_uint32[5], const unsigned char[64]);
static void SHA1Encode(unsigned char *, php_uint32 *, unsigned int);
static void SHA1Decode(php_uint32 *, const unsigned char *, unsigned int);
}
/* }}} */
-
/* {{{ proto bool stream_default_encoding(string encoding) U
Convenience wrapper for ini_set('unicode.stream_encoding', $encoding) */
PHP_FUNCTION(stream_default_encoding)
}
/* }}} */
-
/* {{{ proto void stream_encoding(resource stream[, string encoding]) U
Set character set for stream encoding
UTODO: Return current encoding charset
}
/* }}} */
-PHP_RINIT_FUNCTION(syslog)
+PHP_RINIT_FUNCTION(syslog) /* {{{ */
{
if (INI_INT("define_syslog_variables")) {
start_syslog(TSRMLS_C);
}
return SUCCESS;
}
-
+/* }}} */
#ifdef PHP_WIN32
-PHP_RSHUTDOWN_FUNCTION(syslog)
+PHP_RSHUTDOWN_FUNCTION(syslog) /* {{{ */
{
closelog();
return SUCCESS;
}
+/* }}} */
#endif
-PHP_MSHUTDOWN_FUNCTION(syslog)
+PHP_MSHUTDOWN_FUNCTION(syslog) /* {{{ */
{
if (BG(syslog_device)) {
free(BG(syslog_device));
}
return SUCCESS;
}
+/* }}} */
/* {{{ start_syslog
*/
}
/* }}} */
-PHPAPI char *php_replace_controlchars(char *str)
+PHPAPI char *php_replace_controlchars(char *str) /* {{{ */
{
return php_replace_controlchars_ex(str, strlen(str));
}
+/* }}} */
-PHPAPI php_url *php_url_parse(char const *str)
+PHPAPI php_url *php_url_parse(char const *str) /* {{{ */
{
return php_url_parse_ex(str, strlen(str));
}
+/* }}} */
/* {{{ php_url_parse
*/
#define BUFSIZE 256
#endif
-int php_url_scanner_activate(TSRMLS_D)
+int php_url_scanner_activate(TSRMLS_D) /* {{{ */
{
url_adapt(NULL,0,NULL,NULL);
return SUCCESS;
}
+/* }}} */
-
-int php_url_scanner_deactivate(TSRMLS_D)
+int php_url_scanner_deactivate(TSRMLS_D) /* {{{ */
{
url_adapt(NULL,0,NULL,NULL);
return SUCCESS;
}
+/* }}} */
/* {{{ url_attr_addon
*/
static zend_class_entry user_filter_class_entry;
-static ZEND_RSRC_DTOR_FUNC(php_bucket_dtor)
+static ZEND_RSRC_DTOR_FUNC(php_bucket_dtor) /* {{{ */
{
php_stream_bucket *bucket = (php_stream_bucket *)rsrc->ptr;
if (bucket) {
bucket = NULL;
}
}
+/* }}} */
-PHP_MINIT_FUNCTION(user_filters)
+PHP_MINIT_FUNCTION(user_filters) /* {{{ */
{
zend_class_entry *php_user_filter;
/* init the filter class ancestor */
return SUCCESS;
}
+/* }}} */
-PHP_RSHUTDOWN_FUNCTION(user_filters)
+PHP_RSHUTDOWN_FUNCTION(user_filters) /* {{{ */
{
if (BG(user_filter_map)) {
zend_hash_destroy(BG(user_filter_map));
return SUCCESS;
}
+/* }}} */
-static void userfilter_dtor(php_stream_filter *thisfilter TSRMLS_DC)
+static void userfilter_dtor(php_stream_filter *thisfilter TSRMLS_DC) /* {{{ */
{
zval *obj = (zval*)thisfilter->abstract;
zval func_name;
/* kill the object */
zval_ptr_dtor(&obj);
}
+/* }}} */
-php_stream_filter_status_t userfilter_filter(
- php_stream *stream,
- php_stream_filter *thisfilter,
- php_stream_bucket_brigade *buckets_in,
- php_stream_bucket_brigade *buckets_out,
- size_t *consumed,
- int flags
- TSRMLS_DC)
+php_stream_filter_status_t userfilter_filter( php_stream *stream, php_stream_filter *thisfilter, php_stream_bucket_brigade *buckets_in, php_stream_bucket_brigade *buckets_out, size_t *consumed, int flags TSRMLS_DC) /* {{{ */
{
int ret = PSFS_ERR_FATAL;
zval *obj = (zval*)thisfilter->abstract;
return ret;
}
+/* }}} */
static php_stream_filter_ops userfilter_ops = {
userfilter_filter,
PSFO_FLAG_OUTPUTS_SAME
};
-static php_stream_filter *user_filter_factory_create(const char *filtername,
- zval *filterparams, int persistent TSRMLS_DC)
+static php_stream_filter *user_filter_factory_create(const char *filtername, zval *filterparams, int persistent TSRMLS_DC) /* {{{ */
{
struct php_user_filter_data *fdat = NULL;
php_stream_filter *filter;
return filter;
}
+/* }}} */
static php_stream_filter_factory user_filter_factory = {
user_filter_factory_create
};
-static void filter_item_dtor(struct php_user_filter_data *fdat)
+static void filter_item_dtor(struct php_user_filter_data *fdat) /* {{{ */
{
efree(fdat->classname.v);
}
+/* }}} */
/* {{{ proto object stream_bucket_make_writeable(resource brigade) U
Return a bucket object from the brigade for operating on */
}
/* }}} */
-
/*
* Local variables:
* tab-width: 4
}
/* }}} */
+
/* {{{ compare_special_version_forms() */
typedef struct {
}
/* }}} */
+
/* {{{ php_version_compare() */
PHPAPI int