diff options
| author | Max Semenik <maxsem.wiki@gmail.com> | 2020-07-01 16:32:55 +0300 |
|---|---|---|
| committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-07-06 21:13:34 +0200 |
| commit | 2b5de6f839feea0ae1d5289d59dd7f159fcdcc8c (patch) | |
| tree | f23a5c00a96f30a62ddcf626b4c6a6d53809d14f /sapi | |
| parent | 47579986504022d3eab38e24fff5861d5e4eadad (diff) | |
| download | php-git-2b5de6f839feea0ae1d5289d59dd7f159fcdcc8c.tar.gz | |
Remove proto comments from C files
Closes GH-5758
Diffstat (limited to 'sapi')
| -rw-r--r-- | sapi/apache2handler/php_functions.c | 24 | ||||
| -rw-r--r-- | sapi/cgi/cgi_main.c | 24 | ||||
| -rw-r--r-- | sapi/cli/php_cli.c | 12 | ||||
| -rw-r--r-- | sapi/cli/php_cli_process_title.c | 6 | ||||
| -rw-r--r-- | sapi/cli/php_cli_server.c | 6 | ||||
| -rw-r--r-- | sapi/fpm/fpm/fpm_main.c | 30 | ||||
| -rw-r--r-- | sapi/litespeed/lsapi_main.c | 45 | ||||
| -rw-r--r-- | sapi/phpdbg/phpdbg.c | 28 |
8 files changed, 61 insertions, 114 deletions
diff --git a/sapi/apache2handler/php_functions.c b/sapi/apache2handler/php_functions.c index 834a079ee8..1a601e6906 100644 --- a/sapi/apache2handler/php_functions.c +++ b/sapi/apache2handler/php_functions.c @@ -70,8 +70,7 @@ static request_rec *php_apache_lookup_uri(char *filename) return ap_sub_req_lookup_uri(filename, ctx->r, ctx->r->output_filters); } -/* {{{ proto bool virtual(string uri) - Perform an apache sub-request */ +/* {{{ Perform an apache sub-request */ PHP_FUNCTION(virtual) { char *filename; @@ -171,8 +170,7 @@ PHP_FUNCTION(apache_lookup_uri) RETURN_FALSE; } -/* {{{ proto array getallheaders(void) - Fetch all HTTP request headers */ +/* {{{ Fetch all HTTP request headers */ PHP_FUNCTION(apache_request_headers) { php_struct *ctx; @@ -195,8 +193,7 @@ PHP_FUNCTION(apache_request_headers) } /* }}} */ -/* {{{ proto array apache_response_headers(void) - Fetch all HTTP response headers */ +/* {{{ Fetch all HTTP response headers */ PHP_FUNCTION(apache_response_headers) { php_struct *ctx; @@ -219,8 +216,7 @@ PHP_FUNCTION(apache_response_headers) } /* }}} */ -/* {{{ proto string apache_note(string note_name [, string note_value]) - Get and set Apache request notes */ +/* {{{ Get and set Apache request notes */ PHP_FUNCTION(apache_note) { php_struct *ctx; @@ -249,8 +245,7 @@ PHP_FUNCTION(apache_note) /* }}} */ -/* {{{ proto bool apache_setenv(string variable, string value [, bool walk_to_top]) - Set an Apache subprocess_env variable */ +/* {{{ Set an Apache subprocess_env variable */ /* * XXX this doesn't look right. shouldn't it be the parent ?*/ PHP_FUNCTION(apache_setenv) @@ -283,8 +278,7 @@ PHP_FUNCTION(apache_setenv) } /* }}} */ -/* {{{ proto bool apache_getenv(string variable [, bool walk_to_top]) - Get an Apache subprocess_env variable */ +/* {{{ Get an Apache subprocess_env variable */ /* * XXX: shouldn't this be the parent not the 'prev' */ @@ -332,8 +326,7 @@ static char *php_apache_get_version() #endif } -/* {{{ proto string apache_get_version(void) - Fetch Apache version */ +/* {{{ Fetch Apache version */ PHP_FUNCTION(apache_get_version) { char *apv = php_apache_get_version(); @@ -346,8 +339,7 @@ PHP_FUNCTION(apache_get_version) } /* }}} */ -/* {{{ proto array apache_get_modules(void) - Get a list of loaded Apache modules */ +/* {{{ Get a list of loaded Apache modules */ PHP_FUNCTION(apache_get_modules) { int n; diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index 7c9e1bdfa6..acbe69a7a9 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -773,8 +773,7 @@ static void sapi_cgi_log_message(const char *message, int syslog_type_int) } } -/* {{{ php_cgi_ini_activate_user_config - */ +/* {{{ php_cgi_ini_activate_user_config */ static void php_cgi_ini_activate_user_config(char *path, size_t path_len, const char *doc_root, size_t doc_root_len) { user_config_cache_entry *new_entry, *entry; @@ -973,8 +972,7 @@ static int php_cgi_startup(sapi_module_struct *sapi_module) return SUCCESS; } -/* {{{ sapi_module_struct cgi_sapi_module - */ +/* {{{ sapi_module_struct cgi_sapi_module */ static sapi_module_struct cgi_sapi_module = { "cgi-fcgi", /* name */ "CGI/FastCGI", /* pretty name */ @@ -1019,8 +1017,7 @@ static const zend_function_entry additional_functions[] = { PHP_FE_END }; -/* {{{ php_cgi_usage - */ +/* {{{ php_cgi_usage */ static void php_cgi_usage(char *argv0) { char *prog; @@ -1525,8 +1522,7 @@ PHP_INI_BEGIN() #endif PHP_INI_END() -/* {{{ php_cgi_globals_ctor - */ +/* {{{ php_cgi_globals_ctor */ static void php_cgi_globals_ctor(php_cgi_globals_struct *php_cgi_globals) { #if defined(ZTS) && defined(PHP_WIN32) @@ -1547,8 +1543,7 @@ static void php_cgi_globals_ctor(php_cgi_globals_struct *php_cgi_globals) } /* }}} */ -/* {{{ PHP_MINIT_FUNCTION - */ +/* {{{ PHP_MINIT_FUNCTION */ static PHP_MINIT_FUNCTION(cgi) { REGISTER_INI_ENTRIES(); @@ -1556,8 +1551,7 @@ static PHP_MINIT_FUNCTION(cgi) } /* }}} */ -/* {{{ PHP_MSHUTDOWN_FUNCTION - */ +/* {{{ PHP_MSHUTDOWN_FUNCTION */ static PHP_MSHUTDOWN_FUNCTION(cgi) { zend_hash_destroy(&CGIG(user_config_cache)); @@ -1567,8 +1561,7 @@ static PHP_MSHUTDOWN_FUNCTION(cgi) } /* }}} */ -/* {{{ PHP_MINFO_FUNCTION - */ +/* {{{ PHP_MINFO_FUNCTION */ static PHP_MINFO_FUNCTION(cgi) { DISPLAY_INI_ENTRIES(); @@ -1735,8 +1728,7 @@ static zend_module_entry cgi_module_entry = { STANDARD_MODULE_PROPERTIES }; -/* {{{ main - */ +/* {{{ main */ int main(int argc, char *argv[]) { int free_query_string = 0; diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c index dfda90fb8e..9972b0f7a7 100644 --- a/sapi/cli/php_cli.c +++ b/sapi/cli/php_cli.c @@ -423,8 +423,7 @@ static void sapi_cli_ini_defaults(HashTable *configuration_hash) } /* }}} */ -/* {{{ sapi_module_struct cli_sapi_module - */ +/* {{{ sapi_module_struct cli_sapi_module */ static sapi_module_struct cli_sapi_module = { "cli", /* name */ "Command Line Interface", /* pretty name */ @@ -471,8 +470,7 @@ static const zend_function_entry additional_functions[] = { PHP_FE_END }; -/* {{{ php_cli_usage - */ +/* {{{ php_cli_usage */ static void php_cli_usage(char *argv0) { char *prog; @@ -581,8 +579,7 @@ static void cli_register_file_handles(void) /* {{{ */ static const char *param_mode_conflict = "Either execute direct code, process stdin or use a file.\n"; -/* {{{ cli_seek_file_begin - */ +/* {{{ cli_seek_file_begin */ static int cli_seek_file_begin(zend_file_handle *file_handle, char *script_file) { FILE *fp = VCWD_FOPEN(script_file, "rb"); @@ -1141,8 +1138,7 @@ err: } /* }}} */ -/* {{{ main - */ +/* {{{ main */ #ifdef PHP_CLI_WIN32_NO_CONSOLE int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) #else diff --git a/sapi/cli/php_cli_process_title.c b/sapi/cli/php_cli_process_title.c index 4437fdd46b..bd4eea59cd 100644 --- a/sapi/cli/php_cli_process_title.c +++ b/sapi/cli/php_cli_process_title.c @@ -22,8 +22,7 @@ #include "php_cli_process_title.h" #include "ps_title.h" -/* {{{ proto bool cli_set_process_title(string arg) - Return a boolean to confirm if the process title was successfully changed or not */ +/* {{{ Return a boolean to confirm if the process title was successfully changed or not */ PHP_FUNCTION(cli_set_process_title) { char *title = NULL; @@ -44,8 +43,7 @@ PHP_FUNCTION(cli_set_process_title) } /* }}} */ -/* {{{ proto string cli_get_process_title() - Return a string with the current process title. NULL if error. */ +/* {{{ Return a string with the current process title. NULL if error. */ PHP_FUNCTION(cli_get_process_title) { int length = 0; diff --git a/sapi/cli/php_cli_server.c b/sapi/cli/php_cli_server.c index ec658eb738..59929f21c9 100644 --- a/sapi/cli/php_cli_server.c +++ b/sapi/cli/php_cli_server.c @@ -436,8 +436,7 @@ PHP_FUNCTION(apache_response_headers) /* {{{ */ } /* }}} */ -/* {{{ cli_server module - */ +/* {{{ cli_server module */ static void cli_server_init_globals(zend_cli_server_globals *cg) { @@ -782,8 +781,7 @@ static void sapi_cli_server_log_message(const char *msg, int syslog_type_int) /* sapi_cli_server_log_write(PHP_CLI_SERVER_LOG_MESSAGE, msg); } /* }}} */ -/* {{{ sapi_module_struct cli_server_sapi_module - */ +/* {{{ sapi_module_struct cli_server_sapi_module */ sapi_module_struct cli_server_sapi_module = { "cli-server", /* name */ "Built-in HTTP server", /* pretty name */ diff --git a/sapi/fpm/fpm/fpm_main.c b/sapi/fpm/fpm/fpm_main.c index c2a1bd5df3..84b9e5958a 100644 --- a/sapi/fpm/fpm/fpm_main.c +++ b/sapi/fpm/fpm/fpm_main.c @@ -605,16 +605,14 @@ void sapi_cgi_log_fastcgi(int level, char *message, size_t len) } /* }}} */ -/* {{{ sapi_cgi_log_message - */ +/* {{{ sapi_cgi_log_message */ static void sapi_cgi_log_message(const char *message, int syslog_type_int) { zlog_msg(ZLOG_NOTICE, "PHP message: ", message); } /* }}} */ -/* {{{ php_cgi_ini_activate_user_config - */ +/* {{{ php_cgi_ini_activate_user_config */ static void php_cgi_ini_activate_user_config(char *path, int path_len, const char *doc_root, int doc_root_len) { char *ptr; @@ -777,8 +775,7 @@ static int php_cgi_startup(sapi_module_struct *sapi_module) /* {{{ */ } /* }}} */ -/* {{{ sapi_module_struct cgi_sapi_module - */ +/* {{{ sapi_module_struct cgi_sapi_module */ static sapi_module_struct cgi_sapi_module = { "fpm-fcgi", /* name */ "FPM/FastCGI", /* pretty name */ @@ -812,8 +809,7 @@ static sapi_module_struct cgi_sapi_module = { }; /* }}} */ -/* {{{ php_cgi_usage - */ +/* {{{ php_cgi_usage */ static void php_cgi_usage(char *argv0) { char *prog; @@ -1404,8 +1400,7 @@ PHP_INI_BEGIN() STD_PHP_INI_ENTRY("fpm.config", NULL, PHP_INI_SYSTEM, OnUpdateString, fpm_config, php_cgi_globals_struct, php_cgi_globals) PHP_INI_END() -/* {{{ php_cgi_globals_ctor - */ +/* {{{ php_cgi_globals_ctor */ static void php_cgi_globals_ctor(php_cgi_globals_struct *php_cgi_globals) { php_cgi_globals->rfc2616_headers = 0; @@ -1421,8 +1416,7 @@ static void php_cgi_globals_ctor(php_cgi_globals_struct *php_cgi_globals) } /* }}} */ -/* {{{ PHP_MINIT_FUNCTION - */ +/* {{{ PHP_MINIT_FUNCTION */ static PHP_MINIT_FUNCTION(cgi) { #ifdef ZTS @@ -1435,8 +1429,7 @@ static PHP_MINIT_FUNCTION(cgi) } /* }}} */ -/* {{{ PHP_MSHUTDOWN_FUNCTION - */ +/* {{{ PHP_MSHUTDOWN_FUNCTION */ static PHP_MSHUTDOWN_FUNCTION(cgi) { zend_hash_destroy(&CGIG(user_config_cache)); @@ -1446,8 +1439,7 @@ static PHP_MSHUTDOWN_FUNCTION(cgi) } /* }}} */ -/* {{{ PHP_MINFO_FUNCTION - */ +/* {{{ PHP_MINFO_FUNCTION */ static PHP_MINFO_FUNCTION(cgi) { php_info_print_table_start(); @@ -1494,8 +1486,7 @@ PHP_FUNCTION(apache_request_headers) /* {{{ */ } } /* }}} */ -/* {{{ proto array fpm_get_status - * Returns the status of the fastcgi process manager */ +/* {{{ Returns the status of the fastcgi process manager */ PHP_FUNCTION(fpm_get_status) /* {{{ */ { if (zend_parse_parameters_none() == FAILURE) { @@ -1521,8 +1512,7 @@ static zend_module_entry cgi_module_entry = { STANDARD_MODULE_PROPERTIES }; -/* {{{ main - */ +/* {{{ main */ int main(int argc, char *argv[]) { int exit_status = FPM_EXIT_OK; diff --git a/sapi/litespeed/lsapi_main.c b/sapi/litespeed/lsapi_main.c index 6fec0c2b54..c3386f47ec 100644 --- a/sapi/litespeed/lsapi_main.c +++ b/sapi/litespeed/lsapi_main.c @@ -93,8 +93,7 @@ static void init_sapi_from_env(sapi_module_struct *sapi_module) sapi_module->php_ini_path_override = p; } -/* {{{ php_lsapi_startup - */ +/* {{{ php_lsapi_startup */ static int php_lsapi_startup(sapi_module_struct *sapi_module) { if (php_module_startup(sapi_module, NULL, 0)==FAILURE) { @@ -131,8 +130,7 @@ static void sapi_lsapi_ini_defaults(HashTable *configuration_hash) /* }}} */ -/* {{{ sapi_lsapi_ub_write - */ +/* {{{ sapi_lsapi_ub_write */ static size_t sapi_lsapi_ub_write(const char *str, size_t str_length) { int ret; @@ -160,8 +158,7 @@ static size_t sapi_lsapi_ub_write(const char *str, size_t str_length) /* }}} */ -/* {{{ sapi_lsapi_flush - */ +/* {{{ sapi_lsapi_flush */ static void sapi_lsapi_flush(void * server_context) { if ( lsapi_mode ) { @@ -173,8 +170,7 @@ static void sapi_lsapi_flush(void * server_context) /* }}} */ -/* {{{ sapi_lsapi_deactivate - */ +/* {{{ sapi_lsapi_deactivate */ static int sapi_lsapi_deactivate(void) { if ( SG(request_info).path_translated ) { @@ -189,8 +185,7 @@ static int sapi_lsapi_deactivate(void) -/* {{{ sapi_lsapi_getenv - */ +/* {{{ sapi_lsapi_getenv */ static char *sapi_lsapi_getenv(const char * name, size_t name_len ) { if ( lsapi_mode ) { @@ -260,8 +255,7 @@ static void litespeed_php_import_environment_variables(zval *array_ptr) } } -/* {{{ sapi_lsapi_register_variables - */ +/* {{{ sapi_lsapi_register_variables */ static void sapi_lsapi_register_variables(zval *track_vars_array) { char * php_self = ""; @@ -288,8 +282,7 @@ static void sapi_lsapi_register_variables(zval *track_vars_array) /* }}} */ -/* {{{ sapi_lsapi_read_post - */ +/* {{{ sapi_lsapi_read_post */ static size_t sapi_lsapi_read_post(char *buffer, size_t count_bytes) { if ( lsapi_mode ) { @@ -304,8 +297,7 @@ static size_t sapi_lsapi_read_post(char *buffer, size_t count_bytes) -/* {{{ sapi_lsapi_read_cookies - */ +/* {{{ sapi_lsapi_read_cookies */ static char *sapi_lsapi_read_cookies(void) { if ( lsapi_mode ) { @@ -463,8 +455,7 @@ static int sapi_lsapi_send_headers_like_cgi(sapi_headers_struct *sapi_headers) static int mod_lsapi_mode = 0; -/* {{{ sapi_lsapi_send_headers - */ +/* {{{ sapi_lsapi_send_headers */ static int sapi_lsapi_send_headers(sapi_headers_struct *sapi_headers) { sapi_header_struct *h; @@ -507,8 +498,7 @@ static int sapi_lsapi_send_headers(sapi_headers_struct *sapi_headers) /* }}} */ -/* {{{ sapi_lsapi_send_headers - */ +/* {{{ sapi_lsapi_send_headers */ static void sapi_lsapi_log_message(const char *message, int syslog_type_int) { char buf[8192]; @@ -597,8 +587,7 @@ static int sapi_lsapi_activate() } return SUCCESS; } -/* {{{ sapi_module_struct cgi_sapi_module - */ +/* {{{ sapi_module_struct cgi_sapi_module */ static sapi_module_struct lsapi_sapi_module = { "litespeed", @@ -1678,8 +1667,7 @@ static int add_associate_array( const char * pKey, int keyLen, const char * pVal } -/* {{{ proto array litespeed_request_headers(void) - Fetch all HTTP request headers */ +/* {{{ Fetch all HTTP request headers */ PHP_FUNCTION(litespeed_request_headers) { if (zend_parse_parameters_none() == FAILURE) { @@ -1694,8 +1682,7 @@ PHP_FUNCTION(litespeed_request_headers) -/* {{{ proto array litespeed_response_headers(void) - Fetch all HTTP response headers */ +/* {{{ Fetch all HTTP response headers */ PHP_FUNCTION(litespeed_response_headers) { sapi_header_struct *h; @@ -1737,8 +1724,7 @@ PHP_FUNCTION(litespeed_response_headers) /* }}} */ -/* {{{ proto array apache_get_modules(void) - Fetch all loaded module names */ +/* {{{ Fetch all loaded module names */ PHP_FUNCTION(apache_get_modules) { static const char * mod_names[] = @@ -1761,8 +1747,7 @@ PHP_FUNCTION(apache_get_modules) /* }}} */ -/* {{{ proto bool litespeed_finish_request(void) - Flushes all response data to the client */ +/* {{{ Flushes all response data to the client */ PHP_FUNCTION(litespeed_finish_request) { if (zend_parse_parameters_none() == FAILURE) { diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index f978c21ea3..176ab4cb49 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -286,8 +286,7 @@ static PHP_RSHUTDOWN_FUNCTION(phpdbg) /* {{{ */ return SUCCESS; } /* }}} */ -/* {{{ proto mixed phpdbg_exec(string context) - Attempt to set the execution context for phpdbg +/* {{{ Attempt to set the execution context for phpdbg If the execution context was set previously it is returned If the execution context was not set previously boolean true is returned If the request to set the context fails, boolean false is returned, and an E_WARNING raised */ @@ -329,8 +328,7 @@ PHP_FUNCTION(phpdbg_exec) } } /* }}} */ -/* {{{ proto void phpdbg_break() - instructs phpdbg to insert a breakpoint at the next opcode */ +/* {{{ instructs phpdbg to insert a breakpoint at the next opcode */ PHP_FUNCTION(phpdbg_break_next) { zend_execute_data *ex; @@ -351,7 +349,7 @@ PHP_FUNCTION(phpdbg_break_next) phpdbg_set_breakpoint_opline_ex((phpdbg_opline_ptr_t) ex->opline + 1); } /* }}} */ -/* {{{ proto void phpdbg_break_file(string file, int line) */ +/* {{{ */ PHP_FUNCTION(phpdbg_break_file) { char *file; @@ -365,7 +363,7 @@ PHP_FUNCTION(phpdbg_break_file) phpdbg_set_breakpoint_file(file, 0, line); } /* }}} */ -/* {{{ proto void phpdbg_break_method(string class, string method) */ +/* {{{ */ PHP_FUNCTION(phpdbg_break_method) { char *class, *method; @@ -378,7 +376,7 @@ PHP_FUNCTION(phpdbg_break_method) phpdbg_set_breakpoint_method(class, method); } /* }}} */ -/* {{{ proto void phpdbg_break_function(string function) */ +/* {{{ */ PHP_FUNCTION(phpdbg_break_function) { char *function; @@ -391,8 +389,7 @@ PHP_FUNCTION(phpdbg_break_function) phpdbg_set_breakpoint_symbol(function, function_len); } /* }}} */ -/* {{{ proto void phpdbg_clear(void) - instructs phpdbg to clear breakpoints */ +/* {{{ instructs phpdbg to clear breakpoints */ PHP_FUNCTION(phpdbg_clear) { if (zend_parse_parameters_none() == FAILURE) { @@ -410,7 +407,7 @@ PHP_FUNCTION(phpdbg_clear) zend_hash_clean(&PHPDBG_G(bp)[PHPDBG_BREAK_COND]); } /* }}} */ -/* {{{ proto void phpdbg_color(int element, string color) */ +/* {{{ */ PHP_FUNCTION(phpdbg_color) { zend_long element; @@ -433,7 +430,7 @@ PHP_FUNCTION(phpdbg_color) } } /* }}} */ -/* {{{ proto void phpdbg_prompt(string prompt) */ +/* {{{ */ PHP_FUNCTION(phpdbg_prompt) { char *prompt = NULL; @@ -446,7 +443,7 @@ PHP_FUNCTION(phpdbg_prompt) phpdbg_set_prompt(prompt); } /* }}} */ -/* {{{ proto void phpdbg_start_oplog() */ +/* {{{ */ PHP_FUNCTION(phpdbg_start_oplog) { phpdbg_oplog_list *prev; @@ -523,7 +520,7 @@ static inline HashTable* phpdbg_add_empty_array(HashTable *ht, zend_string *name return Z_ARR_P(ht_zv); } -/* {{{ proto void phpdbg_get_executable() */ +/* {{{ */ PHP_FUNCTION(phpdbg_get_executable) { HashTable *options = NULL; @@ -621,7 +618,7 @@ PHP_FUNCTION(phpdbg_get_executable) } } -/* {{{ proto void phpdbg_end_oplog() */ +/* {{{ */ PHP_FUNCTION(phpdbg_end_oplog) { phpdbg_oplog_entry *cur; @@ -981,8 +978,7 @@ void phpdbg_register_file_handles(void) /* {{{ */ } /* }}} */ -/* {{{ sapi_module_struct phpdbg_sapi_module -*/ +/* {{{ sapi_module_struct phpdbg_sapi_module */ static sapi_module_struct phpdbg_sapi_module = { "phpdbg", /* name */ "phpdbg", /* pretty name */ |
