Permalink
Browse files

vim-6 does folding - clean up a bunch of missing folding tags plus

some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
  • Loading branch information...
1 parent 4efe6f7 commit 25c3a3a39d7aebdce95825e6af2ad8c62905b7cc @rlerdorf rlerdorf committed Jun 5, 2001
Showing with 1,769 additions and 570 deletions.
  1. +4 −5 CODING_STANDARDS
  2. +20 −4 ext/aspell/aspell.c
  3. +1 −0 ext/crack/crack.c
  4. +14 −6 ext/ctype/ctype.c
  5. +45 −3 ext/curl/curl.c
  6. +31 −0 ext/cybercash/cybercash.c
  7. +13 −63 ext/cybermut/cybermut.c
  8. +75 −13 ext/db/db.c
  9. +31 −6 ext/dba/dba.c
  10. +8 −0 ext/dba/dba_cdb.c
  11. +8 −0 ext/dba/dba_db2.c
  12. +8 −0 ext/dba/dba_db3.c
  13. +8 −0 ext/dba/dba_dbm.c
  14. +8 −0 ext/dba/dba_gdbm.c
  15. +8 −0 ext/dba/dba_ndbm.c
  16. +7 −0 ext/dbase/dbase.c
  17. +1 −3 ext/ereg/ereg.c
  18. +59 −21 ext/exif/exif.c
  19. +16 −19 ext/fdf/fdf.c
  20. +7 −2 ext/filepro/filepro.c
  21. +16 −35 ext/fribidi/fribidi.c
  22. +114 −35 ext/ftp/ftp.c
  23. +63 −24 ext/gd/gd.c
  24. +62 −12 ext/gmp/gmp.c
  25. +15 −5 ext/iconv/iconv.c
  26. +11 −2 ext/imap/php_imap.c
  27. +41 −46 ext/ldap/ldap.c
  28. +29 −25 ext/msql/php_msql.c
  29. +61 −30 ext/mysql/php_mysql.c
  30. +7 −4 ext/oci8/oci8.c
  31. +15 −2 ext/odbc/php_odbc.c
  32. +23 −13 ext/openssl/openssl.c
  33. +25 −18 ext/pcre/php_pcre.c
  34. +64 −4 ext/pdf/pdf.c
  35. +1 −0 ext/pfpro/pfpro.c
  36. +75 −19 ext/pgsql/pgsql.c
  37. +17 −4 ext/posix/posix.c
  38. +17 −0 ext/pspell/pspell.c
  39. +20 −8 ext/shmop/shmop.c
  40. +36 −7 ext/skeleton/skeleton.c
  41. +21 −7 ext/snmp/snmp.c
  42. +20 −6 ext/snmp/winsnmp.c
  43. +1 −0 ext/standard/array.c
  44. +1 −0 ext/standard/assert.c
  45. +1 −0 ext/standard/base64.c
  46. +1 −0 ext/standard/basic_functions.c
  47. +1 −0 ext/standard/browscap.c
  48. +1 −0 ext/standard/crc32.c
  49. +7 −0 ext/standard/credits.c
  50. +1 −0 ext/standard/crypt.c
  51. +8 −0 ext/standard/cyr_convert.c
  52. +1 −0 ext/standard/datetime.c
  53. +1 −0 ext/standard/dir.c
  54. +1 −0 ext/standard/dl.c
  55. +1 −0 ext/standard/dns.c
  56. +1 −0 ext/standard/exec.c
  57. +1 −3 ext/standard/file.c
  58. +1 −0 ext/standard/filestat.c
  59. +8 −0 ext/standard/flock_compat.c
  60. +1 −0 ext/standard/formatted_print.c
  61. +1 −1 ext/standard/fsock.c
  62. +8 −0 ext/standard/ftp_fopen_wrapper.c
  63. +1 −0 ext/standard/head.c
  64. +1 −0 ext/standard/html.c
  65. +8 −0 ext/standard/http_fopen_wrapper.c
  66. +8 −0 ext/standard/image.c
  67. +8 −0 ext/standard/incomplete_class.c
  68. +1 −0 ext/standard/info.c
  69. +2 −0 ext/standard/iptc.c
  70. +9 −1 ext/standard/mail.c
  71. +1 −0 ext/standard/math.c
  72. +1 −0 ext/standard/md5.c
  73. +1 −0 ext/standard/metaphone.c
  74. +1 −0 ext/standard/microtime.c
  75. +1 −2 ext/standard/output.c
  76. +2 −2 ext/standard/pack.c
  77. +8 −0 ext/standard/pageinfo.c
  78. +8 −0 ext/standard/php_fopen_wrapper.c
  79. +8 −0 ext/standard/quot_print.c
  80. +2 −1 ext/standard/rand.c
  81. +1 −3 ext/standard/reg.c
  82. +7 −0 ext/standard/scanf.c
  83. +1 −0 ext/standard/soundex.c
  84. +99 −28 ext/standard/string.c
  85. +8 −0 ext/standard/strnatcmp.c
  86. +2 −0 ext/standard/syslog.c
  87. +8 −0 ext/standard/type.c
  88. +2 −0 ext/standard/uniqid.c
  89. +1 −0 ext/standard/url.c
  90. +8 −0 ext/standard/url_scanner.c
  91. +8 −0 ext/standard/url_scanner_ex.c
  92. +1 −0 ext/standard/var.c
  93. +39 −1 ext/swf/swf.c
  94. +17 −7 ext/sysvsem/sysvsem.c
  95. +23 −13 ext/sysvshm/sysvshm.c
  96. +94 −27 ext/wddx/wddx.c
  97. +3 −4 ext/xml/xml.c
  98. +18 −4 ext/xslt/sablot.c
  99. +8 −0 ext/xslt/xslt.c
  100. +2 −1 ext/yaz/php_yaz.c
  101. +24 −1 ext/zip/zip.c
  102. +53 −12 ext/zlib/zlib.c
  103. +1 −0 main/SAPI.c
  104. +8 −0 main/alloca.c
  105. +1 −1 main/fopen_wrappers.c
  106. +1 −0 main/internal_functions_win32.c
  107. +1 −0 main/main.c
  108. +8 −0 main/mergesort.c
  109. +1 −1 main/network.c
  110. +1 −2 main/output.c
  111. +1 −0 main/php.h
  112. +1 −0 main/php_content_types.c
  113. +1 −0 main/php_ini.c
  114. +8 −0 main/php_logos.c
  115. +14 −2 main/php_open_temporary_file.c
  116. +8 −0 main/php_sprintf.c
  117. +1 −1 main/php_ticks.c
  118. +1 −0 main/php_variables.c
  119. +8 −0 main/reentrancy.c
  120. +1 −0 main/rfc1867.c
  121. +8 −0 main/safe_mode.c
  122. +8 −0 main/snprintf.c
  123. +1 −1 main/streams.c
  124. +8 −0 main/strlcat.c
  125. +8 −0 main/strlcpy.c
View
@@ -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
View
@@ -37,38 +37,44 @@
#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)
PHP_FE(aspell_check_raw, NULL)
PHP_FE(aspell_suggest, NULL)
{NULL, NULL, NULL}
};
+/* }}} */
static int le_aspell;
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
+ */
View
@@ -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
*/
View
@@ -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
*/
View
@@ -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,21 +75,27 @@ 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();
php_info_print_table_row(2, "CURL support", "enabled");
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
+ */
Oops, something went wrong.

0 comments on commit 25c3a3a

Please sign in to comment.