com php-src: - Move phpdbg_welcome to phpdbg.c and staticfy it: phpdbg.c phpdbg_prompt.c phpdbg_ prompt.h

From: Date: Mon, 18 Nov 2013 01:07:57 +0000
Subject: com php-src: - Move phpdbg_welcome to phpdbg.c and staticfy it: phpdbg.c phpdbg_prompt.c phpdbg_ prompt.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-74862@lists.php.net to get a copy of this message
Commit: f72b2d6c7c908d2485168e1050743078ff67b4f6 Author: Felipe Pena <felipensp@gmail.com> Sun, 17 Nov 2013 23:07:57 -0200 Parents: 66494ad94e089b53ed292a5b69a6772ecd00b9ac Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f72b2d6c7c908d2485168e1050743078ff67b4f6 Log: - Move phpdbg_welcome to phpdbg.c and staticfy it Changed paths: M phpdbg.c M phpdbg_prompt.c M phpdbg_prompt.h Diff: diff --git a/phpdbg.c b/phpdbg.c index 4226dc3..14d6625 100644 --- a/phpdbg.c +++ b/phpdbg.c @@ -387,6 +387,24 @@ void phpdbg_ini_defaults(HashTable *configuration_hash) /* {{{ */ INI_DEFAULT("display_errors", "1"); } /* }}} */ +static void phpdbg_welcome(zend_bool cleaning TSRMLS_DC) /* {{{ */ +{ + /* print blurb */ + if (!cleaning) { + phpdbg_notice("Welcome to phpdbg, the interactive PHP debugger, v%s", + PHPDBG_VERSION); + phpdbg_writeln("To get help using phpdbg type \"help\" and press enter"); + phpdbg_notice("Please report bugs to <%s>", PHPDBG_ISSUES); + } else { + phpdbg_notice("Clean Execution Environment"); + + phpdbg_writeln("Classes\t\t\t%d", zend_hash_num_elements(EG(class_table))); + phpdbg_writeln("Functions\t\t%d", zend_hash_num_elements(EG(function_table))); + phpdbg_writeln("Constants\t\t%d", zend_hash_num_elements(EG(zend_constants))); + phpdbg_writeln("Includes\t\t%d", zend_hash_num_elements(&EG(included_files))); + } +} /* }}} */ + int main(int argc, char **argv) /* {{{ */ { sapi_module_struct *phpdbg = &phpdbg_sapi_module; @@ -416,12 +434,12 @@ int main(int argc, char **argv) /* {{{ */ setmode(_fileno(stdin), O_BINARY); /* make the stdio mode be binary */ setmode(_fileno(stdout), O_BINARY); /* make the stdio mode be binary */ setmode(_fileno(stderr), O_BINARY); /* make the stdio mode be binary */ - + console = GetConsoleWindow(); if (console) { GetWindowRect(console, &consoleRect); MoveWindow( - console, consoleRect.left, consoleRect.top, 800,600, TRUE); + console, consoleRect.left, consoleRect.top, 800,600, TRUE); } #endif diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index e4451c5..3a5dbf6 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -179,24 +179,6 @@ next_line: } } /* }}} */ -void phpdbg_welcome(zend_bool cleaning TSRMLS_DC) /* {{{ */ -{ - /* print blurb */ - if (!cleaning) { - phpdbg_notice("Welcome to phpdbg, the interactive PHP debugger, v%s", - PHPDBG_VERSION); - phpdbg_writeln("To get help using phpdbg type \"help\" and press enter"); - phpdbg_notice("Please report bugs to <%s>", PHPDBG_ISSUES); - } else { - phpdbg_notice("Clean Execution Environment"); - - phpdbg_writeln("Classes\t\t\t%d", zend_hash_num_elements(EG(class_table))); - phpdbg_writeln("Functions\t\t%d", zend_hash_num_elements(EG(function_table))); - phpdbg_writeln("Constants\t\t%d", zend_hash_num_elements(EG(zend_constants))); - phpdbg_writeln("Includes\t\t%d", zend_hash_num_elements(&EG(included_files))); - } -} /* }}} */ - static PHPDBG_COMMAND(exec) /* {{{ */ { switch (param->type) { diff --git a/phpdbg_prompt.h b/phpdbg_prompt.h index ce28647..5f8de2b 100644 --- a/phpdbg_prompt.h +++ b/phpdbg_prompt.h @@ -26,7 +26,6 @@ #define PHPDBG_MAX_CMD 500 void phpdbg_init(char *init_file, size_t init_file_len, zend_bool use_default TSRMLS_DC); -void phpdbg_welcome(zend_bool cleaning TSRMLS_DC); int phpdbg_interactive(TSRMLS_D); void phpdbg_print_opline(zend_execute_data *execute_data, zend_bool ignore_flags TSRMLS_DC); int phpdbg_compile(TSRMLS_D);

« previous php.cvs (#74862) next »