summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2001-06-05 13:12:10 +0000
committerRasmus Lerdorf <rasmus@php.net>2001-06-05 13:12:10 +0000
commit25c3a3a39d7aebdce95825e6af2ad8c62905b7cc (patch)
tree4d8f1ff9644c880e3b7a63a361a0db2280d8058f
parent4efe6f7e6b53496fb1c4f6990b3ad0771bd9be67 (diff)
downloadphp-git-25c3a3a39d7aebdce95825e6af2ad8c62905b7cc.tar.gz
vim-6 does folding - clean up a bunch of missing folding tags plus
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
-rw-r--r--CODING_STANDARDS9
-rw-r--r--ext/aspell/aspell.c24
-rw-r--r--ext/crack/crack.c1
-rw-r--r--ext/ctype/ctype.c20
-rw-r--r--ext/curl/curl.c48
-rw-r--r--ext/cybercash/cybercash.c31
-rw-r--r--ext/cybermut/cybermut.c76
-rw-r--r--ext/db/db.c88
-rw-r--r--ext/dba/dba.c37
-rw-r--r--ext/dba/dba_cdb.c8
-rw-r--r--ext/dba/dba_db2.c8
-rw-r--r--ext/dba/dba_db3.c8
-rw-r--r--ext/dba/dba_dbm.c8
-rw-r--r--ext/dba/dba_gdbm.c8
-rw-r--r--ext/dba/dba_ndbm.c8
-rw-r--r--ext/dbase/dbase.c7
-rw-r--r--ext/ereg/ereg.c4
-rw-r--r--ext/exif/exif.c80
-rw-r--r--ext/fdf/fdf.c35
-rw-r--r--ext/filepro/filepro.c9
-rwxr-xr-xext/fribidi/fribidi.c51
-rw-r--r--ext/ftp/ftp.c149
-rw-r--r--ext/gd/gd.c87
-rw-r--r--ext/gmp/gmp.c74
-rw-r--r--ext/iconv/iconv.c20
-rw-r--r--ext/imap/php_imap.c13
-rw-r--r--ext/ldap/ldap.c87
-rw-r--r--ext/msql/php_msql.c54
-rw-r--r--ext/mysql/php_mysql.c91
-rw-r--r--ext/oci8/oci8.c11
-rw-r--r--ext/odbc/php_odbc.c17
-rw-r--r--ext/openssl/openssl.c36
-rw-r--r--ext/pcre/php_pcre.c43
-rw-r--r--ext/pdf/pdf.c68
-rw-r--r--ext/pfpro/pfpro.c1
-rw-r--r--ext/pgsql/pgsql.c94
-rw-r--r--ext/posix/posix.c21
-rw-r--r--ext/pspell/pspell.c17
-rw-r--r--ext/shmop/shmop.c28
-rw-r--r--ext/skeleton/skeleton.c43
-rw-r--r--ext/snmp/snmp.c28
-rw-r--r--ext/snmp/winsnmp.c26
-rw-r--r--ext/standard/array.c1
-rw-r--r--ext/standard/assert.c1
-rw-r--r--ext/standard/base64.c1
-rw-r--r--ext/standard/basic_functions.c1
-rw-r--r--ext/standard/browscap.c1
-rw-r--r--ext/standard/crc32.c1
-rw-r--r--ext/standard/credits.c7
-rw-r--r--ext/standard/crypt.c1
-rw-r--r--ext/standard/cyr_convert.c8
-rw-r--r--ext/standard/datetime.c1
-rw-r--r--ext/standard/dir.c1
-rw-r--r--ext/standard/dl.c1
-rw-r--r--ext/standard/dns.c1
-rw-r--r--ext/standard/exec.c1
-rw-r--r--ext/standard/file.c4
-rw-r--r--ext/standard/filestat.c1
-rw-r--r--ext/standard/flock_compat.c8
-rw-r--r--ext/standard/formatted_print.c1
-rw-r--r--ext/standard/fsock.c2
-rw-r--r--ext/standard/ftp_fopen_wrapper.c8
-rw-r--r--ext/standard/head.c1
-rw-r--r--ext/standard/html.c1
-rw-r--r--ext/standard/http_fopen_wrapper.c8
-rw-r--r--ext/standard/image.c8
-rw-r--r--ext/standard/incomplete_class.c8
-rw-r--r--ext/standard/info.c1
-rw-r--r--ext/standard/iptc.c2
-rw-r--r--ext/standard/mail.c10
-rw-r--r--ext/standard/math.c1
-rw-r--r--ext/standard/md5.c1
-rw-r--r--ext/standard/metaphone.c1
-rw-r--r--ext/standard/microtime.c1
-rw-r--r--ext/standard/output.c3
-rw-r--r--ext/standard/pack.c4
-rw-r--r--ext/standard/pageinfo.c8
-rw-r--r--ext/standard/php_fopen_wrapper.c8
-rw-r--r--ext/standard/quot_print.c8
-rw-r--r--ext/standard/rand.c3
-rw-r--r--ext/standard/reg.c4
-rw-r--r--ext/standard/scanf.c7
-rw-r--r--ext/standard/soundex.c1
-rw-r--r--ext/standard/string.c127
-rw-r--r--ext/standard/strnatcmp.c8
-rw-r--r--ext/standard/syslog.c2
-rw-r--r--ext/standard/type.c8
-rw-r--r--ext/standard/uniqid.c2
-rw-r--r--ext/standard/url.c1
-rw-r--r--ext/standard/url_scanner.c8
-rw-r--r--ext/standard/url_scanner_ex.c8
-rw-r--r--ext/standard/var.c1
-rw-r--r--ext/swf/swf.c40
-rw-r--r--ext/sysvsem/sysvsem.c24
-rw-r--r--ext/sysvshm/sysvshm.c36
-rw-r--r--ext/wddx/wddx.c121
-rw-r--r--ext/xml/xml.c7
-rw-r--r--ext/xslt/sablot.c22
-rw-r--r--ext/xslt/xslt.c8
-rw-r--r--ext/yaz/php_yaz.c3
-rw-r--r--ext/zip/zip.c25
-rw-r--r--ext/zlib/zlib.c65
-rw-r--r--main/SAPI.c1
-rw-r--r--main/alloca.c8
-rw-r--r--main/fopen_wrappers.c2
-rw-r--r--main/internal_functions_win32.c1
-rw-r--r--main/main.c1
-rw-r--r--main/mergesort.c8
-rw-r--r--main/network.c2
-rw-r--r--main/output.c3
-rw-r--r--main/php.h1
-rw-r--r--main/php_content_types.c1
-rw-r--r--main/php_ini.c1
-rw-r--r--main/php_logos.c8
-rw-r--r--main/php_open_temporary_file.c16
-rw-r--r--main/php_sprintf.c8
-rw-r--r--main/php_ticks.c2
-rw-r--r--main/php_variables.c1
-rw-r--r--main/reentrancy.c8
-rw-r--r--main/rfc1867.c1
-rw-r--r--main/safe_mode.c8
-rw-r--r--main/snprintf.c8
-rwxr-xr-xmain/streams.c2
-rw-r--r--main/strlcat.c8
-rw-r--r--main/strlcpy.c8
125 files changed, 1769 insertions, 570 deletions
diff --git a/CODING_STANDARDS b/CODING_STANDARDS
index fded3a3341..2f5b70a6b4 100644
--- a/CODING_STANDARDS
+++ b/CODING_STANDARDS
@@ -171,11 +171,10 @@ PHP_FUNCTION(abs)
/* }}} */
The {{{ symbols are the default folding symbols for the folding mode in
-Emacs. vim will soon have support for folding as well. Folding is very
-useful when dealing with large files because you can scroll through the
-file quickly and just unfold the function you wish to work on. The }}}
-at the end of each function marks the end of the fold, and should be on
-a separate line.
+Emacs and vim (set fdm=marker). Folding is very useful when dealing with
+large files because you can scroll through the file quickly and just unfold
+the function you wish to work on. The }}} at the end of each function marks
+the end of the fold, and should be on a separate line.
The "proto" keyword there is just a helper for the doc/genfuncsummary script
which generates a full function summary. Having this keyword in front of the
diff --git a/ext/aspell/aspell.c b/ext/aspell/aspell.c
index dac32cb259..6a5cba65cd 100644
--- a/ext/aspell/aspell.c
+++ b/ext/aspell/aspell.c
@@ -37,6 +37,8 @@
#include <aspell-c.h>
#include "ext/standard/info.h"
+/* {{{ aspell_functions[]
+ */
function_entry aspell_functions[] = {
PHP_FE(aspell_new, NULL)
PHP_FE(aspell_check, NULL)
@@ -44,6 +46,7 @@ function_entry aspell_functions[] = {
PHP_FE(aspell_suggest, NULL)
{NULL, NULL, NULL}
};
+/* }}} */
static int le_aspell;
@@ -51,24 +54,27 @@ zend_module_entry aspell_module_entry = {
"aspell", aspell_functions, PHP_MINIT(aspell), NULL, NULL, NULL, PHP_MINFO(aspell), STANDARD_MODULE_PROPERTIES
};
-
#ifdef COMPILE_DL_ASPELL
ZEND_GET_MODULE(aspell)
#endif
+/* {{{ php_aspell_close
+ */
static void php_aspell_close(zend_rsrc_list_entry *rsrc)
{
aspell *sc = (aspell *)rsrc->ptr;
aspell_free(sc);
}
+/* }}} */
-
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(aspell)
{
le_aspell = zend_register_list_destructors_ex(php_aspell_close, NULL, "aspell", module_number);
return SUCCESS;
-
}
+/* }}} */
/* {{{ proto int aspell_new(string master [, string personal])
Load a dictionary */
@@ -97,7 +103,6 @@ PHP_FUNCTION(aspell_new)
}
/* }}} */
-
/* {{{ proto array aspell_suggest(aspell int, string word)
Return array of Suggestions */
PHP_FUNCTION(aspell_suggest)
@@ -199,11 +204,22 @@ PHP_FUNCTION(aspell_check_raw)
}
/* }}} */
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(aspell)
{
php_info_print_table_start();
php_info_print_table_row(2, "ASpell Support", "enabled");
php_info_print_table_end();
}
+/* }}} */
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/crack/crack.c b/ext/crack/crack.c
index f63b740f9c..7aaa200573 100644
--- a/ext/crack/crack.c
+++ b/ext/crack/crack.c
@@ -259,4 +259,5 @@ ZEND_FUNCTION(crack_getlastmessage)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/ctype/ctype.c b/ext/ctype/ctype.c
index 8c88e7d9c0..c8a1f7c6a9 100644
--- a/ext/ctype/ctype.c
+++ b/ext/ctype/ctype.c
@@ -41,8 +41,9 @@ ZEND_DECLARE_MODULE_GLOBALS(ctype)
/* True global resources - no need for thread safety here */
static int le_ctype;
-/* Every user visible function must have an entry in ctype_functions[].
-*/
+/* {{{ ctype_functions[]
+ * Every user visible function must have an entry in ctype_functions[].
+ */
function_entry ctype_functions[] = {
PHP_FE(ctype_alnum, NULL)
PHP_FE(ctype_alpha, NULL)
@@ -57,7 +58,10 @@ function_entry ctype_functions[] = {
PHP_FE(ctype_xdigit, NULL)
{NULL, NULL, NULL} /* Must be the last line in ctype_functions[] */
};
+/* }}} */
+/* {{{ ctype_mpodule_entry
+ */
zend_module_entry ctype_module_entry = {
"ctype",
ctype_functions,
@@ -68,6 +72,7 @@ zend_module_entry ctype_module_entry = {
PHP_MINFO(ctype),
STANDARD_MODULE_PROPERTIES
};
+/* }}} */
#ifdef COMPILE_DL_CTYPE
ZEND_GET_MODULE(ctype)
@@ -77,7 +82,8 @@ ZEND_GET_MODULE(ctype)
#define PHP_EXPERIMENTAL(x,y)
#endif
-
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(ctype)
{
ELS_FETCH();
@@ -87,8 +93,10 @@ PHP_MINFO_FUNCTION(ctype)
php_info_print_table_row(2, "ctype functions", "enabled (experimental)");
php_info_print_table_end();
}
+/* }}} */
-
+/* {{{ ctype
+ */
static int ctype(int (*iswhat)(int),zval **c)
{
switch ((*c)->type) {
@@ -111,6 +119,7 @@ static int ctype(int (*iswhat)(int),zval **c)
}
return 0;
}
+/* }}} */
/* {{{ proto bool isalnum(mixed c)
Check for alphanumeric character(s) */
@@ -310,13 +319,12 @@ PHP_FUNCTION(ctype_xdigit)
}
/* }}} */
-
#endif /* HAVE_CTYPE */
-
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/curl/curl.c b/ext/curl/curl.c
index 49ad7f2b35..0d159e8ccd 100644
--- a/ext/curl/curl.c
+++ b/ext/curl/curl.c
@@ -48,6 +48,8 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc);
#define SAVE_CURL_ERROR(__handle, __err) (__handle)->err.no = (int) __err;
+/* {{{ curl_functions[]
+ */
function_entry curl_functions[] = {
PHP_FE(curl_init, NULL)
PHP_FE(curl_version, NULL)
@@ -59,7 +61,10 @@ function_entry curl_functions[] = {
PHP_FE(curl_close, NULL)
{NULL, NULL, NULL}
};
+/* }}} */
+/* {{{ curl_module_entry
+ */
zend_module_entry curl_module_entry = {
"curl",
curl_functions,
@@ -70,11 +75,14 @@ zend_module_entry curl_module_entry = {
PHP_MINFO(curl),
STANDARD_MODULE_PROPERTIES
};
+/* }}} */
#ifdef COMPILE_DL_CURL
ZEND_GET_MODULE (curl)
#endif
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(curl)
{
php_info_print_table_start();
@@ -82,9 +90,12 @@ PHP_MINFO_FUNCTION(curl)
php_info_print_table_row(2, "CURL Information", curl_version());
php_info_print_table_end();
}
+/* }}} */
#define REGISTER_CURL_CONSTANT(name, value) REGISTER_LONG_CONSTANT(name, value, CONST_CS | CONST_PERSISTENT)
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(curl)
{
le_curl = zend_register_list_destructors_ex(_php_curl_close, NULL, "curl", module_number);
@@ -230,6 +241,7 @@ PHP_MINIT_FUNCTION(curl)
return SUCCESS;
}
+/* }}} */
#define PHP_CURL_STDOUT 0
#define PHP_CURL_FILE 1
@@ -239,6 +251,8 @@ PHP_MINIT_FUNCTION(curl)
#define PHP_CURL_ASCII 5
#define PHP_CURL_BINARY 6
+/* {{{ curl_write
+ */
static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
{
php_curl *ch = (php_curl *) ctx;
@@ -290,7 +304,10 @@ static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
return length;
}
+/* }}} */
+/* {{{ curl_read
+ */
static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
{
php_curl *ch = (php_curl *) ctx;
@@ -341,7 +358,10 @@ static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
return length;
}
+/* }}} */
+/* {{{ _php_curl_write_header
+ */
static size_t _php_curl_write_header(char *data, size_t size, size_t nmemb, void *ctx)
{
php_curl *ch = (php_curl *) ctx;
@@ -377,7 +397,10 @@ static size_t _php_curl_write_header(char *data, size_t size, size_t nmemb, void
return length;
}
+/* }}} */
+/* {{{ _php_curl_passwd
+ */
static size_t _php_curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
{
php_curl *ch = (php_curl *) ctx;
@@ -419,23 +442,31 @@ static size_t _php_curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
return 0;
}
-
-
+/* }}} */
+/* {{{ curl_free_string
+ */
static void curl_free_string(void **string)
{
efree(*string);
-}
+}
+/* }}} */
+/* {{{ curl_free_post
+ */
static void curl_free_post(void **post)
{
curl_formfree((struct HttpPost *) *post);
}
+/* }}} */
+/* {{{ curl_free_slist
+ */
static void curl_free_slist(void **slist)
{
curl_slist_free_all((struct curl_slist *) *slist);
}
+/* }}} */
/* {{{ proto string curl_version(void)
Return the CURL version string. */
@@ -445,6 +476,8 @@ PHP_FUNCTION(curl_version)
}
/* }}} */
+/* {{{ alloc_curl_handle
+ */
static void alloc_curl_handle(php_curl **ch)
{
*ch = emalloc(sizeof(php_curl));
@@ -459,6 +492,7 @@ static void alloc_curl_handle(php_curl **ch)
zend_llist_init(&(*ch)->to_free.post, sizeof(struct HttpPost),
(void(*)(void *)) curl_free_post, 0);
}
+/* }}} */
/* {{{ proto int curl_init([string url])
Initialize a CURL session */
@@ -939,3 +973,11 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc)
/* }}} */
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/cybercash/cybercash.c b/ext/cybercash/cybercash.c
index 4cf2c44b72..9e7016b82c 100644
--- a/ext/cybercash/cybercash.c
+++ b/ext/cybercash/cybercash.c
@@ -28,6 +28,8 @@
+----------------------------------------------------------------------+
*/
+/* $Id$ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -40,6 +42,8 @@
#include "mckcrypt.h"
#include "base64.h"
+/* {{{ cybercash_functions[]
+ */
function_entry cybercash_functions[] = {
PHP_FE(cybercash_encr, NULL)
PHP_FE(cybercash_decr, NULL)
@@ -47,7 +51,10 @@ function_entry cybercash_functions[] = {
PHP_FE(cybercash_base64_decode, NULL)
{NULL, NULL, NULL}
};
+/* }}} */
+/* {{{ cybercash_module_entry
+ */
zend_module_entry cybercash_module_entry = {
"cybercash",
cybercash_functions,
@@ -58,18 +65,24 @@ zend_module_entry cybercash_module_entry = {
PHP_MINFO(cybercash),
STANDARD_MODULE_PROPERTIES,
};
+/* }}} */
#ifdef COMPILE_DL_CYBERCASH
ZEND_GET_MODULE(cybercash)
#endif
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(cybercash)
{
php_info_print_table_start();
php_info_print_table_row(2, "Cybercash Support", "enabled");
php_info_print_table_end();
}
+/* }}} */
+/* {{{ proto cybercash_encr(string wmk, string sk, string data)
+ Cybercash encrypt */
PHP_FUNCTION(cybercash_encr)
{
zval **wmk, **sk, **inbuff;
@@ -116,7 +129,10 @@ PHP_FUNCTION(cybercash_encr)
efree(macbuff);
}
}
+/* }}} */
+/* {{{ proto array cybercash_decr(string wmp, string sk, string data)
+ Cybercash decrypt */
PHP_FUNCTION(cybercash_decr)
{
zval **wmk,**sk,**inbuff;
@@ -164,7 +180,10 @@ PHP_FUNCTION(cybercash_decr)
efree(macbuff);
}
}
+/* }}} */
+/* {{{ proto string cybercash_base64_encode(string data)
+ base64 encode data for cybercash */
PHP_FUNCTION(cybercash_base64_encode)
{
zval **inbuff;
@@ -185,7 +204,10 @@ PHP_FUNCTION(cybercash_base64_encode)
RETURN_STRINGL(outbuff, ret_length, 0);
}
+/* }}} */
+/* {{{ proto string cybercash_base64_decode(string data)
+ base64 decode data for cybercash */
PHP_FUNCTION(cybercash_base64_decode)
{
zval **inbuff;
@@ -204,4 +226,13 @@ PHP_FUNCTION(cybercash_base64_decode)
RETURN_STRINGL(outbuff, ret_length, 0);
}
+/* }}} */
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/cybermut/cybermut.c b/ext/cybermut/cybermut.c
index 239bc69aa5..6afcc7e47d 100644
--- a/ext/cybermut/cybermut.c
+++ b/ext/cybermut/cybermut.c
@@ -13,10 +13,11 @@
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Sylvain PAGES <spages@free.fr> |
- | |
+----------------------------------------------------------------------+
*/
+/* $Id$ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -34,103 +35,53 @@ ZEND_DECLARE_MODULE_GLOBALS(cybermut)
/* True global resources - no need for thread safety here */
static int le_cybermut;
-/* Every user visible function must have an entry in cybermut_functions[].
-*/
+/* {{{ cybermut_functions[]
+ */
function_entry cybermut_functions[] = {
- PHP_FE(confirm_cybermut_compiled, NULL) /* For testing, remove later. */
PHP_FE(cybermut_creerformulairecm, NULL)
PHP_FE(cybermut_testmac, NULL)
PHP_FE(cybermut_creerreponsecm, NULL)
{NULL, NULL, NULL} /* Must be the last line in cybermut_functions[] */
};
+/* }}} */
+/* {{{ cybermut_module_entry
+ */
zend_module_entry cybermut_module_entry = {
"cybermut",
cybermut_functions,
PHP_MINIT(cybermut),
PHP_MSHUTDOWN(cybermut),
- PHP_RINIT(cybermut), /* Replace with NULL if there's nothing to do at request start */
- PHP_RSHUTDOWN(cybermut), /* Replace with NULL if there's nothing to do at request end */
+ NULL,
+ NULL,
PHP_MINFO(cybermut),
STANDARD_MODULE_PROPERTIES
};
+/* }}} */
#ifdef COMPILE_DL_CYBERMUT
ZEND_GET_MODULE(cybermut)
#endif
-/* Remove comments and fill if you need to have entries in php.ini
-PHP_INI_BEGIN()
-PHP_INI_END()
-*/
-
PHP_MINIT_FUNCTION(cybermut)
{
-/* Remove comments if you have entries in php.ini
- REGISTER_INI_ENTRIES();
-*/
return SUCCESS;
}
PHP_MSHUTDOWN_FUNCTION(cybermut)
{
-/* Remove comments if you have entries in php.ini
- UNREGISTER_INI_ENTRIES();
-*/
- return SUCCESS;
-}
-
-/* Remove if there's nothing to do at request start */
-PHP_RINIT_FUNCTION(cybermut)
-{
- return SUCCESS;
-}
-
-/* Remove if there's nothing to do at request end */
-PHP_RSHUTDOWN_FUNCTION(cybermut)
-{
return SUCCESS;
}
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(cybermut)
{
php_info_print_table_start();
php_info_print_table_header(2, "cybermut support", "enabled");
php_info_print_table_end();
-
- /* Remove comments if you have entries in php.ini
- DISPLAY_INI_ENTRIES();
- */
-}
-
-/* Remove the following function when you have succesfully modified config.m4
- so that your module can be compiled into PHP, it exists only for testing
- purposes. */
-
-/* Every user-visible function in PHP should document itself in the source */
-/* {{{ proto string confirm_cybermut_compiled(string arg)
- Return a string to confirm that the module is compiled in */
-PHP_FUNCTION(confirm_cybermut_compiled)
-{
- zval **arg;
- int len;
- char string[256];
-
- if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &arg) == FAILURE) {
- WRONG_PARAM_COUNT;
- }
-
- convert_to_string_ex(arg);
-
- len = sprintf(string, "Congratulations, you have successfully modified ext/cybermut/config.m4, module %s is compiled into PHP", Z_STRVAL_PP(arg));
- RETURN_STRINGL(string, len, 1);
}
/* }}} */
-/* The previous line is meant for emacs, so it can correctly fold and unfold
- functions in source code. See the corresponding marks just before function
- definition, where the functions purpose is also documented. Please follow
- this convention for the convenience of others editing your code.
-*/
/* {{{ proto string cybermut_creerformulairecm(string url_CM, string version, string TPE, string montant, string ref_commande, string texte_libre, string url_retour, string url_retour_ok, string url_retour_err, string langue, string code_societe, string texte_bouton)
Return a string containing source HTML of the form of request for payment.
@@ -222,11 +173,10 @@ PHP_FUNCTION(cybermut_creerreponsecm)
}
/* }}} */
-
-
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/db/db.c b/ext/db/db.c
index 26f3b7917e..02cc441407 100644
--- a/ext/db/db.c
+++ b/ext/db/db.c
@@ -103,6 +103,8 @@
#define DBM_FIRSTKEY(dbf) dbm_firstkey(dbf)
#define DBM_NEXTKEY(dbf, key) dbm_nextkey(dbf)
+/* {{{ php_dbm_key_exists
+ */
static int php_dbm_key_exists(DBM *dbf, datum key_datum) {
datum value_datum;
int ret;
@@ -114,6 +116,7 @@ static int php_dbm_key_exists(DBM *dbf, datum key_datum) {
ret = 0;
return ret;
}
+/* }}} */
#endif
#if !NDBM && !GDBM
@@ -163,6 +166,8 @@ static int numthreads=0;
/*needed for blocking calls in windows*/
void *dbm_mutex;
+/* {{{ php_find_dbm
+ */
dbm_info *php_find_dbm(pval *id)
{
list_entry *le;
@@ -193,7 +198,10 @@ dbm_info *php_find_dbm(pval *id)
return NULL;
return info;
}
+/* }}} */
+/* {{{ php_get_info_db
+ */
static char *php_get_info_db(void)
{
static char temp1[128];
@@ -228,8 +236,10 @@ static char *php_get_info_db(void)
return temp;
}
+/* }}} */
-
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(db)
{
/* this isn't pretty ... should break out the info a bit more (cmv) */
@@ -237,6 +247,7 @@ PHP_MINFO_FUNCTION(db)
php_printf(php_get_info_db());
php_info_print_box_end();
}
+/* }}} */
/* {{{ proto string dblist(void)
Describes the dbm-compatible library being used */
@@ -271,7 +282,8 @@ PHP_FUNCTION(dbmopen) {
}
/* }}} */
-
+/* {{{ php_dbm_open
+ */
dbm_info *php_dbm_open(char *filename, char *mode) {
dbm_info *info;
int ret, lock=0;
@@ -408,6 +420,7 @@ dbm_info *php_dbm_open(char *filename, char *mode) {
return NULL;
}
+/* }}} */
/* {{{ proto bool dbmclose(int dbm_identifier)
Closes a dbm database */
@@ -427,6 +440,8 @@ PHP_FUNCTION(dbmclose) {
}
/* }}} */
+/* {{{ php_dbm_close
+ */
int php_dbm_close(zend_rsrc_list_entry *rsrc) {
int ret = 0;
dbm_info *info = (dbm_info *)rsrc->ptr;
@@ -454,7 +469,8 @@ int php_dbm_close(zend_rsrc_list_entry *rsrc) {
efree(info);
return(ret);
-}
+}
+/* }}} */
/*
* ret = -1 means that database was opened for read-only
@@ -487,7 +503,8 @@ PHP_FUNCTION(dbminsert)
/* }}} */
-
+/* {{{ php_dbm_insert
+ */
int php_dbm_insert(dbm_info *info, char *key, char *value) {
datum key_datum, value_datum;
int ret;
@@ -517,7 +534,8 @@ int php_dbm_insert(dbm_info *info, char *key, char *value) {
efree(key_datum.dptr); efree(value_datum.dptr);
return(ret);
-}
+}
+/* }}} */
/* {{{ proto int dbmreplace(int dbm_identifier, string key, string value)
Replaces the value for a key in a dbm database */
@@ -544,6 +562,8 @@ PHP_FUNCTION(dbmreplace)
}
/* }}} */
+/* {{{ php_dbm_replace
+ */
int php_dbm_replace(dbm_info *info, char *key, char *value) {
DBM_TYPE dbf;
int ret;
@@ -576,7 +596,8 @@ int php_dbm_replace(dbm_info *info, char *key, char *value) {
efree(key_datum.dptr); efree(value_datum.dptr);
return(ret);
-}
+}
+/* }}} */
/* {{{ proto string dbmfetch(int dbm_identifier, string key)
Fetches a value for a key from a dbm database */
@@ -606,6 +627,8 @@ PHP_FUNCTION(dbmfetch)
}
/* }}} */
+/* {{{ php_dbm_fetch
+ */
char *php_dbm_fetch(dbm_info *info, char *key) {
datum key_datum, value_datum;
char *ret;
@@ -650,6 +673,7 @@ char *php_dbm_fetch(dbm_info *info, char *key) {
}
return(ret);
}
+/* }}} */
/* {{{ proto int dbmexists(int dbm_identifier, string key)
Tells if a value exists for a key in a dbm database */
@@ -675,6 +699,8 @@ PHP_FUNCTION(dbmexists)
}
/* }}} */
+/* {{{ php_dbm_exists
+ */
int php_dbm_exists(dbm_info *info, char *key) {
datum key_datum;
int ret;
@@ -696,6 +722,7 @@ int php_dbm_exists(dbm_info *info, char *key) {
return(ret);
}
+/* }}} */
/* {{{ proto int dbmdelete(int dbm_identifier, string key)
Deletes the value for a key from a dbm database */
@@ -721,6 +748,8 @@ PHP_FUNCTION(dbmdelete)
}
/* }}} */
+/* {{{ php_dbm_delete
+ */
int php_dbm_delete(dbm_info *info, char *key) {
datum key_datum;
int ret;
@@ -741,6 +770,7 @@ int php_dbm_delete(dbm_info *info, char *key) {
ret = DBM_DELETE(dbf, key_datum);
return(ret);
}
+/* }}} */
/* {{{ proto string dbmfirstkey(int dbm_identifier)
Retrieves the first key from a dbm database */
@@ -769,6 +799,8 @@ PHP_FUNCTION(dbmfirstkey)
}
/* }}} */
+/* {{{ php_dbm_first_key
+ */
char *php_dbm_first_key(dbm_info *info) {
datum ret_datum;
char *ret;
@@ -799,6 +831,7 @@ char *php_dbm_first_key(dbm_info *info) {
return (ret);
}
+/* }}} */
/* {{{ proto string dbmnextkey(int dbm_identifier, string key)
Retrieves the next key from a dbm database */
@@ -828,7 +861,8 @@ PHP_FUNCTION(dbmnextkey)
}
/* }}} */
-
+/* {{{ php_dbm_nextkey
+ */
char *php_dbm_nextkey(dbm_info *info, char *key) {
datum key_datum, ret_datum;
char *ret;
@@ -873,11 +907,12 @@ char *php_dbm_nextkey(dbm_info *info, char *key) {
}
return(ret);
}
-
+/* }}} */
#if !GDBM && !NDBM
static long CurrentFlatFilePos = 0L;
-
+/* {{{ flatfile_store
+ */
int flatfile_store(FILE *dbf, datum key_datum, datum value_datum, int mode) {
int ret;
@@ -905,7 +940,10 @@ int flatfile_store(FILE *dbf, datum key_datum, datum value_datum, int mode) {
ret=0;
return ret;
}
+/* }}} */
+/* {{{ flatfile_fetch
+ */
datum flatfile_fetch(FILE *dbf, datum key_datum) {
datum value_datum = {NULL, 0};
int num=0, buf_size=1024;
@@ -926,7 +964,10 @@ datum flatfile_fetch(FILE *dbf, datum key_datum) {
}
return value_datum;
}
+/* }}} */
+/* {{{ flatfile_delete
+ */
int flatfile_delete(FILE *dbf, datum key_datum) {
char *key = key_datum.dptr;
int size = key_datum.dsize;
@@ -981,7 +1022,10 @@ int flatfile_delete(FILE *dbf, datum key_datum) {
if (buf) efree(buf);
return FAILURE;
}
+/* }}} */
+/* {{{ flatfile_findkey
+ */
int flatfile_findkey(FILE *dbf, datum key_datum) {
char *buf = NULL;
int num;
@@ -1023,8 +1067,11 @@ int flatfile_findkey(FILE *dbf, datum key_datum) {
}
if (buf) efree(buf);
return(ret);
-}
+}
+/* }}} */
+/* {{{ flatfile_firstkey
+ */
datum flatfile_firstkey(FILE *dbf) {
datum buf;
int num;
@@ -1060,8 +1107,11 @@ datum flatfile_firstkey(FILE *dbf) {
if (buf.dptr) efree(buf.dptr);
buf.dptr = NULL;
return(buf);
-}
+}
+/* }}} */
+/* {{{ latfile_nextkey
+ */
datum flatfile_nextkey(FILE *dbf) {
datum buf;
int num;
@@ -1098,9 +1148,11 @@ datum flatfile_nextkey(FILE *dbf) {
buf.dptr = NULL;
return(buf);
}
+/* }}} */
#endif
-
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(db)
{
#if defined(THREAD_SAFE)
@@ -1125,7 +1177,10 @@ PHP_MINIT_FUNCTION(db)
le_db = zend_register_list_destructors_ex(php_dbm_close, NULL, "dbm", module_number);
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_MSHUTDOWN_FUNCTION
+ */
static PHP_MSHUTDOWN_FUNCTION(db)
{
#ifdef THREAD_SAFE
@@ -1142,7 +1197,10 @@ static PHP_MSHUTDOWN_FUNCTION(db)
#endif
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_RINIT_FUNCTION
+ */
PHP_RINIT_FUNCTION(db)
{
#if !GDBM && !NDBM
@@ -1150,8 +1208,10 @@ PHP_RINIT_FUNCTION(db)
#endif
return SUCCESS;
}
+/* }}} */
-
+/* {{{ dbm_functions[]
+ */
function_entry dbm_functions[] = {
PHP_FE(dblist, NULL)
PHP_FE(dbmopen, NULL)
@@ -1165,6 +1225,7 @@ function_entry dbm_functions[] = {
PHP_FE(dbmnextkey, NULL)
{NULL,NULL,NULL}
};
+/* }}} */
zend_module_entry dbm_module_entry = {
"db", dbm_functions, PHP_MINIT(db), PHP_MSHUTDOWN(db), PHP_RINIT(db), NULL, PHP_MINFO(db), STANDARD_MODULE_PROPERTIES
@@ -1181,4 +1242,5 @@ ZEND_GET_MODULE(dbm)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/dba/dba.c b/ext/dba/dba.c
index 54f337177f..b72c9eae0f 100644
--- a/ext/dba/dba.c
+++ b/ext/dba/dba.c
@@ -47,6 +47,8 @@
#include "php_db2.h"
#include "php_db3.h"
+/* {{{ dba_functions[]
+ */
function_entry dba_functions[] = {
PHP_FE(dba_open, NULL)
PHP_FE(dba_popen, NULL)
@@ -62,6 +64,7 @@ function_entry dba_functions[] = {
PHP_FE(dba_sync, NULL)
{NULL,NULL,NULL}
};
+/* }}} */
static PHP_MINIT_FUNCTION(dba);
static PHP_MSHUTDOWN_FUNCTION(dba);
@@ -179,9 +182,8 @@ static int le_pdb;
static HashTable ht_keys;
/* }}} */
-/* {{{ helper routines */
- /* {{{ dba_close */
-
+/* {{{ dba_close
+ */
static void dba_close(dba_info *info)
{
if(info->hnd) info->hnd->close(info);
@@ -190,12 +192,17 @@ static void dba_close(dba_info *info)
}
/* }}} */
+/* {{{ dba_close_rsrc
+ */
static void dba_close_rsrc(zend_rsrc_list_entry *rsrc)
{
dba_info *info = (dba_info *)rsrc->ptr;
dba_close(info);
}
+/* }}} */
+/* {{{ PHP_MINIT_FUNCTION
+ */
static PHP_MINIT_FUNCTION(dba)
{
zend_hash_init(&ht_keys, 0, NULL, NULL, 1);
@@ -203,15 +210,21 @@ static PHP_MINIT_FUNCTION(dba)
GLOBAL(le_pdb) = zend_register_list_destructors_ex(NULL, dba_close_rsrc, "dba persistent", module_number);
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_MSHUTDOWN_FUNCTION
+ */
static PHP_MSHUTDOWN_FUNCTION(dba)
{
zend_hash_destroy(&ht_keys);
return SUCCESS;
}
+/* }}} */
#include "ext/standard/php_smart_str.h"
+/* {{{ PHP_MINFO_FUNCTION
+ */
static PHP_MINFO_FUNCTION(dba)
{
dba_handler *hptr;
@@ -233,8 +246,10 @@ static PHP_MINFO_FUNCTION(dba)
}
php_info_print_table_end();
}
+/* }}} */
-
+/* {{{ php_dba_update
+ */
static void php_dba_update(INTERNAL_FUNCTION_PARAMETERS, int mode)
{
DBA_ID_PARS;
@@ -253,9 +268,12 @@ static void php_dba_update(INTERNAL_FUNCTION_PARAMETERS, int mode)
RETURN_TRUE;
RETURN_FALSE;
}
+/* }}} */
#define FREENOW if(args) efree(args); if(key) efree(key)
+/* {{{ php_dba_open
+ */
static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
{
pval ***args = (pval ***) NULL;
@@ -355,9 +373,8 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
FREENOW;
RETURN_LONG(listid);
}
-#undef FREENOW
-/* }}} */
/* }}} */
+#undef FREENOW
/* {{{ proto int dba_popen(string path, string mode, string handlername [, string ...])
Opens path using the specified handler in mode persistently */
@@ -501,3 +518,11 @@ PHP_FUNCTION(dba_sync)
/* }}} */
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/dba/dba_cdb.c b/ext/dba/dba_cdb.c
index ab54d12da6..f9edfae777 100644
--- a/ext/dba/dba_cdb.c
+++ b/ext/dba/dba_cdb.c
@@ -218,3 +218,11 @@ DBA_SYNC_FUNC(cdb)
}
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/dba/dba_db2.c b/ext/dba/dba_db2.c
index 2c6fcb8ace..7f0f23d47c 100644
--- a/ext/dba/dba_db2.c
+++ b/ext/dba/dba_db2.c
@@ -199,3 +199,11 @@ DBA_SYNC_FUNC(db2)
}
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/dba/dba_db3.c b/ext/dba/dba_db3.c
index e0832a86a0..60012ccc23 100644
--- a/ext/dba/dba_db3.c
+++ b/ext/dba/dba_db3.c
@@ -206,3 +206,11 @@ DBA_SYNC_FUNC(db3)
}
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/dba/dba_dbm.c b/ext/dba/dba_dbm.c
index ede05a47ca..554c92e559 100644
--- a/ext/dba/dba_dbm.c
+++ b/ext/dba/dba_dbm.c
@@ -184,3 +184,11 @@ DBA_SYNC_FUNC(dbm)
}
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/dba/dba_gdbm.c b/ext/dba/dba_gdbm.c
index 85666991bb..b4fd5bf1bb 100644
--- a/ext/dba/dba_gdbm.c
+++ b/ext/dba/dba_gdbm.c
@@ -187,3 +187,11 @@ DBA_SYNC_FUNC(gdbm)
return SUCCESS;
}
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/dba/dba_ndbm.c b/ext/dba/dba_ndbm.c
index 45652e3b54..4722ce91a4 100644
--- a/ext/dba/dba_ndbm.c
+++ b/ext/dba/dba_ndbm.c
@@ -164,3 +164,11 @@ DBA_SYNC_FUNC(ndbm)
return SUCCESS;
}
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/dbase/dbase.c b/ext/dbase/dbase.c
index e8ecf09eb8..885eb47dbc 100644
--- a/ext/dbase/dbase.c
+++ b/ext/dbase/dbase.c
@@ -16,6 +16,8 @@
+----------------------------------------------------------------------+
*/
+/* $Id$ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -731,6 +733,8 @@ PHP_FUNCTION(dbase_create) {
}
/* }}} */
+/* {{{ dbase_functions[]
+ */
function_entry dbase_functions[] = {
PHP_FE(dbase_open, NULL)
PHP_FE(dbase_create, NULL)
@@ -745,6 +749,7 @@ function_entry dbase_functions[] = {
PHP_FE(dbase_pack, NULL)
{NULL, NULL, NULL}
};
+/* }}} */
zend_module_entry dbase_module_entry = {
"dbase", dbase_functions, PHP_MINIT(dbase), PHP_MSHUTDOWN(dbase), NULL, NULL, NULL, STANDARD_MODULE_PROPERTIES
@@ -768,9 +773,11 @@ BOOL WINAPI DllMain(HANDLE hModule,
#endif
#endif
+
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/ereg/ereg.c b/ext/ereg/ereg.c
index 86bdec78a7..e8896f5f7d 100644
--- a/ext/ereg/ereg.c
+++ b/ext/ereg/ereg.c
@@ -609,7 +609,6 @@ PHP_FUNCTION(spliti)
/* }}} */
-
/* {{{ proto string sql_regcase(string string)
Make regular expression for case insensitive match */
PHPAPI PHP_FUNCTION(sql_regcase)
@@ -646,11 +645,10 @@ PHPAPI PHP_FUNCTION(sql_regcase)
}
/* }}} */
-
-
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/exif/exif.c b/ext/exif/exif.c
index b4d0d18889..144a581a50 100644
--- a/ext/exif/exif.c
+++ b/ext/exif/exif.c
@@ -57,7 +57,8 @@ typedef unsigned char uchar;
#define FALSE 0
#endif
-/*
+
+/* {{{ structs
This structure stores Exif header image elements in a simple manner
Used to store camera data as extracted from the various ways that it can be
stored in a nexif header
@@ -108,17 +109,23 @@ typedef struct {
int Type;
unsigned Size;
} Section_t;
+/* }}} */
#define EXIT_FAILURE 1
#define EXIT_SUCCESS 0
+/* {{{ exif_functions[]
+ */
function_entry exif_functions[] = {
PHP_FE(read_exif_data, NULL)
{NULL, NULL, NULL}
};
+/* }}} */
PHP_MINFO_FUNCTION(exif);
+/* {{{ exif_module_entry
+ */
zend_module_entry exif_module_entry = {
"exif",
exif_functions,
@@ -127,18 +134,22 @@ zend_module_entry exif_module_entry = {
PHP_MINFO(exif),
STANDARD_MODULE_PROPERTIES
};
+/* }}} */
#ifdef COMPILE_DL_EXIF
ZEND_GET_MODULE(exif)
#endif
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(exif) {
php_info_print_table_start();
php_info_print_table_row(2, "EXIF Support", "enabled" );
php_info_print_table_end();
}
+/* }}} */
-/*
+/* {{{ Markers
JPEG markers consist of one or more 0xFF bytes, followed by a marker
code byte (which is not an FF). Here are the marker codes of interest
in this program. (See jdmarker.c for a more complete list.)
@@ -166,16 +177,18 @@ PHP_MINFO_FUNCTION(exif) {
#define PSEUDO_IMAGE_MARKER 0x123; /* Extra value. */
-/*
+/* }}} */
+
+/* {{{ Get16m
Get 16 bits motorola order (always) for jpeg header stuff.
*/
static int Get16m(void *Short)
{
return (((uchar *)Short)[0] << 8) | ((uchar *)Short)[1];
}
+/* }}} */
-
-/*
+/* {{{ process_COM
Process a COM marker.
We want to print out the marker contents as legible text;
we must guard against random junk and varying newline representations.
@@ -213,9 +226,10 @@ static void process_COM (ImageInfoType *ImageInfo, uchar *Data, int length)
strcpy(ImageInfo->Comments,Comment);
}
-
+/* }}} */
-/* Process a SOFn marker. This is useful for the image dimensions */
+/* {{{ process_SOFn
+ * Process a SOFn marker. This is useful for the image dimensions */
static void process_SOFn (ImageInfoType *ImageInfo, uchar *Data, int marker)
{
int data_precision, num_components;
@@ -249,8 +263,9 @@ static void process_SOFn (ImageInfoType *ImageInfo, uchar *Data, int marker)
default: process = "Unknown"; break;
}
}
+/* }}} */
-/*
+/* {{{ format description defines
Describes format descriptor
*/
static int ExifBytesPerFormat[] = {0,1,1,2,4,8,1,1,2,4,8,4,8};
@@ -318,7 +333,10 @@ static int ExifBytesPerFormat[] = {0,1,1,2,4,8,1,1,2,4,8,4,8};
#define TAG_FOCALPLANEXRES 0xa20E
#define TAG_FOCALPLANEUNITS 0xa210
#define TAG_IMAGEWIDTH 0xA002
+/* }}} */
+/* {{{ TabTable[]
+ */
static const struct {
unsigned short Tag;
char *Desc;
@@ -408,10 +426,10 @@ static const struct {
{ 0xA301, "SceneType"},
{ 0, NULL}
} ;
+/* }}} */
-
-
-/* Convert a 16 bit unsigned value from file's native byte order */
+/* {{{ Get16u
+ * Convert a 16 bit unsigned value from file's native byte order */
static int Get16u(void *Short, int MotorolaOrder)
{
if (MotorolaOrder) {
@@ -420,8 +438,10 @@ static int Get16u(void *Short, int MotorolaOrder)
return (((uchar *)Short)[1] << 8) | ((uchar *)Short)[0];
}
}
+/* }}} */
-/* Convert a 32 bit signed value from file's native byte order */
+/* {{{ Get32s
+ * Convert a 32 bit signed value from file's native byte order */
static int Get32s(void *Long, int MotorolaOrder)
{
if (MotorolaOrder) {
@@ -432,14 +452,18 @@ static int Get32s(void *Long, int MotorolaOrder)
| (((uchar *)Long)[1] << 8 ) | (((uchar *)Long)[0] << 0 );
}
}
+/* }}} */
-/* Convert a 32 bit unsigned value from file's native byte order */
+/* {{{ Get32u
+ * Convert a 32 bit unsigned value from file's native byte order */
static unsigned Get32u(void *Long, int MotorolaOrder)
{
return (unsigned)Get32s(Long, MotorolaOrder) & 0xffffffff;
}
+/* }}} */
-/* Evaluate number, be it int, rational, or float from directory. */
+/* {{{ ConvertAnyFormat
+ * Evaluate number, be it int, rational, or float from directory. */
static double ConvertAnyFormat(void *ValuePtr, int Format, int MotorolaOrder)
{
double Value;
@@ -475,8 +499,10 @@ static double ConvertAnyFormat(void *ValuePtr, int Format, int MotorolaOrder)
}
return Value;
}
+/* }}} */
-/* Grab the thumbnail - by Matt Bonneau */
+/* {{{ ExtractThumbnail
+ * Grab the thumbnail - by Matt Bonneau */
static void ExtractThumbnail(ImageInfoType *ImageInfo, char *OffsetBase, unsigned ExifLength) {
/* according to exif2.1, the thumbnail is not supposed to be greater than 64K */
if (ImageInfo->ThumbnailSize > 65536) {
@@ -495,8 +521,10 @@ static void ExtractThumbnail(ImageInfoType *ImageInfo, char *OffsetBase, unsigne
}
}
}
+/* }}} */
-/* Process one of the nested EXIF directories. */
+/* {{{ ProcessExifDir
+ * Process one of the nested EXIF directories. */
static void ProcessExifDir(ImageInfoType *ImageInfo, char *DirStart, char *OffsetBase, unsigned ExifLength, char *LastExifRefd)
{
int de;
@@ -767,8 +795,9 @@ static void ProcessExifDir(ImageInfoType *ImageInfo, char *DirStart, char *Offse
ProcessExifDir(ImageInfo, OffsetBase + NextDirOffset, OffsetBase, ExifLength, LastExifRefd);
}
}
+/* }}} */
-/*
+/* {{{ process_EXIF
Process an EXIF marker
Describes all the drivel that most digital cameras include...
*/
@@ -821,8 +850,10 @@ static void process_EXIF (ImageInfoType *ImageInfo, char *CharBuf, unsigned int
ImageInfo->CCDWidth = (float)(ImageInfo->ExifImageWidth * ImageInfo->FocalplaneUnits / ImageInfo->FocalplaneXRes);
}
}
-
-/* Parse the marker stream until SOS or EOI is seen; */
+/* }}} */
+
+/* {{{ scan_JPEG_header
+ * Parse the marker stream until SOS or EOI is seen; */
static int scan_JPEG_header (ImageInfoType *ImageInfo, FILE *infile, Section_t *Sections, int *SectionsRead, int ReadAll, char *LastExifRefd)
{
int a;
@@ -953,8 +984,9 @@ static int scan_JPEG_header (ImageInfoType *ImageInfo, FILE *infile, Section_t *
}
return TRUE;
}
+/* }}} */
-/*
+/* {{{ DiscardData
Discard read data.
*/
void DiscardData(Section_t *Sections, int *SectionsRead)
@@ -965,8 +997,9 @@ void DiscardData(Section_t *Sections, int *SectionsRead)
}
*SectionsRead = 0;
}
+/* }}} */
-/*
+/* {{{ ReadJpegFile
Read image data.
*/
int ReadJpegFile(ImageInfoType *ImageInfo, Section_t *Sections,
@@ -1024,7 +1057,10 @@ int ReadJpegFile(ImageInfoType *ImageInfo, Section_t *Sections,
return ret;
}
+/* }}} */
+/* {{{ php_read_jpeg_exif
+ */
int php_read_jpeg_exif(ImageInfoType *ImageInfo, char *FileName, int ReadAll)
{
Section_t Sections[20];
@@ -1057,6 +1093,7 @@ int php_read_jpeg_exif(ImageInfoType *ImageInfo, char *FileName, int ReadAll)
}
return(ret);
}
+/* }}} */
/* {{{ proto string read_exif_data(string filename)
Reads the EXIF header data from a JPEG file */
@@ -1181,6 +1218,7 @@ PHP_FUNCTION(read_exif_data) {
add_assoc_string(return_value,"CameraId",ImageInfo.CameraId,1);
}
}
+/* }}} */
#endif
diff --git a/ext/fdf/fdf.c b/ext/fdf/fdf.c
index 2a003130c7..7629c6e87f 100644
--- a/ext/fdf/fdf.c
+++ b/ext/fdf/fdf.c
@@ -42,6 +42,8 @@ static int le_fdf;
SAPI_POST_HANDLER_FUNC(fdf_post_handler);
+/* {{{ fdf_functions[]
+ */
function_entry fdf_functions[] = {
PHP_FE(fdf_open, NULL)
PHP_FE(fdf_create, NULL)
@@ -62,6 +64,7 @@ function_entry fdf_functions[] = {
PHP_FE(fdf_set_javascript_action, NULL)
{NULL, NULL, NULL}
};
+/* }}} */
zend_module_entry fdf_module_entry = {
"fdf",
@@ -95,7 +98,8 @@ static sapi_post_entry php_fdf_post_entry = {
fdf_post_handler
};
-
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(fdf)
{
FDFErc err;
@@ -140,7 +144,10 @@ PHP_MINIT_FUNCTION(fdf)
if((err = FDFInitialize()) == FDFErcOK) return SUCCESS;
return FAILURE;
}
+/* }}} */
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(fdf)
{
/* need to use a PHPAPI function here because it is external module in windows */
@@ -149,7 +156,10 @@ PHP_MINFO_FUNCTION(fdf)
php_info_print_table_row(2, "FdfTk Version", FDFGetVersion() );
php_info_print_table_end();
}
+/* }}} */
+/* {{{ PHP_MSHUTDOWN_FUNCTION
+ */
PHP_MSHUTDOWN_FUNCTION(fdf)
{
FDFErc err;
@@ -163,7 +173,7 @@ PHP_MSHUTDOWN_FUNCTION(fdf)
if((err = FDFFinalize()) == FDFErcOK) return SUCCESS;
return FAILURE;
}
-
+/* }}} */
/* {{{ proto int fdf_open(string filename)
Opens a new FDF document */
@@ -190,7 +200,6 @@ PHP_FUNCTION(fdf_open)
}
/* }}} */
-
/* {{{ proto int fdf_create(void)
Creates a new FDF document */
PHP_FUNCTION(fdf_create)
@@ -209,7 +218,6 @@ PHP_FUNCTION(fdf_create)
}
/* }}} */
-
/* {{{ proto bool fdf_close(int fdfdoc)
Closes the FDF document */
PHP_FUNCTION(fdf_close)
@@ -226,7 +234,6 @@ PHP_FUNCTION(fdf_close)
}
/* }}} */
-
/* {{{ proto string fdf_get_value(int fdfdoc, string fieldname)
Gets the value of a field as string */
PHP_FUNCTION(fdf_get_value)
@@ -263,7 +270,6 @@ PHP_FUNCTION(fdf_get_value)
}
/* }}} */
-
/* {{{ proto bool fdf_set_value(int fdfdoc, string fieldname, string value, int isname)
Sets the value of a field */
PHP_FUNCTION(fdf_set_value)
@@ -291,7 +297,6 @@ PHP_FUNCTION(fdf_set_value)
}
/* }}} */
-
/* {{{ proto string fdf_next_field_name(int fdfdoc [, string fieldname])
Gets the name of the next field name or the first field name */
PHP_FUNCTION(fdf_next_field_name)
@@ -333,7 +338,6 @@ PHP_FUNCTION(fdf_next_field_name)
}
/* }}} */
-
/* {{{ proto bool fdf_set_ap(int fdfdoc, string fieldname, int face, string filename, int pagenr)
Sets the appearence of a field */
PHP_FUNCTION(fdf_set_ap)
@@ -383,7 +387,6 @@ PHP_FUNCTION(fdf_set_ap)
}
/* }}} */
-
/* {{{ proto bool fdf_set_status(int fdfdoc, string status)
Sets the value of /Status key */
PHP_FUNCTION(fdf_set_status)
@@ -410,7 +413,6 @@ PHP_FUNCTION(fdf_set_status)
}
/* }}} */
-
/* {{{ proto string fdf_get_status(int fdfdoc)
Gets the value of /Status key */
PHP_FUNCTION(fdf_get_status)
@@ -446,7 +448,6 @@ PHP_FUNCTION(fdf_get_status)
}
/* }}} */
-
/* {{{ proto bool fdf_set_file(int fdfdoc, string filename)
Sets the value of /F key */
PHP_FUNCTION(fdf_set_file)
@@ -473,7 +474,6 @@ PHP_FUNCTION(fdf_set_file)
}
/* }}} */
-
/* {{{ proto string fdf_get_file(int fdfdoc)
Gets the value of /F key */
PHP_FUNCTION(fdf_get_file)
@@ -509,7 +509,6 @@ PHP_FUNCTION(fdf_get_file)
}
/* }}} */
-
/* {{{ proto bool fdf_save(int fdfdoc, string filename)
Writes out the FDF file */
PHP_FUNCTION(fdf_save)
@@ -536,7 +535,6 @@ PHP_FUNCTION(fdf_save)
}
/* }}} */
-
/* {{{ proto bool fdf_add_template(int fdfdoc, int newpage, string filename, string template, int rename)
Adds a template into the FDF document */
PHP_FUNCTION(fdf_add_template)
@@ -576,7 +574,6 @@ PHP_FUNCTION(fdf_add_template)
}
/* }}} */
-
/* {{{ proto bool fdf_set_flags(int fdfdoc, string fieldname, int whichflags, int newflags)
Sets flags for a field in the FDF document */
PHP_FUNCTION(fdf_set_flags)
@@ -605,7 +602,6 @@ PHP_FUNCTION(fdf_set_flags)
}
/* }}} */
-
/* {{{ proto bool fdf_set_opt(int fdfdoc, string fieldname, int element, string value, string name)
Sets a value in the opt array for a field */
PHP_FUNCTION(fdf_set_opt)
@@ -634,7 +630,6 @@ PHP_FUNCTION(fdf_set_opt)
}
/* }}} */
-
/* {{{ proto bool fdf_set_submit_form_action(int fdfdoc, string fieldname, int whichtrigger, string url, int flags)
Sets the submit form action for a field */
PHP_FUNCTION(fdf_set_submit_form_action)
@@ -663,7 +658,6 @@ PHP_FUNCTION(fdf_set_submit_form_action)
}
/* }}} */
-
/* {{{ proto bool fdf_set_javascript_action(int fdfdoc, string fieldname, int whichtrigger, string script)
Sets the javascript action for a field */
PHP_FUNCTION(fdf_set_javascript_action)
@@ -691,7 +685,8 @@ PHP_FUNCTION(fdf_set_javascript_action)
}
/* }}} */
-/* SAPI post handler for FDF forms */
+/* {{{ SAPI_POST_HANDLER_FUNC
+ * SAPI post handler for FDF forms */
SAPI_POST_HANDLER_FUNC(fdf_post_handler)
{
FILE *fp;
@@ -760,6 +755,7 @@ SAPI_POST_HANDLER_FUNC(fdf_post_handler)
if(lastfieldname) efree(lastfieldname);
}
}
+/* }}} */
#endif
@@ -768,4 +764,5 @@ SAPI_POST_HANDLER_FUNC(fdf_post_handler)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/filepro/filepro.c b/ext/filepro/filepro.c
index 37afbbecbe..905ffdf898 100644
--- a/ext/filepro/filepro.c
+++ b/ext/filepro/filepro.c
@@ -78,7 +78,8 @@ static signed int fp_keysize = -1; /* Size of key records */
static FP_FIELD *fp_fieldlist = NULL; /* List of fields */
#endif
-
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(filepro)
{
#ifdef THREAD_SAFE
@@ -104,7 +105,10 @@ PHP_MINIT_FUNCTION(filepro)
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_MSHUTDOWN_FUNCTION
+ */
PHP_MSHUTDOWN_FUNCTION(filepro)
{
#ifdef THREAD_SAFE
@@ -125,7 +129,7 @@ PHP_MSHUTDOWN_FUNCTION(filepro)
#endif
return SUCCESS;
}
-
+/* }}} */
function_entry filepro_functions[] = {
PHP_FE(filepro, NULL)
@@ -568,4 +572,5 @@ PHP_FUNCTION(filepro_retrieve)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/fribidi/fribidi.c b/ext/fribidi/fribidi.c
index f4ac00d11e..5ff58a3841 100755
--- a/ext/fribidi/fribidi.c
+++ b/ext/fribidi/fribidi.c
@@ -13,10 +13,11 @@
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: |
- | |
+----------------------------------------------------------------------+
*/
+/* $Id$ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -41,7 +42,7 @@ ZEND_DECLARE_MODULE_GLOBALS(fribidi)
/* Every user visible function must have an entry in fribidi_functions[].
*/
function_entry fribidi_functions[] = {
- ZEND_FE(fribidi_log2vis, NULL)
+ PHP_FE(fribidi_log2vis, NULL)
{NULL, NULL, NULL} /* Must be the last line in fribidi_functions[] */
};
@@ -50,8 +51,8 @@ zend_module_entry fribidi_module_entry = {
fribidi_functions,
PHP_MINIT(fribidi),
PHP_MSHUTDOWN(fribidi),
- PHP_RINIT(fribidi), /* Replace with NULL if there's nothing to do at request start */
- PHP_RSHUTDOWN(fribidi), /* Replace with NULL if there's nothing to do at request end */
+ NULL,
+ NULL,
PHP_MINFO(fribidi),
STANDARD_MODULE_PROPERTIES
};
@@ -60,17 +61,10 @@ zend_module_entry fribidi_module_entry = {
ZEND_GET_MODULE(fribidi)
#endif
-/* Remove comments and fill if you need to have entries in php.ini
-PHP_INI_BEGIN()
-PHP_INI_END()
-*/
-
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(fribidi)
{
-/* Remove comments if you have entries in php.ini
- REGISTER_INI_ENTRIES();
-*/
-
REGISTER_LONG_CONSTANT("FRIBIDI_CHARSET_UTF8",FRIBIDI_CHARSET_UTF8, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FRIBIDI_CHARSET_8859_6",FRIBIDI_CHARSET_8859_6, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("FRIBIDI_CHARSET_8859_8",FRIBIDI_CHARSET_8859_8, CONST_CS | CONST_PERSISTENT);
@@ -80,38 +74,25 @@ PHP_MINIT_FUNCTION(fribidi)
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_MSHUTDOWN_FUNCTION
+ */
PHP_MSHUTDOWN_FUNCTION(fribidi)
{
-/* Remove comments if you have entries in php.ini
- UNREGISTER_INI_ENTRIES();
-*/
- return SUCCESS;
-}
-
-/* Remove if there's nothing to do at request start */
-PHP_RINIT_FUNCTION(fribidi)
-{
- return SUCCESS;
-}
-
-/* Remove if there's nothing to do at request end */
-PHP_RSHUTDOWN_FUNCTION(fribidi)
-{
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(fribidi)
{
php_info_print_table_start();
php_info_print_table_header(2, "fribidi support", "enabled");
php_info_print_table_end();
-
- /* Remove comments if you have entries in php.ini
- DISPLAY_INI_ENTRIES();
- */
}
-
+/* }}} */
/*--------------------------------------------------------------*/
/* Name: fribidi_log2vis */
@@ -138,7 +119,7 @@ PHP_MINFO_FUNCTION(fribidi)
/* {{{ proto string fribidi_log2vis(string str, string direction, int charset)
Convert a logical string to a visual one */
-ZEND_FUNCTION(fribidi_log2vis)
+PHP_FUNCTION(fribidi_log2vis)
{
zval **parameter1,**parameter2, **parameter3;
@@ -264,10 +245,10 @@ ZEND_FUNCTION(fribidi_log2vis)
#endif /* HAVE_FRIBIDI */
-
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c
index c6deea8c77..80fa322d8f 100644
--- a/ext/ftp/ftp.c
+++ b/ext/ftp/ftp.c
@@ -23,8 +23,7 @@
| If you did not, or have any questions about PHP licensing, please |
| contact core@php.net. |
+----------------------------------------------------------------------+
- | Authors: |
- | Andrew Skalski <askalski@chek.com> |
+ | Authors: Andrew Skalski <askalski@chek.com> |
+----------------------------------------------------------------------+
*/
@@ -108,7 +107,8 @@ union ipbox {
unsigned char c[8];
};
-
+/* {{{ ftp_open
+ */
ftpbuf_t*
ftp_open(const char *host, short port)
{
@@ -172,8 +172,10 @@ bail:
free(ftp);
return NULL;
}
+/* }}} */
-
+/* {{{ ftp_close
+ */
ftpbuf_t*
ftp_close(ftpbuf_t *ftp)
{
@@ -185,8 +187,10 @@ ftp_close(ftpbuf_t *ftp)
free(ftp);
return NULL;
}
+/* }}} */
-
+/* {{{ ftp_gc
+ */
void
ftp_gc(ftpbuf_t *ftp)
{
@@ -198,8 +202,10 @@ ftp_gc(ftpbuf_t *ftp)
free(ftp->syst);
ftp->syst = NULL;
}
+/* }}} */
-
+/* {{{ ftp_quit
+ */
int
ftp_quit(ftpbuf_t *ftp)
{
@@ -216,8 +222,10 @@ ftp_quit(ftpbuf_t *ftp)
return 1;
}
+/* }}} */
-
+/* {{{ ftp_login
+ */
int
ftp_login(ftpbuf_t *ftp, const char *user, const char *pass)
{
@@ -238,8 +246,10 @@ ftp_login(ftpbuf_t *ftp, const char *user, const char *pass)
return 0;
return (ftp->resp == 230);
}
+/* }}} */
-
+/* {{{ ftp_reinit
+ */
int
ftp_reinit(ftpbuf_t *ftp)
{
@@ -255,8 +265,10 @@ ftp_reinit(ftpbuf_t *ftp)
return 1;
}
+/* }}} */
-
+/* {{{ ftp_syst
+ */
const char*
ftp_syst(ftpbuf_t *ftp)
{
@@ -283,8 +295,10 @@ ftp_syst(ftpbuf_t *ftp)
return ftp->syst;
}
+/* }}} */
-
+/* {{{ ftp_pwd
+ */
const char*
ftp_pwd(ftpbuf_t *ftp)
{
@@ -312,8 +326,10 @@ ftp_pwd(ftpbuf_t *ftp)
return ftp->pwd;
}
+/* }}} */
-
+/* {{{ ftp_exec
+ */
int
ftp_exec(ftpbuf_t *ftp, const char *cmd)
{
@@ -326,8 +342,10 @@ ftp_exec(ftpbuf_t *ftp, const char *cmd)
return 1;
}
+/* }}} */
-
+/* {{{ ftp_chdir
+ */
int
ftp_chdir(ftpbuf_t *ftp, const char *dir)
{
@@ -344,8 +362,10 @@ ftp_chdir(ftpbuf_t *ftp, const char *dir)
return 1;
}
+/* }}} */
-
+/* {{{ ftp_cdup
+ */
int
ftp_cdup(ftpbuf_t *ftp)
{
@@ -362,8 +382,10 @@ ftp_cdup(ftpbuf_t *ftp)
return 1;
}
+/* }}} */
-
+/* {{{ ftp_mkdir
+ */
char*
ftp_mkdir(ftpbuf_t *ftp, const char *dir)
{
@@ -390,8 +412,10 @@ ftp_mkdir(ftpbuf_t *ftp, const char *dir)
return mkd;
}
+/* }}} */
-
+/* {{{ ftp_rmdir
+ */
int
ftp_rmdir(ftpbuf_t *ftp, const char *dir)
{
@@ -405,22 +429,28 @@ ftp_rmdir(ftpbuf_t *ftp, const char *dir)
return 1;
}
+/* }}} */
-
+/* {{{ ftp_nlist
+ */
char**
ftp_nlist(ftpbuf_t *ftp, const char *path)
{
return ftp_genlist(ftp, "NLST", path);
}
+/* }}} */
-
+/* {{{ ftp_list
+ */
char**
ftp_list(ftpbuf_t *ftp, const char *path)
{
return ftp_genlist(ftp, "LIST", path);
}
+/* }}} */
-
+/* {{{ ftp_type
+ */
int
ftp_type(ftpbuf_t *ftp, ftptype_t type)
{
@@ -448,8 +478,10 @@ ftp_type(ftpbuf_t *ftp, ftptype_t type)
return 1;
}
+/* }}} */
-
+/* {{{ ftp_pasv
+ */
int
ftp_pasv(ftpbuf_t *ftp, int pasv)
{
@@ -492,8 +524,10 @@ ftp_pasv(ftpbuf_t *ftp, int pasv)
return 1;
}
+/* }}} */
-
+/* {{{ ftp_get
+ */
int
ftp_get(ftpbuf_t *ftp, FILE *outfp, const char *path, ftptype_t type)
{
@@ -554,8 +588,10 @@ bail:
data_close(data);
return 0;
}
+/* }}} */
-
+/* {{{ ftp_put
+ */
int
ftp_put(ftpbuf_t *ftp, const char *path, FILE *infp, ftptype_t type)
{
@@ -617,8 +653,10 @@ bail:
data_close(data);
return 0;
}
+/* }}} */
-
+/* {{{ ftp_size
+ */
int
ftp_size(ftpbuf_t *ftp, const char *path)
{
@@ -632,8 +670,10 @@ ftp_size(ftpbuf_t *ftp, const char *path)
return atoi(ftp->inbuf);
}
+/* }}} */
-
+/* {{{ ftp_mdtm
+ */
time_t
ftp_mdtm(ftpbuf_t *ftp, const char *path)
{
@@ -675,8 +715,10 @@ ftp_mdtm(ftpbuf_t *ftp, const char *path)
return stamp;
}
+/* }}} */
-
+/* {{{ ftp_delete
+ */
int
ftp_delete(ftpbuf_t *ftp, const char *path)
{
@@ -690,8 +732,10 @@ ftp_delete(ftpbuf_t *ftp, const char *path)
return 1;
}
+/* }}} */
-
+/* {{{ ftp_rename
+ */
int
ftp_rename(ftpbuf_t *ftp, const char *src, const char *dest)
{
@@ -710,8 +754,10 @@ ftp_rename(ftpbuf_t *ftp, const char *src, const char *dest)
return 1;
}
+/* }}} */
-
+/* {{{ ftp_site
+ */
int
ftp_site(ftpbuf_t *ftp, const char *cmd)
{
@@ -725,9 +771,12 @@ ftp_site(ftpbuf_t *ftp, const char *cmd)
return 1;
}
+/* }}} */
/* static functions */
+/* {{{ ftp_putcmd
+ */
int
ftp_putcmd(ftpbuf_t *ftp, const char *cmd, const char *args)
{
@@ -754,8 +803,10 @@ ftp_putcmd(ftpbuf_t *ftp, const char *cmd, const char *args)
return 1;
}
+/* }}} */
-
+/* {{{ ftp_readline
+ */
int
ftp_readline(ftpbuf_t *ftp)
{
@@ -802,8 +853,10 @@ ftp_readline(ftpbuf_t *ftp)
return 0;
}
+/* }}} */
-
+/* {{{ ftp_getresp
+ */
int
ftp_getresp(ftpbuf_t *ftp)
{
@@ -844,8 +897,10 @@ ftp_getresp(ftpbuf_t *ftp)
return 1;
}
+/* }}} */
-
+/* {{{ my_send
+ */
int
my_send(int s, void *buf, size_t len)
{
@@ -879,8 +934,10 @@ my_send(int s, void *buf, size_t len)
return len;
}
+/* }}} */
-
+/* {{{ my_recv
+ */
int
my_recv(int s, void *buf, size_t len)
{
@@ -904,8 +961,10 @@ my_recv(int s, void *buf, size_t len)
return recv(s, buf, len, 0);
}
+/* }}} */
-
+/* {{{ my_connect
+ */
int
my_connect(int s, const struct sockaddr *addr, int addrlen)
#ifndef PHP_WIN32
@@ -957,7 +1016,10 @@ my_connect(int s, const struct sockaddr *addr, int addrlen)
return connect(s, addr, addrlen);
}
#endif
+/* }}} */
+/* {{{ my_accept
+ */
int
my_accept(int s, struct sockaddr *addr, int *addrlen)
{
@@ -981,8 +1043,10 @@ my_accept(int s, struct sockaddr *addr, int *addrlen)
return accept(s, addr, addrlen);
}
+/* }}} */
-
+/* {{{ ftp_getdata
+ */
databuf_t*
ftp_getdata(ftpbuf_t *ftp)
{
@@ -1081,8 +1145,10 @@ bail:
free(data);
return NULL;
}
+/* }}} */
-
+/* {{{ data_accept
+ */
databuf_t*
data_accept(databuf_t *data)
{
@@ -1104,8 +1170,10 @@ data_accept(databuf_t *data)
return data;
}
+/* }}} */
-
+/* {{{ data_close
+ */
databuf_t*
data_close(databuf_t *data)
{
@@ -1118,8 +1186,10 @@ data_close(databuf_t *data)
free(data);
return NULL;
}
+/* }}} */
-
+/* {{{ ftp_genlist
+ */
char**
ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path)
{
@@ -1219,5 +1289,14 @@ bail:
free(ret);
return NULL;
}
+/* }}} */
#endif /* HAVE_FTP */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 41aed5753c..fbaaf0910c 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -101,6 +101,8 @@ static int _php_image_type ( char data[8] );
static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type);
static void _php_image_bw_convert(gdImagePtr im_org, gdIOCtx *out, int threshold);
+/* {{{ gd_functions[]
+ */
function_entry gd_functions[] = {
PHP_FE(imagearc, NULL)
PHP_FE(imagechar, NULL)
@@ -196,6 +198,7 @@ function_entry gd_functions[] = {
{NULL, NULL, NULL}
};
+/* }}} */
zend_module_entry gd_module_entry = {
"gd", gd_functions, PHP_MINIT(gd), NULL, NULL, NULL, PHP_MINFO(gd), STANDARD_MODULE_PROPERTIES
@@ -205,13 +208,16 @@ zend_module_entry gd_module_entry = {
ZEND_GET_MODULE(gd)
#endif
-
+/* {{{ php_free_gd_image
+ */
static void php_free_gd_image(zend_rsrc_list_entry *rsrc)
{
gdImageDestroy((gdImagePtr)rsrc->ptr);
}
+/* }}} */
-
+/* {{{ php_free_gd_font
+ */
static void php_free_gd_font(zend_rsrc_list_entry *rsrc)
{
gdFontPtr fp = (gdFontPtr)rsrc->ptr;
@@ -220,8 +226,10 @@ static void php_free_gd_font(zend_rsrc_list_entry *rsrc)
}
efree(fp);
}
+/* }}} */
-
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(gd)
{
le_gd = zend_register_list_destructors_ex(php_free_gd_image, NULL, "gd", module_number);
@@ -256,7 +264,10 @@ PHP_MINIT_FUNCTION(gd)
#endif
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(gd)
{
php_info_print_table_start();
@@ -308,6 +319,7 @@ PHP_MINFO_FUNCTION(gd)
#endif
php_info_print_table_end();
}
+/* }}} */
/* Need this for cpdf. See also comment in file.c php3i_get_le_fp() */
PHP_GD_API int phpi_get_le_gd(void)
@@ -317,6 +329,8 @@ PHP_GD_API int phpi_get_le_gd(void)
#ifndef HAVE_GDIMAGECOLORRESOLVE
+/* {{{ gdImageColorResolve
+ */
/********************************************************************/
/* gdImageColorResolve is a replacement for the old fragment: */
/* */
@@ -366,6 +380,7 @@ gdImageColorResolve(gdImagePtr im, int r, int g, int b)
im->open [op] = 0;
return op; /* Return newly allocated color */
}
+/* }}} */
#endif
@@ -508,7 +523,6 @@ PHP_FUNCTION(imagesetstyle)
}
/* }}} */
-
/* {{{ proto int imagecreatetruecolor(int x_size, int y_size)
Create a new true color image */
PHP_FUNCTION(imagecreatetruecolor)
@@ -886,7 +900,6 @@ PHP_FUNCTION(imagesetbrush)
}
/* }}} */
-
/* {{{ proto int imagecreate(int x_size, int y_size)
Create a new image */
PHP_FUNCTION(imagecreate)
@@ -929,7 +942,10 @@ PHP_FUNCTION(imagetypes)
#endif
RETURN_LONG(ret);
}
+/* }}} */
+/* {{{ _php_image_type
+ */
static int _php_image_type (char data[8])
{
#ifdef HAVE_LIBGD15
@@ -962,7 +978,10 @@ static int _php_image_type (char data[8])
return -1;
#endif
}
+/* }}} */
+/* {{{ _php_image_create_from_string
+ */
gdImagePtr _php_image_create_from_string (zval **data, char *tn, gdImagePtr (*ioctx_func_p)())
{
#ifdef HAVE_LIBGD15
@@ -986,6 +1005,7 @@ gdImagePtr _php_image_create_from_string (zval **data, char *tn, gdImagePtr (*io
return NULL;
#endif
}
+/* }}} */
/* {{{ proto int imagecreatefromstring(string image)
Create a new image from the image stream in the string */
@@ -1062,6 +1082,9 @@ PHP_FUNCTION (imagecreatefromstring)
/* }}} */
size_t php_fread_all(char **buf, int socket, FILE *fp, int issock);
+
+/* {{{ _php_image_create_from
+ */
static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type, char *tn, gdImagePtr (*func_p)(), gdImagePtr (*ioctx_func_p)())
{
zval **file, **srcx, **srcy, **width, **height;
@@ -1152,6 +1175,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type,
ZEND_REGISTER_RESOURCE(return_value, im, le_gd);
}
+/* }}} */
/* {{{ proto int imagecreatefromgif(string filename)
Create a new image from GIF file or URL */
@@ -1269,6 +1293,8 @@ PHP_FUNCTION(imagecreatefromgd2part)
}
/* }}} */
+/* {{{ _php_image_output
+ */
static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char *tn, void (*func_p)())
{
zval **imgind, **file, **quality;
@@ -1377,6 +1403,7 @@ static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char
}
RETURN_TRUE;
}
+/* }}} */
/* {{{ proto int imagegif(int im [, string filename])
Output GIF image to browser or file */
@@ -2075,7 +2102,8 @@ PHP_FUNCTION(imageinterlace)
}
/* }}} */
-/* arg = 0 normal polygon
+/* {{{ php_imagepolygon
+ arg = 0 normal polygon
arg = 1 filled polygon */
/* im, points, num_points, col */
static void php_imagepolygon(INTERNAL_FUNCTION_PARAMETERS, int filled) {
@@ -2138,7 +2166,7 @@ static void php_imagepolygon(INTERNAL_FUNCTION_PARAMETERS, int filled) {
efree(points);
RETURN_TRUE;
}
-
+/* }}} */
/* {{{ proto int imagepolygon(int im, array point, int num_points, int col)
Draw a polygon */
@@ -2156,7 +2184,8 @@ PHP_FUNCTION(imagefilledpolygon)
}
/* }}} */
-
+/* {{{ php_find_gd_font
+ */
static gdFontPtr php_find_gd_font(int size)
{
gdFontPtr font;
@@ -2192,9 +2221,9 @@ static gdFontPtr php_find_gd_font(int size)
return font;
}
+/* }}} */
-
-/*
+/* {{{ php_imagefontsize
* arg = 0 ImageFontWidth
* arg = 1 ImageFontHeight
*/
@@ -2213,7 +2242,7 @@ static void php_imagefontsize(INTERNAL_FUNCTION_PARAMETERS, int arg)
font = php_find_gd_font(Z_LVAL_PP(SIZE));
RETURN_LONG(arg ? font->h : font->w);
}
-
+/* }}} */
/* {{{ proto int imagefontwidth(int font)
Get font width */
@@ -2231,8 +2260,8 @@ PHP_FUNCTION(imagefontheight)
}
/* }}} */
-
-/* workaround for a bug in gd 1.2 */
+/* {{{ php_gdimagecharup
+ * workaround for a bug in gd 1.2 */
void php_gdimagecharup(gdImagePtr im, gdFontPtr f, int x, int y, int c,
int color)
{
@@ -2254,8 +2283,9 @@ void php_gdimagecharup(gdImagePtr im, gdFontPtr f, int x, int y, int c,
cx++;
}
}
+/* }}} */
-/*
+/* {{{ php_imagechar
* arg = 0 ImageChar
* arg = 1 ImageCharUp
* arg = 2 ImageString
@@ -2324,7 +2354,8 @@ static void php_imagechar(INTERNAL_FUNCTION_PARAMETERS, int mode)
efree(str);
}
RETURN_TRUE;
-}
+}
+/* }}} */
/* {{{ proto int imagechar(int im, int font, int x, int y, string c, int col)
Draw a character */
@@ -2480,8 +2511,6 @@ PHP_FUNCTION(imagecopymergegray)
}
/* }}} */
-
-
/* {{{ proto int imagecopyresized(int dst_im, int src_im, int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h)
Copy and resize part of an image */
PHP_FUNCTION(imagecopyresized)
@@ -2588,6 +2617,8 @@ PHP_FUNCTION(imagettftext)
/* }}} */
#ifdef ENABLE_GD_TTF
+/* {{{ php_imagettftext_common
+ */
static
void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode)
{
@@ -2657,22 +2688,29 @@ void php_imagettftext_common(INTERNAL_FUNCTION_PARAMETERS, int mode)
add_next_index_long(return_value, brect[i]);
}
}
+/* }}} */
#endif /* ENABLE_GD_TTF */
#if HAVE_LIBT1
+/* {{{ php_free_ps_font
+ */
void php_free_ps_font(zend_rsrc_list_entry *rsrc)
{
int *font = (int *)rsrc->ptr;
T1_DeleteFont(*font);
efree(font);
}
+/* }}} */
+/* {{{ php_free_ps_enc
+ */
void php_free_ps_enc(zend_rsrc_list_entry *rsrc)
{
char **enc = (char **)rsrc->ptr;
T1_DeleteEncoding(enc);
}
+/* }}} */
#endif
@@ -3159,7 +3197,6 @@ PHP_FUNCTION(imagepsbbox)
}
/* }}} */
-
/* {{{ proto int image2wbmp(int im [, string filename [, int threshold]])
Output WBMP image to browser or file */
PHP_FUNCTION(image2wbmp)
@@ -3171,7 +3208,7 @@ PHP_FUNCTION(image2wbmp)
RETURN_FALSE;
#endif /* HAVE_GD_WBMP */
}
-
+/* }}} */
/* {{{ proto void jpeg2wbmp (string f_org, string f_dest, int d_height, int d_width)
Convert JPEG image to WBMP image */
@@ -3209,10 +3246,9 @@ PHP_FUNCTION(png2wbmp)
}
/* }}} */
-
-
#ifdef HAVE_GD_WBMP
-/* It converts a gd Image to bw using a threshold value */
+/* {{{ _php_image_bw_convert
+ * It converts a gd Image to bw using a threshold value */
static void _php_image_bw_convert( gdImagePtr im_org, gdIOCtx *out, int threshold)
{
gdImagePtr im_dest;
@@ -3259,8 +3295,10 @@ static void _php_image_bw_convert( gdImagePtr im_org, gdIOCtx *out, int threshol
#endif
}
+/* }}} */
-/* _php_image_convert converts jpeg/png images to wbmp and resizes them as needed */
+/* {{{ _php_image_convert
+ * _php_image_convert converts jpeg/png images to wbmp and resizes them as needed */
static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type ) {
zval **f_org, **f_dest, **height, **width, **threshold;
gdImagePtr im_org, im_dest, im_tmp;
@@ -3451,9 +3489,9 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type ) {
}
WRONG_PARAM_COUNT;
}
+/* }}} */
#endif /* HAVE_GD_WBMP */
-
#endif /* HAVE_LIBGD */
/*
@@ -3461,4 +3499,5 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type ) {
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c
index a52a1b2121..550c5f46c4 100644
--- a/ext/gmp/gmp.c
+++ b/ext/gmp/gmp.c
@@ -37,6 +37,8 @@ static int le_gmp;
static unsigned char first_of_two_force_ref[] = { 2, BYREF_FORCE, BYREF_NONE };
+/* {{{ gmp_functions[]
+ */
function_entry gmp_functions[] = {
ZEND_FE(gmp_init, NULL)
ZEND_FE(gmp_intval, NULL)
@@ -79,7 +81,10 @@ function_entry gmp_functions[] = {
ZEND_FE(gmp_hamdist, NULL)
{NULL, NULL, NULL} /* Must be the last line in gmp_functions[] */
};
+/* }}} */
+/* {{{ gmp_module_entry
+ */
zend_module_entry gmp_module_entry = {
"gmp",
gmp_functions,
@@ -90,6 +95,7 @@ zend_module_entry gmp_module_entry = {
ZEND_MINFO(gmp),
STANDARD_MODULE_PROPERTIES
};
+/* }}} */
#ifdef COMPILE_DL_GMP
ZEND_GET_MODULE(gmp)
@@ -103,22 +109,33 @@ static void _php_gmpnum_free(zend_rsrc_list_entry *rsrc);
#define GMP_ROUND_PLUSINF 1
#define GMP_ROUND_MINUSINF 2
+/* {{{ gmp_emalloc
+ */
static void *gmp_emalloc(size_t size)
{
return emalloc(size);
}
+/* }}} */
+/* {{{ gmp_erealloc
+ */
static void *gmp_erealloc(void *ptr, size_t old_size, size_t new_size)
{
return erealloc(ptr, new_size);
}
+/* }}} */
+/* {{{ gmp_efree
+ */
static void gmp_efree(void *ptr, size_t size)
{
efree(ptr);
}
+/* }}} */
-ZEND_MINIT_FUNCTION(gmp)
+/* {{{ PHP_MINIT_FUNCTION
+ */
+PHP_MINIT_FUNCTION(gmp)
{
/* Remove comments if you have entries in php.ini
REGISTER_INI_ENTRIES();
@@ -134,16 +151,22 @@ ZEND_MINIT_FUNCTION(gmp)
return SUCCESS;
}
+/* }}} */
-ZEND_MSHUTDOWN_FUNCTION(gmp)
+/* {{{ PHP_MSHUTDOWN_FUNCTION
+ */
+PHP_MSHUTDOWN_FUNCTION(gmp)
{
/* Remove comments if you have entries in php.ini
UNREGISTER_INI_ENTRIES();
*/
return SUCCESS;
}
+/* }}} */
-ZEND_MINFO_FUNCTION(gmp)
+/* {{{ PHP_MINFO_FUNCTION
+ */
+PHP_MINFO_FUNCTION(gmp)
{
php_info_print_table_start();
php_info_print_table_header(2, "gmp support", "enabled");
@@ -153,6 +176,7 @@ ZEND_MINFO_FUNCTION(gmp)
DISPLAY_INI_ENTRIES();
*/
}
+/* }}} */
/* Fetch zval to be GMP number.
Initially, zval can be also number or string */
@@ -170,7 +194,8 @@ if(Z_TYPE_PP(zval) == IS_RESOURCE) { \
#define INIT_GMP_NUM(gmpnumber) { gmpnumber=emalloc(sizeof(mpz_t)); mpz_init(*gmpnumber); }
#define FREE_GMP_NUM(gmpnumber) { mpz_clear(*gmpnumber); efree(gmpnumber); }
-/* Convert zval to be gmp number */
+/* {{{ convert_to_gmp
+ * Convert zval to be gmp number */
static int convert_to_gmp(mpz_t * *gmpnumber, zval **val)
{
int ret = 0;
@@ -203,7 +228,10 @@ static int convert_to_gmp(mpz_t * *gmpnumber, zval **val)
return ret?FAILURE:SUCCESS;
}
+/* }}} */
+/* {{{ typedefs
+ */
typedef void (*gmp_unary_op_t)(mpz_ptr, mpz_srcptr);
typedef int (*gmp_unary_opl_t)(mpz_srcptr);
@@ -215,6 +243,8 @@ typedef int (*gmp_binary_opl_t)(mpz_srcptr, mpz_srcptr);
typedef unsigned long (*gmp_binary_ui_op_t)(mpz_ptr, mpz_srcptr, unsigned long);
typedef void (*gmp_binary_op2_t)(mpz_ptr, mpz_ptr, mpz_srcptr, mpz_srcptr);
typedef unsigned long (*gmp_binary_ui_op2_t)(mpz_ptr, mpz_ptr, mpz_srcptr, unsigned long);
+/* }}} */
+
#define gmp_zval_binary_ui_op(r,a,b,o,u) gmp_zval_binary_ui_op_ex(r,a,b,o,u,0)
#define gmp_zval_binary_ui_op2(r,a,b,o,u) gmp_zval_binary_ui_op2_ex(r,a,b,o,u,0)
@@ -227,7 +257,7 @@ typedef unsigned long (*gmp_binary_ui_op2_t)(mpz_ptr, mpz_ptr, mpz_srcptr, unsig
#define gmp_unary_opl(op) _gmp_unary_opl(INTERNAL_FUNCTION_PARAM_PASSTHRU, op)
#define gmp_unary_ui_op(op) _gmp_unary_ui_op(INTERNAL_FUNCTION_PARAM_PASSTHRU, op)
-/*
+/* {{{ gmp_zval_binary_ui_op_ex
Execute GMP binary operation.
May return GMP resource or long if operation allows this
*/
@@ -261,8 +291,9 @@ static inline void gmp_zval_binary_ui_op_ex(zval *return_value, zval **a_arg, zv
ZEND_REGISTER_RESOURCE(return_value, gmpnum_result, le_gmp);
}
}
+/* }}} */
-/*
+/* {{{ gmp_zval_binary_ui_op2_ex
Execute GMP binary operation which returns 2 values.
May return GMP resources or longs if operation allows this.
*/
@@ -304,8 +335,10 @@ static inline void gmp_zval_binary_ui_op2_ex(zval *return_value, zval **a_arg, z
add_index_resource(return_value, 1, Z_LVAL(r));
}
}
+/* }}} */
-
+/* {{{ _gmp_binary_ui_op
+ */
static inline void _gmp_binary_ui_op(INTERNAL_FUNCTION_PARAMETERS, gmp_binary_op_t gmp_op, gmp_binary_ui_op_t gmp_ui_op) {
zval **a_arg, **b_arg;
@@ -315,9 +348,12 @@ static inline void _gmp_binary_ui_op(INTERNAL_FUNCTION_PARAMETERS, gmp_binary_op
gmp_zval_binary_ui_op(return_value,a_arg,b_arg,gmp_op,gmp_ui_op);
}
+/* }}} */
/* Unary operations */
+/* {{{ gmp_zval_unary_op
+ */
static inline void gmp_zval_unary_op(zval *return_value, zval **a_arg, gmp_unary_op_t gmp_op) {
mpz_t *gmpnum_a, *gmpnum_result;
@@ -328,7 +364,10 @@ static inline void gmp_zval_unary_op(zval *return_value, zval **a_arg, gmp_unary
ZEND_REGISTER_RESOURCE(return_value, gmpnum_result, le_gmp);
}
+/* }}} */
+/* {{{ gmp_zval_unary_ui_op
+ */
static inline void gmp_zval_unary_ui_op(zval *return_value, zval **a_arg, gmp_unary_ui_op_t gmp_op) {
mpz_t *gmpnum_result;
@@ -339,8 +378,9 @@ static inline void gmp_zval_unary_ui_op(zval *return_value, zval **a_arg, gmp_un
ZEND_REGISTER_RESOURCE(return_value, gmpnum_result, le_gmp);
}
+/* }}} */
-/*
+/* {{{ _gmp_unary_ui_op
Execute GMP unary operation.
*/
static inline void _gmp_unary_ui_op(INTERNAL_FUNCTION_PARAMETERS, gmp_unary_ui_op_t gmp_op) {
@@ -352,7 +392,10 @@ static inline void _gmp_unary_ui_op(INTERNAL_FUNCTION_PARAMETERS, gmp_unary_ui_o
gmp_zval_unary_ui_op(return_value,a_arg,gmp_op);
}
+/* }}} */
+/* {{{ _gmp_unary_op
+ */
static inline void _gmp_unary_op(INTERNAL_FUNCTION_PARAMETERS, gmp_unary_op_t gmp_op) {
zval **a_arg;
@@ -362,7 +405,10 @@ static inline void _gmp_unary_op(INTERNAL_FUNCTION_PARAMETERS, gmp_unary_op_t gm
gmp_zval_unary_op(return_value,a_arg,gmp_op);
}
+/* }}} */
+/* {{{ _gmp_unary_opl
+ */
static inline void _gmp_unary_opl(INTERNAL_FUNCTION_PARAMETERS, gmp_unary_opl_t gmp_op) {
zval **a_arg;
mpz_t *gmpnum_a;
@@ -375,7 +421,10 @@ static inline void _gmp_unary_opl(INTERNAL_FUNCTION_PARAMETERS, gmp_unary_opl_t
RETURN_LONG(gmp_op(*gmpnum_a));
}
+/* }}} */
+/* {{{ _gmp_binary_opl
+ */
static inline void _gmp_binary_opl(INTERNAL_FUNCTION_PARAMETERS, gmp_binary_opl_t gmp_op) {
zval **a_arg, **b_arg;
mpz_t *gmpnum_a, *gmpnum_b;
@@ -389,7 +438,7 @@ static inline void _gmp_binary_opl(INTERNAL_FUNCTION_PARAMETERS, gmp_binary_opl_
RETURN_LONG(gmp_op(*gmpnum_a, *gmpnum_b));
}
-
+/* }}} */
/* Remove the following function when you have succesfully modified config.m4
so that your module can be compiled into PHP, it exists only for testing
@@ -853,7 +902,6 @@ ZEND_FUNCTION(gmp_gcdext)
}
/* }}} */
-
/* {{{ proto resource gmp_invert(resource a, resource b)
Computes the inverse of a modulo b */
ZEND_FUNCTION(gmp_invert)
@@ -1151,19 +1199,21 @@ ZEND_FUNCTION(gmp_scan1)
}
/* }}} */
-
+/* {{{ _php_gmpnum_free
+ */
static void _php_gmpnum_free(zend_rsrc_list_entry *rsrc)
{
mpz_t *gmpnum = (mpz_t *)rsrc->ptr;
FREE_GMP_NUM(gmpnum);
}
+/* }}} */
#endif /* HAVE_GMP */
-
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index 77a3bc7960..2ff802c9ad 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -17,6 +17,8 @@
+----------------------------------------------------------------------+
*/
+/* $Id$ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -46,8 +48,8 @@
#endif
-/* Every user visible function must have an entry in iconv_functions[].
-*/
+/* {{{ iconv_functions[]
+ */
function_entry iconv_functions[] = {
PHP_FE(iconv, NULL)
PHP_FE(ob_iconv_handler, NULL)
@@ -55,7 +57,10 @@ function_entry iconv_functions[] = {
PHP_FE(iconv_set_encoding, NULL)
{NULL, NULL, NULL}
};
+/* }}} */
+/* {{{ iconv_module_entry
+ */
zend_module_entry iconv_module_entry = {
"iconv",
iconv_functions,
@@ -66,6 +71,7 @@ zend_module_entry iconv_module_entry = {
PHP_MINFO(miconv),
STANDARD_MODULE_PROPERTIES
};
+/* }}} */
ZEND_DECLARE_MODULE_GLOBALS(iconv)
@@ -75,11 +81,14 @@ ZEND_GET_MODULE(iconv)
int php_iconv_string(char *, char **, char *, char *);
+/* {{{ PHP_INI
+ */
PHP_INI_BEGIN()
STD_PHP_INI_ENTRY("iconv.input_encoding", ICONV_INPUT_ENCODING, PHP_INI_ALL, OnUpdateString, input_encoding, zend_iconv_globals, iconv_globals)
STD_PHP_INI_ENTRY("iconv.output_encoding", ICONV_OUTPUT_ENCODING, PHP_INI_ALL, OnUpdateString, output_encoding, zend_iconv_globals, iconv_globals)
STD_PHP_INI_ENTRY("iconv.internal_encoding", ICONV_INTERNAL_ENCODING, PHP_INI_ALL, OnUpdateString, internal_encoding, zend_iconv_globals, iconv_globals)
PHP_INI_END()
+/* }}} */
static void
php_iconv_init_globals(zend_iconv_globals *iconv_globals)
@@ -111,6 +120,8 @@ PHP_MINFO_FUNCTION(miconv)
DISPLAY_INI_ENTRIES();
}
+/* {{{ php_iconv_string
+ */
int php_iconv_string(char *in_p, char **out, char *in_charset, char *out_charset)
{
unsigned int in_size, out_size;
@@ -147,7 +158,7 @@ int php_iconv_string(char *in_p, char **out, char *in_charset, char *out_charset
return SUCCESS;
}
-
+/* }}} */
/* {{{ proto string iconv(string in_charset, string out_charset, string str)
Returns str converted to the out_charset character set */
@@ -277,13 +288,12 @@ PHP_FUNCTION(iconv_get_encoding)
}
/* }}} */
-
#endif
-
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c
index 0bc6d1fe45..164d23ce58 100644
--- a/ext/imap/php_imap.c
+++ b/ext/imap/php_imap.c
@@ -81,7 +81,9 @@ void mail_close_it (zend_rsrc_list_entry *rsrc);
void mail_userlogout_it(zend_rsrc_list_entry *rsrc);
void mail_nuke_chain(zend_rsrc_list_entry *rsrc);
#endif
-
+
+/* {{{ imap_functions[]
+ */
function_entry imap_functions[] = {
PHP_FE(imap_open, NULL)
PHP_FE(imap_popen, NULL)
@@ -157,6 +159,7 @@ function_entry imap_functions[] = {
PHP_FE(imap_thread, NULL)
{NULL, NULL, NULL}
};
+/* }}} */
#ifdef OP_RELOGIN
#define IS_STREAM(ind_type) ((ind_type)==le_imap || (ind_type)==le_pimap)
@@ -424,7 +427,8 @@ static void php_imap_init_globals(zend_imap_globals *imap_globals)
imap_globals->folderlist_style = FLIST_ARRAY;
}
-
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(imap)
{
unsigned long sa_all = SA_MESSAGES | SA_RECENT | SA_UNSEEN |
@@ -634,7 +638,10 @@ PHP_MINIT_FUNCTION(imap)
#endif
return SUCCESS;
}
+/* }}} */
+/* {{{ imap_do_open
+ */
void imap_do_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
{
zval **mailbox, **user, **passwd, **options;
@@ -836,6 +843,7 @@ void imap_do_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
RETURN_LONG(ind);
}
+/* }}} */
/* {{{ proto int imap_open(string mailbox, string user, string password [, int options])
Open an IMAP stream to a mailbox */
@@ -4454,4 +4462,5 @@ PHP_FUNCTION (imap_thread)
mail_free_threadnode(&top);
}
/* }}} */
+
/* end IMAP_THREAD functionality */
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index c94ee529f8..d7232bf7ee 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -22,7 +22,6 @@
+----------------------------------------------------------------------+
*/
-
/* $Id$ */
#define IS_EXT_MODULE
@@ -63,7 +62,8 @@ static int le_link, le_result, le_result_entry, le_ber_entry;
This is just a small subset of the functionality provided by the LDAP library. All the
operations are synchronous. Referrals are not handled automatically.
*/
-
+/* {{{ ldap_functions[]
+ */
function_entry ldap_functions[] = {
PHP_FE(ldap_connect, NULL)
PHP_FALIAS(ldap_close, ldap_unbind, NULL)
@@ -117,7 +117,7 @@ function_entry ldap_functions[] = {
{NULL, NULL, NULL}
};
-
+/* }}} */
zend_module_entry ldap_module_entry = {
"ldap",
@@ -152,19 +152,24 @@ static void _free_ldap_result(zend_rsrc_list_entry *rsrc)
ldap_msgfree(result);
}
-
+/* {{{ PHP_INI_BEGIN
+ */
PHP_INI_BEGIN()
STD_PHP_INI_ENTRY_EX("ldap.max_links", "-1", PHP_INI_SYSTEM, OnUpdateInt, max_links, zend_ldap_globals, ldap_globals, display_link_numbers)
STD_PHP_INI_ENTRY("ldap.base_dn", NULL, PHP_INI_ALL, OnUpdateString, base_dn, zend_ldap_globals, ldap_globals)
PHP_INI_END()
+/* }}} */
-
+/* {{{ php_ldap_init_globals
+ */
static void php_ldap_init_globals(zend_ldap_globals *ldap_globals)
{
ldap_globals->num_links = 0;
}
+/* }}} */
-
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(ldap)
{
ZEND_INIT_MODULE_GLOBALS(ldap, php_ldap_init_globals, NULL);
@@ -209,14 +214,18 @@ PHP_MINIT_FUNCTION(ldap)
return SUCCESS;
}
+/* }}} */
-
+/* {{{ PHP_MSHUTDOWN_FUNCTION
+ */
PHP_MSHUTDOWN_FUNCTION(ldap)
{
return SUCCESS;
}
+/* }}} */
-
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(ldap)
{
char maxl[32];
@@ -278,7 +287,7 @@ PHP_MINFO_FUNCTION(ldap)
php_info_print_table_end();
}
-
+/* }}} */
/* {{{ proto int ldap_connect([string host [, int port]])
Connect to an LDAP server */
@@ -406,7 +415,8 @@ PHP_FUNCTION(ldap_connect)
}
/* }}} */
-
+/* {{{ _get_lderrno
+ */
static int _get_lderrno(LDAP *ldap)
{
#if !HAVE_NSLDAP
@@ -423,7 +433,7 @@ static int _get_lderrno(LDAP *ldap)
return ldap_get_lderrno(ldap,NULL,NULL);
#endif
}
-
+/* }}} */
/* {{{ proto int ldap_bind(int link [, string dn, string password])
Bind to LDAP directory */
@@ -473,7 +483,6 @@ PHP_FUNCTION(ldap_bind)
}
/* }}} */
-
/* {{{ proto int ldap_unbind(int link)
Unbind from LDAP directory */
PHP_FUNCTION(ldap_unbind)
@@ -492,7 +501,8 @@ PHP_FUNCTION(ldap_unbind)
}
/* }}} */
-
+/* {{{ hp_set_opts
+ */
static void php_set_opts(LDAP *ldap, int sizelimit, int timelimit, int deref)
{
/* sizelimit */
@@ -522,8 +532,10 @@ static void php_set_opts(LDAP *ldap, int sizelimit, int timelimit, int deref)
#endif
}
}
+/* }}} */
-
+/* {{{ php_ldap_do_search
+ */
static void php_ldap_do_search(INTERNAL_FUNCTION_PARAMETERS, int scope)
{
pval **link, **base_dn, **filter, **attrs, **attr, **attrsonly, **sizelimit, **timelimit, **deref;
@@ -759,7 +771,7 @@ static void php_ldap_do_search(INTERNAL_FUNCTION_PARAMETERS, int scope)
ZEND_REGISTER_RESOURCE(return_value, ldap_res, le_result);
}
}
-
+/* }}} */
/* {{{ proto int ldap_read(int link, string base_dn, string filter [, array attrs [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]])
Read an entry */
@@ -769,7 +781,6 @@ PHP_FUNCTION(ldap_read)
}
/* }}} */
-
/* {{{ proto int ldap_list(int link, string base_dn, string filter [, array attrs [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]])
Single-level search */
PHP_FUNCTION(ldap_list)
@@ -778,7 +789,6 @@ PHP_FUNCTION(ldap_list)
}
/* }}} */
-
/* {{{ proto int ldap_search(int link, string base_dn, string filter [, array attrs [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]])
Search LDAP tree under base_dn */
PHP_FUNCTION(ldap_search)
@@ -787,7 +797,6 @@ PHP_FUNCTION(ldap_search)
}
/* }}} */
-
/* {{{ proto int ldap_free_result(int result)
Free result memory */
PHP_FUNCTION(ldap_free_result)
@@ -811,7 +820,6 @@ PHP_FUNCTION(ldap_free_result)
}
/* }}} */
-
/* {{{ proto int ldap_count_entries(int link, int result)
Count the number of entries in a search result */
PHP_FUNCTION(ldap_count_entries)
@@ -831,7 +839,6 @@ PHP_FUNCTION(ldap_count_entries)
}
/* }}} */
-
/* {{{ proto int ldap_first_entry(int link, int result)
Return first result id */
PHP_FUNCTION(ldap_first_entry)
@@ -856,7 +863,6 @@ PHP_FUNCTION(ldap_first_entry)
}
/* }}} */
-
/* {{{ proto int ldap_next_entry(int link, int entry)
Get next result entry */
PHP_FUNCTION(ldap_next_entry)
@@ -881,7 +887,6 @@ PHP_FUNCTION(ldap_next_entry)
}
/* }}} */
-
/* {{{ proto array ldap_get_entries(int link, int result)
Get all result entries */
PHP_FUNCTION(ldap_get_entries)
@@ -958,7 +963,6 @@ PHP_FUNCTION(ldap_get_entries)
}
/* }}} */
-
/* {{{ proto string ldap_first_attribute(int link, int result, int ber)
Return first attribute */
PHP_FUNCTION(ldap_first_attribute)
@@ -990,7 +994,6 @@ PHP_FUNCTION(ldap_first_attribute)
}
/* }}} */
-
/* {{{ proto string ldap_next_attribute(int link, int result, int ber)
Get the next attribute in result */
PHP_FUNCTION(ldap_next_attribute)
@@ -1022,7 +1025,6 @@ PHP_FUNCTION(ldap_next_attribute)
}
/* }}} */
-
/* {{{ proto array ldap_get_attributes(int link, int result)
Get attributes from a search result entry */
PHP_FUNCTION(ldap_get_attributes)
@@ -1070,7 +1072,6 @@ PHP_FUNCTION(ldap_get_attributes)
}
/* }}} */
-
/* {{{ proto array ldap_get_values(int link, int result, string attribute)
Get all values from a result entry */
PHP_FUNCTION(ldap_get_values)
@@ -1113,7 +1114,6 @@ PHP_FUNCTION(ldap_get_values)
}
/* }}} */
-
/* {{{ proto array ldap_get_values_len(int link, int result, string attribute)
Get all values with lengths from a result entry */
PHP_FUNCTION(ldap_get_values_len)
@@ -1155,7 +1155,6 @@ PHP_FUNCTION(ldap_get_values_len)
}
/* }}} */
-
/* {{{ proto string ldap_get_dn(int link, int result)
Get the DN of a result entry */
@@ -1185,7 +1184,6 @@ PHP_FUNCTION(ldap_get_dn)
}
/* }}} */
-
/* {{{ proto array ldap_explode_dn(string dn, int with_attrib)
Splits DN into its component parts */
PHP_FUNCTION(ldap_explode_dn)
@@ -1220,7 +1218,6 @@ PHP_FUNCTION(ldap_explode_dn)
}
/* }}} */
-
/* {{{ proto string ldap_dn2ufn(string dn)
Convert DN to User Friendly Naming format */
PHP_FUNCTION(ldap_dn2ufn)
@@ -1250,6 +1247,8 @@ PHP_FUNCTION(ldap_dn2ufn)
/* added to fix use of ldap_modify_add for doing an ldap_add, gerrit thomson. */
#define PHP_LD_FULL_ADD 0xff
+/* {{{ php_ldap_do_modify
+ */
static void php_ldap_do_modify(INTERNAL_FUNCTION_PARAMETERS, int oper)
{
pval **link, **dn, **entry, **value, **ivalue;
@@ -1365,7 +1364,7 @@ static void php_ldap_do_modify(INTERNAL_FUNCTION_PARAMETERS, int oper)
return;
}
-
+/* }}} */
/* {{{ proto int ldap_add(int link, string dn, array entry)
Add entries to LDAP directory */
@@ -1377,7 +1376,6 @@ PHP_FUNCTION(ldap_add)
}
/* }}} */
-
/* {{{ proto int ldap_modify(int link, string dn, array entry)
Modify an LDAP entry */
PHP_FUNCTION(ldap_modify)
@@ -1397,7 +1395,6 @@ PHP_FUNCTION(ldap_mod_replace)
}
/* }}} */
-
/* {{{ proto int ldap_mod_add(int link, string dn, array entry)
Add attribute values to current */
PHP_FUNCTION(ldap_mod_add)
@@ -1406,7 +1403,6 @@ PHP_FUNCTION(ldap_mod_add)
}
/* }}} */
-
/* {{{ proto int ldap_mod_del(int link, string dn, array entry)
Delete attribute values */
PHP_FUNCTION(ldap_mod_del)
@@ -1444,7 +1440,6 @@ PHP_FUNCTION(ldap_delete)
}
/* }}} */
-
/* {{{ proto int ldap_errno(int link)
Get the current ldap error number */
PHP_FUNCTION(ldap_errno)
@@ -1466,7 +1461,6 @@ PHP_FUNCTION(ldap_errno)
}
/* }}} */
-
/* {{{ proto string ldap_err2str(int errno)
Convert error number to error string */
PHP_FUNCTION(ldap_err2str)
@@ -1482,7 +1476,6 @@ PHP_FUNCTION(ldap_err2str)
}
/* }}} */
-
/* {{{ proto string ldap_error(int link)
Get the current ldap error string */
PHP_FUNCTION(ldap_error)
@@ -1503,7 +1496,6 @@ PHP_FUNCTION(ldap_error)
}
/* }}} */
-
/* {{{ proto int ldap_compare(int link, string dn, string attr, string value)
Determine if an entry has a specific value for one of its attributes */
PHP_FUNCTION(ldap_compare)
@@ -1612,7 +1604,6 @@ PHP_FUNCTION(ldap_get_option)
}
/* }}} */
-
/* {{{ proto boolean ldap_set_option(int link, int option, mixed newval)
Set the value of various session-wide parameters */
PHP_FUNCTION(ldap_set_option)
@@ -1742,7 +1733,6 @@ PHP_FUNCTION(ldap_set_option)
}
/* }}} */
-
/* {{{ proto boolean ldap_parse_result(int link, int result, int errcode, string matcheddn, string errmsg, array referrals)
Extract information from result */
PHP_FUNCTION(ldap_parse_result)
@@ -1815,7 +1805,6 @@ PHP_FUNCTION(ldap_parse_result)
}
/* }}} */
-
/* {{{ proto int ldap_first_reference(int link, int result)
Return first reference */
PHP_FUNCTION(ldap_first_reference)
@@ -1841,7 +1830,6 @@ PHP_FUNCTION(ldap_first_reference)
}
/* }}} */
-
/* {{{ proto int ldap_next_reference(int link, int entry)
Get next reference */
PHP_FUNCTION(ldap_next_reference)
@@ -1866,7 +1854,6 @@ PHP_FUNCTION(ldap_next_reference)
}
/* }}} */
-
/* {{{ proto boolean ldap_parse_reference(int link, int entry, array referrals)
Extract information from reference entry */
PHP_FUNCTION(ldap_parse_reference)
@@ -1905,7 +1892,6 @@ PHP_FUNCTION(ldap_parse_reference)
}
/* }}} */
-
/* {{{ proto boolean ldap_rename(int link, string dn, string newrdn, string newparent, boolean deleteoldrdn);
Modify the name of an entry */
PHP_FUNCTION(ldap_rename)
@@ -1946,6 +1932,8 @@ PHP_FUNCTION(ldap_rename)
#ifdef STR_TRANSLATION
+/* {{{ php_ldap_do_translate
+ */
static void php_ldap_do_translate(INTERNAL_FUNCTION_PARAMETERS, int way)
{
zval **value;
@@ -1981,7 +1969,7 @@ static void php_ldap_do_translate(INTERNAL_FUNCTION_PARAMETERS, int way)
return;
}
-
+/* }}} */
/* {{{ proto string ldap_t61_to_8859(string value)
Translate t61 characters to 8859 characters */
@@ -1990,7 +1978,6 @@ PHP_FUNCTION(ldap_t61_to_8859) {
}
/* }}} */
-
/* {{{ proto string ldap_8859_to_t61(string value)
Translate 8859 characters to t61 characters */
PHP_FUNCTION(ldap_8859_to_t61) {
@@ -1998,3 +1985,11 @@ PHP_FUNCTION(ldap_8859_to_t61) {
}
/* }}} */
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/msql/php_msql.c b/ext/msql/php_msql.c
index 6f77d4f42d..86ed7ad25d 100644
--- a/ext/msql/php_msql.c
+++ b/ext/msql/php_msql.c
@@ -44,7 +44,8 @@ static php_msql_globals msql_globals;
#define MSQL_NUM 1<<1
#define MSQL_BOTH (MSQL_ASSOC|MSQL_NUM)
-
+/* {{{ msql_functions[]
+ */
function_entry msql_functions[] = {
PHP_FE(msql_connect, NULL)
PHP_FE(msql_pconnect, NULL)
@@ -99,7 +100,7 @@ function_entry msql_functions[] = {
PHP_FALIAS(msql_tablename, msql_result, NULL)
{NULL, NULL, NULL}
};
-
+/* }}} */
zend_module_entry msql_module_entry = {
"msql", msql_functions, PHP_MINIT(msql), NULL, PHP_RINIT(msql), NULL,
@@ -154,6 +155,8 @@ static void _close_msql_plink(zend_rsrc_list_entry *rsrc)
msql_globals.num_links--;
}
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(msql)
{
if (cfg_get_long("msql.allow_persistent",&msql_globals.allow_persistent)==FAILURE) {
@@ -178,7 +181,10 @@ PHP_MINIT_FUNCTION(msql)
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_RINIT_FUNCTION
+ */
PHP_RINIT_FUNCTION(msql)
{
msql_globals.default_link=-1;
@@ -186,7 +192,10 @@ PHP_RINIT_FUNCTION(msql)
msqlErrMsg[0]=0;
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(msql)
{
char maxp[32],maxl[32];
@@ -213,8 +222,10 @@ PHP_MINFO_FUNCTION(msql)
php_info_print_table_end();
}
+/* }}} */
-
+/* {{{ php_msql_do_connect
+ */
static void php_msql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
{
char *host;
@@ -353,8 +364,10 @@ static void php_msql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
efree(hashed_details);
msql_globals.default_link=return_value->value.lval;
}
+/* }}} */
-
+/* {{{ php_msql_get_default_link
+ */
static int php_msql_get_default_link(INTERNAL_FUNCTION_PARAMETERS)
{
if (msql_globals.default_link==-1) { /* no link opened yet, implicitly open one */
@@ -363,7 +376,7 @@ static int php_msql_get_default_link(INTERNAL_FUNCTION_PARAMETERS)
}
return msql_globals.default_link;
}
-
+/* }}} */
/* {{{ proto int msql_connect([string hostname[:port]] [, string username] [, string password])
Open a connection to an mSQL Server */
@@ -373,7 +386,6 @@ PHP_FUNCTION(msql_connect)
}
/* }}} */
-
/* {{{ proto int msql_pconnect([string hostname[:port]] [, string username] [, string password])
Open a persistent connection to an mSQL Server */
PHP_FUNCTION(msql_pconnect)
@@ -382,7 +394,6 @@ PHP_FUNCTION(msql_pconnect)
}
/* }}} */
-
/* {{{ proto int msql_close([int link_identifier])
Close an mSQL connection */
PHP_FUNCTION(msql_close)
@@ -422,7 +433,6 @@ PHP_FUNCTION(msql_close)
}
/* }}} */
-
/* {{{ proto int msql_select_db(string database_name [, int link_identifier])
Select an mSQL database */
PHP_FUNCTION(msql_select_db)
@@ -462,7 +472,6 @@ PHP_FUNCTION(msql_select_db)
}
/* }}} */
-
/* {{{ proto int msql_create_db(string database_name [, int link_identifier])
Create an mSQL database */
PHP_FUNCTION(msql_create_db)
@@ -500,7 +509,6 @@ PHP_FUNCTION(msql_create_db)
}
/* }}} */
-
/* {{{ proto int msql_drop_db(string database_name [, int link_identifier])
Drop (delete) an mSQL database */
PHP_FUNCTION(msql_drop_db)
@@ -538,7 +546,6 @@ PHP_FUNCTION(msql_drop_db)
}
/* }}} */
-
/* {{{ proto int msql_query(string query [, int link_identifier])
Send an SQL query to mSQL */
PHP_FUNCTION(msql_query)
@@ -576,7 +583,6 @@ PHP_FUNCTION(msql_query)
}
/* }}} */
-
/* {{{ proto int msql_db_query(string database_name, string query [, int link_identifier])
Send an SQL query to mSQL */
PHP_FUNCTION(msql_db_query)
@@ -619,7 +625,6 @@ PHP_FUNCTION(msql_db_query)
}
/* }}} */
-
/* {{{ proto int msql_list_dbs([int link_identifier])
List databases available on an mSQL server */
PHP_FUNCTION(msql_list_dbs)
@@ -654,7 +659,6 @@ PHP_FUNCTION(msql_list_dbs)
}
/* }}} */
-
/* {{{ proto int msql_list_tables(string database_name [, int link_identifier])
List tables in an mSQL database */
PHP_FUNCTION(msql_list_tables)
@@ -696,7 +700,6 @@ PHP_FUNCTION(msql_list_tables)
}
/* }}} */
-
/* {{{ proto int msql_list_fields(string database_name, string table_name [, int link_identifier])
List mSQL result fields */
PHP_FUNCTION(msql_list_fields)
@@ -739,7 +742,6 @@ PHP_FUNCTION(msql_list_fields)
}
/* }}} */
-
/* {{{ proto string msql_error([int link_identifier])
Returns the text of the error message from previous mSQL operation */
PHP_FUNCTION(msql_error)
@@ -854,7 +856,6 @@ PHP_FUNCTION(msql_result)
}
/* }}} */
-
/* {{{ proto int msql_num_rows(int query)
Get number of rows in a result */
PHP_FUNCTION(msql_num_rows)
@@ -872,7 +873,6 @@ PHP_FUNCTION(msql_num_rows)
}
/* }}} */
-
/* {{{ proto int msql_num_fields(int query)
Get number of fields in a result */
PHP_FUNCTION(msql_num_fields)
@@ -890,7 +890,8 @@ PHP_FUNCTION(msql_num_fields)
}
/* }}} */
-
+/* {{{ php_msql_fetch_hash
+ */
static void php_msql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
{
pval *result, *arg2;
@@ -965,7 +966,7 @@ static void php_msql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
}
}
}
-
+/* }}} */
/* {{{ proto array msql_fetch_row(int query)
Get a result row as an enumerated array */
@@ -975,7 +976,6 @@ PHP_FUNCTION(msql_fetch_row)
}
/* }}} */
-
/* {{{ proto object msql_fetch_object(int query [, int result_type])
Fetch a result row as an object */
PHP_FUNCTION(msql_fetch_object)
@@ -1022,6 +1022,8 @@ PHP_FUNCTION(msql_data_seek)
}
/* }}} */
+/* {{{ php_msql_get_field_name
+ */
static char *php_msql_get_field_name(int field_type)
{
switch (field_type) {
@@ -1059,6 +1061,7 @@ static char *php_msql_get_field_name(int field_type)
break;
}
}
+/* }}} */
/* {{{ proto object msql_fetch_field(int query [, int field_offset])
Get column information from a result and return as an object */
@@ -1145,7 +1148,9 @@ PHP_FUNCTION(msql_field_seek)
#define PHP_MSQL_FIELD_LEN 3
#define PHP_MSQL_FIELD_TYPE 4
#define PHP_MSQL_FIELD_FLAGS 5
-
+
+/* {{{ php_msql_field_info
+ */
static void php_msql_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
{
pval *result, *field;
@@ -1230,6 +1235,7 @@ static void php_msql_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
RETURN_FALSE;
}
}
+/* }}} */
/* {{{ proto string msql_field_name(int query, int field_index)
Get the name of the specified field in a result */
@@ -1271,7 +1277,6 @@ PHP_FUNCTION(msql_field_flags)
}
/* }}} */
-
/* {{{ proto int msql_free_result(int query)
Free result memory */
PHP_FUNCTION(msql_free_result)
@@ -1308,11 +1313,10 @@ PHP_FUNCTION(msql_affected_rows)
#endif
-
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
-
diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c
index 6a0e6cb452..58c3af9963 100644
--- a/ext/mysql/php_mysql.c
+++ b/ext/mysql/php_mysql.c
@@ -110,6 +110,8 @@ typedef struct _php_mysql_conn {
} php_mysql_conn;
+/* {{{ mysql_functions[]
+ */
function_entry mysql_functions[] = {
PHP_FE(mysql_connect, NULL)
PHP_FE(mysql_pconnect, NULL)
@@ -175,12 +177,15 @@ function_entry mysql_functions[] = {
PHP_FALIAS(mysql_tablename, mysql_result, NULL)
{NULL, NULL, NULL}
};
+/* }}} */
+/* {{{ mysql_module_entry
+ */
zend_module_entry mysql_module_entry = {
"mysql", mysql_functions, PHP_MINIT(mysql), PHP_MSHUTDOWN(mysql), PHP_RINIT(mysql), PHP_RSHUTDOWN(mysql),
PHP_MINFO(mysql), STANDARD_MODULE_PROPERTIES
};
-
+/* }}} */
ZEND_DECLARE_MODULE_GLOBALS(mysql)
@@ -192,7 +197,7 @@ void timeout(int sig);
#define CHECK_LINK(link) { if (link==-1) { php_error(E_WARNING, "MySQL: A link to the server could not be established"); RETURN_FALSE; } }
-/*
+/* {{{ _free_mysql_result
* This wrapper is required since mysql_free_result() returns an integer, and
* thus, cannot be used directly
*/
@@ -202,8 +207,10 @@ static void _free_mysql_result(zend_rsrc_list_entry *rsrc)
mysql_free_result(mysql_result);
}
+/* }}} */
-
+/* {{{ php_mysql_set_default_link
+ */
static void php_mysql_set_default_link(int id)
{
MySLS_FETCH();
@@ -214,8 +221,10 @@ static void php_mysql_set_default_link(int id)
MySG(default_link) = id;
zend_list_addref(id);
}
+/* }}} */
-
+/* {{{ _close_mysql_link
+ */
static void _close_mysql_link(zend_rsrc_list_entry *rsrc)
{
php_mysql_conn *link = (php_mysql_conn *)rsrc->ptr;
@@ -228,7 +237,10 @@ static void _close_mysql_link(zend_rsrc_list_entry *rsrc)
efree(link);
MySG(num_links)--;
}
+/* }}} */
+/* {{{ _close_mysql_plink
+ */
static void _close_mysql_plink(zend_rsrc_list_entry *rsrc)
{
php_mysql_conn *link = (php_mysql_conn *)rsrc->ptr;
@@ -243,8 +255,10 @@ static void _close_mysql_plink(zend_rsrc_list_entry *rsrc)
MySG(num_persistent)--;
MySG(num_links)--;
}
+/* }}} */
-
+/* {{{ PHP_INI_MH
+ */
static PHP_INI_MH(OnMySQLPort)
{
MySLS_FETCH();
@@ -269,8 +283,9 @@ static PHP_INI_MH(OnMySQLPort)
}
return SUCCESS;
}
+/* }}} */
-
+/* {{{ PHP_INI
PHP_INI_BEGIN()
STD_PHP_INI_BOOLEAN("mysql.allow_persistent", "1", PHP_INI_SYSTEM, OnUpdateInt, allow_persistent, zend_mysql_globals, mysql_globals)
STD_PHP_INI_ENTRY_EX("mysql.max_persistent", "-1", PHP_INI_SYSTEM, OnUpdateInt, max_persistent, zend_mysql_globals, mysql_globals, display_link_numbers)
@@ -281,8 +296,10 @@ PHP_INI_BEGIN()
PHP_INI_ENTRY("mysql.default_port", NULL, PHP_INI_ALL, OnMySQLPort)
STD_PHP_INI_ENTRY("mysql.default_socket", NULL, PHP_INI_ALL, OnUpdateStringUnempty, default_socket, zend_mysql_globals, mysql_globals)
PHP_INI_END()
+/* }}} */
-
+/* {{{ php_mysql_init_globals
+ */
static void php_mysql_init_globals(zend_mysql_globals *mysql_globals)
{
mysql_globals->num_persistent = 0;
@@ -293,8 +310,10 @@ static void php_mysql_init_globals(zend_mysql_globals *mysql_globals)
mysql_globals->connect_errno = 0;
mysql_globals->connect_error = NULL;
}
+/* }}} */
-
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(mysql)
{
ZEND_INIT_MODULE_GLOBALS(mysql, php_mysql_init_globals, NULL);
@@ -313,15 +332,19 @@ PHP_MINIT_FUNCTION(mysql)
return SUCCESS;
}
+/* }}} */
-
+/* {{{ PHP_MSHUTDOWN_FUNCTION
+ */
PHP_MSHUTDOWN_FUNCTION(mysql)
{
UNREGISTER_INI_ENTRIES();
return SUCCESS;
}
+/* }}} */
-
+/* {{{ PHP_RINIT_FUNCTION
+ */
PHP_RINIT_FUNCTION(mysql)
{
MySLS_FETCH();
@@ -333,8 +356,10 @@ PHP_RINIT_FUNCTION(mysql)
MySG(connect_errno)=0;
return SUCCESS;
}
+/* }}} */
-
+/* {{{ PHP_RSHUTDOWN_FUNCTION
+ */
PHP_RSHUTDOWN_FUNCTION(mysql)
{
MySLS_FETCH();
@@ -343,8 +368,10 @@ PHP_RSHUTDOWN_FUNCTION(mysql)
}
return SUCCESS;
}
+/* }}} */
-
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(mysql)
{
char buf[32];
@@ -368,8 +395,10 @@ PHP_MINFO_FUNCTION(mysql)
DISPLAY_INI_ENTRIES();
}
+/* }}} */
-
+/* {{{ php_mysql_do_connect
+ */
#define MYSQL_DO_CONNECT_CLEANUP() \
if (free_host) { \
efree(host); \
@@ -634,8 +663,10 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
php_mysql_set_default_link(return_value->value.lval);
MYSQL_DO_CONNECT_CLEANUP();
}
+/* }}} */
-
+/* {{{ php_mysql_get_default_link
+ */
static int php_mysql_get_default_link(INTERNAL_FUNCTION_PARAMETERS MySLS_DC)
{
if (MySG(default_link)==-1) { /* no link opened yet, implicitly open one */
@@ -644,7 +675,7 @@ static int php_mysql_get_default_link(INTERNAL_FUNCTION_PARAMETERS MySLS_DC)
}
return MySG(default_link);
}
-
+/* }}} */
/* {{{ proto int mysql_connect([string hostname[:port][:/path/to/socket]] [, string username] [, string password])
Open a connection to a MySQL Server */
@@ -654,7 +685,6 @@ PHP_FUNCTION(mysql_connect)
}
/* }}} */
-
/* {{{ proto int mysql_pconnect([string hostname[:port][:/path/to/socket]] [, string username] [, string password])
Open a persistent connection to a MySQL Server */
PHP_FUNCTION(mysql_pconnect)
@@ -663,7 +693,6 @@ PHP_FUNCTION(mysql_pconnect)
}
/* }}} */
-
/* {{{ proto int mysql_close([int link_identifier])
Close a MySQL connection */
PHP_FUNCTION(mysql_close)
@@ -704,7 +733,6 @@ PHP_FUNCTION(mysql_close)
}
/* }}} */
-
/* {{{ proto int mysql_select_db(string database_name [, int link_identifier])
Select a MySQL database */
PHP_FUNCTION(mysql_select_db)
@@ -894,7 +922,6 @@ PHP_FUNCTION(mysql_create_db)
}
/* }}} */
-
/* {{{ proto int mysql_drop_db(string database_name [, int link_identifier])
Drop (delete) a MySQL database */
PHP_FUNCTION(mysql_drop_db)
@@ -935,7 +962,8 @@ PHP_FUNCTION(mysql_drop_db)
}
/* }}} */
-
+/* {{{ php_mysql_do_query_general
+ */
static void php_mysql_do_query_general(zval **query, zval **mysql_link, int link_id, zval **db, int use_store, zval *return_value)
{
php_mysql_conn *mysql;
@@ -995,8 +1023,10 @@ static void php_mysql_do_query_general(zval **query, zval **mysql_link, int link
mysql->active_result_id = Z_LVAL_P(return_value);
}
}
+/* }}} */
-
+/* {{{ php_mysql_do_query
+ */
static void php_mysql_do_query(INTERNAL_FUNCTION_PARAMETERS, int use_store)
{
zval **query, **mysql_link;
@@ -1023,7 +1053,7 @@ static void php_mysql_do_query(INTERNAL_FUNCTION_PARAMETERS, int use_store)
}
php_mysql_do_query_general(query, mysql_link, id, NULL, use_store, return_value);
}
-
+/* }}} */
/* {{{ proto int mysql_query(string query [, int link_identifier] [, int result_mode])
Send an SQL query to MySQL */
@@ -1511,7 +1541,8 @@ PHP_FUNCTION(mysql_num_fields)
}
/* }}} */
-
+/* {{{ php_mysql_fetch_hash
+ */
static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type, int expected_args)
{
zval **result, **arg2;
@@ -1594,7 +1625,7 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type,
}
}
}
-
+/* }}} */
/* {{{ proto array mysql_fetch_row(int result)
Get a result row as an enumerated array */
@@ -1691,7 +1722,8 @@ PHP_FUNCTION(mysql_fetch_lengths)
}
/* }}} */
-
+/* {{{ php_mysql_get_field_name
+ */
static char *php_mysql_get_field_name(int field_type)
{
switch(field_type) {
@@ -1744,7 +1776,7 @@ static char *php_mysql_get_field_name(int field_type)
break;
}
}
-
+/* }}} */
/* {{{ proto object mysql_fetch_field(int result [, int field_offset])
Get column information from a result and return as an object */
@@ -1833,7 +1865,8 @@ PHP_FUNCTION(mysql_field_seek)
#define PHP_MYSQL_FIELD_TYPE 4
#define PHP_MYSQL_FIELD_FLAGS 5
-
+/* {{{ php_mysql_field_info
+ */
static void php_mysql_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
{
zval **result, **field;
@@ -1952,7 +1985,7 @@ static void php_mysql_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
RETURN_FALSE;
}
}
-
+/* }}} */
/* {{{ proto string mysql_field_name(int result, int field_index)
Get the name of the specified field in a result */
@@ -2029,5 +2062,3 @@ PHP_FUNCTION(mysql_free_result)
* c-basic-offset: 4
* End:
*/
-
-
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index da209afa39..331ec4cc30 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -770,11 +770,14 @@ _oci_conn_list_dtor(oci_connection *connection)
/* }}} */
+/* {{{ php_oci_free_conn_list
+ */
static void php_oci_free_conn_list(zend_rsrc_list_entry *rsrc)
{
oci_connection *conn = (oci_connection *)rsrc->ptr;
_oci_conn_list_dtor(conn);
}
+/* }}} */
#ifdef WITH_COLLECTIONS
@@ -796,7 +799,7 @@ _oci_coll_list_dtor(zend_rsrc_list_entry *rsrc)
efree(coll);
}
-
+/* }}} */
#endif
/* {{{ _oci_descriptor_list_dtor()
@@ -847,6 +850,8 @@ _oci_session_list_dtor(zend_rsrc_list_entry *rsrc)
/* }}} */
+/* {{{ oci_handle_error
+ */
static ub4
oci_handle_error(oci_connection *connection, ub4 errcode)
{
@@ -862,6 +867,7 @@ oci_handle_error(oci_connection *connection, ub4 errcode)
return 0; /* no fatal error */
}
+/* }}} */
/* {{{ oci_error() */
@@ -3320,7 +3326,6 @@ PHP_FUNCTION(ocicloselob)
}
/* }}} */
-
#endif
/* {{{ proto string ocinewdescriptor(int connection [, int type])
@@ -3637,7 +3642,6 @@ PHP_FUNCTION(ocicolumnisnull)
/* }}} */
-
/* {{{ proto void ociinternaldebug(int onoff)
Toggle internal debugging output for the OCI extension */
/* Disables or enables the internal debug output.
@@ -4140,7 +4144,6 @@ PHP_FUNCTION(ociresult)
/* }}} */
-
/* {{{ proto string ociserverversion(int conn)
Return a string containing server version information */
diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c
index 7d769ea5e4..474e9cabc4 100644
--- a/ext/odbc/php_odbc.c
+++ b/ext/odbc/php_odbc.c
@@ -71,6 +71,8 @@ static int le_result, le_conn, le_pconn;
static unsigned char a3_arg3_and_3_force_ref[] = { 3, BYREF_NONE, BYREF_FORCE, BYREF_FORCE };
+/* {{{ odbc_functions[]
+ */
function_entry odbc_functions[] = {
PHP_FE(odbc_error, NULL)
PHP_FE(odbc_errormsg, NULL)
@@ -126,7 +128,10 @@ function_entry odbc_functions[] = {
PHP_FALIAS(odbc_field_precision, odbc_field_len, NULL)
{ NULL, NULL, NULL }
};
+/* }}} */
+/* {{{ odbc_module_entry
+ */
zend_module_entry odbc_module_entry = {
"odbc",
odbc_functions,
@@ -137,6 +142,7 @@ zend_module_entry odbc_module_entry = {
PHP_MINFO(odbc),
STANDARD_MODULE_PROPERTIES
};
+/* }}} */
#ifdef ZTS
int odbc_globals_id;
@@ -148,6 +154,8 @@ ZEND_API php_odbc_globals odbc_globals;
ZEND_GET_MODULE(odbc)
#endif
+/* {{{ _free_odbc_result
+ */
static void _free_odbc_result(zend_rsrc_list_entry *rsrc)
{
odbc_result *res = (odbc_result *)rsrc->ptr;
@@ -176,11 +184,11 @@ static void _free_odbc_result(zend_rsrc_list_entry *rsrc)
efree(res);
}
}
+/* }}} */
-/*
+/* {{{ safe_odbc_disconnect
* disconnect, and if it fails, then issue a rollback for any pending transaction (lurcher)
*/
-
static void safe_odbc_disconnect( void *handle )
{
int ret;
@@ -192,7 +200,10 @@ static void safe_odbc_disconnect( void *handle )
SQLDisconnect( handle );
}
}
+/* }}} */
+/* {{{ _close_odbc_conn
+ */
static void _close_odbc_conn(zend_rsrc_list_entry *rsrc)
{
odbc_connection *conn = (odbc_connection *)rsrc->ptr;
@@ -205,6 +216,7 @@ static void _close_odbc_conn(zend_rsrc_list_entry *rsrc)
efree(conn);
ODBCG(num_links)--;
}
+/* }}} */
static void _close_odbc_pconn(zend_rsrc_list_entry *rsrc)
{
@@ -3507,4 +3519,5 @@ PHP_FUNCTION(odbc_tableprivileges)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index 8bbf5b9f9c..1d4b1b860b 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -46,6 +46,8 @@ static unsigned char arg2of4_force_ref[] =
static unsigned char arg2and3of4_force_ref[] =
{ 4, BYREF_NONE, BYREF_FORCE, BYREF_FORCE, BYREF_NONE };
+/* {{{ openssl_functions[]
+ */
function_entry openssl_functions[] = {
PHP_FE(openssl_get_privatekey, NULL)
PHP_FE(openssl_get_publickey, NULL)
@@ -75,7 +77,10 @@ function_entry openssl_functions[] = {
PHP_FE(openssl_error_string, NULL)
{NULL, NULL, NULL}
};
+/* }}} */
+/* {{{ openssl_module_entry
+ */
zend_module_entry openssl_module_entry = {
"openssl",
openssl_functions,
@@ -86,6 +91,7 @@ zend_module_entry openssl_module_entry = {
PHP_MINFO(openssl),
STANDARD_MODULE_PROPERTIES
};
+/* }}} */
#ifdef COMPILE_DL_OPENSSL
ZEND_GET_MODULE(openssl)
@@ -102,7 +108,8 @@ static EVP_PKEY * php_openssl_evp_from_zval(zval ** val, int public_key, char *
static X509_STORE * setup_verify(zval * calist);
static STACK_OF(X509) * load_all_certs_from_file(char *certfile);
-
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(openssl)
{
le_key = zend_register_list_destructors_ex(_php_pkey_free, NULL, "OpenSSL key", module_number);
@@ -152,7 +159,10 @@ PHP_MINIT_FUNCTION(openssl)
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(openssl)
{
php_info_print_table_start();
@@ -160,15 +170,18 @@ PHP_MINFO_FUNCTION(openssl)
php_info_print_table_row(2, "OpenSSL Version", OPENSSL_VERSION_TEXT);
php_info_print_table_end();
}
+/* }}} */
+/* {{{ PHP_MSHUTDOWN_FUNCTION
+ */
PHP_MSHUTDOWN_FUNCTION(openssl)
{
EVP_cleanup();
return SUCCESS;
}
+/* }}} */
-
-/*
+/* {{{ php_openssl_x509_from_zval
Given a zval, coerce it into an X509 object.
The zval can be:
. X509 resource created using openssl_read_x509()
@@ -236,10 +249,10 @@ static X509 * php_openssl_x509_from_zval(zval ** val, int makeresource, long * r
}
return cert;
}
+/* }}} */
-
-
-/* Given a zval, coerce it into a EVP_PKEY object.
+/* {{{ php_openssl_evp_from_zval
+ Given a zval, coerce it into a EVP_PKEY object.
It can be:
1. private key resource from openssl_get_privatekey()
2. X509 resource -> public key will be extracted from it
@@ -353,6 +366,7 @@ static EVP_PKEY * php_openssl_evp_from_zval(zval ** val, int public_key, char *
}
return key;
}
+/* }}} */
/* {{{ proto bool openssl_private_encrypt(string data, string crypted, mixed key [, int padding])
Encrypt data with private key */
@@ -652,7 +666,6 @@ PHP_FUNCTION(openssl_public_decrypt)
}
/* }}} */
-
/* {{{ proto int openssl_get_privatekey(string key [, string passphrase])
Get private key */
PHP_FUNCTION(openssl_get_privatekey)
@@ -681,7 +694,6 @@ PHP_FUNCTION(openssl_get_privatekey)
}
/* }}} */
-
/* {{{ openssl -> PHP "bridging" */
static void add_assoc_name_entry(zval * val, char * key, X509_NAME * name, int shortname)
@@ -998,7 +1010,6 @@ clean_exit:
}
/* }}} */
-
/* {{{ proto int openssl_get_publickey(mixed cert)
Get public key from X.509 certificate */
PHP_FUNCTION(openssl_get_publickey)
@@ -1020,8 +1031,6 @@ PHP_FUNCTION(openssl_get_publickey)
}
/* }}} */
-
-
/* {{{ proto void openssl_free_key(int key)
Free key */
PHP_FUNCTION(openssl_free_key)
@@ -1077,7 +1086,7 @@ PHP_FUNCTION(openssl_x509_free)
}
/* }}} */
-/*
+/* {{{ setup_verify
* calist is an array containing file and directory names. create a
* certificate store and add those certs to it for use in verification.
*/
@@ -1139,6 +1148,7 @@ static X509_STORE * setup_verify(zval * calist)
}
return store;
}
+/* }}} */
/* {{{ proto mixed openssl_error_string()
returns a description of the last error, and alters the index of the error messages. returns false when the are no more messages. */
@@ -1864,5 +1874,5 @@ static void _php_x509_free(zend_rsrc_list_entry *rsrc)
* tab-width: 8
* c-basic-offset: 8
* End:
- * vim: sw=4 ts=4 tw=78
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
index 582f1c623a..ecdd8b22b7 100644
--- a/ext/pcre/php_pcre.c
+++ b/ext/pcre/php_pcre.c
@@ -93,7 +93,6 @@ PHP_MINFO_FUNCTION(pcre)
}
/* }}} */
-
/* {{{ PHP_MINIT_FUNCTION(pcre) */
static PHP_MINIT_FUNCTION(pcre)
{
@@ -114,7 +113,6 @@ static PHP_MINIT_FUNCTION(pcre)
}
/* }}} */
-
/* {{{ PHP_MSHUTDOWN_FUNCTION(pcre) */
static PHP_MSHUTDOWN_FUNCTION(pcre)
{
@@ -127,7 +125,6 @@ static PHP_MSHUTDOWN_FUNCTION(pcre)
}
/* }}} */
-
/* {{{ PHP_RINIT_FUNCTION(pcre) */
static PHP_RINIT_FUNCTION(pcre)
{
@@ -138,7 +135,8 @@ static PHP_RINIT_FUNCTION(pcre)
}
/* }}} */
-
+/* {{{ pcre_get_compiled_regex
+ */
static pcre* pcre_get_compiled_regex(char *regex, pcre_extra *extra, int *preg_options) {
pcre *re = NULL;
int coptions = 0;
@@ -320,8 +318,10 @@ static pcre* pcre_get_compiled_regex(char *regex, pcre_extra *extra, int *preg_o
return re;
}
+/* }}} */
-
+/* {{{ php_pcre_match
+ */
static void php_pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global)
{
zval **regex, /* Regular expression */
@@ -521,7 +521,7 @@ static void php_pcre_match(INTERNAL_FUNCTION_PARAMETERS, int global)
RETVAL_LONG(matched);
}
-
+/* }}} */
/* {{{ proto int preg_match(string pattern, string subject [, array subpatterns])
Perform a Perl-style regular expression match */
@@ -531,7 +531,6 @@ PHP_FUNCTION(preg_match)
}
/* }}} */
-
/* {{{ proto int preg_match_all(string pattern, string subject, array subpatterns [, int order])
Perform a Perl-style global regular expression match */
PHP_FUNCTION(preg_match_all)
@@ -540,7 +539,8 @@ PHP_FUNCTION(preg_match_all)
}
/* }}} */
-
+/* {{{ preg_get_backref
+ */
static inline int preg_get_backref(const char *walk, int *backref)
{
if (*walk && *walk >= '0' && *walk <= '9')
@@ -553,7 +553,10 @@ static inline int preg_get_backref(const char *walk, int *backref)
return 1;
}
+/* }}} */
+/* {{{ preg_do_repl_func
+ */
static int preg_do_repl_func(zval *function, char *subject, int *offsets, int count, char **result)
{
zval *retval_ptr; /* Function return value */
@@ -584,7 +587,10 @@ static int preg_do_repl_func(zval *function, char *subject, int *offsets, int co
return result_len;
}
+/* }}} */
+/* {{{ preg_do_eval
+ */
static int preg_do_eval(char *eval_str, int eval_str_len, char *subject,
int *offsets, int count, char **result)
{
@@ -674,8 +680,10 @@ static int preg_do_eval(char *eval_str, int eval_str_len, char *subject,
return result_len;
}
+/* }}} */
-
+/* {{{ php_pcre_replace
+ */
char *php_pcre_replace(char *regex, int regex_len,
char *subject, int subject_len,
zval *replace_val, int is_callable_replace,
@@ -883,8 +891,10 @@ char *php_pcre_replace(char *regex, int regex_len,
return result;
}
+/* }}} */
-
+/* {{{ php_replace_in_subject
+ */
static char *php_replace_in_subject(zval *regex, zval *replace, zval **subject, int *result_len, int limit, zend_bool is_callable_replace)
{
zval **regex_entry,
@@ -960,8 +970,10 @@ static char *php_replace_in_subject(zval *regex, zval *replace, zval **subject,
return result;
}
}
+/* }}} */
-
+/* {{{ preg_replace_impl
+ */
static void preg_replace_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_callable_replace)
{
zval **regex,
@@ -1039,7 +1051,7 @@ static void preg_replace_impl(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_callabl
}
}
}
-
+/* }}} */
/* {{{ proto string preg_replace(mixed regex, mixed replace, mixed subject [, int limit])
Perform Perl-style regular expression replacement. */
@@ -1049,7 +1061,6 @@ PHP_FUNCTION(preg_replace)
}
/* }}} */
-
/* {{{ proto string preg_replace_callback(mixed regex, mixed callback, mixed subject [, int limit])
Perform Perl-style regular expression replacement using replacement callback. */
PHP_FUNCTION(preg_replace_callback)
@@ -1058,7 +1069,6 @@ PHP_FUNCTION(preg_replace_callback)
}
/* }}} */
-
/* {{{ proto array preg_split(string pattern, string subject [, int limit [, int flags]])
Split string into an array using a perl-style regular expression as a delimiter */
PHP_FUNCTION(preg_split)
@@ -1193,7 +1203,6 @@ PHP_FUNCTION(preg_split)
}
/* }}} */
-
/* {{{ proto string preg_quote(string str, string delim_char)
Quote regular expression characters plus an optional character */
PHP_FUNCTION(preg_quote)
@@ -1278,7 +1287,6 @@ PHP_FUNCTION(preg_quote)
}
/* }}} */
-
/* {{{ proto array preg_grep(string regex, array input)
Searches array and returns entries which match regex */
PHP_FUNCTION(preg_grep)
@@ -1367,7 +1375,6 @@ PHP_FUNCTION(preg_grep)
}
/* }}} */
-
/* {{{ module definition structures */
unsigned char third_arg_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE };
@@ -1399,7 +1406,6 @@ ZEND_GET_MODULE(pcre)
/* }}} */
-
#endif /* HAVE_PCRE || HAVE_BUNDLED_PCRE */
/*
@@ -1407,4 +1413,5 @@ ZEND_GET_MODULE(pcre)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/pdf/pdf.c b/ext/pdf/pdf.c
index c73836dc9e..5599a38705 100644
--- a/ext/pdf/pdf.c
+++ b/ext/pdf/pdf.c
@@ -24,6 +24,8 @@
Copyright (C) 1997-1999 Thomas Merz. 2000-2001 PDFlib GmbH */
/* Note that there is no code from the pdflib package in this file */
+/* {{{ includes
+ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -49,6 +51,7 @@ static int le_gd;
# include <io.h>
# include <fcntl.h>
#endif
+/* }}} */
#if HAVE_PDFLIB
@@ -56,6 +59,7 @@ static int le_gd;
static int le_pdf;
+/* {{{ constants
/*
* to adopt the php way of error handling to PDFlib
* The image related functions in PDFlib return -1 on error
@@ -67,7 +71,10 @@ static int le_pdf;
#define PDFLIB_PDI_OFFSET 1
#define PDFLIB_PATTERN_OFFSET 1
#define PDFLIB_SPOT_OFFSET 1
+/* }}} */
+/* {{{ pdf_functions[]
+ */
function_entry pdf_functions[] = {
/* sorry for sorting this stuff like the pdflib manual,
but this helps me to see what is done :) RJS
@@ -229,7 +236,10 @@ function_entry pdf_functions[] = {
{NULL, NULL, NULL}
};
+/* }}} */
+/* {{{ pdf_module_entry
+ */
zend_module_entry pdf_module_entry = {
"pdf",
pdf_functions,
@@ -240,11 +250,14 @@ zend_module_entry pdf_module_entry = {
PHP_MINFO(pdf),
STANDARD_MODULE_PROPERTIES
};
+/* }}} */
#ifdef COMPILE_DL_PDF
ZEND_GET_MODULE(pdf)
#endif
+/* {{{ _free_pdf_doc
+ */
static void _free_pdf_doc(zend_rsrc_list_entry *rsrc)
{
/* RJS: TODO:
@@ -254,7 +267,10 @@ static void _free_pdf_doc(zend_rsrc_list_entry *rsrc)
/* PDF_delete(pdf);
*/
}
+/* }}} */
+/* {{{ custom_errorhandler
+ */
static void custom_errorhandler(PDF *p, int type, const char *shortmsg)
{
switch (type){
@@ -284,28 +300,43 @@ static void custom_errorhandler(PDF *p, int type, const char *shortmsg)
php_error(E_ERROR,"PDFlib error: %s", shortmsg);
}
}
+/* }}} */
+/* {{{ pdf_emalloc
+ */
static void *pdf_emalloc(PDF *p, size_t size, const char *caller)
{
return(emalloc(size));
}
+/* }}} */
+/* {{{ pdf_realloc
+ */
static void *pdf_realloc(PDF *p, void *mem, size_t size, const char *caller)
{
return(erealloc(mem, size));
}
+/* }}} */
+/* {{{ pdf_efree
+ */
static void pdf_efree(PDF *p, void *mem)
{
efree(mem);
}
+/* }}} */
+/* {{{ pdf_flushwrite
+ */
static size_t pdf_flushwrite(PDF *p, void *data, size_t size)
{
return(php_write(data, size));
return 0;
}
+/* }}} */
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(pdf)
{
char tmp[32];
@@ -324,7 +355,10 @@ PHP_MINFO_FUNCTION(pdf)
php_info_print_table_end();
}
+/* }}} */
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(pdf)
{
if ((PDF_get_majorversion() != PDFLIB_MAJORVERSION) ||
@@ -337,14 +371,19 @@ PHP_MINIT_FUNCTION(pdf)
PDF_boot();
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_MSHUTDOWN_FUNCTION
+ */
PHP_MSHUTDOWN_FUNCTION(pdf)
{
PDF_shutdown();
return SUCCESS;
}
+/* }}} */
-
+/* {{{ _php_pdf_set_info
+ */
static void _php_pdf_set_info(INTERNAL_FUNCTION_PARAMETERS, char *field)
{
zval **arg1, **arg2;
@@ -361,6 +400,7 @@ static void _php_pdf_set_info(INTERNAL_FUNCTION_PARAMETERS, char *field)
RETURN_TRUE;
}
+/* }}} */
/* {{{ proto bool pdf_set_info(int pdfdoc, string fieldname, string value)
Fills an info field of the document */
@@ -422,7 +462,6 @@ PHP_FUNCTION(pdf_set_info_keywords) {
}
/* }}} */
-
/* {{{ proto int pdf_open([int filedesc])
Opens a new pdf document. If filedesc is NULL, document is created in memory. This is the old interface, only for compatibility use pdf_new + pdf_open_file instead */
PHP_FUNCTION(pdf_open)
@@ -640,7 +679,8 @@ PHP_FUNCTION(pdf_set_font)
}
/* }}} */
-
+/* {{{ _php_pdf_set_value
+ */
static void _php_pdf_set_value(INTERNAL_FUNCTION_PARAMETERS, char *field)
{
zval **arg1, **arg2;
@@ -657,6 +697,7 @@ static void _php_pdf_set_value(INTERNAL_FUNCTION_PARAMETERS, char *field)
RETURN_TRUE;
}
+/* }}} */
/* {{{ proto void pdf_set_value(int pdfdoc, string key, double value)
Sets arbitrary value */
@@ -1776,6 +1817,8 @@ PHP_FUNCTION(pdf_set_duration)
}
/* }}} */
+/* {{{ _php_pdf_open_image
+ */
static void _php_pdf_open_image(INTERNAL_FUNCTION_PARAMETERS, char *type)
{
zval **arg1, **arg2;
@@ -1801,6 +1844,7 @@ static void _php_pdf_open_image(INTERNAL_FUNCTION_PARAMETERS, char *type)
RETURN_LONG(pdf_image+PDFLIB_IMAGE_OFFSET);
}
+/* }}} */
/* {{{ proto int pdf_open_gif(int pdf, string giffile)
Opens a GIF file and returns an image for placement in a pdf object */
@@ -2670,6 +2714,7 @@ PHP_FUNCTION(pdf_open_pdi) {
RETURN_LONG(pdi_handle+PDFLIB_PDI_OFFSET);
}
+/* }}} */
/* {{{ proto void pdf_close_pdi(int pdf, int doc);
* Close all open page handles, and close the input PDF document. */
@@ -2690,6 +2735,7 @@ PHP_FUNCTION(pdf_close_pdi) {
RETURN_TRUE;
}
+/* }}} */
/* {{{ proto int pdf_open_pdi_page(int pdf, int doc, int page, string label);
* Prepare a page for later use with PDF_place_image(). */
@@ -2715,6 +2761,7 @@ PHP_FUNCTION(pdf_open_pdi_page) {
RETURN_LONG(pdi_image+PDFLIB_IMAGE_OFFSET);
}
+/* }}} */
/* {{{ proto void pdf_place_pdi_page(int pdf, int page, double x, double y, double sx, double sy)
* Place a PDF page with the lower left corner at (x, y), and scale it. */
@@ -2743,6 +2790,7 @@ PHP_FUNCTION(pdf_place_pdi_page) {
RETURN_TRUE;
}
+/* }}} */
/* {{{ proto void pdf_close_pdi_page(int pdf, int page);
* Close the page handle, and free all page-related resources. */
@@ -2763,6 +2811,7 @@ PHP_FUNCTION(pdf_close_pdi_page) {
RETURN_TRUE;
}
+/* }}} */
/* {{{ proto string pdf_get_pdi_parameter(int pdf, string key, int doc, int page, int index);
* Get the contents of some PDI document parameter with string type. */
@@ -2792,6 +2841,7 @@ PHP_FUNCTION(pdf_get_pdi_parameter) {
RETURN_STRINGL((char *)buffer, size, 1);
}
+/* }}} */
/* {{{ proto double pdf_get_pdi_value(int pdf, string key, int doc, int page, int index);
* Get the contents of some PDI document parameter with numerical type. */
@@ -2819,6 +2869,7 @@ PHP_FUNCTION(pdf_get_pdi_value) {
RETURN_DOUBLE(value);
}
+/* }}} */
/* {{{ proto int pdf_begin_pattern(int pdf, double width, double height, double xstep, double ystep, int painttype);
* Start a new pattern definition. */
@@ -2848,6 +2899,7 @@ PHP_FUNCTION(pdf_begin_pattern) {
RETURN_LONG(pattern_image+PDFLIB_PATTERN_OFFSET);
}
+/* }}} */
/* {{{ proto void pdf_end_pattern(int pdf);
* Finish the pattern definition. */
@@ -2865,6 +2917,7 @@ PHP_FUNCTION(pdf_end_pattern) {
RETURN_TRUE;
}
+/* }}} */
/* {{{ proto int pdf_begin_template(int pdf, double width, double height);
* Start a new template definition. */
@@ -2888,6 +2941,7 @@ PHP_FUNCTION(pdf_begin_template) {
RETURN_LONG(tmpl_image+PDFLIB_IMAGE_OFFSET);
}
+/* }}} */
/* {{{ proto void pdf_end_template(int pdf);
* Finish the template definition. */
@@ -2906,6 +2960,7 @@ PHP_FUNCTION(pdf_end_template) {
RETURN_TRUE;
}
+/* }}} */
/* {{{ proto void pdf_setcolor(int pdf, string type, string colorspace, double c1 [, double c2 [, double c3 [, double c4]]]);
* Set the current color space and color. */
@@ -2968,6 +3023,7 @@ PHP_FUNCTION(pdf_setcolor) {
RETURN_TRUE;
}
+/* }}} */
/* {{{ proto int pdf_makespotcolor(int pdf, string spotname);
* Make a named spot color from the current color. */
@@ -2990,6 +3046,7 @@ PHP_FUNCTION(pdf_makespotcolor) {
RETURN_LONG(spotcolor+PDFLIB_SPOT_OFFSET);
}
+/* }}} */
/* {{{ proto void pdf_arcn(int pdf, double x, double y, double r, double alpha, double beta);
* Draw a clockwise circular arc from alpha to beta degrees. */
@@ -3018,6 +3075,7 @@ PHP_FUNCTION(pdf_arcn) {
RETURN_TRUE;
}
+/* }}} */
/* {{{ proto void pdf_initgraphics(int pdf);
* Reset all implicit color and graphics state parameters to their defaults. */
@@ -3035,6 +3093,7 @@ PHP_FUNCTION(pdf_initgraphics) {
RETURN_TRUE;
}
+/* }}} */
/* {{{ proto void pdf_add_thumbnail(int pdf, int image);
* Add an existing image as thumbnail for the current page. */
@@ -3055,6 +3114,7 @@ PHP_FUNCTION(pdf_add_thumbnail) {
RETURN_TRUE;
}
+/* }}} */
/* {{{ proto void pdf_setmatrix(int pdf, double a, double b, double c, double d, double e, double f)
Explicitly set the current transformation matrix. */
@@ -3085,7 +3145,7 @@ PHP_FUNCTION(pdf_setmatrix) {
RETURN_TRUE;
}
-
+/* }}} */
#endif /* PDFlib >= V4 */
#endif
diff --git a/ext/pfpro/pfpro.c b/ext/pfpro/pfpro.c
index 860a4f1a1e..666239fcd0 100644
--- a/ext/pfpro/pfpro.c
+++ b/ext/pfpro/pfpro.c
@@ -599,4 +599,5 @@ PHP_FUNCTION(pfpro_process)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 35e5b23191..a2f479e75b 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -45,6 +45,8 @@
#define CHECK_DEFAULT_LINK(x) if (x == -1) { php_error(E_WARNING, "%s: no PostgreSQL link opened yet", get_active_function_name()); }
+/* {{{ pgsql_functions[]
+ */
function_entry pgsql_functions[] = {
PHP_FE(pg_connect, NULL)
PHP_FE(pg_pconnect, NULL)
@@ -94,7 +96,10 @@ function_entry pgsql_functions[] = {
#endif
{NULL, NULL, NULL}
};
+/* }}} */
+/* {{{ pgsql_module_entry
+ */
zend_module_entry pgsql_module_entry = {
"pgsql",
pgsql_functions,
@@ -105,6 +110,7 @@ zend_module_entry pgsql_module_entry = {
PHP_MINFO(pgsql),
STANDARD_MODULE_PROPERTIES
};
+/* }}} */
#ifdef COMPILE_DL_PGSQL
ZEND_GET_MODULE(pgsql)
@@ -118,6 +124,8 @@ int pgsql_globals_id;
PHP_PGSQL_API php_pgsql_globals pgsql_globals;
#endif
+/* {{{ php_pgsql_set_default_link
+ */
static void php_pgsql_set_default_link(int id)
{
PGLS_FETCH();
@@ -130,8 +138,10 @@ static void php_pgsql_set_default_link(int id)
PGG(default_link) = id;
}
+/* }}} */
-
+/* {{{ _close_pgsql_link
+ */
static void _close_pgsql_link(zend_rsrc_list_entry *rsrc)
{
PGconn *link = (PGconn *)rsrc->ptr;
@@ -140,8 +150,10 @@ static void _close_pgsql_link(zend_rsrc_list_entry *rsrc)
PQfinish(link);
PGG(num_links)--;
}
+/* }}} */
-
+/* {{{ _close_pgsql_plink
+ */
static void _close_pgsql_plink(zend_rsrc_list_entry *rsrc)
{
PGconn *link = (PGconn *)rsrc->ptr;
@@ -154,8 +166,10 @@ static void _close_pgsql_plink(zend_rsrc_list_entry *rsrc)
efree(PGG(last_notice));
}
}
+/* }}} */
-
+/* {{{ _notice_handler
+ */
static void
_notice_handler(void *arg, const char *message)
{
@@ -169,7 +183,10 @@ _notice_handler(void *arg, const char *message)
PGG(last_notice) = estrdup(message);
}
}
+/* }}} */
+/* {{{ _rollback_transactions
+ */
static int _rollback_transactions(zend_rsrc_list_entry *rsrc)
{
PGconn *link;
@@ -186,36 +203,48 @@ static int _rollback_transactions(zend_rsrc_list_entry *rsrc)
return 0;
}
+/* }}} */
-
+/* {{{ _free_ptr
+ */
static void _free_ptr(zend_rsrc_list_entry *rsrc)
{
pgLofp *lofp = (pgLofp *)rsrc->ptr;
efree(lofp);
}
+/* }}} */
-
+/* {{{ _free_result
+ */
static void _free_result(zend_rsrc_list_entry *rsrc)
{
pgsql_result_handle *pg_result = (pgsql_result_handle *)rsrc->ptr;
PQclear(pg_result->result);
efree(pg_result);
}
+/* }}} */
+/* {{{ PHP_INI
+ */
PHP_INI_BEGIN()
STD_PHP_INI_BOOLEAN("pgsql.allow_persistent", "1", PHP_INI_SYSTEM, OnUpdateInt, allow_persistent, php_pgsql_globals, pgsql_globals)
STD_PHP_INI_ENTRY_EX("pgsql.max_persistent", "-1", PHP_INI_SYSTEM, OnUpdateInt, max_persistent, php_pgsql_globals, pgsql_globals, display_link_numbers)
STD_PHP_INI_ENTRY_EX("pgsql.max_links", "-1", PHP_INI_SYSTEM, OnUpdateInt, max_links, php_pgsql_globals, pgsql_globals, display_link_numbers)
PHP_INI_END()
+/* }}} */
-
+/* {{{ php_pgsql_init_globals
+ */
static void php_pgsql_init_globals(PGLS_D)
{
PGG(num_persistent) = 0;
PGG(ignore_notices) = 0;
PGG(last_notice) = NULL;
}
+/* }}} */
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(pgsql)
{
#ifdef ZTS
@@ -239,15 +268,19 @@ PHP_MINIT_FUNCTION(pgsql)
return SUCCESS;
}
+/* }}} */
-
+/* {{{ PHP_MSHUTDOWN_FUNCTION
+ */
PHP_MSHUTDOWN_FUNCTION(pgsql)
{
UNREGISTER_INI_ENTRIES();
return SUCCESS;
}
+/* }}} */
-
+/* {{{ PHP_RINIT_FUNCTION
+ */
PHP_RINIT_FUNCTION(pgsql)
{
PGLS_FETCH();
@@ -256,16 +289,20 @@ PHP_RINIT_FUNCTION(pgsql)
PGG(num_links) = PGG(num_persistent);
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_RSHUTDOWN_FUNCTION
+ */
PHP_RSHUTDOWN_FUNCTION(pgsql)
{
ELS_FETCH();
zend_hash_apply(&EG(persistent_list), (apply_func_t) _rollback_transactions);
return SUCCESS;
}
+/* }}} */
-
-
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(pgsql)
{
char buf[32];
@@ -282,8 +319,11 @@ PHP_MINFO_FUNCTION(pgsql)
DISPLAY_INI_ENTRIES();
}
+/* }}} */
+/* {{{ php_pgsql_do_connect
+ */
void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
{
char *host=NULL,*port=NULL,*options=NULL,*tty=NULL,*dbname=NULL,*connstring=NULL;
@@ -497,8 +537,10 @@ void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent)
efree(hashed_details);
php_pgsql_set_default_link(return_value->value.lval);
}
+/* }}} */
-
+/* {{{ php_pgsql_get_default_link
+ */
int php_pgsql_get_default_link(INTERNAL_FUNCTION_PARAMETERS)
{
PGLS_FETCH();
@@ -509,7 +551,7 @@ int php_pgsql_get_default_link(INTERNAL_FUNCTION_PARAMETERS)
}
return PGG(default_link);
}
-
+/* }}} */
/* {{{ proto int pg_connect([string connection_string] | [string host, string port [, string options [, string tty,]] string database)
Open a PostgreSQL connection */
@@ -576,6 +618,8 @@ PHP_FUNCTION(pg_close)
#define PHP_PG_TTY 5
#define PHP_PG_HOST 6
+/* {{{ php_pgsql_get_link_info
+ */
void php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
{
zval **pgsql_link = NULL;
@@ -626,6 +670,7 @@ void php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
return_value->value.str.val = (char *) estrdup(return_value->value.str.val);
return_value->type = IS_STRING;
}
+/* }}} */
/* {{{ proto string pg_dbname([int connection])
Get the database name */
@@ -743,6 +788,7 @@ PHP_FUNCTION(pg_exec)
}
}
/* }}} */
+
/* {{{ proto int pg_end_copy([int connection])
Sync with backend. Completes the Copy command */
PHP_FUNCTION(pg_end_copy)
@@ -824,6 +870,8 @@ PHP_FUNCTION(pg_put_line)
#define PHP_PG_NUM_FIELDS 2
#define PHP_PG_CMD_TUPLES 3
+/* {{{ php_pgsql_get_result_info
+ */
void php_pgsql_get_result_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
{
zval **result;
@@ -858,6 +906,7 @@ void php_pgsql_get_result_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
}
return_value->type = IS_LONG;
}
+/* }}} */
/* {{{ proto int pg_numrows(int result)
Return the number of rows in the result */
@@ -897,6 +946,8 @@ PHP_FUNCTION(pg_last_notice)
}
/* }}} */
+/* {{{ get_field_name
+ */
char *get_field_name(PGconn *pgsql, Oid oid, HashTable *list)
{
PGresult *result;
@@ -941,12 +992,14 @@ char *get_field_name(PGconn *pgsql, Oid oid, HashTable *list)
}
return ret;
}
-
+/* }}} */
#define PHP_PG_FIELD_NAME 1
#define PHP_PG_FIELD_SIZE 2
#define PHP_PG_FIELD_TYPE 3
+/* {{{ php_pgsql_get_field_info
+ */
void php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
{
zval **result, **field;
@@ -987,6 +1040,7 @@ void php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
RETURN_FALSE;
}
}
+/* }}} */
/* {{{ proto string pg_fieldname(int result, int field_number)
Returns the name of the field */
@@ -1081,7 +1135,8 @@ PHP_FUNCTION(pg_result)
}
/* }}} */
-
+/* {{{ void php_pgsql_fetch_hash
+ */
static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
{
zval **result, **row, **arg3;
@@ -1160,7 +1215,7 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type)
}
}
}
-
+/* }}} */
/* {{{ proto array pg_fetch_row(int result, int row)
Get a row as an enumerated array */
@@ -1195,6 +1250,8 @@ PHP_FUNCTION(pg_fetch_object)
#define PHP_PG_DATA_LENGTH 1
#define PHP_PG_DATA_ISNULL 2
+/* {{{ php_pgsql_data_info
+ */
void php_pgsql_data_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
{
zval **result, **row, **field;
@@ -1240,6 +1297,7 @@ void php_pgsql_data_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type)
}
return_value->type = IS_LONG;
}
+/* }}} */
/* {{{ proto int pg_fieldprtlen(int result, int row, mixed field_name_or_number)
Returns the printed length */
@@ -1311,7 +1369,6 @@ PHP_FUNCTION(pg_getlastoid)
}
/* }}} */
-
/* {{{ proto bool pg_trace(string filename [, string mode [, resource connection]])
Enable tracing a PostgreSQL connection */
PHP_FUNCTION(pg_trace)
@@ -1367,7 +1424,7 @@ PHP_FUNCTION(pg_trace)
ZEND_REGISTER_RESOURCE(NULL, fp, php_file_le_fopen());
RETURN_TRUE;
}
-
+/* }}} */
/* {{{ proto bool pg_untrace([int connection])
Disable tracing of a PostgreSQL connection */
@@ -1397,7 +1454,7 @@ PHP_FUNCTION(pg_untrace)
PQuntrace(pgsql);
RETURN_TRUE;
}
-
+/* }}} */
/* {{{ proto int pg_locreate(int connection)
Create a large object */
@@ -1901,4 +1958,3 @@ PHP_FUNCTION(pg_client_encoding)
* c-basic-offset: 4
* End:
*/
-
diff --git a/ext/posix/posix.c b/ext/posix/posix.c
index 5723768f3c..6dd6fac233 100644
--- a/ext/posix/posix.c
+++ b/ext/posix/posix.c
@@ -29,7 +29,6 @@
/* $Id$ */
-
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -66,6 +65,8 @@
#define SAFE_STRING(s) ((s)?(s):"")
+/* {{{ posix_functions[]
+ */
function_entry posix_functions[] = {
/* POSIX.1, 3.3 */
PHP_FE(posix_kill, NULL)
@@ -121,9 +122,12 @@ function_entry posix_functions[] = {
{NULL, NULL, NULL}
};
+/* }}} */
static PHP_MINFO_FUNCTION(posix);
+/* {{{ posix_module_entry
+ */
zend_module_entry posix_module_entry = {
"posix",
posix_functions,
@@ -134,17 +138,21 @@ zend_module_entry posix_module_entry = {
PHP_MINFO(posix),
STANDARD_MODULE_PROPERTIES
};
+/* }}} */
#ifdef COMPILE_DL_POSIX
ZEND_GET_MODULE(posix)
#endif
+/* {{{ PHP_MINFO_FUNCTION
+ */
static PHP_MINFO_FUNCTION(posix)
{
php_info_print_table_start();
php_info_print_table_row(2, "Revision", "$Revision$");
php_info_print_table_end();
}
+/* }}} */
/* {{{ proto int posix_kill(int pid, int sig)
Send a signal to a process (POSIX.1, 3.3.2) */
@@ -349,7 +357,6 @@ PHP_FUNCTION(posix_setegid)
}
/* }}} */
-
/* {{{ proto long posix_getgroups(void)
Get supplementary group id's (POSIX.1, 4.2.3) */
PHP_FUNCTION(posix_getgroups)
@@ -685,6 +692,7 @@ PHP_FUNCTION(posix_mkfifo)
RETURN_FALSE;
#endif
}
+/* }}} */
/*
POSIX.1, 5.5.1 unlink()
@@ -735,7 +743,6 @@ PHP_FUNCTION(posix_getgrnam)
}
/* }}} */
-
/* {{{ proto array posix_getgrgid(long gid)
Group database access (POSIX.1, 9.2.1) */
PHP_FUNCTION(posix_getgrgid)
@@ -840,6 +847,8 @@ PHP_FUNCTION(posix_getpwuid)
#define UNLIMITED_STRING "unlimited"
+/* {{{ posix_addlimit
+ */
static int posix_addlimit(int limit, char *name, pval *return_value) {
int result;
struct rlimit rl;
@@ -869,7 +878,10 @@ static int posix_addlimit(int limit, char *name, pval *return_value) {
return SUCCESS;
}
+/* }}} */
+/* {{{ limits[]
+ */
struct limitlist {
int limit;
char *name;
@@ -924,6 +936,7 @@ struct limitlist {
{ 0, NULL }
};
+/* }}} */
#endif /* HAVE_GETRLIMIT */
@@ -948,7 +961,6 @@ PHP_FUNCTION(posix_getrlimit)
}
/* }}} */
-
#endif
/*
@@ -956,4 +968,5 @@ PHP_FUNCTION(posix_getrlimit)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/pspell/pspell.c b/ext/pspell/pspell.c
index 78f8eaf160..10abf469f7 100644
--- a/ext/pspell/pspell.c
+++ b/ext/pspell/pspell.c
@@ -45,6 +45,8 @@
#define PSPELL_SPEED_MASK_INTERNAL 3L
#define PSPELL_RUN_TOGETHER 8L
+/* {{{ pspell_functions[]
+ */
function_entry pspell_functions[] = {
PHP_FE(pspell_new, NULL)
PHP_FE(pspell_new_personal, NULL)
@@ -64,6 +66,7 @@ function_entry pspell_functions[] = {
PHP_FE(pspell_config_repl, NULL)
PHP_FE(pspell_config_save_repl, NULL)
};
+/* }}} */
static int le_pspell, le_pspell_config;
@@ -87,6 +90,8 @@ static void php_pspell_close_config(zend_rsrc_list_entry *rsrc)
delete_pspell_config(config);
}
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(pspell){
REGISTER_MAIN_LONG_CONSTANT("PSPELL_FAST", PSPELL_FAST, CONST_PERSISTENT | CONST_CS);
REGISTER_MAIN_LONG_CONSTANT("PSPELL_NORMAL", PSPELL_NORMAL, CONST_PERSISTENT | CONST_CS);
@@ -96,6 +101,7 @@ PHP_MINIT_FUNCTION(pspell){
le_pspell_config = zend_register_list_destructors_ex(php_pspell_close_config, NULL, "pspell config", module_number);
return SUCCESS;
}
+/* }}} */
/* {{{ proto int pspell_new(string language [, string spelling [, string jargon [, string encoding [, int mode]]]])
Load a dictionary */
@@ -777,11 +783,22 @@ PHP_FUNCTION(pspell_config_save_repl){
}
/* }}} */
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(pspell)
{
php_info_print_table_start();
php_info_print_table_row(2, "PSpell Support", "enabled");
php_info_print_table_end();
}
+/* }}} */
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c
index 53746c2bb8..b8617105c1 100644
--- a/ext/shmop/shmop.c
+++ b/ext/shmop/shmop.c
@@ -16,6 +16,7 @@
| Ilia Alshanetsky (iliaa@home.com) |
+----------------------------------------------------------------------+
*/
+/* $Id$ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -39,8 +40,8 @@ php_shmop_globals shmop_globals;
int shm_type;
-/* Every user visible function must have an entry in shmop_functions[].
-*/
+/* {{{ shmop_functions[]
+ */
function_entry shmop_functions[] = {
PHP_FE(shmop_open, NULL)
PHP_FE(shmop_read, NULL)
@@ -50,7 +51,10 @@ function_entry shmop_functions[] = {
PHP_FE(shmop_delete, NULL)
{NULL, NULL, NULL} /* Must be the last line in shmop_functions[] */
};
+/* }}} */
+/* {{{ shmop_module_entry
+ */
zend_module_entry shmop_module_entry = {
"shmop",
shmop_functions,
@@ -61,36 +65,49 @@ zend_module_entry shmop_module_entry = {
PHP_MINFO(shmop),
STANDARD_MODULE_PROPERTIES
};
+/* }}} */
#ifdef COMPILE_DL_SHMOP
ZEND_GET_MODULE(shmop)
#endif
+/* {{{ rsclean
+ */
static void rsclean(zend_rsrc_list_entry *rsrc)
{
struct php_shmop *shmop = (struct php_shmop *)rsrc->ptr;
shmdt(shmop->addr);
efree(shmop);
}
+/* }}} */
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(shmop)
{
shm_type = zend_register_list_destructors_ex(rsclean, NULL, "shmop", module_number);
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_MSHUTDOWN_FUNCTION
+ */
PHP_MSHUTDOWN_FUNCTION(shmop)
{
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(shmop)
{
php_info_print_table_start();
php_info_print_table_row(2, "shmop support", "enabled");
php_info_print_table_end();
}
+/* }}} */
/* {{{ proto int shmop_open (int key, int flags, int mode, int size)
gets and attaches a shared memory segment */
@@ -158,7 +175,6 @@ PHP_FUNCTION(shmop_open)
}
/* }}} */
-
/* {{{ proto string shmop_read (int shmid, int start, int count)
reads from a shm segment */
PHP_FUNCTION(shmop_read)
@@ -210,7 +226,6 @@ PHP_FUNCTION(shmop_read)
}
/* }}} */
-
/* {{{ proto void shmop_close (int shmid)
closes a shared memory segment */
PHP_FUNCTION(shmop_close)
@@ -235,7 +250,6 @@ PHP_FUNCTION(shmop_close)
}
/* }}} */
-
/* {{{ proto int shmop_size (int shmid)
returns the shm size */
PHP_FUNCTION(shmop_size)
@@ -261,7 +275,6 @@ PHP_FUNCTION(shmop_size)
}
/* }}} */
-
/* {{{ proto int shmop_write (int shmid, string data, int offset)
writes to a shared memory segment */
PHP_FUNCTION(shmop_write)
@@ -298,7 +311,6 @@ PHP_FUNCTION(shmop_write)
}
/* }}} */
-
/* {{{ proto bool shmop_delete (int shmid)
mark segment for deletion */
PHP_FUNCTION(shmop_delete)
@@ -331,10 +343,10 @@ PHP_FUNCTION(shmop_delete)
#endif /* HAVE_SHMOP */
-
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/skeleton/skeleton.c b/ext/skeleton/skeleton.c
index 25b5e3d847..a30bc8c591 100644
--- a/ext/skeleton/skeleton.c
+++ b/ext/skeleton/skeleton.c
@@ -15,14 +15,18 @@ ZEND_DECLARE_MODULE_GLOBALS(extname)
/* True global resources - no need for thread safety here */
static int le_extname;
-/* Every user visible function must have an entry in extname_functions[].
-*/
+/* {{{ extname_functions[]
+ *
+ * Every user visible function must have an entry in extname_functions[].
+ */
function_entry extname_functions[] = {
PHP_FE(confirm_extname_compiled, NULL) /* For testing, remove later. */
/* __function_entries_here__ */
{NULL, NULL, NULL} /* Must be the last line in extname_functions[] */
};
+/* {{{ extname_module_entry
+ */
zend_module_entry extname_module_entry = {
"extname",
extname_functions,
@@ -33,18 +37,24 @@ zend_module_entry extname_module_entry = {
PHP_MINFO(extname),
STANDARD_MODULE_PROPERTIES
};
+/* }}} */
#ifdef COMPILE_DL_EXTNAME
ZEND_GET_MODULE(extname)
#endif
+/* {{{ PHP_INI
+ */
/* Remove comments and fill if you need to have entries in php.ini
PHP_INI_BEGIN()
STD_PHP_INI_ENTRY("extname.value", "42", PHP_INI_ALL, OnUpdateInt, global_value, zend_extname_globals, extname_globals)
STD_PHP_INI_ENTRY("extname.string", "foobar", PHP_INI_ALL, OnUpdateString, global_string, zend_extname_globals, extname_globals)
PHP_INI_END()
*/
+/* }}} */
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(extname)
{
/* Remove comments if you have entries in php.ini
@@ -52,7 +62,10 @@ PHP_MINIT_FUNCTION(extname)
*/
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_MSHUTDOWN_FUNCTION
+ */
PHP_MSHUTDOWN_FUNCTION(extname)
{
/* Remove comments if you have entries in php.ini
@@ -60,19 +73,28 @@ PHP_MSHUTDOWN_FUNCTION(extname)
*/
return SUCCESS;
}
+/* }}} */
/* Remove if there's nothing to do at request start */
+/* {{{ PHP_RINIT_FUNCTION
+ */
PHP_RINIT_FUNCTION(extname)
{
return SUCCESS;
}
+/* }}} */
/* Remove if there's nothing to do at request end */
+/* {{{ PHP_RSHUTDOWN_FUNCTION
+ */
PHP_RSHUTDOWN_FUNCTION(extname)
{
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(extname)
{
php_info_print_table_start();
@@ -83,6 +105,7 @@ PHP_MINFO_FUNCTION(extname)
DISPLAY_INI_ENTRIES();
*/
}
+/* }}} */
/* Remove the following function when you have succesfully modified config.m4
so that your module can be compiled into PHP, it exists only for testing
@@ -107,12 +130,18 @@ PHP_FUNCTION(confirm_extname_compiled)
RETURN_STRINGL(string, len, 1);
}
/* }}} */
-/* The previous line is meant for emacs, so it can correctly fold and unfold
- functions in source code. See the corresponding marks just before function
- definition, where the functions purpose is also documented. Please follow
- this convention for the convenience of others editing your code.
+/* The previous line is meant for vim and emacs, so it can correctly fold and
+ unfold functions in source code. See the corresponding marks just before
+ function definition, where the functions purpose is also documented. Please
+ follow this convention for the convenience of others editing your code.
*/
/* __function_stubs_here__ */
-/* __footer_here__ */
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c
index f6a361f982..35155ef851 100644
--- a/ext/snmp/snmp.c
+++ b/ext/snmp/snmp.c
@@ -79,6 +79,8 @@ void php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st);
/* constant - can be shared among threads */
static oid objid_mib[] = {1, 3, 6, 1, 2, 1};
+/* {{{ snmp_functions[]
+ */
function_entry snmp_functions[] = {
PHP_FE(snmpget, NULL)
PHP_FE(snmpwalk, NULL)
@@ -89,7 +91,10 @@ function_entry snmp_functions[] = {
PHP_FE(snmpset, NULL)
{NULL,NULL,NULL}
};
+/* }}} */
+/* {{{ snmp_module_entry
+ */
zend_module_entry snmp_module_entry = {
"snmp",
snmp_functions,
@@ -100,6 +105,7 @@ zend_module_entry snmp_module_entry = {
PHP_MINFO(snmp),
STANDARD_MODULE_PROPERTIES
};
+/* }}} */
#ifdef COMPILE_DL_SNMP
ZEND_GET_MODULE(snmp)
@@ -107,12 +113,17 @@ ZEND_GET_MODULE(snmp)
/* THREAD_LS snmp_module php_snmp_module; - may need one of these at some point */
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(snmp)
{
init_mib();
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(snmp)
{
php_info_print_table_start();
@@ -120,9 +131,10 @@ PHP_MINFO_FUNCTION(snmp)
php_info_print_table_row(2, "UCD-SNMP Version", VersionInfo);
php_info_print_table_end();
}
+/* }}} */
-
-/*
+/* {{{ php_snmp
+*
* Generic SNMP object fetcher
*
* st=1 snmpget() - query an agent and return a single value.
@@ -342,6 +354,7 @@ retry:
} /* keepwalking */
snmp_close(ss);
}
+/* }}} */
/* {{{ proto string snmpget(string host, string community, string object_id [, int timeout [, int retries]])
Fetch a SNMP object */
@@ -393,8 +406,9 @@ PHP_FUNCTION(snmpset) {
#endif
/*
-* Local variables:
-* tab-width: 4
-* c-basic-offset: 4
-* End:
-*/
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/snmp/winsnmp.c b/ext/snmp/winsnmp.c
index 45bda9fa9b..6e01354acf 100644
--- a/ext/snmp/winsnmp.c
+++ b/ext/snmp/winsnmp.c
@@ -21,16 +21,21 @@ Created from the snmputil sample in the Microsoft SDK for NT
#include <snmp.h>
#include <mgmtapi.h>
-
+/* {{{ snmp_functions[]
+ */
function_entry snmp_functions[] = {
{"snmpget", php3_snmpget, NULL},
{"snmpwalk", php3_snmpwalk, NULL},
{NULL,NULL,NULL}
};
+/* }}} */
+/* {{{ snmp_module_entry
+ */
zend_module_entry snmp_module_entry = {
"SNMP",snmp_functions,NULL,NULL,NULL,NULL,NULL,0,0,0,NULL
};
+/* }}} */
#if COMPILE_DL
DLEXPORT zend_module_entry *get_module() { return &snmp_module_entry; }
@@ -43,8 +48,9 @@ DLEXPORT zend_module_entry *get_module() { return &snmp_module_entry; }
#define TIMEOUT 6000 /* milliseconds */
#define RETRIES 3
-
-void _php3_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
+/* {{{ _php_snmp
+ */
+void _php_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
pval *a1, *a2, *a3;
INT operation;
LPSTR agent;
@@ -209,20 +215,28 @@ void _php3_snmp(INTERNAL_FUNCTION_PARAMETERS, int st) {
php_error(E_WARNING,"error on SnmpMgrClose %d\n", GetLastError());
}
}
+/* }}} */
+/* {{{ php3_snmpget
+ */
DLEXPORT void php3_snmpget(INTERNAL_FUNCTION_PARAMETERS) {
- _php3_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU,1);
+ _php_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU,1);
}
+/* }}} */
+/* {{{ php3_snmpwalk
+ */
DLEXPORT void php3_snmpwalk(INTERNAL_FUNCTION_PARAMETERS) {
- _php3_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU,2);
+ _php_snmp(INTERNAL_FUNCTION_PARAM_PASSTHRU,2);
}
-
+/* }}} */
#endif
+
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/array.c b/ext/standard/array.c
index 4e35c9e269..e69dc6e597 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -3122,4 +3122,5 @@ PHP_FUNCTION(key_exists)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/assert.c b/ext/standard/assert.c
index 91eb3fde4e..e5988f3a90 100644
--- a/ext/standard/assert.c
+++ b/ext/standard/assert.c
@@ -329,4 +329,5 @@ PHP_FUNCTION(assert_options)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/base64.c b/ext/standard/base64.c
index f5f3d48272..21864431fe 100644
--- a/ext/standard/base64.c
+++ b/ext/standard/base64.c
@@ -196,4 +196,5 @@ PHP_FUNCTION(base64_decode) {
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 5dc26a3f98..3f14dc599c 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -2623,4 +2623,5 @@ PHP_FUNCTION(is_callable)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c
index 3976613a79..9e39af959c 100644
--- a/ext/standard/browscap.c
+++ b/ext/standard/browscap.c
@@ -253,4 +253,5 @@ PHP_FUNCTION(get_browser)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/crc32.c b/ext/standard/crc32.c
index 3048e366a7..e7b754d92f 100644
--- a/ext/standard/crc32.c
+++ b/ext/standard/crc32.c
@@ -131,4 +131,5 @@ PHP_NAMED_FUNCTION(php_if_crc32)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/credits.c b/ext/standard/credits.c
index 226ef54090..7a65ab09b3 100644
--- a/ext/standard/credits.c
+++ b/ext/standard/credits.c
@@ -109,3 +109,10 @@ PHPAPI void php_print_credits(int flag)
PUTS("</body></html>\n");
}
}
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c
index 011242acc0..8d749e90fb 100644
--- a/ext/standard/crypt.c
+++ b/ext/standard/crypt.c
@@ -182,4 +182,5 @@ PHP_FUNCTION(crypt)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/cyr_convert.c b/ext/standard/cyr_convert.c
index 8652fcaef2..0869dd056a 100644
--- a/ext/standard/cyr_convert.c
+++ b/ext/standard/cyr_convert.c
@@ -288,3 +288,11 @@ PHP_FUNCTION(convert_cyr_string)
RETVAL_STRING((char *)str, 0)
}
/* }}} */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c
index 8fb839ca86..d5e1f180e5 100644
--- a/ext/standard/datetime.c
+++ b/ext/standard/datetime.c
@@ -804,4 +804,5 @@ PHP_FUNCTION(strtotime)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/dir.c b/ext/standard/dir.c
index 2e1b4605c1..23060fd365 100644
--- a/ext/standard/dir.c
+++ b/ext/standard/dir.c
@@ -364,4 +364,5 @@ PHP_NAMED_FUNCTION(php_if_readdir)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/dl.c b/ext/standard/dl.c
index cfd3bd429b..7f10f5ac96 100644
--- a/ext/standard/dl.c
+++ b/ext/standard/dl.c
@@ -227,4 +227,5 @@ PHP_MINFO_FUNCTION(dl)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/dns.c b/ext/standard/dns.c
index d9878eaa53..5ff093995d 100644
--- a/ext/standard/dns.c
+++ b/ext/standard/dns.c
@@ -324,4 +324,5 @@ PHP_FUNCTION(getmxrr)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/exec.c b/ext/standard/exec.c
index 56f2c6481a..f85c40a98f 100644
--- a/ext/standard/exec.c
+++ b/ext/standard/exec.c
@@ -480,4 +480,5 @@ PHP_FUNCTION(shell_exec)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/file.c b/ext/standard/file.c
index f86be131eb..e52feda63f 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -2447,7 +2447,5 @@ php_meta_tags_token php_next_meta_token(FILE *fp, int socketd, int issock, int *
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: tw=78 sw=4 ts=4
+ * vim: tw=78 sw=4 ts=4 fdm=marker
*/
-
-
diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c
index c700403463..41d0603e44 100644
--- a/ext/standard/filestat.c
+++ b/ext/standard/filestat.c
@@ -868,4 +868,5 @@ FileFunction(php_if_stat,17)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/flock_compat.c b/ext/standard/flock_compat.c
index 1ab7f676c3..6395df992c 100644
--- a/ext/standard/flock_compat.c
+++ b/ext/standard/flock_compat.c
@@ -216,3 +216,11 @@ int inet_aton(const char *cp, struct in_addr *ap)
}
#endif /* !HAVE_INET_ATON */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c
index e5e5708c92..67791bbe23 100644
--- a/ext/standard/formatted_print.c
+++ b/ext/standard/formatted_print.c
@@ -665,4 +665,5 @@ PHP_FUNCTION(user_printf)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c
index ebd176f9e4..c3334f8969 100644
--- a/ext/standard/fsock.c
+++ b/ext/standard/fsock.c
@@ -761,5 +761,5 @@ PHP_RSHUTDOWN_FUNCTION(fsock)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/ftp_fopen_wrapper.c b/ext/standard/ftp_fopen_wrapper.c
index 678b77661d..62efc0c413 100644
--- a/ext/standard/ftp_fopen_wrapper.c
+++ b/ext/standard/ftp_fopen_wrapper.c
@@ -311,3 +311,11 @@ FILE *php_fopen_url_wrap_ftp(char *path, char *mode, int options, int *issock, i
*socketd = 0;
return NULL;
}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/standard/head.c b/ext/standard/head.c
index d05d0c7bc7..c10c9ba261 100644
--- a/ext/standard/head.c
+++ b/ext/standard/head.c
@@ -279,4 +279,5 @@ PHP_FUNCTION(headers_sent)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/html.c b/ext/standard/html.c
index 8921663633..3df62a4eae 100644
--- a/ext/standard/html.c
+++ b/ext/standard/html.c
@@ -471,4 +471,5 @@ PHP_FUNCTION(get_html_translation_table)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c
index 78c263f79d..37c229705c 100644
--- a/ext/standard/http_fopen_wrapper.c
+++ b/ext/standard/http_fopen_wrapper.c
@@ -302,3 +302,11 @@ FILE *php_fopen_url_wrap_http(char *path, char *mode, int options, int *issock,
}
return (fp);
}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/standard/image.c b/ext/standard/image.c
index 6ede7aa0c5..8d4934e77b 100644
--- a/ext/standard/image.c
+++ b/ext/standard/image.c
@@ -494,3 +494,11 @@ PHP_FUNCTION(getimagesize)
}
}
/* }}} */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/standard/incomplete_class.c b/ext/standard/incomplete_class.c
index 948de9f219..e9967fc784 100644
--- a/ext/standard/incomplete_class.c
+++ b/ext/standard/incomplete_class.c
@@ -119,3 +119,11 @@ void php_store_class_name(zval *object, const char *name, size_t len)
zend_hash_update(object->value.obj.properties, MAGIC_MEMBER, sizeof(MAGIC_MEMBER), &val, sizeof(val), NULL);
}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/standard/info.c b/ext/standard/info.c
index 76265e41d8..16ee26bfa6 100644
--- a/ext/standard/info.c
+++ b/ext/standard/info.c
@@ -558,4 +558,5 @@ PHP_FUNCTION(php_uname)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c
index c32ae918c9..675291f252 100644
--- a/ext/standard/iptc.c
+++ b/ext/standard/iptc.c
@@ -282,6 +282,7 @@ PHP_FUNCTION(iptcembed)
RETURN_TRUE;
}
}
+/* }}} */
/* {{{ proto array iptcparse(string iptcdata)
Parse binary IPTC-data into associative array */
@@ -374,4 +375,5 @@ PHP_FUNCTION(iptcparse)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/mail.c b/ext/standard/mail.c
index dbac68ed45..3079659d34 100644
--- a/ext/standard/mail.c
+++ b/ext/standard/mail.c
@@ -70,6 +70,7 @@ PHP_FUNCTION(ezmlm_hash)
RETURN_LONG((int) h);
}
+/* }}} */
/* {{{ proto int mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]])
Send an email message */
@@ -129,6 +130,8 @@ PHP_FUNCTION(mail)
}
/* }}} */
+/* {{{ php_mail
+ */
int php_mail(char *to, char *subject, char *message, char *headers, char *extra_cmd)
{
#ifdef PHP_WIN32
@@ -186,7 +189,10 @@ int php_mail(char *to, char *subject, char *message, char *headers, char *extra_
#endif
return 1;
}
+/* }}} */
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(mail)
{
#ifdef PHP_WIN32
@@ -195,6 +201,7 @@ PHP_MINFO_FUNCTION(mail)
php_info_print_table_row(2, "Path to sendmail", INI_STR("sendmail_path") );
#endif
}
+/* }}} */
#else
@@ -203,9 +210,10 @@ PHP_MINFO_FUNCTION(mail) {}
#endif
-
/*
* Local variables:
* tab-width: 4
+ * c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/math.c b/ext/standard/math.c
index 8df2393c91..63a7c0a050 100644
--- a/ext/standard/math.c
+++ b/ext/standard/math.c
@@ -725,4 +725,5 @@ PHP_FUNCTION(number_format)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/md5.c b/ext/standard/md5.c
index 389d6705c6..e22c46a124 100644
--- a/ext/standard/md5.c
+++ b/ext/standard/md5.c
@@ -360,4 +360,5 @@ unsigned int len;
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/metaphone.c b/ext/standard/metaphone.c
index d1643debb4..383e67476e 100644
--- a/ext/standard/metaphone.c
+++ b/ext/standard/metaphone.c
@@ -466,4 +466,5 @@ static int metaphone(char *word, int max_phonemes, char **phoned_word, int tradi
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c
index 442ae3d395..1eb10d49f6 100644
--- a/ext/standard/microtime.c
+++ b/ext/standard/microtime.c
@@ -146,4 +146,5 @@ PHP_FUNCTION(getrusage)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/output.c b/ext/standard/output.c
index d406b7e2ca..1f3f5f9f17 100644
--- a/ext/standard/output.c
+++ b/ext/standard/output.c
@@ -613,11 +613,10 @@ PHPAPI int php_get_output_start_lineno()
return OG(output_start_lineno);
}
-
-
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/pack.c b/ext/standard/pack.c
index 7319997c3c..b114131a4f 100644
--- a/ext/standard/pack.c
+++ b/ext/standard/pack.c
@@ -863,10 +863,10 @@ PHP_MINIT_FUNCTION(pack)
return SUCCESS;
}
-
-
/*
* Local variables:
* tab-width: 4
+ * c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/pageinfo.c b/ext/standard/pageinfo.c
index d25e7666a2..3f6fb09f8b 100644
--- a/ext/standard/pageinfo.c
+++ b/ext/standard/pageinfo.c
@@ -123,3 +123,11 @@ PHP_FUNCTION(getlastmod)
}
}
/* }}} */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c
index d917bfd741..f70447904d 100644
--- a/ext/standard/php_fopen_wrapper.c
+++ b/ext/standard/php_fopen_wrapper.c
@@ -45,3 +45,11 @@ FILE *php_fopen_url_wrap_php(char *path, char *mode, int options, int *issock, i
return NULL;
}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/standard/quot_print.c b/ext/standard/quot_print.c
index 26309f6e1a..067417a9bc 100644
--- a/ext/standard/quot_print.c
+++ b/ext/standard/quot_print.c
@@ -127,3 +127,11 @@ PHP_FUNCTION(quoted_printable_decode)
RETVAL_STRINGL(str_out, j, 0);
}
/* }}} */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/standard/rand.c b/ext/standard/rand.c
index c91e1a123f..d2a632b128 100644
--- a/ext/standard/rand.c
+++ b/ext/standard/rand.c
@@ -333,7 +333,6 @@ PHP_FUNCTION(getrandmax)
}
/* }}} */
-
/* {{{ proto int mt_getrandmax(void)
Returns the maximum value a random number from Mersenne Twister can have */
PHP_FUNCTION(mt_getrandmax)
@@ -346,9 +345,11 @@ PHP_FUNCTION(mt_getrandmax)
return_value->value.lval = MT_RAND_MAX; /* 2^^31 */
}
/* }}} */
+
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/reg.c b/ext/standard/reg.c
index 86bdec78a7..e8896f5f7d 100644
--- a/ext/standard/reg.c
+++ b/ext/standard/reg.c
@@ -609,7 +609,6 @@ PHP_FUNCTION(spliti)
/* }}} */
-
/* {{{ proto string sql_regcase(string string)
Make regular expression for case insensitive match */
PHPAPI PHP_FUNCTION(sql_regcase)
@@ -646,11 +645,10 @@ PHPAPI PHP_FUNCTION(sql_regcase)
}
/* }}} */
-
-
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/scanf.c b/ext/standard/scanf.c
index a8ed8c9f51..98ba84f75f 100644
--- a/ext/standard/scanf.c
+++ b/ext/standard/scanf.c
@@ -1242,3 +1242,10 @@ inline void scan_set_error_return(int numVars,pval **return_value) {
}
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/standard/soundex.c b/ext/standard/soundex.c
index 254d8fed9e..107088dc2f 100644
--- a/ext/standard/soundex.c
+++ b/ext/standard/soundex.c
@@ -117,4 +117,5 @@ PHP_FUNCTION(soundex)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/string.c b/ext/standard/string.c
index c213fb95ee..cb84c9511e 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -113,7 +113,8 @@ static char *php_bin2hex(const unsigned char *old, const size_t oldlen, size_t *
}
#ifdef HAVE_LOCALECONV
-/* glibc's localeconv is not reentrant, so lets make it so ... sorta */
+/* {{{ localeconv_r
+ * glibc's localeconv is not reentrant, so lets make it so ... sorta */
struct lconv *localeconv_r(struct lconv *out)
{
struct lconv *res;
@@ -133,15 +134,21 @@ struct lconv *localeconv_r(struct lconv *out)
return out;
}
+/* }}} */
# ifdef ZTS
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(localeconv)
{
locale_mutex = tsrm_mutex_alloc();
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_MSHUTDOWN_FUNCTION
+ */
PHP_MSHUTDOWN_FUNCTION(localeconv)
{
tsrm_mutex_free( locale_mutex );
@@ -150,6 +157,7 @@ PHP_MSHUTDOWN_FUNCTION(localeconv)
return SUCCESS;
}
+/* }}} */
# endif
#endif
@@ -227,8 +235,11 @@ PHP_FUNCTION(strcoll)
RETURN_LONG(strcoll((const char *)(*s1)->value.str.val, (const char *)(*s2)->value.str.val));
}
+/* }}} */
#endif
+/* {{{ php_trim
+ */
PHPAPI void php_trim(zval *str, zval * return_value, int mode)
/* mode 1 : trim left
mode 2 : trim right
@@ -264,6 +275,7 @@ PHPAPI void php_trim(zval *str, zval * return_value, int mode)
}
RETVAL_STRINGL(c, len, 1);
}
+/* }}} */
/* {{{ proto string rtrim(string str)
An alias for chop */
@@ -325,7 +337,6 @@ PHP_FUNCTION(ltrim)
}
/* }}} */
-
/* {{{ proto string wordwrap(string str [, int width [, string break [, int cut]]])
Wrap buffer to selected number of characters using string break char */
PHP_FUNCTION(wordwrap)
@@ -483,7 +494,8 @@ PHP_FUNCTION(wordwrap)
}
/* }}} */
-
+/* {{{ php_explode
+ */
PHPAPI void php_explode(zval *delim, zval *str, zval *return_value, int limit)
{
char *p1, *p2, *endp;
@@ -506,6 +518,7 @@ PHPAPI void php_explode(zval *delim, zval *str, zval *return_value, int limit)
add_next_index_stringl(return_value, p1, endp-p1, 1);
}
}
+/* }}} */
/* {{{ proto array explode(string separator, string str [, int limit])
Split a string on string separator and return array of components */
@@ -550,10 +563,12 @@ PHP_FUNCTION(explode)
}
/* }}} */
-
/* {{{ proto string join(array src, string glue)
An alias for implode */
/* }}} */
+
+/* {{{ php_implode
+ */
PHPAPI void php_implode(zval *delim, zval *arr, zval *return_value)
{
zval **tmp;
@@ -592,7 +607,7 @@ PHPAPI void php_implode(zval *delim, zval *arr, zval *return_value)
return_value->type = IS_STRING;
return_value->value.str.len = len;
}
-
+/* }}} */
/* {{{ proto string implode(array src, string glue)
Join array elements placing glue string between items and return one string */
@@ -623,7 +638,6 @@ PHP_FUNCTION(implode)
}
/* }}} */
-
/* {{{ proto string strtok([string str,] string token)
Tokenize a string */
PHP_FUNCTION(strtok)
@@ -682,6 +696,8 @@ PHP_FUNCTION(strtok)
}
/* }}} */
+/* {{{ php_strtoupper
+ */
PHPAPI char *php_strtoupper(char *s, size_t len)
{
char *c;
@@ -695,6 +711,7 @@ PHPAPI char *php_strtoupper(char *s, size_t len)
}
return (s);
}
+/* }}} */
/* {{{ proto string strtoupper(string str)
Make a string uppercase */
@@ -713,7 +730,8 @@ PHP_FUNCTION(strtoupper)
}
/* }}} */
-
+/* {{{ php_strtolower
+ */
PHPAPI char *php_strtolower(char *s, size_t len)
{
register int ch;
@@ -727,6 +745,7 @@ PHPAPI char *php_strtolower(char *s, size_t len)
}
return (s);
}
+/* }}} */
/* {{{ proto string strtolower(string str)
Make a string lowercase */
@@ -746,6 +765,8 @@ PHP_FUNCTION(strtolower)
}
/* }}} */
+/* {{{ php_basename
+ */
PHPAPI char *php_basename(char *s, size_t len)
{
char *ret=NULL, *c, *p=NULL, buf='\0';
@@ -776,6 +797,7 @@ PHPAPI char *php_basename(char *s, size_t len)
if(buf) *p = buf;
return (ret);
}
+/* }}} */
/* {{{ proto string basename(string path)
Return the filename component of the path */
@@ -793,7 +815,9 @@ PHP_FUNCTION(basename)
}
/* }}} */
-/* This function doesn't work with absolute paths in Win32 such as C:\foo
+/* {{{ php_dirname
+ *
+ * This function doesn't work with absolute paths in Win32 such as C:\foo
* (and it didn't before either). This needs to be fixed
*/
PHPAPI void php_dirname(char *path, int len)
@@ -838,6 +862,7 @@ PHPAPI void php_dirname(char *path, int len)
}
*(end+1) = '\0';
}
+/* }}} */
/* {{{ proto string dirname(string path)
Return the directory name component of the path */
@@ -922,7 +947,8 @@ PHP_FUNCTION(pathinfo)
}
/* }}} */
-/* case insensitve strstr */
+/* {{{ php_stristr
+ * case insensitve strstr */
PHPAPI char *php_stristr(unsigned char *s, unsigned char *t,
size_t s_len, size_t t_len)
{
@@ -930,7 +956,10 @@ PHPAPI char *php_stristr(unsigned char *s, unsigned char *t,
php_strtolower(t, t_len);
return php_memnstr(s, t, t_len, s + s_len);
}
+/* }}} */
+/* {{{ php_strspn
+ */
PHPAPI size_t php_strspn(char *s1, char *s2, char *s1_end, char *s2_end)
{
register const char *p = s1, *spanp;
@@ -944,7 +973,10 @@ cont:
}
return (p - s1);
}
+/* }}} */
+/* {{{ php_strcspn
+ */
PHPAPI size_t php_strcspn(char *s1, char *s2, char *s1_end, char *s2_end)
{
register const char *p, *spanp;
@@ -960,6 +992,7 @@ PHPAPI size_t php_strcspn(char *s1, char *s2, char *s1_end, char *s2_end)
}
/* NOTREACHED */
}
+/* }}} */
/* {{{ proto string stristr(string haystack, string needle)
Find first occurrence of a string within another, case insensitive */
@@ -1178,6 +1211,8 @@ PHP_FUNCTION(strrchr)
}
/* }}} */
+/* {{{ php_chunk_split
+ */
static char *php_chunk_split(char *src, int srclen, char *end, int endlen,
int chunklen, int *destlen)
{
@@ -1213,6 +1248,7 @@ static char *php_chunk_split(char *src, int srclen, char *end, int endlen,
return(dest);
}
+/* }}} */
/* {{{ proto string chunk_split(string str [, int chunklen [, string ending]])
Return split line */
@@ -1323,7 +1359,6 @@ PHP_FUNCTION(substr)
}
/* }}} */
-
/* {{{ proto string substr_replace(string str, string repl, int start [, int length])
Replace part of a string with another string */
PHP_FUNCTION(substr_replace)
@@ -1396,7 +1431,6 @@ PHP_FUNCTION(substr_replace)
}
/* }}} */
-
/* {{{ proto string quotemeta(string str)
Quote meta characters */
PHP_FUNCTION(quotemeta)
@@ -1526,6 +1560,8 @@ PHP_FUNCTION(ucwords)
}
/* }}} */
+/* {{{ php_strtr
+ */
PHPAPI char *php_strtr(char *str, int len, char *str_from,
char *str_to, int trlen)
{
@@ -1548,7 +1584,10 @@ PHPAPI char *php_strtr(char *str, int len, char *str_from,
return str;
}
+/* }}} */
+/* {{{ php_strtr_array
+ */
static void php_strtr_array(zval *return_value,char *str,int slen,HashTable *hash)
{
zval *entry;
@@ -1636,6 +1675,7 @@ static void php_strtr_array(zval *return_value,char *str,int slen,HashTable *has
smart_str_0(&result);
RETVAL_STRINGL(result.c,result.len,0);
}
+/* }}} */
/* {{{ proto string strtr(string str, string from, string to)
Translate characters in str using given translation tables */
@@ -1678,7 +1718,6 @@ PHP_FUNCTION(strtr)
}
/* }}} */
-
/* {{{ proto string strrev(string str)
Reverse a string */
PHP_FUNCTION(strrev)
@@ -1706,6 +1745,8 @@ PHP_FUNCTION(strrev)
}
/* }}} */
+/* {{{ php_similar_str
+ */
static void php_similar_str(const char *txt1, int len1, const char *txt2,
int len2, int *pos1, int *pos2, int *max)
{
@@ -1727,7 +1768,10 @@ static void php_similar_str(const char *txt1, int len1, const char *txt2,
}
}
}
+/* }}} */
+/* {{{ php_similar_char
+ */
static int php_similar_char(const char *txt1, int len1,
const char *txt2, int len2)
{
@@ -1744,6 +1788,7 @@ static int php_similar_char(const char *txt1, int len1,
}
return sum;
}
+/* }}} */
/* {{{ proto int similar_text(string str1, string str2 [, double percent])
Calculates the similarity between two strings */
@@ -1781,9 +1826,10 @@ PHP_FUNCTION(similar_text)
RETURN_LONG(sim);
}
/* }}} */
-
-/* be careful, this edits the string in-place */
+/* {{{ php_stripslashes
+ *
+ * be careful, this edits the string in-place */
PHPAPI void php_stripslashes(char *str, int *len)
{
char *s, *t;
@@ -1831,6 +1877,7 @@ PHPAPI void php_stripslashes(char *str, int *len)
*s = '\0';
}
}
+/* }}} */
/* {{{ proto string addcslashes(string str, string charlist)
Escape all chars mentioned in charlist with backslash. It creates octal representations if asked to backslash characters with 8th bit set or with ASCII<32 (except '\n', '\r', '\t' etc...) */
@@ -1912,6 +1959,8 @@ PHP_FUNCTION(stripslashes)
/* }}} */
#ifndef HAVE_STRERROR
+/* {{{ php_strerror
+ */
char *php_strerror(int errnum)
{
extern int sys_nerr;
@@ -1922,8 +1971,11 @@ char *php_strerror(int errnum)
(void)sprintf(BG(str_ebuf), "Unknown error: %d", errnum);
return(BG(str_ebuf));
}
+/* }}} */
#endif
+/* {{{ php_stripcslashes
+ */
PHPAPI void php_stripcslashes(char *str, int *len)
{
char *source,*target,*end;
@@ -1981,8 +2033,10 @@ PHPAPI void php_stripcslashes(char *str, int *len)
*len = nlen;
}
+/* }}} */
-
+/* {{{ php_addcslashes
+ */
PHPAPI char *php_addcslashes(char *str, int length, int *new_length, int should_free, char *what, int wlength)
{
char flags[256];
@@ -2042,7 +2096,10 @@ PHPAPI char *php_addcslashes(char *str, int length, int *new_length, int should_
}
return new_str;
}
+/* }}} */
+/* {{{ php_addslashes
+ */
PHPAPI char *php_addslashes(char *str, int length, int *new_length, int should_free)
{
/* maximum string length, worst case situation */
@@ -2091,7 +2148,7 @@ PHPAPI char *php_addslashes(char *str, int length, int *new_length, int should_f
}
return new_str;
}
-
+/* }}} */
#define _HEB_BLOCK_TYPE_ENG 1
#define _HEB_BLOCK_TYPE_HEB 2
@@ -2099,6 +2156,8 @@ PHPAPI char *php_addslashes(char *str, int length, int *new_length, int should_f
#define _isblank(c) (((((unsigned char) c)==' ' || ((unsigned char) c)=='\t')) ? 1 : 0)
#define _isnewline(c) (((((unsigned char) c)=='\n' || ((unsigned char) c)=='\r')) ? 1 : 0)
+/* {{{ php_char_to_str
+ */
PHPAPI void php_char_to_str(char *str,uint len,char from,char *to,int to_len,zval *result)
{
int char_count=0;
@@ -2134,7 +2193,10 @@ PHPAPI void php_char_to_str(char *str,uint len,char from,char *to,int to_len,zva
}
*target = 0;
}
+/* }}} */
+/* {{{ php_str_to_str
+ */
PHPAPI char *php_str_to_str(char *haystack, int length,
char *needle, int needle_len, char *str, int str_len, int *_new_length)
{
@@ -2159,8 +2221,10 @@ PHPAPI char *php_str_to_str(char *haystack, int length,
return result.c;
}
+/* }}} */
-
+/* {{{ php_str_replace_in_subject
+ */
static void php_str_replace_in_subject(zval *search, zval *replace, zval **subject, zval *result)
{
zval **search_entry,
@@ -2258,7 +2322,7 @@ static void php_str_replace_in_subject(zval *search, zval *replace, zval **subje
}
}
}
-
+/* }}} */
/* {{{ proto mixed str_replace(mixed search, mixed replace, mixed subject)
Replace all occurrences of search in haystack with replace */
@@ -2315,8 +2379,9 @@ PHP_FUNCTION(str_replace)
}
/* }}} */
-
-/* Converts Logical Hebrew text (Hebrew Windows style) to Visual text
+/* {{{ php_hebrev
+ *
+ * Converts Logical Hebrew text (Hebrew Windows style) to Visual text
* Cheers/complaints/flames - Zeev Suraski <zeev@php.net>
*/
static void php_hebrev(INTERNAL_FUNCTION_PARAMETERS,int convert_newlines)
@@ -2481,7 +2546,7 @@ static void php_hebrev(INTERNAL_FUNCTION_PARAMETERS,int convert_newlines)
return_value->type = IS_STRING;
}
}
-
+/* }}} */
/* {{{ proto string hebrev(string str [, int max_chars_per_line])
Convert logical Hebrew text to visual text */
@@ -2659,7 +2724,9 @@ PHP_FUNCTION(parse_str)
#define PHP_TAG_BUF_SIZE 1023
-/* Check if tag is in a set of tags
+/* {{{ php_tag_find
+ *
+ * Check if tag is in a set of tags
*
* states:
*
@@ -2715,8 +2782,11 @@ int php_tag_find(char *tag, int len, char *set) {
efree(norm);
return done;
}
+/* }}} */
-/* A simple little state-machine to strip out html and php tags
+/* {{{ php_strip_tags
+
+ A simple little state-machine to strip out html and php tags
State 0 is the output state, State 1 means we are inside a
normal html tag and state 2 means we are inside a php tag.
@@ -2851,6 +2921,7 @@ PHPAPI void php_strip_tags(char *rbuf, int len, int state, char *allow, int allo
efree(buf);
if(allow) efree(tbuf);
}
+/* }}} */
/* {{{ proto string str_repeat(string input, int mult)
Returns the input string repeat mult times */
@@ -2977,6 +3048,8 @@ PHP_FUNCTION(count_chars)
}
/* }}} */
+/* {{{ php_strnatcmp
+ */
static void php_strnatcmp(INTERNAL_FUNCTION_PARAMETERS, int fold_case)
{
zval **s1, **s2;
@@ -2992,7 +3065,7 @@ static void php_strnatcmp(INTERNAL_FUNCTION_PARAMETERS, int fold_case)
(*s2)->value.str.val, (*s2)->value.str.len,
fold_case));
}
-
+/* }}} */
/* {{{ proto int strnatcmp(string s1, string s2)
Returns the result of string comparison using 'natural' algorithm */
@@ -3090,7 +3163,7 @@ PHP_FUNCTION(localeconv)
zend_hash_update(return_value->value.ht, "grouping", 9, &grouping, sizeof(zval *), NULL);
zend_hash_update(return_value->value.ht, "mon_grouping", 13, &mon_grouping, sizeof(zval *), NULL);
}
-
+/* }}} */
/* {{{ proto int strnatcasecmp(string s1, string s2)
Returns the result of case-insensitive string comparison using 'natural' algorithm */
@@ -3100,7 +3173,6 @@ PHP_FUNCTION(strnatcasecmp)
}
/* }}} */
-
/* {{{ proto int substr_count(string haystack, string needle)
Returns the number of times a substring occurs in the string */
PHP_FUNCTION(substr_count)
@@ -3145,7 +3217,6 @@ PHP_FUNCTION(substr_count)
}
/* }}} */
-
/* {{{ proto string str_pad(string input, int pad_length [, string pad_string [, int pad_type]])
Returns input string padded on the left or right to specified length with pad_string */
PHP_FUNCTION(str_pad)
@@ -3243,7 +3314,6 @@ PHP_FUNCTION(str_pad)
RETURN_STRINGL(result, result_len, 0);
}
/* }}} */
-
/* {{{ proto mixed sscanf(string str, string format [, string ...])
Implements an ANSI C compatible sscanf */
@@ -3290,4 +3360,5 @@ PHP_FUNCTION(sscanf)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/strnatcmp.c b/ext/standard/strnatcmp.c
index 42c26ce1cd..00455cfa41 100644
--- a/ext/standard/strnatcmp.c
+++ b/ext/standard/strnatcmp.c
@@ -156,3 +156,11 @@ PHPAPI int strnatcmp_ex(char const *a, size_t a_len, char const *b, size_t b_len
return 1;
}
}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/standard/syslog.c b/ext/standard/syslog.c
index 9295be3b59..3efe2b3710 100644
--- a/ext/standard/syslog.c
+++ b/ext/standard/syslog.c
@@ -199,6 +199,7 @@ PHP_FUNCTION(define_syslog_variables)
start_syslog(BLS_C);
}
}
+/* }}} */
/* {{{ proto int openlog(string ident, int option, int facility)
Open connection to system logger */
@@ -271,4 +272,5 @@ PHP_FUNCTION(syslog)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/type.c b/ext/standard/type.c
index caeabdeeae..76371ce6a2 100644
--- a/ext/standard/type.c
+++ b/ext/standard/type.c
@@ -96,3 +96,11 @@ char *php_get_ident_index(char *str)
}
return (temp);
}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/standard/uniqid.c b/ext/standard/uniqid.c
index 6ffce2a73c..9bbc4f5f7d 100644
--- a/ext/standard/uniqid.c
+++ b/ext/standard/uniqid.c
@@ -92,9 +92,11 @@ function_entry uniqid_functions[] = {
{NULL, NULL, NULL}
};
+
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/url.c b/ext/standard/url.c
index 3f5ea0aad8..b71414b6c2 100644
--- a/ext/standard/url.c
+++ b/ext/standard/url.c
@@ -439,4 +439,5 @@ int php_raw_url_decode(char *str, int len)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/standard/url_scanner.c b/ext/standard/url_scanner.c
index aacfcff8e8..5371b7b308 100644
--- a/ext/standard/url_scanner.c
+++ b/ext/standard/url_scanner.c
@@ -367,3 +367,11 @@ char *url_adapt(const char *src, size_t srclen, const char *data, size_t *newlen
}
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/standard/url_scanner_ex.c b/ext/standard/url_scanner_ex.c
index 562e314af5..dbdf55149e 100644
--- a/ext/standard/url_scanner_ex.c
+++ b/ext/standard/url_scanner_ex.c
@@ -747,3 +747,11 @@ PHP_MSHUTDOWN_FUNCTION(url_scanner)
}
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/standard/var.c b/ext/standard/var.c
index c369f47681..112ceda3fb 100644
--- a/ext/standard/var.c
+++ b/ext/standard/var.c
@@ -671,4 +671,5 @@ PHP_FUNCTION(unserialize)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/swf/swf.c b/ext/swf/swf.c
index e251df8523..f41e6676d8 100644
--- a/ext/swf/swf.c
+++ b/ext/swf/swf.c
@@ -34,6 +34,8 @@
ZEND_DECLARE_MODULE_GLOBALS(swf)
+/* {{{ swf_functions[]
+ */
function_entry swf_functions[] = {
PHP_FE(swf_openfile, NULL)
PHP_FE(swf_closefile, NULL)
@@ -104,7 +106,10 @@ function_entry swf_functions[] = {
PHP_FE(swf_posround, NULL)
{NULL,NULL,NULL}
};
+/* }}} */
+/* {{{ swf_module_entry
+ */
zend_module_entry swf_module_entry = {
"swf",
swf_functions,
@@ -115,19 +120,24 @@ zend_module_entry swf_module_entry = {
PHP_MINFO(swf),
STANDARD_MODULE_PROPERTIES
};
+/* }}} */
#ifdef COMPILE_DL_SWF
ZEND_GET_MODULE(swf)
#endif
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(swf)
{
php_info_print_table_start();
php_info_print_table_row(2, "swf support", "enabled");
php_info_print_table_end();
}
+/* }}} */
-
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(swf)
{
REGISTER_LONG_CONSTANT("MOD_COLOR", MOD_COLOR, CONST_CS | CONST_PERSISTENT);
@@ -152,7 +162,10 @@ PHP_MINIT_FUNCTION(swf)
REGISTER_LONG_CONSTANT("MenuExit", MenuExit, CONST_CS | CONST_PERSISTENT);
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_RINIT_FUNCTION
+ */
PHP_RINIT_FUNCTION(swf)
{
SWFLS_FETCH();
@@ -160,6 +173,7 @@ PHP_RINIT_FUNCTION(swf)
return SUCCESS;
}
+/* }}} */
/* {{{ proto void swf_openfile(string name, double xsize, double ysize, double framerate, double r, double g, double b)
Create a Shockwave Flash file given by name, with width xsize and height ysize at a frame rate of framerate and a background color specified by a red value of r, green value of g and a blue value of b */
@@ -300,6 +314,8 @@ PHP_FUNCTION(swf_getframe)
}
/* }}} */
+/* {{{ col_swf
+ */
void col_swf(INTERNAL_FUNCTION_PARAMETERS, int opt) {
zval **r, **g, **b, **a;
if (ZEND_NUM_ARGS() != 4 ||
@@ -316,6 +332,7 @@ void col_swf(INTERNAL_FUNCTION_PARAMETERS, int opt) {
swf_mulcolor((float)Z_DVAL_PP(r), (float)Z_DVAL_PP(g), (float)Z_DVAL_PP(b), (float)Z_DVAL_PP(a));
}
}
+/* }}} */
/* {{{ proto void swf_mulcolor(double r, double g, double b, double a)
Sets the global multiply color to the rgba value specified */
@@ -377,6 +394,7 @@ PHP_FUNCTION(swf_removeobject)
swf_removeobject(Z_LVAL_PP(depth));
}
+/* }}} */
/* {{{ proto int swf_nextid(void)
Returns a free objid */
@@ -519,6 +537,8 @@ PHP_FUNCTION(swf_actiongotolabel)
}
/* }}} */
+/* {{{ php_swf_define
+ */
void php_swf_define(INTERNAL_FUNCTION_PARAMETERS, int opt)
{
zval **objid, **x1, **y1, **x2, **y2, **width;
@@ -542,6 +562,7 @@ void php_swf_define(INTERNAL_FUNCTION_PARAMETERS, int opt)
(float)Z_DVAL_PP(x2), (float)Z_DVAL_PP(y2), (float)Z_DVAL_PP(width));
}
}
+/* }}} */
/* {{{ proto void swf_defineline(int objid, double x1, double y1, double x2, double y2, double width)
Create a line with object id, objid, starting from x1, y1 and going to x2, y2 with width, width */
@@ -660,6 +681,8 @@ PHP_FUNCTION(swf_shapefillsolid)
}
/* }}} */
+/* {{{ php_swf_fill_bitmap
+ */
void php_swf_fill_bitmap(INTERNAL_FUNCTION_PARAMETERS, int opt)
{
zval **bitmapid;
@@ -675,6 +698,7 @@ void php_swf_fill_bitmap(INTERNAL_FUNCTION_PARAMETERS, int opt)
swf_shapefillbitmaptile(Z_LVAL_PP(bitmapid));
}
}
+/* }}} */
/* {{{ proto void swf_shapefillbitmapclip(int bitmapid)
Sets the current fill mode to clipped bitmap fill. Pixels from the previously defined bitmapid will be used to fill areas */
@@ -692,6 +716,8 @@ PHP_FUNCTION(swf_shapefillbitmaptile)
}
/* }}} */
+/* {{{ php_swf_shape
+ */
void php_swf_shape(INTERNAL_FUNCTION_PARAMETERS, int opt)
{
zval **x, **y;
@@ -708,6 +734,7 @@ void php_swf_shape(INTERNAL_FUNCTION_PARAMETERS, int opt)
swf_shapelineto((float)Z_DVAL_PP(x), (float)Z_DVAL_PP(y));
}
}
+/* }}} */
/* {{{ proto void swf_shapemoveto(double x, double y)
swf_shapemoveto moves the current position to the given x,y. */
@@ -1032,6 +1059,8 @@ PHP_FUNCTION(swf_endbutton)
}
/* }}} */
+/* {{{ php_swf_geo_same
+ */
void php_swf_geo_same(INTERNAL_FUNCTION_PARAMETERS, int opt)
{
zval **arg1, **arg2, **arg3, **arg4;
@@ -1058,6 +1087,7 @@ void php_swf_geo_same(INTERNAL_FUNCTION_PARAMETERS, int opt)
Z_DVAL_PP(arg4));
}
}
+/* }}} */
/* {{{ proto void swf_viewport(double xmin, double xmax, double ymin, double ymax)
Selects an area on the drawing surface for future drawing */
@@ -1217,3 +1247,11 @@ PHP_FUNCTION(swf_posround)
/* }}} */
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/sysvsem/sysvsem.c b/ext/sysvsem/sysvsem.c
index a55f1c1adb..3a006dde76 100644
--- a/ext/sysvsem/sysvsem.c
+++ b/ext/sysvsem/sysvsem.c
@@ -56,6 +56,8 @@ union semun {
#endif
+/* {{{ sysvsem_functions[]
+ */
function_entry sysvsem_functions[] = {
PHP_FE(sem_get, NULL)
PHP_FE(sem_acquire, NULL)
@@ -63,10 +65,14 @@ function_entry sysvsem_functions[] = {
PHP_FE(sem_remove, NULL)
{NULL, NULL, NULL}
};
+/* }}} */
+/* {{{ sysvsem_module_entry
+ */
zend_module_entry sysvsem_module_entry = {
"sysvsem", sysvsem_functions, PHP_MINIT(sysvsem), NULL, NULL, NULL, NULL, STANDARD_MODULE_PROPERTIES
};
+/* }}} */
#ifdef COMPILE_DL_SYSVSEM
ZEND_GET_MODULE(sysvsem)
@@ -94,7 +100,8 @@ THREAD_LS sysvsem_module php_sysvsem_module;
#define SYSVSEM_USAGE 1
#define SYSVSEM_SETVAL 2
-
+/* {{{ release_sysvsem_sem
+ */
static void release_sysvsem_sem(zend_rsrc_list_entry *rsrc)
{
sysvsem_sem *sem_ptr = (sysvsem_sem *)rsrc->ptr;
@@ -129,14 +136,17 @@ static void release_sysvsem_sem(zend_rsrc_list_entry *rsrc)
efree(sem_ptr);
}
+/* }}} */
-
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(sysvsem)
{
php_sysvsem_module.le_sem = zend_register_list_destructors_ex(release_sysvsem_sem, NULL, "sysvsem", module_number);
return SUCCESS;
}
+/* }}} */
#define SETVAL_WANTS_PTR
@@ -296,7 +306,8 @@ PHP_FUNCTION(sem_get)
}
/* }}} */
-
+/* {{{ php_sysvsem_semop
+ */
static void php_sysvsem_semop(INTERNAL_FUNCTION_PARAMETERS, int acquire)
{
pval **arg_id;
@@ -343,7 +354,7 @@ static void php_sysvsem_semop(INTERNAL_FUNCTION_PARAMETERS, int acquire)
sem_ptr->count -= acquire ? -1 : 1;
RETURN_TRUE;
}
-
+/* }}} */
/* {{{ proto int sem_acquire(int id)
Acquires the semaphore with the given id, blocking if necessary */
@@ -361,9 +372,6 @@ PHP_FUNCTION(sem_release)
}
/* }}} */
-
-
-
/* {{{ proto int sem_remove(int id)
Removes semaphore from Unix systems */
@@ -419,9 +427,11 @@ PHP_FUNCTION(sem_remove)
/* }}} */
#endif /* HAVE_SYSVSEM */
+
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/sysvshm/sysvshm.c b/ext/sysvshm/sysvshm.c
index c8930ca793..ff28c9a5dd 100644
--- a/ext/sysvshm/sysvshm.c
+++ b/ext/sysvshm/sysvshm.c
@@ -37,6 +37,8 @@
#include "php_sysvshm.h"
#include "../standard/php_var.h"
+/* {{{ sysvshm_functions[]
+ */
function_entry sysvshm_functions[] = {
PHP_FE(shm_attach, NULL)
PHP_FE(shm_remove, NULL)
@@ -46,7 +48,10 @@ function_entry sysvshm_functions[] = {
PHP_FE(shm_remove_var, NULL)
{0}
};
+/* }}} */
+/* {{{ sysvshm_module_entry
+ */
zend_module_entry sysvshm_module_entry = {
"sysvshm", sysvshm_functions,
PHP_MINIT(sysvshm), NULL,
@@ -54,7 +59,7 @@ zend_module_entry sysvshm_module_entry = {
NULL,
STANDARD_MODULE_PROPERTIES
};
-
+/* }}} */
#ifdef COMPILE_DL_SYSVSHM
ZEND_GET_MODULE(sysvshm)
@@ -64,13 +69,18 @@ ZEND_GET_MODULE(sysvshm)
THREAD_LS sysvshm_module php_sysvshm;
+/* {{{ php_release_sysvshm
+ */
static void php_release_sysvshm(zend_rsrc_list_entry *rsrc)
{
sysvshm_shm *shm_ptr = (sysvshm_shm *)rsrc->ptr;
shmdt((void*)shm_ptr->ptr);
efree(shm_ptr);
}
+/* }}} */
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(sysvshm)
{
php_sysvshm.le_shm = zend_register_list_destructors_ex(php_release_sysvshm, NULL, "sysvshm", module_number);
@@ -80,7 +90,7 @@ PHP_MINIT_FUNCTION(sysvshm)
}
return SUCCESS;
}
-
+/* }}} */
/* {{{ proto int shm_attach(int key [, int memsize [, int perm]])
Creates or open a shared memory segment */
@@ -155,8 +165,6 @@ PHP_FUNCTION(shm_attach)
}
/* }}} */
-
-
/* {{{ proto int shm_detach(int shm_identifier)
Disconnects from shared memory segment */
PHP_FUNCTION(shm_detach)
@@ -177,6 +185,7 @@ PHP_FUNCTION(shm_detach)
RETURN_TRUE;
}
/* }}} */
+
/* {{{ proto int shm_remove(int shm_identifier)
Removes shared memory from Unix systems */
@@ -205,8 +214,6 @@ PHP_FUNCTION(shm_remove)
}
/* }}} */
-
-
/* {{{ proto int shm_put_var(int shm_identifier, int variable_key, mixed variable)
Inserts or updates a variable in shared memory */
PHP_FUNCTION(shm_put_var)
@@ -256,7 +263,6 @@ PHP_FUNCTION(shm_put_var)
}
/* }}} */
-
/* {{{ proto mixed shm_get_var(int id, int variable_key)
Returns a variable from shared memory */
PHP_FUNCTION(shm_get_var)
@@ -342,8 +348,8 @@ PHP_FUNCTION(shm_remove_var)
}
/* }}} */
-
-/* inserts an ascii-string into shared memory */
+/* {{{ php_put_shm_data
+ * inserts an ascii-string into shared memory */
int php_put_shm_data(sysvshm_chunk_head *ptr,long key,char *data, long len) {
sysvshm_chunk* shm_var;
long total_size;
@@ -367,8 +373,10 @@ int php_put_shm_data(sysvshm_chunk_head *ptr,long key,char *data, long len) {
ptr->free-=total_size;
return 0;
}
+/* }}} */
-
+/* {{{ php_check_shm_data
+ */
long php_check_shm_data(sysvshm_chunk_head *ptr, long key) {
long pos;
sysvshm_chunk *shm_var;
@@ -387,8 +395,10 @@ long php_check_shm_data(sysvshm_chunk_head *ptr, long key) {
}
return -1;
}
+/* }}} */
-
+/* {{{ php_remove_shm_data
+ */
int php_remove_shm_data(sysvshm_chunk_head *ptr, long shm_varpos) {
sysvshm_chunk *chunk_ptr, *next_chunk_ptr;
long memcpy_len;
@@ -403,8 +413,7 @@ int php_remove_shm_data(sysvshm_chunk_head *ptr, long shm_varpos) {
memcpy(chunk_ptr,next_chunk_ptr,memcpy_len);
return 0;
}
-
-
+/* }}} */
#endif /* HAVE_SYSVSHM */
@@ -413,4 +422,5 @@ int php_remove_shm_data(sysvshm_chunk_head *ptr, long shm_varpos) {
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c
index 74e3352323..c0dd5eb454 100644
--- a/ext/wddx/wddx.c
+++ b/ext/wddx/wddx.c
@@ -23,7 +23,7 @@
| If you did not, or have any questions about PHP licensing, please |
| contact core@php.net. |
+----------------------------------------------------------------------+
- | Authors: Andrei Zmievski <andrei@ispi.net> |
+ | Authors: Andrei Zmievski <andrei@ispi.net> |
+----------------------------------------------------------------------+
*/
@@ -97,7 +97,8 @@ typedef struct {
static void php_wddx_process_data(void *user_data, const char *s, int len);
-
+/* {{{ wddx_functions[]
+ */
function_entry wddx_functions[] = {
PHP_FE(wddx_serialize_value, NULL)
PHP_FE(wddx_serialize_vars, NULL)
@@ -107,10 +108,13 @@ function_entry wddx_functions[] = {
PHP_FE(wddx_deserialize, NULL)
{NULL, NULL, NULL}
};
+/* }}} */
PHP_MINIT_FUNCTION(wddx);
PHP_MINFO_FUNCTION(wddx);
+/* {{{ wddx_module_entry
+ */
zend_module_entry wddx_module_entry = {
"wddx",
wddx_functions,
@@ -121,9 +125,10 @@ zend_module_entry wddx_module_entry = {
PHP_MINFO(wddx),
STANDARD_MODULE_PROPERTIES
};
+/* }}} */
-
-
+/* {{{ wddx_stack_init
+ */
static int wddx_stack_init(wddx_stack *stack)
{
stack->top = 0;
@@ -136,8 +141,10 @@ static int wddx_stack_init(wddx_stack *stack)
return SUCCESS;
}
}
+/* }}} */
-
+/* {{{ wddx_stack_push
+ */
static int wddx_stack_push(wddx_stack *stack, void *element, int size)
{
if (stack->top >= stack->max) { /* we need to allocate more memory */
@@ -151,8 +158,10 @@ static int wddx_stack_push(wddx_stack *stack, void *element, int size)
memcpy(stack->elements[stack->top], element, size);
return stack->top++;
}
+/* }}} */
-
+/* {{{ wddx_stack_top
+ */
static int wddx_stack_top(wddx_stack *stack, void **element)
{
if (stack->top > 0) {
@@ -163,8 +172,10 @@ static int wddx_stack_top(wddx_stack *stack, void **element)
return FAILURE;
}
}
+/* }}} */
-
+/* {{{ wddx_stack_is_empty
+ */
static int wddx_stack_is_empty(wddx_stack *stack)
{
if (stack->top == 0) {
@@ -173,8 +184,10 @@ static int wddx_stack_is_empty(wddx_stack *stack)
return 0;
}
}
+/* }}} */
-
+/* {{{ wddx_stack_destroy
+ */
static int wddx_stack_destroy(wddx_stack *stack)
{
register int i;
@@ -194,17 +207,22 @@ static int wddx_stack_destroy(wddx_stack *stack)
}
return SUCCESS;
}
+/* }}} */
-
+/* {{{ release_wddx_packet_rsrc
+ */
static void release_wddx_packet_rsrc(zend_rsrc_list_entry *rsrc)
{
smart_str *str = (smart_str *)rsrc->ptr;
smart_str_free(str);
efree(str);
}
+/* }}} */
#include "ext/session/php_session.h"
+/* {{{ PS_SERIALIZER_ENCODE_FUNC
+ */
PS_SERIALIZER_ENCODE_FUNC(wddx)
{
wddx_packet *packet;
@@ -231,7 +249,10 @@ PS_SERIALIZER_ENCODE_FUNC(wddx)
return SUCCESS;
}
+/* }}} */
+/* {{{ PS_SERIALIZER_DECODE_FUNC
+ */
PS_SERIALIZER_DECODE_FUNC(wddx)
{
zval *retval;
@@ -271,7 +292,10 @@ PS_SERIALIZER_DECODE_FUNC(wddx)
return ret;
}
+/* }}} */
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(wddx)
{
le_wddx = zend_register_list_destructors_ex(release_wddx_packet_rsrc, NULL, "wddx", module_number);
@@ -281,16 +305,20 @@ PHP_MINIT_FUNCTION(wddx)
return SUCCESS;
}
+/* }}} */
-
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(wddx)
{
php_info_print_table_start();
php_info_print_table_row(2, "WDDX Support", "enabled" );
php_info_print_table_end();
}
+/* }}} */
-
+/* {{{ php_wddx_packet_start
+ */
void php_wddx_packet_start(wddx_packet *packet, char *comment, int comment_len)
{
php_wddx_add_chunk_static(packet, WDDX_PACKET_S);
@@ -304,21 +332,25 @@ void php_wddx_packet_start(wddx_packet *packet, char *comment, int comment_len)
php_wddx_add_chunk_static(packet, WDDX_HEADER);
php_wddx_add_chunk_static(packet, WDDX_DATA_S);
}
+/* }}} */
-
+/* {{{ php_wddx_packet_end
+ */
void php_wddx_packet_end(wddx_packet *packet)
{
php_wddx_add_chunk_static(packet, WDDX_DATA_E);
php_wddx_add_chunk_static(packet, WDDX_PACKET_E);
}
-
+/* }}} */
#define FLUSH_BUF() \
if (l > 0) { \
php_wddx_add_chunk_ex(packet, buf, l); \
l = 0; \
}
-
+
+/* {{{ php_wddx_serialize_string
+ */
static void php_wddx_serialize_string(wddx_packet *packet, zval *var)
{
char *buf,
@@ -368,8 +400,10 @@ static void php_wddx_serialize_string(wddx_packet *packet, zval *var)
php_wddx_add_chunk_static(packet, WDDX_STRING_E);
}
+/* }}} */
-
+/* {{{ php_wddx_serialize_number
+ */
static void php_wddx_serialize_number(wddx_packet *packet, zval *var)
{
char tmp_buf[WDDX_BUF_LEN];
@@ -383,8 +417,10 @@ static void php_wddx_serialize_number(wddx_packet *packet, zval *var)
php_wddx_add_chunk(packet, tmp_buf);
}
+/* }}} */
-
+/* {{{ php_wddx_serialize_boolean
+ */
static void php_wddx_serialize_boolean(wddx_packet *packet, zval *var)
{
char tmp_buf[WDDX_BUF_LEN];
@@ -392,12 +428,18 @@ static void php_wddx_serialize_boolean(wddx_packet *packet, zval *var)
sprintf(tmp_buf, WDDX_BOOLEAN, Z_LVAL_P(var) ? "true" : "false");
php_wddx_add_chunk(packet, tmp_buf);
}
+/* }}} */
+/* {{{ php_wddx_serialize_unset
+ */
static void php_wddx_serialize_unset(wddx_packet *packet)
{
php_wddx_add_chunk_static(packet, WDDX_NULL);
}
+/* }}} */
+/* {{{ php_wddx_serialize_object
+ */
static void php_wddx_serialize_object(wddx_packet *packet, zval *obj)
{
zval **ent, *fname, **varname;
@@ -485,7 +527,10 @@ static void php_wddx_serialize_object(wddx_packet *packet, zval *obj)
if (retval)
zval_ptr_dtor(&retval);
}
+/* }}} */
+/* {{{ php_wddx_serialize_array
+ */
static void php_wddx_serialize_array(wddx_packet *packet, zval *arr)
{
zval **ent;
@@ -551,8 +596,10 @@ static void php_wddx_serialize_array(wddx_packet *packet, zval *arr)
php_wddx_add_chunk_static(packet, WDDX_ARRAY_E);
}
}
+/* }}} */
-
+/* {{{ php_wddx_serialize_var
+ */
void php_wddx_serialize_var(wddx_packet *packet, zval *var, char *name, int name_len)
{
char tmp_buf[WDDX_BUF_LEN];
@@ -597,8 +644,10 @@ void php_wddx_serialize_var(wddx_packet *packet, zval *var, char *name, int name
php_wddx_add_chunk_static(packet, WDDX_VAR_E);
}
}
+/* }}} */
-
+/* {{{ php_wddx_add_var
+ */
static void php_wddx_add_var(wddx_packet *packet, zval *name_var)
{
zval **val;
@@ -625,8 +674,10 @@ static void php_wddx_add_var(wddx_packet *packet, zval *name_var)
}
}
}
+/* }}} */
-
+/* {{{ php_wddx_push_element
+ */
static void php_wddx_push_element(void *user_data, const char *name, const char **atts)
{
st_entry ent;
@@ -731,8 +782,10 @@ static void php_wddx_push_element(void *user_data, const char *name, const char
}
}
}
+/* }}} */
-
+/* {{{ php_wddx_pop_element
+ */
static void php_wddx_pop_element(void *user_data, const char *name)
{
st_entry *ent1, *ent2;
@@ -839,8 +892,10 @@ static void php_wddx_pop_element(void *user_data, const char *name)
else if (!strcmp(name, EL_VAR) && stack->varname)
efree(stack->varname);
}
+/* }}} */
-
+/* {{{ php_wddx_process_data
+ */
static void php_wddx_process_data(void *user_data, const char *s, int len)
{
st_entry *ent;
@@ -906,7 +961,10 @@ static void php_wddx_process_data(void *user_data, const char *s, int len)
}
}
}
+/* }}} */
+/* {{{ php_wddx_deserialize_ex
+ */
int php_wddx_deserialize_ex(char *value, int vallen, zval *return_value)
{
wddx_stack stack;
@@ -937,7 +995,7 @@ int php_wddx_deserialize_ex(char *value, int vallen, zval *return_value)
return retval;
}
-
+/* }}} */
/* {{{ proto string wddx_serialize_value(mixed var [, string comment])
Creates a new packet and serializes the given value */
@@ -975,7 +1033,6 @@ PHP_FUNCTION(wddx_serialize_value)
}
/* }}} */
-
/* {{{ proto string wddx_serialize_vars(mixed var_name [, mixed ...])
Creates a new packet and serializes given variables into a struct */
PHP_FUNCTION(wddx_serialize_vars)
@@ -1017,6 +1074,8 @@ PHP_FUNCTION(wddx_serialize_vars)
}
/* }}} */
+/* {{{ php_wddx_constructor
+ */
wddx_packet *php_wddx_constructor(void)
{
smart_str *packet;
@@ -1026,12 +1085,16 @@ wddx_packet *php_wddx_constructor(void)
return packet;
}
+/* }}} */
+/* {{{ php_wddx_destructor
+ */
void php_wddx_destructor(wddx_packet *packet)
{
smart_str_free(packet);
efree(packet);
}
+/* }}} */
/* {{{ proto int wddx_packet_start([string comment])
Starts a WDDX packet with optional comment and returns the packet id */
@@ -1065,7 +1128,6 @@ PHP_FUNCTION(wddx_packet_start)
}
/* }}} */
-
/* {{{ proto string wddx_packet_end(int packet_id)
Ends specified WDDX packet and returns the string containing the packet */
PHP_FUNCTION(wddx_packet_end)
@@ -1089,7 +1151,6 @@ PHP_FUNCTION(wddx_packet_end)
}
/* }}} */
-
/* {{{ proto int wddx_add_vars(int packet_id [, mixed var_names [, mixed ...]])
Serializes given variables and adds them to packet given by packet_id */
PHP_FUNCTION(wddx_add_vars)
@@ -1131,7 +1192,6 @@ PHP_FUNCTION(wddx_add_vars)
}
/* }}} */
-
/* {{{ proto mixed wddx_deserialize(string packet)
Deserializes given packet and returns a PHP value */
PHP_FUNCTION(wddx_deserialize)
@@ -1150,5 +1210,12 @@ PHP_FUNCTION(wddx_deserialize)
}
/* }}} */
-
#endif /* HAVE_LIBEXPAT */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/xml/xml.c b/ext/xml/xml.c
index d5e3bad988..b3d2ff28ea 100644
--- a/ext/xml/xml.c
+++ b/ext/xml/xml.c
@@ -236,7 +236,7 @@ PHP_MINFO_FUNCTION(xml)
php_info_print_table_row(2, "EXPAT Version",XML_ExpatVersion());
php_info_print_table_end();
}
-
+/* }}} */
/* {{{ extension-internal functions */
@@ -991,7 +991,6 @@ _xml_externalEntityRefHandler(XML_Parser parserPtr,
}
/* }}} */
-
/* {{{ _xml_startNamespaceDeclHandler() */
void _xml_startNamespaceDeclHandler(void *userData,
@@ -1014,7 +1013,6 @@ void _xml_startNamespaceDeclHandler(void *userData,
}
/* }}} */
-
/* {{{ _xml_endNamespaceDeclHandler() */
void _xml_endNamespaceDeclHandler(void *userData,
@@ -1318,7 +1316,6 @@ PHP_FUNCTION(xml_set_external_entity_ref_handler)
}
/* }}} */
-
/* {{{ proto int xml_set_start_namespace_decl_handler(int pind, string hdl)
Set up character data handler */
PHP_FUNCTION(xml_set_start_namespace_decl_handler)
@@ -1385,6 +1382,7 @@ PHP_FUNCTION(xml_parse)
}
/* }}} */
+
/* {{{ proto int xml_parse_into_struct(int pind, string data, array &struct, array &index)
Parsing a XML document */
@@ -1654,4 +1652,5 @@ PHP_FUNCTION(utf8_decode)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/xslt/sablot.c b/ext/xslt/sablot.c
index d5b50d4227..340e3d39f4 100644
--- a/ext/xslt/sablot.c
+++ b/ext/xslt/sablot.c
@@ -16,6 +16,7 @@
+----------------------------------------------------------------------+
*/
+/* $Id$ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -70,6 +71,8 @@ static MH_ERROR error_print(void *, SablotHandle, MH_ERROR, MH_LEVEL, char **);
#define le_xslt_name "XSLT Processor"
static int le_xslt;
+/* {{{ xslt_functions[]
+ */
function_entry xslt_functions[] = {
PHP_FE(xslt_create, NULL)
PHP_FE(xslt_set_sax_handlers, NULL)
@@ -87,7 +90,10 @@ function_entry xslt_functions[] = {
PHP_FE(xslt_errno, NULL)
PHP_FE(xslt_free, NULL)
};
+/* }}} */
+/* {{{ xslt_module_entry
+ */
zend_module_entry xslt_module_entry = {
"xslt",
xslt_functions,
@@ -98,12 +104,14 @@ zend_module_entry xslt_module_entry = {
PHP_MINFO(xslt),
STANDARD_MODULE_PROPERTIES
};
+/* }}} */
#ifdef COMPILE_DL_XSLT
ZEND_GET_MODULE(xslt)
#endif
-/* A structure containing the sax handlers, automatically
+/* {{{ handler structs
+ A structure containing the sax handlers, automatically
registered whether the user defines them or not */
static SAXHandler sax_handlers =
{
@@ -134,21 +142,27 @@ static SchemeHandler scheme_handler = {
scheme_put,
scheme_close
};
+/* }}} */
-
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(xslt)
{
le_xslt = zend_register_list_destructors_ex(free_processor, NULL, le_xslt_name, module_number);
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(xslt)
{
php_info_print_table_start();
php_info_print_table_header(2, "XSLT support", "enabled");
php_info_print_table_end();
}
+/* }}} */
/* {{{ proto resource xslt_create(void)
Create a new XSLT processor */
@@ -435,7 +449,6 @@ PHP_FUNCTION(xslt_set_log)
}
/* }}} */
-
/* {{{ proto string xslt_process(resource processor, string xml, string xslt[, mixed result[, array args[, array params]]])
Perform the xslt transformation */
PHP_FUNCTION(xslt_process)
@@ -636,7 +649,6 @@ static void free_processor(zend_rsrc_list_entry *rsrc)
}
/* }}} */
-
/* {{{ register_sax_handler_pair()
Register a pair of sax handlers */
static void register_sax_handler_pair(zval *handler1, zval *handler2, zval **handler)
@@ -1014,6 +1026,7 @@ static SAX_RETURN sax_endelement(void *ctx, const char *name)
/* Cleanup */
zval_ptr_dtor(&retval);
}
+/* }}} */
/* {{{ sax_startnamespace()
Called at the beginning of the parsing of a new namespace */
@@ -1531,4 +1544,5 @@ static MH_ERROR error_print(void *user_data, SablotHandle proc, MH_ERROR code, M
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/xslt/xslt.c b/ext/xslt/xslt.c
index 92cdf12d3e..fd7904d6c3 100644
--- a/ext/xslt/xslt.c
+++ b/ext/xslt/xslt.c
@@ -241,3 +241,11 @@ extern void xslt_call_function(char *name,
}
/* }}} */
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/ext/yaz/php_yaz.c b/ext/yaz/php_yaz.c
index 869773ec07..916be8460e 100644
--- a/ext/yaz/php_yaz.c
+++ b/ext/yaz/php_yaz.c
@@ -1252,7 +1252,6 @@ PHP_FUNCTION(yaz_search)
}
/* }}} */
-
/* {{{ proto int yaz_present(int id)
Retrieve records */
PHP_FUNCTION(yaz_present)
@@ -2485,9 +2484,11 @@ ZEND_GET_MODULE(yaz)
#endif
+
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/zip/zip.c b/ext/zip/zip.c
index edfbe16b30..dd82e646be 100644
--- a/ext/zip/zip.c
+++ b/ext/zip/zip.c
@@ -16,6 +16,8 @@
+----------------------------------------------------------------------+
*/
+/* $Id$ */
+
#include "php.h"
#include "php_ini.h"
#include "php_zip.h"
@@ -34,6 +36,8 @@ static int le_zip_dir;
static int le_zip_entry;
#define le_zip_entry_name "Zip Entry"
+/* {{{ zip_functions[]
+ */
function_entry zip_functions[] = {
PHP_FE(zip_open, NULL)
PHP_FE(zip_read, NULL)
@@ -47,7 +51,10 @@ function_entry zip_functions[] = {
PHP_FE(zip_entry_close, NULL)
{NULL, NULL, NULL}
};
+/* }}} */
+/* {{{ zip_module_entry
+ */
zend_module_entry zip_module_entry = {
"zip",
zip_functions,
@@ -58,17 +65,23 @@ zend_module_entry zip_module_entry = {
PHP_MINFO(zip),
STANDARD_MODULE_PROPERTIES
};
+/* }}} */
#ifdef COMPILE_DL_ZIP
ZEND_GET_MODULE(zip)
#endif
+/* {{{ php_zip_free_dir
+ */
static void php_zip_free_dir(zend_rsrc_list_entry *rsrc)
{
ZZIP_DIR *z_dir = (ZZIP_DIR *) rsrc->ptr;
zzip_closedir(z_dir);
}
+/* }}} */
+/* {{{ php_zip_free_entry
+ */
static void php_zip_free_entry(zend_rsrc_list_entry *rsrc)
{
php_zzip_dirent *entry = (php_zzip_dirent *) rsrc->ptr;
@@ -79,7 +92,10 @@ static void php_zip_free_entry(zend_rsrc_list_entry *rsrc)
efree(entry);
}
+/* }}} */
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(zip)
{
le_zip_dir = zend_register_list_destructors_ex(php_zip_free_dir, NULL, le_zip_dir_name, module_number);
@@ -87,7 +103,10 @@ PHP_MINIT_FUNCTION(zip)
return(SUCCESS);
}
+/* }}} */
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(zip)
{
php_info_print_table_start();
@@ -95,6 +114,7 @@ PHP_MINFO_FUNCTION(zip)
php_info_print_table_end();
}
+/* }}} */
/* {{{ proto resource zip_opendir(string filename)
Open a new zip archive for reading */
@@ -166,6 +186,8 @@ PHP_FUNCTION(zip_close)
}
/* }}} */
+/* {{{ php_zzip_get_entry
+ */
static void php_zzip_get_entry(INTERNAL_FUNCTION_PARAMETERS, int opt)
{
zval **zzip_ent;
@@ -193,6 +215,7 @@ static void php_zzip_get_entry(INTERNAL_FUNCTION_PARAMETERS, int opt)
break;
}
}
+/* }}} */
/* {{{ proto string zip_entry_name(resource zip_entry)
Return the name given a ZZip entry */
@@ -305,10 +328,10 @@ PHP_FUNCTION(zip_entry_close)
#endif /* HAVE_ZZIPLIB */
-
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 8f72cc0636..ca9a3e5aa4 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -85,7 +85,8 @@ static php_zlib_globals zlib_globals;
static int le_zp;
static int gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */
-
+/* {{{ php_zlib_functions[]
+ */
function_entry php_zlib_functions[] = {
PHP_FE(readgzfile, NULL)
PHP_FE(gzrewind, NULL)
@@ -110,13 +111,14 @@ function_entry php_zlib_functions[] = {
PHP_FE(ob_gzhandler, NULL)
{NULL, NULL, NULL}
};
-
+/* }}} */
PHP_INI_BEGIN()
STD_PHP_INI_BOOLEAN("zlib.output_compression", "0", PHP_INI_ALL, OnUpdateInt, output_compression, php_zlib_globals, zlib_globals)
PHP_INI_END()
-
+/* {{{ php_zlib_module_entry
+ */
zend_module_entry php_zlib_module_entry = {
"zlib",
php_zlib_functions,
@@ -127,24 +129,33 @@ zend_module_entry php_zlib_module_entry = {
PHP_MINFO(zlib),
STANDARD_MODULE_PROPERTIES
};
+/* }}} */
#ifdef COMPILE_DL_ZLIB
ZEND_GET_MODULE(php_zlib)
#endif
+/* {{{ phpi_destructor_gzclose
+ */
static void phpi_destructor_gzclose(zend_rsrc_list_entry *rsrc)
{
gzFile *zp = (gzFile *)rsrc->ptr;
(void)gzclose(zp);
}
+/* }}} */
#ifdef ZTS
+/* {{{ php_zlib_init_globals
+ */
static void php_zlib_init_globals(ZLIBLS_D)
{
ZLIBG(gzgetss_state) = 0;
}
+/* }}} */
#endif
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(zlib)
{
PLS_FETCH();
@@ -170,7 +181,10 @@ PHP_MINIT_FUNCTION(zlib)
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_RINIT_FUNCTION
+ */
PHP_RINIT_FUNCTION(zlib)
{
ZLIBLS_FETCH();
@@ -187,8 +201,10 @@ PHP_RINIT_FUNCTION(zlib)
}
return SUCCESS;
}
+/* }}} */
-
+/* {{{ PHP_MSHUTDOWN_FUNCTION
+ */
PHP_MSHUTDOWN_FUNCTION(zlib)
{
#if HAVE_FOPENCOOKIE
@@ -203,7 +219,10 @@ PHP_MSHUTDOWN_FUNCTION(zlib)
return SUCCESS;
}
+/* }}} */
+/* {{{ PHP_MINFO_FUNCTION
+ */
PHP_MINFO_FUNCTION(zlib)
{
php_info_print_table_start();
@@ -215,7 +234,10 @@ PHP_MINFO_FUNCTION(zlib)
php_info_print_table_row(2, "Linked Version", (char *)zlibVersion() );
php_info_print_table_end();
}
+/* }}} */
+/* {{{ php_gzopen_wrapper
+ */
static gzFile php_gzopen_wrapper(char *path, char *mode, int options)
{
FILE *f;
@@ -228,6 +250,7 @@ static gzFile php_gzopen_wrapper(char *path, char *mode, int options)
}
return gzdopen(fileno(f), mode);
}
+/* }}} */
/* {{{ proto array gzfile(string filename [, int use_include_path])
Read und uncompress entire .gz-file into an array */
@@ -961,8 +984,8 @@ PHP_FUNCTION(gzinflate)
}
/* }}} */
-
-
+/* {{{ php_do_deflate
+ */
static int php_do_deflate(uint str_length, Bytef **p_buffer, uint *p_buffer_len, zend_bool do_start, zend_bool do_end ZLIBLS_DC)
{
Bytef *buffer;
@@ -1006,8 +1029,10 @@ static int php_do_deflate(uint str_length, Bytef **p_buffer, uint *p_buffer_len,
return err;
}
+/* }}} */
-
+/* {{{ php_deflate_string
+ */
int php_deflate_string(const char *str, uint str_length, char **newstr, uint *new_length, int coding, zend_bool do_start, zend_bool do_end)
{
int err;
@@ -1080,8 +1105,10 @@ int php_deflate_string(const char *str, uint str_length, char **newstr, uint *ne
return SUCCESS;
}
+/* }}} */
-
+/* {{{ proto string gzencode(string data [, int encoding_mode])
+ GZ encode a string */
PHP_FUNCTION(gzencode)
{
zval **zv_coding, **zv_string;
@@ -1113,8 +1140,10 @@ PHP_FUNCTION(gzencode)
RETURN_FALSE;
}
}
+/* }}} */
-
+/* {{{ proto string ob_gzhandler(string str, int mode)
+ Encode str based on accept-encoding setting - designed to be called from ob_start() */
PHP_FUNCTION(ob_gzhandler)
{
int coding;
@@ -1198,9 +1227,10 @@ PHP_FUNCTION(ob_gzhandler)
zval_copy_ctor(return_value);
}
}
+/* }}} */
-
-
+/* {{{ php_gzip_output_handler
+ */
static void php_gzip_output_handler(char *output, uint output_len, char **handled_output, uint *handled_output_len, int mode)
{
zend_bool do_start, do_end;
@@ -1212,8 +1242,10 @@ static void php_gzip_output_handler(char *output, uint output_len, char **handle
zend_error(E_ERROR, "Compression failed");
}
}
+/* }}} */
-
+/* {{{ php_enable_output_compression
+ */
int php_enable_output_compression(int buffer_size)
{
zval **a_encoding, **data;
@@ -1244,3 +1276,12 @@ int php_enable_output_compression(int buffer_size)
php_ob_set_internal_handler(php_gzip_output_handler, buffer_size*1.5);
return SUCCESS;
}
+/* }}} */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/main/SAPI.c b/main/SAPI.c
index 8dc5e5890a..d38e70e73f 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -598,4 +598,5 @@ SAPI_API char *sapi_getenv(char *name, size_t name_len)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/main/alloca.c b/main/alloca.c
index 7c6cd4f192..ff553f3541 100644
--- a/main/alloca.c
+++ b/main/alloca.c
@@ -488,3 +488,11 @@ i00afunc (long address)
#endif /* no alloca */
#endif /* not GCC version 2 */
#endif /* HAVE_ALLOCA */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/main/fopen_wrappers.c b/main/fopen_wrappers.c
index b8f752a84c..208a39eebb 100644
--- a/main/fopen_wrappers.c
+++ b/main/fopen_wrappers.c
@@ -545,10 +545,10 @@ PHPAPI char *expand_filepath(const char *filepath, char *real_path)
return real_path;
}
-
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/main/internal_functions_win32.c b/main/internal_functions_win32.c
index 6a706b58fc..98583f7ca6 100644
--- a/main/internal_functions_win32.c
+++ b/main/internal_functions_win32.c
@@ -102,4 +102,5 @@ int php_global_shutdown_internal_extensions(void)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/main/main.c b/main/main.c
index a444cbf2c2..10a8d98064 100644
--- a/main/main.c
+++ b/main/main.c
@@ -1293,4 +1293,5 @@ PHPAPI void dummy_indent()
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/main/mergesort.c b/main/mergesort.c
index c1eb8bc26e..b73b67773b 100644
--- a/main/mergesort.c
+++ b/main/mergesort.c
@@ -342,3 +342,11 @@ static void insertionsort(u_char *a, size_t n, size_t size, int (*cmp)(const voi
swap(u, t);
}
}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/main/network.c b/main/network.c
index b71225dfa0..ff0d6e7f9b 100644
--- a/main/network.c
+++ b/main/network.c
@@ -332,5 +332,5 @@ int php_hostconnect(char *host, unsigned short port, int socktype, int timeout)
* tab-width: 8
* c-basic-offset: 8
* End:
- * vim: ts=4 sw=4 tw=78
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/main/output.c b/main/output.c
index d406b7e2ca..1f3f5f9f17 100644
--- a/main/output.c
+++ b/main/output.c
@@ -613,11 +613,10 @@ PHPAPI int php_get_output_start_lineno()
return OG(output_start_lineno);
}
-
-
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/main/php.h b/main/php.h
index 513edb3fc7..24173462ab 100644
--- a/main/php.h
+++ b/main/php.h
@@ -343,4 +343,5 @@ PHPAPI PHP_FUNCTION(warn_not_available);
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/main/php_content_types.c b/main/php_content_types.c
index e8efe610d3..81ca39882b 100644
--- a/main/php_content_types.c
+++ b/main/php_content_types.c
@@ -54,4 +54,5 @@ int php_startup_sapi_content_types(void)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/main/php_ini.c b/main/php_ini.c
index 38e2c70985..c4b9abb13a 100644
--- a/main/php_ini.c
+++ b/main/php_ini.c
@@ -348,4 +348,5 @@ PHPAPI int cfg_get_string(char *varname, char **result)
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/main/php_logos.c b/main/php_logos.c
index bad0ff9608..f236dc011f 100644
--- a/main/php_logos.c
+++ b/main/php_logos.c
@@ -87,3 +87,11 @@ int php_info_logos(const char *logo_string)
PHPWRITE(logo_image->data, logo_image->size);
return 1;
}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/main/php_open_temporary_file.c b/main/php_open_temporary_file.c
index 6ebcb2ed0f..9cce838814 100644
--- a/main/php_open_temporary_file.c
+++ b/main/php_open_temporary_file.c
@@ -50,7 +50,7 @@
#define P_tmpdir ""
#endif
-/* {{{ php_open_temporary_file */
+/* {{{ php_do_open_temporary_file */
/* Loosely based on a tempnam() implementation by UCLA */
@@ -139,8 +139,11 @@ static FILE *php_do_open_temporary_file(char *path, const char *pfx, char **open
}
return fp;
}
+/* }}} */
-/* Unlike tempnam(), the supplied dir argument takes precedence
+/* {{{ php_open_temporary_file
+ *
+ * Unlike tempnam(), the supplied dir argument takes precedence
* over the TMPDIR environment variable
* This function should do its best to return a file pointer to a newly created
* unique file, on every platform.
@@ -189,3 +192,12 @@ PHPAPI FILE *php_open_temporary_file(const char *dir, const char *pfx, char **op
return NULL;
}
+/* }}} */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/main/php_sprintf.c b/main/php_sprintf.c
index 9836fc79c3..c91d4da6c5 100644
--- a/main/php_sprintf.c
+++ b/main/php_sprintf.c
@@ -40,3 +40,11 @@ php_sprintf (char*s, const char* format, ...)
}
#endif /* BROKEN_SPRINTF */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/main/php_ticks.c b/main/php_ticks.c
index b1607d3ccf..5e66bfdd37 100644
--- a/main/php_ticks.c
+++ b/main/php_ticks.c
@@ -71,10 +71,10 @@ void php_run_ticks(int count)
zend_llist_apply_with_argument(&PG(tick_functions), (void(*)(void*,void*))php_tick_iterator, &count);
}
-
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/main/php_variables.c b/main/php_variables.c
index fd958445d1..b5a2e8d50e 100644
--- a/main/php_variables.c
+++ b/main/php_variables.c
@@ -333,4 +333,5 @@ void php_import_environment_variables(zval *array_ptr ELS_DC PLS_DC)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/main/reentrancy.c b/main/reentrancy.c
index d4049ee77d..e1ff8266d5 100644
--- a/main/reentrancy.c
+++ b/main/reentrancy.c
@@ -430,3 +430,11 @@ cont:
}
#endif
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/main/rfc1867.c b/main/rfc1867.c
index 6c87cc7d6f..1347f9d829 100644
--- a/main/rfc1867.c
+++ b/main/rfc1867.c
@@ -479,4 +479,5 @@ SAPI_POST_HANDLER_FUNC(rfc1867_post_handler)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/main/safe_mode.c b/main/safe_mode.c
index 0421ad2c7d..18b2f752c3 100644
--- a/main/safe_mode.c
+++ b/main/safe_mode.c
@@ -163,3 +163,11 @@ PHPAPI char *php_get_current_user()
return SG(request_info).current_user;
}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/main/snprintf.c b/main/snprintf.c
index d5caeff860..1a84a08370 100644
--- a/main/snprintf.c
+++ b/main/snprintf.c
@@ -938,3 +938,11 @@ int ap_php_vsnprintf(char *buf, size_t len, const char *format, va_list ap)
}
#endif /* HAVE_SNPRINTF */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/main/streams.c b/main/streams.c
index df0350d266..d4ac991c69 100755
--- a/main/streams.c
+++ b/main/streams.c
@@ -355,5 +355,5 @@ exit_success:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: tw=78 sw=4 ts=4
+ * vim: sw=4 ts=4 tw=78 fdm=marker
*/
diff --git a/main/strlcat.c b/main/strlcat.c
index 04734f101d..7e4cd9feb0 100644
--- a/main/strlcat.c
+++ b/main/strlcat.c
@@ -75,3 +75,11 @@ PHPAPI size_t php_strlcat(dst, src, siz)
}
#endif /* !HAVE_STRLCAT */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */
diff --git a/main/strlcpy.c b/main/strlcpy.c
index 68b5147ac6..6b51ca3a86 100644
--- a/main/strlcpy.c
+++ b/main/strlcpy.c
@@ -72,3 +72,11 @@ PHPAPI size_t php_strlcpy(dst, src, siz)
}
#endif /* !HAVE_STRLCPY */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim: sw=4 ts=4 tw=78 fdm=marker
+ */