summaryrefslogtreecommitdiff
path: root/ext/standard
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard')
-rw-r--r--ext/standard/array.c3
-rw-r--r--ext/standard/assert.c3
-rw-r--r--ext/standard/base64.c3
-rw-r--r--ext/standard/basic_functions.c3
-rw-r--r--ext/standard/browscap.c23
-rw-r--r--ext/standard/crc32.c3
-rw-r--r--ext/standard/credits.c7
-rw-r--r--ext/standard/crypt.c5
-rw-r--r--ext/standard/cyr_convert.c13
-rw-r--r--ext/standard/datetime.c18
-rw-r--r--ext/standard/dir.c3
-rw-r--r--ext/standard/dl.c7
-rw-r--r--ext/standard/dns.c13
-rw-r--r--ext/standard/exec.c16
-rw-r--r--ext/standard/file.c35
-rw-r--r--ext/standard/filestat.c9
-rw-r--r--ext/standard/flock_compat.c9
-rw-r--r--ext/standard/formatted_print.c7
-rw-r--r--ext/standard/fsock.c4
-rw-r--r--ext/standard/ftp_fopen_wrapper.c7
-rw-r--r--ext/standard/head.c16
-rw-r--r--ext/standard/html.c19
-rw-r--r--ext/standard/http_fopen_wrapper.c6
-rw-r--r--ext/standard/image.c44
-rw-r--r--ext/standard/incomplete_class.c25
-rw-r--r--ext/standard/info.c38
-rw-r--r--ext/standard/iptc.c18
-rw-r--r--ext/standard/lcg.c9
-rw-r--r--ext/standard/levenshtein.c18
-rw-r--r--ext/standard/link.c3
-rw-r--r--ext/standard/mail.c5
-rw-r--r--ext/standard/math.c3
-rw-r--r--ext/standard/md5.c27
-rw-r--r--ext/standard/metaphone.c7
-rw-r--r--ext/standard/microtime.c5
-rw-r--r--ext/standard/output.c66
-rw-r--r--ext/standard/pack.c17
-rw-r--r--ext/standard/pageinfo.c9
-rw-r--r--ext/standard/php_fopen_wrapper.c7
-rw-r--r--ext/standard/quot_print.c3
-rw-r--r--ext/standard/rand.c7
-rw-r--r--ext/standard/reg.c22
-rw-r--r--ext/standard/scanf.c27
-rw-r--r--ext/standard/soundex.c3
-rw-r--r--ext/standard/string.c9
-rw-r--r--ext/standard/strnatcmp.c15
-rw-r--r--ext/standard/syslog.c11
-rw-r--r--ext/standard/type.c14
-rw-r--r--ext/standard/uniqid.c3
-rw-r--r--ext/standard/url.c25
-rw-r--r--ext/standard/url_scanner.c14
-rw-r--r--ext/standard/url_scanner_ex.c18
-rw-r--r--ext/standard/var.c3
53 files changed, 526 insertions, 181 deletions
diff --git a/ext/standard/array.c b/ext/standard/array.c
index e69dc6e597..a356cc3c70 100644
--- a/ext/standard/array.c
+++ b/ext/standard/array.c
@@ -3122,5 +3122,6 @@ PHP_FUNCTION(key_exists)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/assert.c b/ext/standard/assert.c
index e5988f3a90..d28424d2bd 100644
--- a/ext/standard/assert.c
+++ b/ext/standard/assert.c
@@ -329,5 +329,6 @@ PHP_FUNCTION(assert_options)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/base64.c b/ext/standard/base64.c
index 21864431fe..cf3a4b79a2 100644
--- a/ext/standard/base64.c
+++ b/ext/standard/base64.c
@@ -196,5 +196,6 @@ PHP_FUNCTION(base64_decode) {
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vimo<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c
index 3f14dc599c..50ae28eb4d 100644
--- a/ext/standard/basic_functions.c
+++ b/ext/standard/basic_functions.c
@@ -2623,5 +2623,6 @@ PHP_FUNCTION(is_callable)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c
index 9e39af959c..91183591b7 100644
--- a/ext/standard/browscap.c
+++ b/ext/standard/browscap.c
@@ -39,7 +39,8 @@ static void browscap_entry_dtor(zval *pvalue)
}
}
-
+/* {{{ convert_browscap_pattern
+ */
static void convert_browscap_pattern(zval *pattern)
{
register int i,j;
@@ -80,8 +81,10 @@ static void convert_browscap_pattern(zval *pattern)
pattern->value.str.val = t;
pattern->value.str.len = j;
}
+/* }}} */
-
+/* {{{ php_browscap_parser_cb
+ */
static void php_browscap_parser_cb(zval *arg1, zval *arg2, int callback_type, void *arg)
{
switch (callback_type) {
@@ -126,8 +129,10 @@ static void php_browscap_parser_cb(zval *arg1, zval *arg2, int callback_type, vo
break;
}
}
+/* }}} */
-
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(browscap)
{
char *browscap = INI_STR("browscap");
@@ -151,8 +156,10 @@ PHP_MINIT_FUNCTION(browscap)
return SUCCESS;
}
+/* }}} */
-
+/* {{{ PHP_MSHUTDOWN_FUNCTION
+ */
PHP_MSHUTDOWN_FUNCTION(browscap)
{
if (INI_STR("browscap")) {
@@ -160,8 +167,10 @@ PHP_MSHUTDOWN_FUNCTION(browscap)
}
return SUCCESS;
}
+/* }}} */
-
+/* {{{ browser_reg_compare
+ */
static int browser_reg_compare(zval **browser,int num_args, va_list args, zend_hash_key *key)
{
zval **browser_name;
@@ -188,6 +197,7 @@ static int browser_reg_compare(zval **browser,int num_args, va_list args, zend_h
regfree(&r);
return 0;
}
+/* }}} */
/* {{{ proto object get_browser(string browser_name)
Get information about the capabilities of a browser */
@@ -253,5 +263,6 @@ PHP_FUNCTION(get_browser)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/crc32.c b/ext/standard/crc32.c
index e7b754d92f..86fe56cccc 100644
--- a/ext/standard/crc32.c
+++ b/ext/standard/crc32.c
@@ -131,5 +131,6 @@ PHP_NAMED_FUNCTION(php_if_crc32)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/credits.c b/ext/standard/credits.c
index 7a65ab09b3..b2089b2eeb 100644
--- a/ext/standard/credits.c
+++ b/ext/standard/credits.c
@@ -24,6 +24,8 @@
#define CREDIT_LINE(module, authors) php_info_print_table_row(2, module, authors)
+/* {{{ php_print_credits
+ */
PHPAPI void php_print_credits(int flag)
{
if (flag & PHP_CREDITS_FULLPAGE) {
@@ -109,10 +111,13 @@ 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
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c
index 8d749e90fb..9b2f8729b6 100644
--- a/ext/standard/crypt.c
+++ b/ext/standard/crypt.c
@@ -175,12 +175,11 @@ PHP_FUNCTION(crypt)
/* }}} */
#endif
-
-
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/cyr_convert.c b/ext/standard/cyr_convert.c
index 0869dd056a..44bb49a8d6 100644
--- a/ext/standard/cyr_convert.c
+++ b/ext/standard/cyr_convert.c
@@ -31,9 +31,6 @@
#include <stdio.h>
-
-
-
/*****************************************************************************
* This is codetables for different Cyrillic charsets (relative to koi8-r).
* Each table contains data for 128-255 symbols from ASCII table.
@@ -50,6 +47,8 @@
typedef unsigned char _cyr_charset_table[512];
+/* {{{ const static _cyr_charset_table _cyr_win1251
+ */
const static _cyr_charset_table _cyr_win1251 = {
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,
@@ -186,9 +185,9 @@ _cyr_mac = {
158,128,129,150,132,133,148,131,149,136,137,138,139,140,141,142,
143,159,144,145,146,147,134,130,156,155,135,152,157,153,151,154,
};
+/* }}} */
-
-/*****************************************************************************
+/* {{{ php_convert_cyr_string
* This is the function that performs real in-place conversion of the string
* between charsets.
* Parameters:
@@ -266,6 +265,7 @@ static char * php_convert_cyr_string(unsigned char *str, int length, char from,
}
return (char *)str;
}
+/* }}} */
/* {{{ proto string convert_cyr_string(string str, string from, string to)
Convert from one Cyrillic character set to another */
@@ -294,5 +294,6 @@ PHP_FUNCTION(convert_cyr_string)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c
index d5e1f180e5..c0f166c48a 100644
--- a/ext/standard/datetime.c
+++ b/ext/standard/datetime.c
@@ -75,6 +75,8 @@ PHP_FUNCTION(time)
}
/* }}} */
+/* {{{ php_mktime
+ */
void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gm)
{
pval **arguments[7];
@@ -190,6 +192,7 @@ void php_mktime(INTERNAL_FUNCTION_PARAMETERS, int gm)
RETURN_LONG(seconds);
}
+/* }}} */
/* {{{ proto int mktime(int hour, int min, int sec, int mon, int day, int year)
Get UNIX timestamp for a date */
@@ -207,6 +210,8 @@ PHP_FUNCTION(gmmktime)
}
/* }}} */
+/* {{{ php_date
+ */
static void
php_date(INTERNAL_FUNCTION_PARAMETERS, int gm)
{
@@ -511,6 +516,7 @@ php_date(INTERNAL_FUNCTION_PARAMETERS, int gm)
return_value->value.str.len = strlen(return_value->value.str.val);
return_value->type = IS_STRING;
}
+/* }}} */
/* {{{ proto string date(string format [, int timestamp])
Format a local time/date */
@@ -628,7 +634,8 @@ PHP_FUNCTION(getdate)
}
/* }}} */
-/* Return date string in standard format for http headers */
+/* {{{ php_std_date
+ Return date string in standard format for http headers */
char *php_std_date(time_t t)
{
struct tm *tm1, tmbuf;
@@ -656,7 +663,7 @@ char *php_std_date(time_t t)
str[79]=0;
return (str);
}
-
+/* }}} */
/* {{{ proto bool checkdate(int month, int day, int year)
Returns true(1) if it is a valid date in gregorian calendar */
@@ -697,6 +704,8 @@ PHP_FUNCTION(checkdate)
/* }}} */
#if HAVE_STRFTIME
+/* {{{ _php_strftime
+ */
void _php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gm)
{
pval **format_arg, **timestamp_arg;
@@ -753,6 +762,8 @@ void _php_strftime(INTERNAL_FUNCTION_PARAMETERS, int gm)
efree(buf);
RETURN_FALSE;
}
+/* }}} */
+
/* {{{ proto string strftime(string format [, int timestamp])
Format a local time/date according to locale settings */
PHP_FUNCTION(strftime)
@@ -804,5 +815,6 @@ PHP_FUNCTION(strtotime)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/dir.c b/ext/standard/dir.c
index 23060fd365..93f0c386ef 100644
--- a/ext/standard/dir.c
+++ b/ext/standard/dir.c
@@ -364,5 +364,6 @@ PHP_NAMED_FUNCTION(php_if_readdir)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/dl.c b/ext/standard/dl.c
index 7f10f5ac96..439fb889c7 100644
--- a/ext/standard/dl.c
+++ b/ext/standard/dl.c
@@ -91,6 +91,8 @@ PHP_FUNCTION(dl)
#define USING_ZTS 0
#endif
+/* {{{ php_dl
+ */
void php_dl(pval *file, int type, pval *return_value)
{
void *handle;
@@ -200,7 +202,7 @@ void php_dl(pval *file, int type, pval *return_value)
RETURN_TRUE;
}
-
+/* }}} */
PHP_MINFO_FUNCTION(dl)
{
@@ -227,5 +229,6 @@ PHP_MINFO_FUNCTION(dl)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/dns.c b/ext/standard/dns.c
index 5ff093995d..bf8fa2eb76 100644
--- a/ext/standard/dns.c
+++ b/ext/standard/dns.c
@@ -18,6 +18,8 @@
/* $Id$ */
+/* {{{ includes
+ */
#include "php.h"
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
@@ -59,6 +61,7 @@
#endif
#include "dns.h"
+/* }}} */
char *php_gethostbyaddr(char *ip);
char *php_gethostbyname(char *name);
@@ -78,7 +81,8 @@ PHP_FUNCTION(gethostbyaddr)
}
/* }}} */
-
+/* {{{ php_gethostbyaddr
+ */
char *php_gethostbyaddr(char *ip)
{
struct in_addr addr;
@@ -100,6 +104,7 @@ char *php_gethostbyaddr(char *ip)
}
return estrdup(hp->h_name);
}
+/* }}} */
/* {{{ proto string gethostbyname(string hostname)
Get the IP address corresponding to a given Internet host name */
@@ -151,6 +156,8 @@ PHP_FUNCTION(gethostbynamel)
}
/* }}} */
+/* {{{ php_gethostbyname
+ */
char *php_gethostbyname(char *name)
{
struct hostent *hp;
@@ -166,6 +173,7 @@ char *php_gethostbyname(char *name)
memcpy(&in.s_addr, *(hp->h_addr_list), sizeof(in.s_addr));
return estrdup(inet_ntoa(in));
}
+/* }}} */
#if HAVE_RES_SEARCH && !(defined(__BEOS__)||defined(PHP_WIN32))
@@ -324,5 +332,6 @@ PHP_FUNCTION(getmxrr)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/exec.c b/ext/standard/exec.c
index f85c40a98f..5dd828de26 100644
--- a/ext/standard/exec.c
+++ b/ext/standard/exec.c
@@ -35,7 +35,7 @@
#include <signal.h>
#endif
-/*
+/* {{{ php_Exec
* If type==0, only last line of output is returned (exec)
* If type==1, all lines will be printed and last lined returned (system)
* If type==2, all lines will be saved to given array (exec with &$array)
@@ -234,6 +234,7 @@ int php_Exec(int type, char *cmd, pval *array, pval *return_value)
efree(buf);
return FG(pclose_ret);
}
+/* }}} */
/* {{{ proto string exec(string command [, array output [, int return_value]])
Execute an external program */
@@ -326,6 +327,8 @@ PHP_FUNCTION(passthru)
}
/* }}} */
+/* {{{ php_get_index
+ */
static int php_get_index(char *s, char c)
{
register int x;
@@ -336,8 +339,10 @@ static int php_get_index(char *s, char c)
return -1;
}
+/* }}} */
-/* Escape all chars that could possibly be used to
+/* {{{ php_escape_shell_cmd
+ Escape all chars that could possibly be used to
break out of a shell command
This function emalloc's a string and returns the pointer.
@@ -363,7 +368,10 @@ char * php_escape_shell_cmd(char *str) {
}
return cmd;
}
+/* }}} */
+/* {{{ php_escape_shell_arg
+ */
char * php_escape_shell_arg(char *str) {
register int x, y, l;
char *cmd;
@@ -389,6 +397,7 @@ char * php_escape_shell_arg(char *str) {
cmd[l] = '\0';
return cmd;
}
+/* }}} */
/* {{{ proto string escapeshellcmd(string command)
Escape shell metacharacters */
@@ -480,5 +489,6 @@ PHP_FUNCTION(shell_exec)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/file.c b/ext/standard/file.c
index e52feda63f..8c31f827dc 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -584,6 +584,8 @@ PHP_NAMED_FUNCTION(php_if_tmpfile)
/* }}} */
#if HAVE_PHP_STREAM
+/* {{{ PHP_FUNCTION
+ */
PHP_FUNCTION(fopenstream)
{
zval ** zfilename, ** zmode;
@@ -603,6 +605,7 @@ PHP_FUNCTION(fopenstream)
}
ZEND_REGISTER_RESOURCE(return_value, stream, le_stream);
}
+/* }}} */
#endif
/* {{{ proto int fopen(string filename, string mode [, int use_include_path])
@@ -1729,7 +1732,6 @@ PHP_FUNCTION(rename)
}
/* }}} */
-
/* {{{ proto int unlink(string filename)
Delete a file */
PHP_FUNCTION(unlink)
@@ -1758,7 +1760,6 @@ PHP_FUNCTION(unlink)
}
/* }}} */
-
/* {{{ proto int ftruncate (int fp, int size)
Truncate file to 'size' length */
PHP_NAMED_FUNCTION(php_if_ftruncate)
@@ -1874,7 +1875,6 @@ PHP_NAMED_FUNCTION(php_if_fstat)
}
/* }}} */
-
/* {{{ proto int copy(string source_file, string destination_file)
Copy a file */
@@ -1915,7 +1915,8 @@ PHP_FUNCTION(copy)
/* }}} */
-
+/* {{{ php_copy_file
+ */
PHPAPI int php_copy_file(char *src, char *dest)
{
char buffer[8192];
@@ -1971,9 +1972,7 @@ cleanup:
close(fd_t);
return ret;
}
-
-
-
+/* }}} */
/* {{{ proto string fread(int fp, int length)
Binary-safe file read */
@@ -2028,6 +2027,7 @@ PHP_FUNCTION(fread)
}
/* }}} */
+
/* {{{ proto array fgetcsv(int fp, int length [, string delimiter])
Get line from file pointer and parse for CSV fields */
@@ -2222,7 +2222,8 @@ PHP_FUNCTION(realpath)
static fd_set readfd;
static int max_fd;
-
+/* {{{ PHP_FUNCTION(fd_set)
+ */
PHP_FUNCTION(fd_set)
{
pval **arg;
@@ -2274,7 +2275,10 @@ PHP_FUNCTION(fd_set)
}
RETURN_LONG(1);
}
+/* }}} */
+/* {{{ PHP_FUNCTION(select)
+ */
PHP_FUNCTION(select)
{
pval **timeout;
@@ -2292,7 +2296,10 @@ PHP_FUNCTION(select)
RETURN_LONG(select(max_fd + 1,&readfd,NULL,NULL,((*timeout)->value.lval <= 0) ? NULL : &tv));
}
+/* }}} */
+/* {{{ PHP_FUNCTION(fd_isset)
+ */
PHP_FUNCTION(fd_isset)
{
pval **fdarg;
@@ -2318,10 +2325,12 @@ PHP_FUNCTION(fd_isset)
}
RETURN_FALSE;
}
+/* }}} */
#endif
-/* Function reads all data from file or socket and puts it into the buffer */
+/* {{{ php_fread_all
+ Function reads all data from file or socket and puts it into the buffer */
size_t php_fread_all(char **buf, int socket, FILE *fp, int issock) {
size_t ret;
char *ptr;
@@ -2351,11 +2360,13 @@ size_t php_fread_all(char **buf, int socket, FILE *fp, int issock) {
return len;
}
+/* }}} */
/* See http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.2 */
#define PHP_META_HTML401_CHARS "-_.:"
-/* Tokenizes an HTML file for get_meta_tags */
+/* {{{ php_next_meta_token
+ Tokenizes an HTML file for get_meta_tags */
php_meta_tags_token php_next_meta_token(FILE *fp, int socketd, int issock, int *use_last_char, int *last_char, char **data, int *datalen) {
int ch, compliment;
char buff[META_DEF_BUFSIZE + 1];
@@ -2441,11 +2452,13 @@ php_meta_tags_token php_next_meta_token(FILE *fp, int socketd, int issock, int *
return TOK_EOF;
}
+/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: tw=78 sw=4 ts=4 fdm=marker
+ * vim600: tw=78 sw=4 ts=4 fdm=marker
+ * vim<600: tw=78 sw=4 ts=4
*/
diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c
index 41d0603e44..2eb07d8f20 100644
--- a/ext/standard/filestat.c
+++ b/ext/standard/filestat.c
@@ -421,7 +421,6 @@ PHP_FUNCTION(chown)
}
/* }}} */
-
/* {{{ proto bool chmod(string filename, int mode)
Change file mode */
PHP_FUNCTION(chmod)
@@ -462,7 +461,6 @@ PHP_FUNCTION(chmod)
}
/* }}} */
-
/* {{{ proto bool touch(string filename [, int time])
Set modification time of file */
PHP_FUNCTION(touch)
@@ -535,7 +533,6 @@ PHP_FUNCTION(touch)
}
/* }}} */
-
/* {{{ proto void clearstatcache(void)
Clear file stat cache */
PHP_FUNCTION(clearstatcache)
@@ -551,6 +548,8 @@ PHP_FUNCTION(clearstatcache)
#define IS_LINK_OPERATION() (type == 8 /* filetype */ || type == 14 /* is_link */ || type == 16 /* lstat */)
+/* {{{ php_stat
+ */
static void php_stat(const char *filename, php_stat_len filename_length, int type, pval *return_value)
{
zval *stat_dev,*stat_ino,*stat_mode,*stat_nlink,*stat_uid,*stat_gid,*stat_rdev,
@@ -761,6 +760,7 @@ static void php_stat(const char *filename, php_stat_len filename_length, int typ
php_error(E_WARNING, "didn't understand stat call");
RETURN_FALSE;
}
+/* }}} */
/* another quickie macro to make defining similar functions easier */
#define FileFunction(name, funcnum) \
@@ -868,5 +868,6 @@ FileFunction(php_if_stat,17)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/flock_compat.c b/ext/standard/flock_compat.c
index 6395df992c..38b387f8b2 100644
--- a/ext/standard/flock_compat.c
+++ b/ext/standard/flock_compat.c
@@ -152,15 +152,13 @@ int flock(int fd, int operation)
#endif /* !defined(HAVE_FLOCK) */
#if !(HAVE_INET_ATON)
-
-/*
+/* {{{ inet_aton
* Check whether "cp" is a valid ascii representation
* of an Internet address and convert to a binary address.
* Returns 1 if the address is valid, 0 if not.
* This replaces inet_addr, the return value from which
* cannot distinguish between failure and a local broadcast address.
*/
-
int inet_aton(const char *cp, struct in_addr *ap)
{
int dots = 0;
@@ -214,7 +212,7 @@ int inet_aton(const char *cp, struct in_addr *ap)
return 1;
}
-
+/* }}} */
#endif /* !HAVE_INET_ATON */
/*
@@ -222,5 +220,6 @@ int inet_aton(const char *cp, struct in_addr *ap)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c
index 67791bbe23..4ccdc40723 100644
--- a/ext/standard/formatted_print.c
+++ b/ext/standard/formatted_print.c
@@ -389,8 +389,7 @@ php_sprintf_getnumber(char *buffer, int *pos)
return num;
}
-
-/*
+/* {{{ php_formatted_print
* New sprintf implementation for PHP.
*
* Modifiers:
@@ -629,6 +628,7 @@ php_formatted_print(int ht, int *len)
*len = outpos;
return result;
}
+/* }}} */
/* {{{ proto string sprintf(string format [, mixed arg1 [, mixed ...]])
Return a formatted string */
@@ -665,5 +665,6 @@ PHP_FUNCTION(user_printf)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c
index c3334f8969..a4f5148b5a 100644
--- a/ext/standard/fsock.c
+++ b/ext/standard/fsock.c
@@ -737,6 +737,7 @@ PHPAPI size_t php_sock_fread(char *ptr, size_t size, int socket)
}
/* }}} */
+
/* {{{ module start/shutdown functions */
/* {{{ php_msock_destroy */
@@ -761,5 +762,6 @@ PHP_RSHUTDOWN_FUNCTION(fsock)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/ftp_fopen_wrapper.c b/ext/standard/ftp_fopen_wrapper.c
index 62efc0c413..f777a7518a 100644
--- a/ext/standard/ftp_fopen_wrapper.c
+++ b/ext/standard/ftp_fopen_wrapper.c
@@ -77,7 +77,8 @@ static int php_get_ftp_result(int socketd)
return strtol(tmp_line, NULL, 10);
}
-
+/* {{{ php_fopen_url_wrap_ftp
+ */
FILE *php_fopen_url_wrap_ftp(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path)
{
FILE *fp=NULL;
@@ -311,11 +312,13 @@ 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
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/head.c b/ext/standard/head.c
index c10c9ba261..a455691725 100644
--- a/ext/standard/head.c
+++ b/ext/standard/head.c
@@ -81,6 +81,8 @@ PHP_FUNCTION(Header)
}
/* }}} */
+/* {{{ php_header
+ */
PHPAPI int php_header()
{
SLS_FETCH();
@@ -91,8 +93,10 @@ PHPAPI int php_header()
return 1; /* allow output */
}
}
+/* }}} */
-
+/* {{{ php_push_cookie_list
+ */
void php_push_cookie_list(char *name, char *value, time_t expires, char *path, char *domain, int secure)
{
CookieList *new;
@@ -107,7 +111,10 @@ void php_push_cookie_list(char *name, char *value, time_t expires, char *path, c
new->secure = secure;
top = new;
}
+/* }}} */
+/* {{{ php_pop_cookie_list
+ */
CookieList *php_pop_cookie_list(void)
{
CookieList *ret;
@@ -117,6 +124,7 @@ CookieList *php_pop_cookie_list(void)
top = top->next;
return (ret);
}
+/* }}} */
/* php_set_cookie(name,value,expires,path,domain,secure) */
/* {{{ proto void setcookie(string name [, string value [, int expires [, string path [, string domain [, string secure]]]]])
@@ -251,6 +259,8 @@ PHP_FUNCTION(setcookie)
}
/* }}} */
+/* {{{ php_headers_unsent
+ */
int php_headers_unsent(void)
{
if (php_header_printed!=1 || !php_print_header) {
@@ -259,6 +269,7 @@ int php_headers_unsent(void)
return 0;
}
}
+/* }}} */
/* {{{ proto int headers_sent(void)
Return true if headers have already been sent, false otherwise */
@@ -279,5 +290,6 @@ PHP_FUNCTION(headers_sent)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/html.c b/ext/standard/html.c
index 3df62a4eae..5e9bc50117 100644
--- a/ext/standard/html.c
+++ b/ext/standard/html.c
@@ -106,6 +106,8 @@ static const struct {
{ NULL }
};
+/* {{{ get_next_char
+ */
inline static unsigned short get_next_char(enum entity_charset charset,
unsigned char * str,
int * newpos,
@@ -205,8 +207,10 @@ inline static unsigned short get_next_char(enum entity_charset charset,
*mbseqlen = mbpos;
return this_char;
}
+/* }}} */
-/* returns the charset identifier based on current locale or a hint.
+/* {{{ entity_charset determine_charset
+ * returns the charset identifier based on current locale or a hint.
* defaults to iso-8859-1 */
static enum entity_charset determine_charset(char * charset_hint)
{
@@ -261,7 +265,10 @@ static enum entity_charset determine_charset(char * charset_hint)
return charset;
}
+/* }}} */
+/* {{{ php_escape_html_entities
+ */
PHPAPI char *php_escape_html_entities(unsigned char *old, int oldlen, int *newlen, int all, int quote_style, char * hint_charset)
{
int i, maxlen, len;
@@ -347,7 +354,10 @@ PHPAPI char *php_escape_html_entities(unsigned char *old, int oldlen, int *newle
}
+/* }}} */
+/* {{{ php_html_entities
+ */
static void php_html_entities(INTERNAL_FUNCTION_PARAMETERS, int all)
{
zval **arg, **quotes, **charset;
@@ -374,10 +384,13 @@ static void php_html_entities(INTERNAL_FUNCTION_PARAMETERS, int all)
new = php_escape_html_entities((*arg)->value.str.val, (*arg)->value.str.len, &len, all, quote_style, hint_charset);
RETVAL_STRINGL(new,len,0);
}
+/* }}} */
#define HTML_SPECIALCHARS 0
#define HTML_ENTITIES 1
+/* {{{ register_html_constants
+ */
void register_html_constants(INIT_FUNC_ARGS)
{
REGISTER_LONG_CONSTANT("HTML_SPECIALCHARS", HTML_SPECIALCHARS, CONST_PERSISTENT|CONST_CS);
@@ -386,6 +399,7 @@ void register_html_constants(INIT_FUNC_ARGS)
REGISTER_LONG_CONSTANT("ENT_QUOTES", ENT_QUOTES, CONST_PERSISTENT|CONST_CS);
REGISTER_LONG_CONSTANT("ENT_NOQUOTES", ENT_NOQUOTES, CONST_PERSISTENT|CONST_CS);
}
+/* }}} */
/* {{{ proto string htmlspecialchars(string string [, int quote_style][, string charset])
Convert special characters to HTML entities */
@@ -471,5 +485,6 @@ PHP_FUNCTION(get_html_translation_table)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c
index 37c229705c..db5735e9a7 100644
--- a/ext/standard/http_fopen_wrapper.c
+++ b/ext/standard/http_fopen_wrapper.c
@@ -68,6 +68,8 @@
#define HTTP_HEADER_BLOCK_SIZE 128
+/* {{{ php_fopen_url_wrap_http
+ */
FILE *php_fopen_url_wrap_http(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path)
{
FILE *fp=NULL;
@@ -302,11 +304,13 @@ 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
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/image.c b/ext/standard/image.c
index 8d4934e77b..7b550f9519 100644
--- a/ext/standard/image.c
+++ b/ext/standard/image.c
@@ -66,7 +66,8 @@ struct gfxinfo {
unsigned int channels;
};
-/* routine to handle GIF files. If only everything were that easy... ;} */
+/* {{{ php_handle_gif
+ * routine to handle GIF files. If only everything were that easy... ;} */
static struct gfxinfo *php_handle_gif (int socketd, FILE *fp, int issock)
{
struct gfxinfo *result = NULL;
@@ -85,8 +86,10 @@ static struct gfxinfo *php_handle_gif (int socketd, FILE *fp, int issock)
return result;
}
+/* }}} */
-
+/* {{{ php_handle_psd
+ */
static struct gfxinfo *php_handle_psd (int socketd, FILE *fp, int issock)
{
struct gfxinfo *result = NULL;
@@ -110,8 +113,10 @@ static struct gfxinfo *php_handle_psd (int socketd, FILE *fp, int issock)
return result;
}
+/* }}} */
-
+/* {{{ php_handle_bmp
+ */
static struct gfxinfo *php_handle_bmp (int socketd, FILE *fp, int issock)
{
struct gfxinfo *result = NULL;
@@ -130,9 +135,10 @@ static struct gfxinfo *php_handle_bmp (int socketd, FILE *fp, int issock)
return result;
}
+/* }}} */
-
-/* routines to handle SWF files. */
+/* {{{ php_swf_get_bits
+ * routines to handle SWF files. */
static unsigned long int php_swf_get_bits (unsigned char* buffer, unsigned int pos, unsigned int count)
{
unsigned int loop;
@@ -145,8 +151,10 @@ static unsigned long int php_swf_get_bits (unsigned char* buffer, unsigned int p
}
return result;
}
+/* }}} */
-
+/* {{{ php_handle_swf
+ */
static struct gfxinfo *php_handle_swf (int socketd, FILE *fp, int issock)
{
struct gfxinfo *result = NULL;
@@ -165,8 +173,10 @@ static struct gfxinfo *php_handle_swf (int socketd, FILE *fp, int issock)
php_swf_get_bits (a, 5 + (2 * bits), bits)) / 20;
return result;
}
+/* }}} */
-/* routine to handle PNG files */
+/* {{{ php_handle_png
+ * routine to handle PNG files */
static struct gfxinfo *php_handle_png (int socketd, FILE *fp, int issock)
{
struct gfxinfo *result = NULL;
@@ -190,6 +200,7 @@ static struct gfxinfo *php_handle_png (int socketd, FILE *fp, int issock)
result->height = (unsigned int) in_height;
return result;
}
+/* }}} */
/* routines to handle JPEG data */
@@ -227,6 +238,8 @@ static struct gfxinfo *php_handle_png (int socketd, FILE *fp, int issock)
#define M_APP14 0xee
#define M_APP15 0xef
+/* {{{ php_read2
+ */
static unsigned short php_read2(int socketd, FILE *fp, int issock)
{
unsigned char a[2];
@@ -236,7 +249,10 @@ static unsigned short php_read2(int socketd, FILE *fp, int issock)
return (((unsigned short) a[ 0 ]) << 8) + ((unsigned short) a[ 1 ]);
}
+/* }}} */
+/* {{{ php_next_marker
+ */
static unsigned int php_next_marker(int socketd, FILE *fp, int issock)
/* get next marker byte from file */
{
@@ -250,7 +266,10 @@ static unsigned int php_next_marker(int socketd, FILE *fp, int issock)
return (unsigned int) c;
}
+/* }}} */
+/* {{{ php_skip_variable
+ */
static void php_skip_variable(int socketd, FILE *fp, int issock)
/* skip over a variable-length block; assumes proper length marker */
{
@@ -264,7 +283,10 @@ static void php_skip_variable(int socketd, FILE *fp, int issock)
FP_FREAD(tmp, (long) length, socketd, fp, issock); /* skip the header */
efree(tmp);
}
+/* }}} */
+/* {{{ php_read_APP
+ */
static void php_read_APP(int socketd, FILE *fp, int issock,unsigned int marker,pval *info)
{
unsigned short length;
@@ -291,8 +313,10 @@ static void php_read_APP(int socketd, FILE *fp, int issock,unsigned int marker,p
efree(buffer);
}
+/* }}} */
-/* main loop to parse JPEG structure */
+/* {{{ php_handle_jpeg
+ main loop to parse JPEG structure */
static struct gfxinfo *php_handle_jpeg (int socketd, FILE *fp, int issock, pval *info)
{
struct gfxinfo *result = NULL;
@@ -369,6 +393,7 @@ static struct gfxinfo *php_handle_jpeg (int socketd, FILE *fp, int issock, pval
return NULL;
}
+/* }}} */
/* main function */
@@ -500,5 +525,6 @@ PHP_FUNCTION(getimagesize)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/incomplete_class.c b/ext/standard/incomplete_class.c
index e9967fc784..c0019282e8 100644
--- a/ext/standard/incomplete_class.c
+++ b/ext/standard/incomplete_class.c
@@ -33,6 +33,8 @@
#define INCOMPLETE_CLASS "__PHP_Incomplete_Class"
#define MAGIC_MEMBER "__PHP_Incomplete_Class_Name"
+/* {{{ incomplete_class_message
+ */
static void incomplete_class_message(zend_property_reference *ref)
{
char buf[1024];
@@ -49,12 +51,18 @@ static void incomplete_class_message(zend_property_reference *ref)
php_error(E_ERROR, "%s", buf);
}
+/* }}} */
+/* {{{ incomplete_class_call_func
+ */
static void incomplete_class_call_func(INTERNAL_FUNCTION_PARAMETERS, zend_property_reference *property_reference)
{
incomplete_class_message(property_reference);
}
+/* }}} */
+/* {{{ incomplete_class_set_property
+ */
static int incomplete_class_set_property(zend_property_reference *property_reference, zval *value)
{
incomplete_class_message(property_reference);
@@ -62,7 +70,10 @@ static int incomplete_class_set_property(zend_property_reference *property_refer
/* does not reach this point */
return (0);
}
+/* }}} */
+/* {{{ incomplete_class_get_property
+ */
static zval incomplete_class_get_property(zend_property_reference *property_reference)
{
zval foo;
@@ -73,7 +84,10 @@ static zval incomplete_class_get_property(zend_property_reference *property_refe
memset(&foo, 0, sizeof(zval)); /* shut warnings up */
return (foo);
}
+/* }}} */
+/* {{{ php_create_incomplete_class
+ */
zend_class_entry *php_create_incomplete_class(BLS_D)
{
zend_class_entry incomplete_class;
@@ -87,8 +101,10 @@ zend_class_entry *php_create_incomplete_class(BLS_D)
return (BG(incomplete_class));
}
+/* }}} */
-
+/* {{{ php_lookup_class_name
+ */
char *php_lookup_class_name(zval *object, size_t *nlen, zend_bool del)
{
zval **val;
@@ -106,7 +122,10 @@ char *php_lookup_class_name(zval *object, size_t *nlen, zend_bool del)
return (retval);
}
+/* }}} */
+/* {{{ php_store_class_name
+ */
void php_store_class_name(zval *object, const char *name, size_t len)
{
zval *val;
@@ -119,11 +138,13 @@ 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
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/info.c b/ext/standard/info.c
index 16ee26bfa6..8d39d13ce0 100644
--- a/ext/standard/info.c
+++ b/ext/standard/info.c
@@ -38,6 +38,8 @@
PHPAPI extern char *php_ini_opened_path;
+/* {{{ _display_module_info
+ */
static int _display_module_info(zend_module_entry *module, void *arg)
{
int show_info_func = *((int *) arg);
@@ -53,8 +55,10 @@ static int _display_module_info(zend_module_entry *module, void *arg)
}
return 0;
}
+/* }}} */
-
+/* {{{ php_print_gpcse_array
+ */
static void php_print_gpcse_array(char *name, uint name_length ELS_DC)
{
zval **data, **tmp, tmp2;
@@ -96,7 +100,10 @@ static void php_print_gpcse_array(char *name, uint name_length ELS_DC)
}
}
}
+/* }}} */
+/* {{{ php_info_print_style
+ */
void php_info_print_style(void)
{
php_printf("<STYLE TYPE=\"text/css\"><!--\n");
@@ -108,8 +115,10 @@ void php_info_print_style(void)
php_printf("TH { font-family: arial,helvetica,sans-serif; font-size: 11pt; font-weight: bold; }\n");
php_printf("//--></STYLE>\n");
}
+/* }}} */
-
+/* {{{ php_get_uname
+ */
PHPAPI char *php_get_uname()
{
char *php_uname;
@@ -133,7 +142,10 @@ PHPAPI char *php_get_uname()
#endif
return estrdup(php_uname);
}
+/* }}} */
+/* {{{ php_print_info
+ */
PHPAPI void php_print_info(int flag)
{
char **env,*tmp1,*tmp2;
@@ -324,7 +336,7 @@ PHPAPI void php_print_info(int flag)
PUTS("</BODY></HTML>");
}
-
+/* }}} */
PHPAPI void php_info_print_table_start()
@@ -364,7 +376,8 @@ PHPAPI void php_info_print_table_colspan_header(int num_cols, char *header)
php_printf("<TR BGCOLOR=\"" PHP_HEADER_COLOR "\"><TH COLSPAN=%d>%s</TH></TR>\n", num_cols, header );
}
-
+/* {{{ php_info_print_table_header
+ */
PHPAPI void php_info_print_table_header(int num_cols, ...)
{
int i;
@@ -385,8 +398,10 @@ PHPAPI void php_info_print_table_header(int num_cols, ...)
va_end(row_elements);
}
+/* }}} */
-
+/* {{{ php_info_print_table_row
+ */
PHPAPI void php_info_print_table_row(int num_cols, ...)
{
int i;
@@ -414,9 +429,10 @@ PHPAPI void php_info_print_table_row(int num_cols, ...)
va_end(row_elements);
}
+/* }}} */
-
-
+/* {{{ register_phpinfo_constants
+ */
void register_phpinfo_constants(INIT_FUNC_ARGS)
{
REGISTER_LONG_CONSTANT("INFO_GENERAL", PHP_INFO_GENERAL, CONST_PERSISTENT|CONST_CS);
@@ -436,7 +452,7 @@ void register_phpinfo_constants(INIT_FUNC_ARGS)
REGISTER_LONG_CONSTANT("CREDITS_QA", PHP_CREDITS_QA, CONST_PERSISTENT|CONST_CS);
REGISTER_LONG_CONSTANT("CREDITS_ALL", PHP_CREDITS_ALL, CONST_PERSISTENT|CONST_CS);
}
-
+/* }}} */
/* {{{ proto void phpinfo([int what])
Output a page of useful information about PHP and the current request */
@@ -475,7 +491,6 @@ PHP_FUNCTION(phpversion)
}
/* }}} */
-
/* {{{ proto void phpcredits([int flag])
Prints the list of people who've contributed to the PHP project */
PHP_FUNCTION(phpcredits)
@@ -505,7 +520,6 @@ PHP_FUNCTION(phpcredits)
/* }}} */
-
/* {{{ proto string php_logo_guid(void)
Return the special ID used to request the PHP logo in phpinfo screens*/
PHP_FUNCTION(php_logo_guid)
@@ -522,7 +536,6 @@ PHP_FUNCTION(php_egg_logo_guid)
}
/* }}} */
-
/* {{{ proto string zend_logo_guid(void)
Return the special ID used to request the Zend logo in phpinfo screens*/
PHP_FUNCTION(zend_logo_guid)
@@ -558,5 +571,6 @@ PHP_FUNCTION(php_uname)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c
index 675291f252..0d07354455 100644
--- a/ext/standard/iptc.c
+++ b/ext/standard/iptc.c
@@ -73,6 +73,8 @@
#define M_APP14 0xee
#define M_APP15 0xef
+/* {{{ php_iptc_put1
+ */
static int php_iptc_put1(FILE *fp,int spool,unsigned char c,unsigned char **spoolbuf)
{
if (spool > 0)
@@ -82,7 +84,10 @@ static int php_iptc_put1(FILE *fp,int spool,unsigned char c,unsigned char **spoo
return c;
}
+/* }}} */
+/* {{{ php_iptc_get1
+ */
static int php_iptc_get1(FILE *fp,int spool,unsigned char **spoolbuf)
{
int c;
@@ -101,7 +106,10 @@ static int php_iptc_get1(FILE *fp,int spool,unsigned char **spoolbuf)
return c;
}
+/* }}} */
+/* {{{ php_iptc_read_remaining
+ */
static int php_iptc_read_remaining(FILE *fp,int spool,unsigned char **spoolbuf)
{
int c;
@@ -110,7 +118,10 @@ static int php_iptc_read_remaining(FILE *fp,int spool,unsigned char **spoolbuf)
return M_EOI;
}
+/* }}} */
+/* {{{ php_iptc_skip_variable
+ */
static int php_iptc_skip_variable(FILE *fp,int spool,unsigned char **spoolbuf)
{
unsigned int length;
@@ -129,7 +140,10 @@ static int php_iptc_skip_variable(FILE *fp,int spool,unsigned char **spoolbuf)
return 0;
}
+/* }}} */
+/* {{{ php_iptc_next_marker
+ */
static int php_iptc_next_marker(FILE *fp,int spool,unsigned char **spoolbuf)
{
int c;
@@ -157,6 +171,7 @@ static int php_iptc_next_marker(FILE *fp,int spool,unsigned char **spoolbuf)
return (unsigned int) c;
}
+/* }}} */
static char psheader[] = "\xFF\xED\0\0Photoshop 3.0\08BIM\x04\x04\0\0\0\0";
@@ -375,5 +390,6 @@ PHP_FUNCTION(iptcparse)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/lcg.c b/ext/standard/lcg.c
index ca6e8b7fb4..22f6fc3fb5 100644
--- a/ext/standard/lcg.c
+++ b/ext/standard/lcg.c
@@ -97,3 +97,12 @@ PHP_FUNCTION(lcg_value)
RETURN_DOUBLE(php_combined_lcg());
}
/* }}} */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
+ */
diff --git a/ext/standard/levenshtein.c b/ext/standard/levenshtein.c
index d703617da3..e305f8070f 100644
--- a/ext/standard/levenshtein.c
+++ b/ext/standard/levenshtein.c
@@ -25,7 +25,8 @@
#define LEVENSHTEIN_MAX_LENTH 255
-/* reference implementation, only optimized for memory usage, not speed */
+/* {{{ reference_levdist
+ * reference implementation, only optimized for memory usage, not speed */
static int reference_levdist(const char *s1, int l1,
const char *s2, int l2,
int cost_ins, int cost_rep, int cost_del )
@@ -72,8 +73,10 @@ static int reference_levdist(const char *s1, int l1,
return c0;
}
+/* }}} */
-
+/* {{{ custom_levdist
+ */
static int custom_levdist(char *str1,char *str2,char *callback_name)
{
php_error(E_WARNING,"the general Levenshtein support is not there yet");
@@ -81,7 +84,7 @@ static int custom_levdist(char *str1,char *str2,char *callback_name)
return -1;
}
-
+/* }}} */
/* {{{ proto int levenshtein(string str1, string str2)
Calculate Levenshtein distance between two strings */
@@ -148,3 +151,12 @@ PHP_FUNCTION(levenshtein)
RETURN_LONG(distance);
}
/* }}} */
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
+ */
diff --git a/ext/standard/link.c b/ext/standard/link.c
index 7e7e60697e..c600be1fc3 100644
--- a/ext/standard/link.c
+++ b/ext/standard/link.c
@@ -158,7 +158,6 @@ PHP_FUNCTION(link)
}
/* }}} */
-
#endif
/*
@@ -166,4 +165,6 @@ PHP_FUNCTION(link)
* tab-width: 4
* c-basic-offset: 4
* End:
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/mail.c b/ext/standard/mail.c
index 3079659d34..67a2160028 100644
--- a/ext/standard/mail.c
+++ b/ext/standard/mail.c
@@ -12,7 +12,7 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: |
+ | Authors: Rasmus Lerdorf <rasmus@php.net> |
+----------------------------------------------------------------------+
*/
@@ -215,5 +215,6 @@ PHP_MINFO_FUNCTION(mail) {}
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/math.c b/ext/standard/math.c
index 63a7c0a050..aa62621e5f 100644
--- a/ext/standard/math.c
+++ b/ext/standard/math.c
@@ -725,5 +725,6 @@ PHP_FUNCTION(number_format)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/md5.c b/ext/standard/md5.c
index e22c46a124..62699a95e3 100644
--- a/ext/standard/md5.c
+++ b/ext/standard/md5.c
@@ -150,7 +150,8 @@ static unsigned char PADDING[64] =
(a) += (b); \
}
-/* MD5 initialization. Begins an MD5 operation, writing a new context.
+/* {{{ PHP_MD5Init
+ * MD5 initialization. Begins an MD5 operation, writing a new context.
*/
void PHP_MD5Init(PHP_MD5_CTX * context)
{
@@ -162,8 +163,10 @@ void PHP_MD5Init(PHP_MD5_CTX * context)
context->state[2] = 0x98badcfe;
context->state[3] = 0x10325476;
}
+/* }}} */
-/* MD5 block update operation. Continues an MD5 message-digest
+/* {{{ PHP_MD5Update
+ MD5 block update operation. Continues an MD5 message-digest
operation, processing another message block, and updating the
context.
*/
@@ -202,8 +205,10 @@ void PHP_MD5Update(PHP_MD5_CTX * context, const unsigned char *input,
((unsigned char*) & context->buffer[index], (unsigned char*) & input[i],
inputLen - i);
}
+/* }}} */
-/* MD5 finalization. Ends an MD5 message-digest operation, writing the
+/* {{{ PHP_MD5Final
+ MD5 finalization. Ends an MD5 message-digest operation, writing the
the message digest and zeroizing the context.
*/
void PHP_MD5Final(unsigned char digest[16], PHP_MD5_CTX * context)
@@ -230,8 +235,10 @@ void PHP_MD5Final(unsigned char digest[16], PHP_MD5_CTX * context)
*/
memset((unsigned char*) context, 0, sizeof(*context));
}
+/* }}} */
-/* MD5 basic transformation. Transforms state based on block.
+/* {{{ MD5Transform
+ * MD5 basic transformation. Transforms state based on block.
*/
static void MD5Transform(state, block)
php_uint32 state[4];
@@ -321,8 +328,10 @@ const unsigned char block[64];
/* Zeroize sensitive information. */
memset((unsigned char*) x, 0, sizeof(x));
}
+/* }}} */
-/* Encodes input (php_uint32) into output (unsigned char). Assumes len is
+/* {{{ Encode
+ Encodes input (php_uint32) into output (unsigned char). Assumes len is
a multiple of 4.
*/
static void Encode(output, input, len)
@@ -339,8 +348,10 @@ unsigned int len;
output[j + 3] = (unsigned char) ((input[i] >> 24) & 0xff);
}
}
+/* }}} */
-/* Decodes input (unsigned char) into output (php_uint32). Assumes len is
+/* {{{ Decode
+ Decodes input (unsigned char) into output (php_uint32). Assumes len is
a multiple of 4.
*/
static void Decode(output, input, len)
@@ -354,11 +365,13 @@ unsigned int len;
output[i] = ((php_uint32) input[j]) | (((php_uint32) input[j + 1]) << 8) |
(((php_uint32) input[j + 2]) << 16) | (((php_uint32) input[j + 3]) << 24);
}
+/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/metaphone.c b/ext/standard/metaphone.c
index 383e67476e..545bda300c 100644
--- a/ext/standard/metaphone.c
+++ b/ext/standard/metaphone.c
@@ -153,7 +153,8 @@ static char Lookahead(char *word, int how_far)
/* Note is a letter is a 'break' in the word */
#define Isbreak(c) (!isalpha(c))
-
+/* {{{ metaphone
+ */
static int metaphone(char *word, int max_phonemes, char **phoned_word, int traditional)
{
int w_idx = 0; /* point in the phonization we're at. */
@@ -460,11 +461,13 @@ static int metaphone(char *word, int max_phonemes, char **phoned_word, int tradi
return 0;
} /* END metaphone */
+/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c
index 1eb10d49f6..0850c6cf2c 100644
--- a/ext/standard/microtime.c
+++ b/ext/standard/microtime.c
@@ -67,7 +67,6 @@ PHP_FUNCTION(microtime)
}
/* }}} */
-
/* {{{ proto array gettimeofday(void)
Returns the current time as array */
PHP_FUNCTION(gettimeofday)
@@ -140,11 +139,11 @@ PHP_FUNCTION(getrusage)
/* }}} */
-
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/output.c b/ext/standard/output.c
index 1f3f5f9f17..26f95af2e4 100644
--- a/ext/standard/output.c
+++ b/ext/standard/output.c
@@ -102,7 +102,8 @@ PHPAPI int php_header_write(const char *str, uint str_length)
return OG(php_header_write)(str, str_length);
}
-/* Start output buffering */
+/* {{{ php_start_ob_buffer
+ * Start output buffering */
PHPAPI int php_start_ob_buffer(zval *output_handler, uint chunk_size)
{
OLS_FETCH();
@@ -118,9 +119,10 @@ PHPAPI int php_start_ob_buffer(zval *output_handler, uint chunk_size)
OG(php_body_write) = php_b_body_write;
return SUCCESS;
}
+/* }}} */
-
-/* End output buffering (one level) */
+/* {{{ php_end_ob_buffer
+ * End output buffering (one level) */
PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush)
{
char *final_buffer=NULL;
@@ -243,9 +245,10 @@ PHPAPI void php_end_ob_buffer(zend_bool send_buffer, zend_bool just_flush)
efree(to_be_destroyed_handled_output[1]);
}
}
+/* }}} */
-
-/* End output buffering (all buffers) */
+/* {{{ php_end_ob_buffers
+ * End output buffering (all buffers) */
PHPAPI void php_end_ob_buffers(zend_bool send_buffer)
{
OLS_FETCH();
@@ -254,8 +257,10 @@ PHPAPI void php_end_ob_buffers(zend_bool send_buffer)
php_end_ob_buffer(send_buffer, 0);
}
}
+/* }}} */
-
+/* {{{ php_start_implicit_flush
+ */
PHPAPI void php_start_implicit_flush()
{
OLS_FETCH();
@@ -263,16 +268,20 @@ PHPAPI void php_start_implicit_flush()
php_end_ob_buffer(1, 0); /* Switch out of output buffering if we're in it */
OG(implicit_flush)=1;
}
+/* }}} */
-
+/* {{{ php_end_implicit_flush
+ */
PHPAPI void php_end_implicit_flush()
{
OLS_FETCH();
OG(implicit_flush)=0;
}
+/* }}} */
-
+/* {{{ php_ob_set_internal_handler
+ */
PHPAPI void php_ob_set_internal_handler(php_output_handler_func_t internal_output_handler, uint buffer_size)
{
OLS_FETCH();
@@ -285,12 +294,14 @@ PHPAPI void php_ob_set_internal_handler(php_output_handler_func_t internal_outpu
OG(active_ob_buffer).internal_output_handler_buffer = (char *) emalloc(buffer_size);
OG(active_ob_buffer).internal_output_handler_buffer_size = buffer_size;
}
-
+/* }}} */
/*
* Output buffering - implementation
*/
+/* {{{ php_ob_allocate
+ */
static inline void php_ob_allocate(void)
{
OLS_FETCH();
@@ -303,8 +314,10 @@ static inline void php_ob_allocate(void)
OG(active_ob_buffer).buffer = (char *) erealloc(OG(active_ob_buffer).buffer, OG(active_ob_buffer).size+1);
}
}
+/* }}} */
-
+/* {{{ php_ob_init
+ */
static void php_ob_init(uint initial_size, uint block_size, zval *output_handler, uint chunk_size)
{
OLS_FETCH();
@@ -325,8 +338,10 @@ static void php_ob_init(uint initial_size, uint block_size, zval *output_handler
OG(active_ob_buffer).status = 0;
OG(active_ob_buffer).internal_output_handler = NULL;
}
+/* }}} */
-
+/* {{{ php_ob_append
+ */
static void php_ob_append(const char *text, uint text_length)
{
char *target;
@@ -352,6 +367,7 @@ static void php_ob_append(const char *text, uint text_length)
return;
}
}
+/* }}} */
#if 0
static void php_ob_prepend(const char *text, uint text_length)
@@ -375,7 +391,8 @@ static void php_ob_prepend(const char *text, uint text_length)
#endif
-/* Return the current output buffer */
+/* {{{ php_ob_get_buffer
+ * Return the current output buffer */
int php_ob_get_buffer(pval *p)
{
OLS_FETCH();
@@ -388,9 +405,10 @@ int php_ob_get_buffer(pval *p)
p->value.str.len = OG(active_ob_buffer).text_length;
return SUCCESS;
}
+/* }}} */
-
-/* Return the size of the current output buffer */
+/* {{{ php_ob_get_length
+ * Return the size of the current output buffer */
int php_ob_get_length(pval *p)
{
OLS_FETCH();
@@ -402,6 +420,7 @@ int php_ob_get_length(pval *p)
p->value.lval = OG(active_ob_buffer).text_length;
return SUCCESS;
}
+/* }}} */
/*
* Wrapper functions - implementation
@@ -415,7 +434,8 @@ static int php_b_body_write(const char *str, uint str_length)
return str_length;
}
-
+/* {{{ php_ub_body_write_no_header
+ */
static int php_ub_body_write_no_header(const char *str, uint str_length)
{
char *newstr = NULL;
@@ -441,8 +461,10 @@ static int php_ub_body_write_no_header(const char *str, uint str_length)
return result;
}
+/* }}} */
-
+/* {{{ php_ub_body_write
+ */
static int php_ub_body_write(const char *str, uint str_length)
{
int result = 0;
@@ -472,13 +494,12 @@ static int php_ub_body_write(const char *str, uint str_length)
return result;
}
-
+/* }}} */
/*
* HEAD support
*/
-
/* {{{ proto void ob_start([ string user_function [, int chunk_size]])
Turn on Output Buffering (specifying an optional output handler). */
PHP_FUNCTION(ob_start)
@@ -526,7 +547,6 @@ PHP_FUNCTION(ob_start)
}
/* }}} */
-
/* {{{ proto void ob_end_flush(void)
Flush (send) the output buffer, and turn off output buffering */
PHP_FUNCTION(ob_end_flush)
@@ -535,7 +555,6 @@ PHP_FUNCTION(ob_end_flush)
}
/* }}} */
-
/* {{{ proto void ob_end_clean(void)
Clean (erase) the output buffer, and turn off output buffering */
PHP_FUNCTION(ob_end_clean)
@@ -544,7 +563,6 @@ PHP_FUNCTION(ob_end_clean)
}
/* }}} */
-
/* {{{ proto string ob_get_contents(void)
Return the contents of the output buffer */
PHP_FUNCTION(ob_get_contents)
@@ -555,7 +573,6 @@ PHP_FUNCTION(ob_get_contents)
}
/* }}} */
-
/* {{{ proto string ob_get_length(void)
Return the length of the output buffer */
PHP_FUNCTION(ob_get_length)
@@ -566,7 +583,6 @@ PHP_FUNCTION(ob_get_length)
}
/* }}} */
-
/* {{{ proto void ob_implicit_flush([int flag])
Turn implicit flush on/off and is equivalent to calling flush() after every output call */
PHP_FUNCTION(ob_implicit_flush)
@@ -597,7 +613,6 @@ PHP_FUNCTION(ob_implicit_flush)
}
/* }}} */
-
PHPAPI char *php_get_output_start_filename()
{
OLS_FETCH();
@@ -618,5 +633,6 @@ PHPAPI int php_get_output_start_lineno()
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/pack.c b/ext/standard/pack.c
index b114131a4f..75544c41b7 100644
--- a/ext/standard/pack.c
+++ b/ext/standard/pack.c
@@ -68,7 +68,8 @@ static int machine_endian_long_map[4];
static int big_endian_long_map[4];
static int little_endian_long_map[4];
-
+/* {{{ php_pack
+ */
static void php_pack(pval **val, int size, int *map, char *output)
{
int i;
@@ -81,7 +82,7 @@ static void php_pack(pval **val, int size, int *map, char *output)
*(output++) = v[map[i]];
}
}
-
+/* }}} */
/* pack() idea stolen from Perl (implemented formats behave the same as there)
* Implemented formats are A,a,h,H,c,C,s,S,i,I,l,L,n,N,f,d,x,X,@.
@@ -443,7 +444,8 @@ PHP_FUNCTION(pack)
}
/* }}} */
-
+/* {{{ php_unpack
+ */
static long php_unpack(char *data, int size, int issigned, int *map)
{
long result;
@@ -458,7 +460,7 @@ static long php_unpack(char *data, int size, int issigned, int *map)
return result;
}
-
+/* }}} */
/* unpack() is based on Perl's unpack(), but is modified a bit from there.
* Rather than depending on error-prone ordered lists or syntactically
@@ -791,7 +793,8 @@ PHP_FUNCTION(unpack)
}
/* }}} */
-
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(pack)
{
int machine_endian_check = 1;
@@ -862,11 +865,13 @@ 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
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/pageinfo.c b/ext/standard/pageinfo.c
index 3f6fb09f8b..d06f0fcfc4 100644
--- a/ext/standard/pageinfo.c
+++ b/ext/standard/pageinfo.c
@@ -41,6 +41,8 @@
#include "ext/standard/basic_functions.h"
+/* {{{ php_statpage
+ */
static void php_statpage(BLS_D)
{
struct stat *pstat;
@@ -55,7 +57,10 @@ static void php_statpage(BLS_D)
}
}
}
+/* }}} */
+/* {{{ php_getuid
+ */
long php_getuid(void)
{
BLS_FETCH();
@@ -63,6 +68,7 @@ long php_getuid(void)
php_statpage(BLS_C);
return (BG(page_uid));
}
+/* }}} */
/* {{{ proto int getmyuid(void)
Get PHP script owner's UID */
@@ -129,5 +135,6 @@ PHP_FUNCTION(getlastmod)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c
index f70447904d..6e48f2b4aa 100644
--- a/ext/standard/php_fopen_wrapper.c
+++ b/ext/standard/php_fopen_wrapper.c
@@ -28,7 +28,8 @@
#include "php_fopen_wrappers.h"
-
+/* {{{ php_fopen_url_wrap_php
+ */
FILE *php_fopen_url_wrap_php(char *path, char *mode, int options, int *issock, int *socketd, char **opened_path)
{
const char *res = path + 6;
@@ -45,11 +46,13 @@ 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
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/quot_print.c b/ext/standard/quot_print.c
index 067417a9bc..2fb0f601fb 100644
--- a/ext/standard/quot_print.c
+++ b/ext/standard/quot_print.c
@@ -133,5 +133,6 @@ PHP_FUNCTION(quoted_printable_decode)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/rand.c b/ext/standard/rand.c
index d2a632b128..72227af0fd 100644
--- a/ext/standard/rand.c
+++ b/ext/standard/rand.c
@@ -94,6 +94,8 @@
#define MT_RAND_MAX ((long)(0x7FFFFFFF)) /* (1<<31) - 1 */
+/* {{{ seedMT
+ */
static void seedMT(php_uint32 seed BLS_DC)
{
/*
@@ -148,7 +150,7 @@ static void seedMT(php_uint32 seed BLS_DC)
for(BG(left)=0, *s++=x, j=N; --j;
*s++ = (x*=69069U) & 0xFFFFFFFFU);
}
-
+/* }}} */
static php_uint32 reloadMT(BLS_D)
{
@@ -351,5 +353,6 @@ PHP_FUNCTION(mt_getrandmax)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/reg.c b/ext/standard/reg.c
index e8896f5f7d..bcd0111b8a 100644
--- a/ext/standard/reg.c
+++ b/ext/standard/reg.c
@@ -46,6 +46,8 @@ typedef struct {
int cflags;
} reg_cache;
+/* {{{ _php_regcomp
+ */
static int _php_regcomp(regex_t *preg, const char *pattern, int cflags)
{
int r = 0;
@@ -70,6 +72,7 @@ static int _php_regcomp(regex_t *preg, const char *pattern, int cflags)
return r;
}
+/* }}} */
static void _free_reg_cache(reg_cache *rc)
{
@@ -119,7 +122,7 @@ PHP_MINFO_FUNCTION(regex)
call to ereg() or eregi() with the optional third argument. */
#define NS 10
-/*
+/* {{{ php_reg_eprint
* php_reg_eprint - convert error number to name
*/
static void php_reg_eprint(int err, regex_t *re) {
@@ -158,7 +161,10 @@ static void php_reg_eprint(int err, regex_t *re) {
STR_FREE(buf);
STR_FREE(message);
}
+/* }}} */
+/* {{{ php_ereg
+ */
static void php_ereg(INTERNAL_FUNCTION_PARAMETERS, int icase)
{
pval **regex, /* Regular expression */
@@ -263,6 +269,7 @@ static void php_ereg(INTERNAL_FUNCTION_PARAMETERS, int icase)
}
regfree(&re);
}
+/* }}} */
/* {{{ proto int ereg(string pattern, string string [, array registers])
Regular expression match */
@@ -280,7 +287,8 @@ PHP_FUNCTION(eregi)
}
/* }}} */
-/* this is the meat and potatoes of regex replacement! */
+/* {{{ php_reg_replace
+ * this is the meat and potatoes of regex replacement! */
char *php_reg_replace(const char *pattern, const char *replace, const char *string, int icase, int extended)
{
regex_t re;
@@ -418,7 +426,10 @@ char *php_reg_replace(const char *pattern, const char *replace, const char *stri
/* whew. */
return (buf);
}
+/* }}} */
+/* {{{ php_ereg_replace
+ */
static void php_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase)
{
pval **arg_pattern,
@@ -475,6 +486,7 @@ static void php_ereg_replace(INTERNAL_FUNCTION_PARAMETERS, int icase)
STR_FREE(replace);
STR_FREE(pattern);
}
+/* }}} */
/* {{{ proto string ereg_replace(string pattern, string replacement, string string)
Replace regular expression */
@@ -492,6 +504,8 @@ PHP_FUNCTION(eregi_replace)
}
/* }}} */
+/* {{{ php_split
+ */
static void php_split(INTERNAL_FUNCTION_PARAMETERS, int icase)
{
pval **spliton, **str, **arg_count = NULL;
@@ -586,6 +600,7 @@ static void php_split(INTERNAL_FUNCTION_PARAMETERS, int icase)
regfree(&re);
}
+/* }}} */
/* ("root", "passwd", "uid", "gid", "other:stuff:like:/bin/sh")
= split(":", $passwd_file, 5); */
@@ -650,5 +665,6 @@ PHPAPI PHP_FUNCTION(sql_regcase)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/scanf.c b/ext/standard/scanf.c
index 98ba84f75f..dd58d48c4a 100644
--- a/ext/standard/scanf.c
+++ b/ext/standard/scanf.c
@@ -127,7 +127,7 @@ static int CharInSet(CharSet *cset, int ch);
static void ReleaseCharSet(CharSet *cset);
-/*
+/* {{{ BuildCharSet
*----------------------------------------------------------------------
*
* BuildCharSet --
@@ -144,7 +144,6 @@ static void ReleaseCharSet(CharSet *cset);
*
*----------------------------------------------------------------------
*/
-
static char * BuildCharSet(CharSet *cset, char *format)
{
char *ch, start;
@@ -234,8 +233,9 @@ static char * BuildCharSet(CharSet *cset, char *format)
}
return format;
}
+/* }}} */
-/*
+/* {{{ CharInSet
*----------------------------------------------------------------------
*
* CharInSet --
@@ -250,7 +250,6 @@ static char * BuildCharSet(CharSet *cset, char *format)
*
*----------------------------------------------------------------------
*/
-
static int CharInSet(CharSet *cset, int c)
{
char ch = (char) c;
@@ -273,8 +272,9 @@ static int CharInSet(CharSet *cset, int c)
}
return (cset->exclude ? !match : match);
}
+/* }}} */
-/*
+/* {{{ ReleaseCharSet
*----------------------------------------------------------------------
*
* ReleaseCharSet --
@@ -289,7 +289,6 @@ static int CharInSet(CharSet *cset, int c)
*
*----------------------------------------------------------------------
*/
-
static void ReleaseCharSet(CharSet *cset)
{
efree((char *)cset->chars);
@@ -297,8 +296,9 @@ static void ReleaseCharSet(CharSet *cset)
efree((char *)cset->ranges);
}
}
+/* }}} */
-/*
+/* {{{ ValidateFormat
*----------------------------------------------------------------------
*
* ValidateFormat --
@@ -319,8 +319,6 @@ static void ReleaseCharSet(CharSet *cset)
*
*----------------------------------------------------------------------
*/
-
-
PHPAPI int ValidateFormat(char *format,int numVars,int *totalSubs)
{
#define STATIC_LIST_SIZE 16
@@ -577,10 +575,10 @@ PHPAPI int ValidateFormat(char *format,int numVars,int *totalSubs)
return SCAN_ERROR_INVALID_FORMAT;
#undef STATIC_LIST_SIZE
}
+/* }}} */
-
-
-/* This is the internal function which does processing on behalf of
+/* {{{ php_sscanf_internal
+ * This is the internal function which does processing on behalf of
* both sscanf() and fscanf()
*
* parameters :
@@ -1227,7 +1225,7 @@ PHPAPI int php_sscanf_internal( char *string,char *format,
return result;
}
-
+/* }}} */
/* the compiler choked when i tried to make this a macro */
inline void scan_set_error_return(int numVars,pval **return_value) {
@@ -1247,5 +1245,6 @@ inline void scan_set_error_return(int numVars,pval **return_value) {
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/soundex.c b/ext/standard/soundex.c
index 107088dc2f..a67462b1a0 100644
--- a/ext/standard/soundex.c
+++ b/ext/standard/soundex.c
@@ -117,5 +117,6 @@ PHP_FUNCTION(soundex)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/string.c b/ext/standard/string.c
index cb84c9511e..6c9aa51e86 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -47,6 +47,8 @@
#define PHP_PATHINFO_BASENAME 1
#define PHP_PATHINFO_EXTENSION 2
+/* {{{ register_string_constants
+ */
void register_string_constants(INIT_FUNC_ARGS)
{
REGISTER_LONG_CONSTANT("STR_PAD_LEFT", STR_PAD_LEFT, CONST_CS | CONST_PERSISTENT);
@@ -80,6 +82,7 @@ void register_string_constants(INIT_FUNC_ARGS)
#endif
}
+/* }}} */
int php_tag_find(char *tag, int len, char *set);
@@ -91,6 +94,8 @@ static char hexconvtab[] = "0123456789abcdef";
static MUTEX_T locale_mutex = NULL;
#endif
+/* {{{ php_bin2hex
+ */
static char *php_bin2hex(const unsigned char *old, const size_t oldlen, size_t *newlen)
{
unsigned char *result = NULL;
@@ -111,6 +116,7 @@ static char *php_bin2hex(const unsigned char *old, const size_t oldlen, size_t *
return result;
}
+/* }}} */
#ifdef HAVE_LOCALECONV
/* {{{ localeconv_r
@@ -3360,5 +3366,6 @@ PHP_FUNCTION(sscanf)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/strnatcmp.c b/ext/standard/strnatcmp.c
index 00455cfa41..c21f5ce0aa 100644
--- a/ext/standard/strnatcmp.c
+++ b/ext/standard/strnatcmp.c
@@ -38,7 +38,8 @@
static char const *version UNUSED =
"$Id$";
-
+/* {{{ compare_right
+ */
static int
compare_right(char const **a, char const *aend, char const **b, char const *bend)
{
@@ -67,8 +68,10 @@ compare_right(char const **a, char const *aend, char const **b, char const *bend
return 0;
}
+/* }}} */
-
+/* {{{ compare_left
+ */
static int
compare_left(char const **a, char const *aend, char const **b, char const *bend)
{
@@ -90,8 +93,10 @@ compare_left(char const **a, char const *aend, char const **b, char const *bend)
return 0;
}
+/* }}} */
-
+/* {{{ strnatcmp_ex
+ */
PHPAPI int strnatcmp_ex(char const *a, size_t a_len, char const *b, size_t b_len, int fold_case)
{
char ca, cb;
@@ -156,11 +161,13 @@ 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
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/syslog.c b/ext/standard/syslog.c
index 3efe2b3710..236c54cf88 100644
--- a/ext/standard/syslog.c
+++ b/ext/standard/syslog.c
@@ -38,6 +38,8 @@
static void start_syslog(BLS_D);
+/* {{{ PHP_MINIT_FUNCTION
+ */
PHP_MINIT_FUNCTION(syslog)
{
/* error levels */
@@ -98,7 +100,7 @@ PHP_MINIT_FUNCTION(syslog)
return SUCCESS;
}
-
+/* }}} */
PHP_RINIT_FUNCTION(syslog)
{
@@ -124,7 +126,8 @@ PHP_RSHUTDOWN_FUNCTION(syslog)
return SUCCESS;
}
-
+/* {{{ start_syslog
+ */
static void start_syslog(BLS_D)
{
ELS_FETCH();
@@ -188,6 +191,7 @@ static void start_syslog(BLS_D)
BG(syslog_started)=1;
}
+/* }}} */
/* {{{ proto void define_syslog_variables(void)
Initializes all syslog-related variables */
@@ -272,5 +276,6 @@ PHP_FUNCTION(syslog)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/type.c b/ext/standard/type.c
index 76371ce6a2..b782df1c85 100644
--- a/ext/standard/type.c
+++ b/ext/standard/type.c
@@ -12,7 +12,7 @@
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
- | Authors: Rasmus Lerdorf |
+ | Authors: Rasmus Lerdorf <rasmus@php.net> |
+----------------------------------------------------------------------+
*/
@@ -21,7 +21,7 @@
#include "php.h"
#include "type.h"
-/*
+/* {{{ php_check_type
* Determines if 'str' is an integer (long), real number or a string
*
* Note that leading zeroes automatically force a STRING type
@@ -54,8 +54,9 @@ int php_check_type(char *str)
return (type);
} /* php_check_type */
+/* }}} */
-/*
+/* {{{ php_check_ident_type
* 0 - simple variable
* 1 - non-index array
* 2 - index array
@@ -75,7 +76,10 @@ int php_check_ident_type(char *str)
}
return (GPC_INDEXED_ARRAY);
}
+/* }}} */
+/* {{{ php_get_ident_index
+ */
char *php_get_ident_index(char *str)
{
char *temp;
@@ -96,11 +100,13 @@ 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
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/uniqid.c b/ext/standard/uniqid.c
index 9bbc4f5f7d..1af35de9d7 100644
--- a/ext/standard/uniqid.c
+++ b/ext/standard/uniqid.c
@@ -98,5 +98,6 @@ function_entry uniqid_functions[] = {
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/url.c b/ext/standard/url.c
index b71414b6c2..45d69b5dc1 100644
--- a/ext/standard/url.c
+++ b/ext/standard/url.c
@@ -36,7 +36,8 @@
#endif /*APACHE*/
#endif /*_OSD_POSIX*/
-
+/* {{{ free_url
+ */
void free_url(php_url * theurl)
{
if (theurl->scheme)
@@ -55,7 +56,10 @@ void free_url(php_url * theurl)
efree(theurl->fragment);
efree(theurl);
}
+/* }}} */
+/* {{{ url_parse
+ */
php_url *url_parse(char *str)
{
regex_t re;
@@ -157,6 +161,7 @@ php_url *url_parse(char *str)
regfree(&re);
return ret;
}
+/* }}} */
/* {{{ proto array parse_url(string url)
Parse a URL and return its components */
@@ -202,6 +207,8 @@ PHP_FUNCTION(parse_url)
}
/* }}} */
+/* {{{ php_htoi
+ */
static int php_htoi(char *s)
{
int value;
@@ -219,6 +226,7 @@ static int php_htoi(char *s)
return (value);
}
+/* }}} */
/* rfc1738:
@@ -235,6 +243,8 @@ static int php_htoi(char *s)
static unsigned char hexchars[] = "0123456789ABCDEF";
+/* {{{ php_url_encode
+ */
char *php_url_encode(char *s, int len)
{
register int x, y;
@@ -266,6 +276,7 @@ char *php_url_encode(char *s, int len)
str[y] = '\0';
return ((char *) str);
}
+/* }}} */
/* {{{ proto string urlencode(string str)
URL-encodes string */
@@ -314,6 +325,8 @@ PHP_FUNCTION(urldecode)
}
/* }}} */
+/* {{{ php_url_decode
+ */
int php_url_decode(char *str, int len)
{
char *dest = str;
@@ -338,7 +351,10 @@ int php_url_decode(char *str, int len)
*dest = '\0';
return dest - str;
}
+/* }}} */
+/* {{{ php_raw_url_encode
+ */
char *php_raw_url_encode(char *s, int len)
{
register int x, y;
@@ -366,6 +382,7 @@ char *php_raw_url_encode(char *s, int len)
str[y] = '\0';
return ((char *) str);
}
+/* }}} */
/* {{{ proto string rawurlencode(string str)
URL-encodes string */
@@ -411,6 +428,8 @@ PHP_FUNCTION(rawurldecode)
}
/* }}} */
+/* {{{ php_raw_url_decode
+ */
int php_raw_url_decode(char *str, int len)
{
char *dest = str;
@@ -433,11 +452,13 @@ int php_raw_url_decode(char *str, int len)
*dest = '\0';
return dest - str;
}
+/* }}} */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/url_scanner.c b/ext/standard/url_scanner.c
index 5371b7b308..57cdb60a4a 100644
--- a/ext/standard/url_scanner.c
+++ b/ext/standard/url_scanner.c
@@ -47,7 +47,8 @@ PHP_RSHUTDOWN_FUNCTION(url_scanner)
return SUCCESS;
}
-
+/* {{{ url_attr_addon
+ */
static char *url_attr_addon(const char *tag,const char *attr,const char *val,const char *buf)
{
int flag = 0;
@@ -83,9 +84,12 @@ static char *url_attr_addon(const char *tag,const char *attr,const char *val,con
}
return NULL;
}
+/* }}} */
#define US BG(url_adapt_state)
+/* {{{ url_adapt_ext
+ */
char *url_adapt_ext(const char *src, size_t srclen, const char *name, const char *val, size_t *newlen)
{
char buf[1024];
@@ -94,7 +98,10 @@ char *url_adapt_ext(const char *src, size_t srclen, const char *name, const char
return url_adapt(src, srclen, buf, newlen);
}
+/* }}} */
+/* {{{ url_adapt
+ */
char *url_adapt(const char *src, size_t srclen, const char *data, size_t *newlen)
{
char *out,*outp;
@@ -365,7 +372,7 @@ char *url_adapt(const char *src, size_t srclen, const char *data, size_t *newlen
*outp='\0';
return out;
}
-
+/* }}} */
#endif
/*
@@ -373,5 +380,6 @@ char *url_adapt(const char *src, size_t srclen, const char *data, size_t *newlen
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/url_scanner_ex.c b/ext/standard/url_scanner_ex.c
index dbdf55149e..835e37f7f9 100644
--- a/ext/standard/url_scanner_ex.c
+++ b/ext/standard/url_scanner_ex.c
@@ -41,6 +41,8 @@
#include "php_smart_str.h"
+/* {{{ PHP_INI_MH
+ */
static PHP_INI_MH(OnUpdateTags)
{
url_adapt_state_ex_t *ctx;
@@ -84,11 +86,14 @@ static PHP_INI_MH(OnUpdateTags)
return SUCCESS;
}
+/* }}} */
PHP_INI_BEGIN()
STD_PHP_INI_ENTRY("url_rewriter.tags", "a=href,area=href,frame=src,form=fakeentry", PHP_INI_ALL, OnUpdateTags, url_adapt_state_ex, php_basic_globals, basic_globals)
PHP_INI_END()
+/* {{{ append_modified_url
+ */
static inline void append_modified_url(smart_str *url, smart_str *dest, smart_str *name, smart_str *val, const char *separator)
{
register const char *p, *q;
@@ -130,6 +135,7 @@ static inline void append_modified_url(smart_str *url, smart_str *dest, smart_st
if (bash)
smart_str_appendl(dest, bash, q - bash);
}
+/* }}} */
static inline void tag_arg(url_adapt_state_ex_t *ctx, char quote PLS_DC)
{
@@ -221,6 +227,8 @@ static inline void handle_val(STD_PARA, char quotes, char type)
#define scdebug(x)
#endif
+/* {{{ mainloop
+ */
static inline void mainloop(url_adapt_state_ex_t *ctx, const char *newdata, size_t newlen)
{
char *end, *q;
@@ -657,7 +665,10 @@ stop:
if (rest) memmove(ctx->buf.c, start, rest);
ctx->buf.len = rest;
}
+/* }}} */
+/* {{{ url_adapt_single_url
+ */
char *url_adapt_single_url(const char *url, size_t urllen, const char *name, const char *value, size_t *newlen)
{
smart_str surl = {0};
@@ -677,7 +688,10 @@ char *url_adapt_single_url(const char *url, size_t urllen, const char *name, con
return buf.c;
}
+/* }}} */
+/* {{{ url_adapt_ext
+ */
char *url_adapt_ext(const char *src, size_t srclen, const char *name, const char *value, size_t *newlen)
{
char *ret;
@@ -695,6 +709,7 @@ char *url_adapt_ext(const char *src, size_t srclen, const char *name, const char
ctx->result.len = 0;
return ctx->result.c;
}
+/* }}} */
PHP_RINIT_FUNCTION(url_scanner)
{
@@ -753,5 +768,6 @@ PHP_MSHUTDOWN_FUNCTION(url_scanner)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/
diff --git a/ext/standard/var.c b/ext/standard/var.c
index 112ceda3fb..dc240cf7ad 100644
--- a/ext/standard/var.c
+++ b/ext/standard/var.c
@@ -671,5 +671,6 @@ PHP_FUNCTION(unserialize)
* tab-width: 4
* c-basic-offset: 4
* End:
- * vim: sw=4 ts=4 tw=78 fdm=marker
+ * vim600: sw=4 ts=4 tw=78 fdm=marker
+ * vim<600: sw=4 ts=4 tw=78
*/