Skip to content

Commit 25c3a3a

Browse files
committed
vim-6 does folding - clean up a bunch of missing folding tags plus
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
1 parent 4efe6f7 commit 25c3a3a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+1769
-570
lines changed

CODING_STANDARDS

+4-5
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,10 @@ PHP_FUNCTION(abs)
171171
/* }}} */
172172

173173
The {{{ symbols are the default folding symbols for the folding mode in
174-
Emacs. vim will soon have support for folding as well. Folding is very
175-
useful when dealing with large files because you can scroll through the
176-
file quickly and just unfold the function you wish to work on. The }}}
177-
at the end of each function marks the end of the fold, and should be on
178-
a separate line.
174+
Emacs and vim (set fdm=marker). Folding is very useful when dealing with
175+
large files because you can scroll through the file quickly and just unfold
176+
the function you wish to work on. The }}} at the end of each function marks
177+
the end of the fold, and should be on a separate line.
179178

180179
The "proto" keyword there is just a helper for the doc/genfuncsummary script
181180
which generates a full function summary. Having this keyword in front of the

ext/aspell/aspell.c

+20-4
Original file line numberDiff line numberDiff line change
@@ -37,38 +37,44 @@
3737
#include <aspell-c.h>
3838
#include "ext/standard/info.h"
3939

40+
/* {{{ aspell_functions[]
41+
*/
4042
function_entry aspell_functions[] = {
4143
PHP_FE(aspell_new, NULL)
4244
PHP_FE(aspell_check, NULL)
4345
PHP_FE(aspell_check_raw, NULL)
4446
PHP_FE(aspell_suggest, NULL)
4547
{NULL, NULL, NULL}
4648
};
49+
/* }}} */
4750

4851
static int le_aspell;
4952

5053
zend_module_entry aspell_module_entry = {
5154
"aspell", aspell_functions, PHP_MINIT(aspell), NULL, NULL, NULL, PHP_MINFO(aspell), STANDARD_MODULE_PROPERTIES
5255
};
5356

54-
5557
#ifdef COMPILE_DL_ASPELL
5658
ZEND_GET_MODULE(aspell)
5759
#endif
5860

61+
/* {{{ php_aspell_close
62+
*/
5963
static void php_aspell_close(zend_rsrc_list_entry *rsrc)
6064
{
6165
aspell *sc = (aspell *)rsrc->ptr;
6266
aspell_free(sc);
6367
}
68+
/* }}} */
6469

65-
70+
/* {{{ PHP_MINIT_FUNCTION
71+
*/
6672
PHP_MINIT_FUNCTION(aspell)
6773
{
6874
le_aspell = zend_register_list_destructors_ex(php_aspell_close, NULL, "aspell", module_number);
6975
return SUCCESS;
70-
7176
}
77+
/* }}} */
7278

7379
/* {{{ proto int aspell_new(string master [, string personal])
7480
Load a dictionary */
@@ -97,7 +103,6 @@ PHP_FUNCTION(aspell_new)
97103
}
98104
/* }}} */
99105

100-
101106
/* {{{ proto array aspell_suggest(aspell int, string word)
102107
Return array of Suggestions */
103108
PHP_FUNCTION(aspell_suggest)
@@ -199,11 +204,22 @@ PHP_FUNCTION(aspell_check_raw)
199204
}
200205
/* }}} */
201206

207+
/* {{{ PHP_MINFO_FUNCTION
208+
*/
202209
PHP_MINFO_FUNCTION(aspell)
203210
{
204211
php_info_print_table_start();
205212
php_info_print_table_row(2, "ASpell Support", "enabled");
206213
php_info_print_table_end();
207214
}
215+
/* }}} */
208216

209217
#endif
218+
219+
/*
220+
* Local variables:
221+
* tab-width: 4
222+
* c-basic-offset: 4
223+
* End:
224+
* vim: sw=4 ts=4 tw=78 fdm=marker
225+
*/

ext/crack/crack.c

+1
Original file line numberDiff line numberDiff line change
@@ -259,4 +259,5 @@ ZEND_FUNCTION(crack_getlastmessage)
259259
* tab-width: 4
260260
* c-basic-offset: 4
261261
* End:
262+
* vim: sw=4 ts=4 tw=78 fdm=marker
262263
*/

ext/ctype/ctype.c

+14-6
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ ZEND_DECLARE_MODULE_GLOBALS(ctype)
4141
/* True global resources - no need for thread safety here */
4242
static int le_ctype;
4343

44-
/* Every user visible function must have an entry in ctype_functions[].
45-
*/
44+
/* {{{ ctype_functions[]
45+
* Every user visible function must have an entry in ctype_functions[].
46+
*/
4647
function_entry ctype_functions[] = {
4748
PHP_FE(ctype_alnum, NULL)
4849
PHP_FE(ctype_alpha, NULL)
@@ -57,7 +58,10 @@ function_entry ctype_functions[] = {
5758
PHP_FE(ctype_xdigit, NULL)
5859
{NULL, NULL, NULL} /* Must be the last line in ctype_functions[] */
5960
};
61+
/* }}} */
6062

63+
/* {{{ ctype_mpodule_entry
64+
*/
6165
zend_module_entry ctype_module_entry = {
6266
"ctype",
6367
ctype_functions,
@@ -68,6 +72,7 @@ zend_module_entry ctype_module_entry = {
6872
PHP_MINFO(ctype),
6973
STANDARD_MODULE_PROPERTIES
7074
};
75+
/* }}} */
7176

7277
#ifdef COMPILE_DL_CTYPE
7378
ZEND_GET_MODULE(ctype)
@@ -77,7 +82,8 @@ ZEND_GET_MODULE(ctype)
7782
#define PHP_EXPERIMENTAL(x,y)
7883
#endif
7984

80-
85+
/* {{{ PHP_MINFO_FUNCTION
86+
*/
8187
PHP_MINFO_FUNCTION(ctype)
8288
{
8389
ELS_FETCH();
@@ -87,8 +93,10 @@ PHP_MINFO_FUNCTION(ctype)
8793
php_info_print_table_row(2, "ctype functions", "enabled (experimental)");
8894
php_info_print_table_end();
8995
}
96+
/* }}} */
9097

91-
98+
/* {{{ ctype
99+
*/
92100
static int ctype(int (*iswhat)(int),zval **c)
93101
{
94102
switch ((*c)->type) {
@@ -111,6 +119,7 @@ static int ctype(int (*iswhat)(int),zval **c)
111119
}
112120
return 0;
113121
}
122+
/* }}} */
114123

115124
/* {{{ proto bool isalnum(mixed c)
116125
Check for alphanumeric character(s) */
@@ -310,13 +319,12 @@ PHP_FUNCTION(ctype_xdigit)
310319
}
311320
/* }}} */
312321

313-
314322
#endif /* HAVE_CTYPE */
315323

316-
317324
/*
318325
* Local variables:
319326
* tab-width: 4
320327
* c-basic-offset: 4
321328
* End:
329+
* vim: sw=4 ts=4 tw=78 fdm=marker
322330
*/

ext/curl/curl.c

+45-3
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc);
4848

4949
#define SAVE_CURL_ERROR(__handle, __err) (__handle)->err.no = (int) __err;
5050

51+
/* {{{ curl_functions[]
52+
*/
5153
function_entry curl_functions[] = {
5254
PHP_FE(curl_init, NULL)
5355
PHP_FE(curl_version, NULL)
@@ -59,7 +61,10 @@ function_entry curl_functions[] = {
5961
PHP_FE(curl_close, NULL)
6062
{NULL, NULL, NULL}
6163
};
64+
/* }}} */
6265

66+
/* {{{ curl_module_entry
67+
*/
6368
zend_module_entry curl_module_entry = {
6469
"curl",
6570
curl_functions,
@@ -70,21 +75,27 @@ zend_module_entry curl_module_entry = {
7075
PHP_MINFO(curl),
7176
STANDARD_MODULE_PROPERTIES
7277
};
78+
/* }}} */
7379

7480
#ifdef COMPILE_DL_CURL
7581
ZEND_GET_MODULE (curl)
7682
#endif
7783

84+
/* {{{ PHP_MINFO_FUNCTION
85+
*/
7886
PHP_MINFO_FUNCTION(curl)
7987
{
8088
php_info_print_table_start();
8189
php_info_print_table_row(2, "CURL support", "enabled");
8290
php_info_print_table_row(2, "CURL Information", curl_version());
8391
php_info_print_table_end();
8492
}
93+
/* }}} */
8594

8695
#define REGISTER_CURL_CONSTANT(name, value) REGISTER_LONG_CONSTANT(name, value, CONST_CS | CONST_PERSISTENT)
8796

97+
/* {{{ PHP_MINIT_FUNCTION
98+
*/
8899
PHP_MINIT_FUNCTION(curl)
89100
{
90101
le_curl = zend_register_list_destructors_ex(_php_curl_close, NULL, "curl", module_number);
@@ -230,6 +241,7 @@ PHP_MINIT_FUNCTION(curl)
230241

231242
return SUCCESS;
232243
}
244+
/* }}} */
233245

234246
#define PHP_CURL_STDOUT 0
235247
#define PHP_CURL_FILE 1
@@ -239,6 +251,8 @@ PHP_MINIT_FUNCTION(curl)
239251
#define PHP_CURL_ASCII 5
240252
#define PHP_CURL_BINARY 6
241253

254+
/* {{{ curl_write
255+
*/
242256
static size_t curl_write(char *data, size_t size, size_t nmemb, void *ctx)
243257
{
244258
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)
290304

291305
return length;
292306
}
307+
/* }}} */
293308

309+
/* {{{ curl_read
310+
*/
294311
static size_t curl_read(char *data, size_t size, size_t nmemb, void *ctx)
295312
{
296313
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)
341358

342359
return length;
343360
}
361+
/* }}} */
344362

363+
/* {{{ _php_curl_write_header
364+
*/
345365
static size_t _php_curl_write_header(char *data, size_t size, size_t nmemb, void *ctx)
346366
{
347367
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
377397

378398
return length;
379399
}
400+
/* }}} */
380401

402+
/* {{{ _php_curl_passwd
403+
*/
381404
static size_t _php_curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
382405
{
383406
php_curl *ch = (php_curl *) ctx;
@@ -419,23 +442,31 @@ static size_t _php_curl_passwd(void *ctx, char *prompt, char *buf, int buflen)
419442

420443
return 0;
421444
}
422-
423-
445+
/* }}} */
424446

447+
/* {{{ curl_free_string
448+
*/
425449
static void curl_free_string(void **string)
426450
{
427451
efree(*string);
428-
}
452+
}
453+
/* }}} */
429454

455+
/* {{{ curl_free_post
456+
*/
430457
static void curl_free_post(void **post)
431458
{
432459
curl_formfree((struct HttpPost *) *post);
433460
}
461+
/* }}} */
434462

463+
/* {{{ curl_free_slist
464+
*/
435465
static void curl_free_slist(void **slist)
436466
{
437467
curl_slist_free_all((struct curl_slist *) *slist);
438468
}
469+
/* }}} */
439470

440471
/* {{{ proto string curl_version(void)
441472
Return the CURL version string. */
@@ -445,6 +476,8 @@ PHP_FUNCTION(curl_version)
445476
}
446477
/* }}} */
447478

479+
/* {{{ alloc_curl_handle
480+
*/
448481
static void alloc_curl_handle(php_curl **ch)
449482
{
450483
*ch = emalloc(sizeof(php_curl));
@@ -459,6 +492,7 @@ static void alloc_curl_handle(php_curl **ch)
459492
zend_llist_init(&(*ch)->to_free.post, sizeof(struct HttpPost),
460493
(void(*)(void *)) curl_free_post, 0);
461494
}
495+
/* }}} */
462496

463497
/* {{{ proto int curl_init([string url])
464498
Initialize a CURL session */
@@ -939,3 +973,11 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc)
939973
/* }}} */
940974

941975
#endif
976+
977+
/*
978+
* Local variables:
979+
* tab-width: 4
980+
* c-basic-offset: 4
981+
* End:
982+
* vim: sw=4 ts=4 tw=78 fdm=marker
983+
*/

0 commit comments

Comments
 (0)