/* $Id$ */
-/* {{{ includes/startup/misc */
+/* {{{ includes */
#include "php.h"
#include "php_assert.h"
#include "php_ini.h"
+/* }}} */
+
ZEND_BEGIN_MODULE_GLOBALS(assert)
long active;
long bail;
ASSERT_QUIET_EVAL
};
-static PHP_INI_MH(OnChangeCallback)
+static PHP_INI_MH(OnChangeCallback) /* {{{ */
{
if (EG(in_execution)) {
if (ASSERTG(callback)) {
}
return SUCCESS;
}
+/* }}} */
PHP_INI_BEGIN()
STD_PHP_INI_ENTRY("assert.active", "1", PHP_INI_ALL, OnUpdateLong, active, zend_assert_globals, assert_globals)
STD_PHP_INI_ENTRY("assert.quiet_eval", "0", PHP_INI_ALL, OnUpdateLong, quiet_eval, zend_assert_globals, assert_globals)
PHP_INI_END()
-static void php_assert_init_globals(zend_assert_globals *assert_globals_p TSRMLS_DC)
+static void php_assert_init_globals(zend_assert_globals *assert_globals_p TSRMLS_DC) /* {{{ */
{
assert_globals_p->callback = NULL;
assert_globals_p->cb = NULL;
}
+/* }}} */
-PHP_MINIT_FUNCTION(assert)
+PHP_MINIT_FUNCTION(assert) /* {{{ */
{
ZEND_INIT_MODULE_GLOBALS(assert, php_assert_init_globals, NULL);
return SUCCESS;
}
+/* }}} */
-PHP_MSHUTDOWN_FUNCTION(assert)
+PHP_MSHUTDOWN_FUNCTION(assert) /* {{{ */
{
if (ASSERTG(cb)) {
pefree(ASSERTG(cb), 1);
}
return SUCCESS;
}
+/* }}} */
-PHP_RSHUTDOWN_FUNCTION(assert)
+PHP_RSHUTDOWN_FUNCTION(assert) /* {{{ */
{
if (ASSERTG(callback)) {
zval_ptr_dtor(&ASSERTG(callback));
return SUCCESS;
}
+/* }}} */
-PHP_MINFO_FUNCTION(assert)
+PHP_MINFO_FUNCTION(assert) /* {{{ */
{
DISPLAY_INI_ENTRIES();
}
-
-/* }}} */
-/* {{{ internal functions */
/* }}} */
+
/* {{{ proto int assert(string|bool assertion) U
Checks if assertion is false */
}
/* }}} */
+
/* {{{ proto mixed assert_options(int what [, mixed value]) U
Set/get the various assert flags */
#include "php.h"
#include "base64.h"
-/* {{{ */
+/* {{{ base64 tables */
static const char base64_table[] =
{ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
};
/* }}} */
-/* {{{ php_base64_encode */
-PHPAPI unsigned char *php_base64_encode(const unsigned char *str, int length, int *ret_length)
+PHPAPI unsigned char *php_base64_encode(const unsigned char *str, int length, int *ret_length) /* {{{ */
{
const unsigned char *current = str;
unsigned char *p;
*/
/* }}} */
-PHPAPI unsigned char *php_base64_decode(const unsigned char *str, int length, int *ret_length)
+PHPAPI unsigned char *php_base64_decode(const unsigned char *str, int length, int *ret_length) /* {{{ */
{
return php_base64_decode_ex(str, length, ret_length, 0);
}
+/* }}} */
-/* {{{ php_base64_decode */
-/* as above, but backwards. :) */
-PHPAPI unsigned char *php_base64_decode_ex(const unsigned char *str, int length, int *ret_length, zend_bool strict)
+PHPAPI unsigned char *php_base64_decode_ex(const unsigned char *str, int length, int *ret_length, zend_bool strict) /* {{{ */
{
const unsigned char *current = str;
int ch, i = 0, j = 0, k;
}
/* }}} */
-
/* {{{ proto binary base64_decode(binary str[, bool strict]) U
Decodes string using MIME base64 algorithm */
PHP_FUNCTION(base64_decode)
}
/* }}} */
-
/*
* Local variables:
* tab-width: 4
/* OBJECTS_FIXME: This whole extension needs going through. The use of objects looks pretty broken here */
-static void browscap_entry_dtor(zval **zvalue)
+static void browscap_entry_dtor(zval **zvalue) /* {{{ */
{
if (Z_TYPE_PP(zvalue) == IS_ARRAY) {
zend_hash_destroy(Z_ARRVAL_PP(zvalue));
}
free(*zvalue);
}
+/* }}} */
-/* {{{ convert_browscap_pattern
- */
-static void convert_browscap_pattern(zval *pattern)
+static void convert_browscap_pattern(zval *pattern) /* {{{ */
{
register int i, j;
char *t;
}
/* }}} */
-/* {{{ php_browscap_parser_cb
- */
-static void php_browscap_parser_cb(zval *arg1, zval *arg2, int callback_type, void *arg)
+static void php_browscap_parser_cb(zval *arg1, zval *arg2, int callback_type, void *arg) /* {{{ */
{
if (!arg1) {
return;
}
/* }}} */
-/* {{{ PHP_MINIT_FUNCTION
- */
-PHP_MINIT_FUNCTION(browscap)
+PHP_MINIT_FUNCTION(browscap) /* {{{ */
{
char *browscap = INI_STR("browscap");
}
/* }}} */
-/* {{{ PHP_MSHUTDOWN_FUNCTION
- */
-PHP_MSHUTDOWN_FUNCTION(browscap)
+PHP_MSHUTDOWN_FUNCTION(browscap) /* {{{ */
{
char *browscap = INI_STR("browscap");
if (browscap && browscap[0]) {
}
/* }}} */
-
-/* {{{ browser_reg_compare
- */
-static int browser_reg_compare(zval **browser, int num_args, va_list args, zend_hash_key *key)
+static int browser_reg_compare(zval **browser, int num_args, va_list args, zend_hash_key *key) /* {{{ */
{
zval **browser_regex, **previous_match;
regex_t r;
#define CREDIT_LINE(module, authors) php_info_print_table_row(2, module, authors)
#define CREDIT_PUTS(s) php_output_write_utf8((s), strlen(s) TSRMLS_CC)
-/* {{{ php_print_credits
- */
-PHPAPI void php_print_credits(int flag TSRMLS_DC)
+PHPAPI void php_print_credits(int flag TSRMLS_DC) /* {{{ */
{
if (!sapi_module.phpinfo_as_text && flag & PHP_CREDITS_FULLPAGE) {
php_print_info_htmlhead(TSRMLS_C);
#define PHP_CRYPT_RAND php_rand(TSRMLS_C)
-PHP_MINIT_FUNCTION(crypt)
+PHP_MINIT_FUNCTION(crypt) /* {{{ */
{
REGISTER_LONG_CONSTANT("CRYPT_SALT_LENGTH", PHP_MAX_SALT_LEN, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("CRYPT_STD_DES", PHP_STD_DES_CRYPT, CONST_CS | CONST_PERSISTENT);
return SUCCESS;
}
-
+/* }}} */
static unsigned char itoa64[] = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
-static void php_to64(char *s, long v, int n)
+static void php_to64(char *s, long v, int n) /* {{{ */
{
while (--n >= 0) {
*s++ = itoa64[v&0x3f];
v >>= 6;
}
}
+/* }}} */
/* {{{ proto string crypt(string str [, string salt]) U
Hash a string */
#include "php.h"
#include "info.h"
-
-/* {{{ php_info_print_css
- */
-PHPAPI void php_info_print_css(TSRMLS_D)
+PHPAPI void php_info_print_css(TSRMLS_D) /* {{{ */
{
PUTS("body {background-color: #ffffff; color: #000000;}\n");
PUTS("body, td, th, h1, h2 {font-family: sans-serif;}\n");
};
/* }}} */
-/* {{{ php_convert_cyr_string
+/* {{{ static char * php_convert_cyr_string(unsigned char *str, int length, char from, char to TSRMLS_DC)
* This is the function that performs real in-place conversion of the string
* between charsets.
* Parameters:
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
};
-/* {{{ php_std_date
+/* {{{ PHPAPI char *php_std_date(time_t t TSRMLS_DC)
Return date string in standard format for http headers */
PHPAPI char *php_std_date(time_t t TSRMLS_DC)
{
}
/* }}} */
-
#if HAVE_STRPTIME
#ifndef HAVE_STRPTIME_DECL_FAILS
char *strptime(const char *s, const char *format, struct tm *tm);
}
}
/* }}} */
+
#endif
/*