From: Felipe Pena Date: Mon, 18 Nov 2013 01:07:57 +0000 (-0200) Subject: - Move phpdbg_welcome to phpdbg.c and staticfy it X-Git-Tag: php-5.6.0alpha1~110^2~248^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f72b2d6c7c908d2485168e1050743078ff67b4f6;p=php - Move phpdbg_welcome to phpdbg.c and staticfy it --- diff --git a/phpdbg.c b/phpdbg.c index 4226dc3bdb..14d6625cc6 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 e4451c5179..3a5dbf6c5d 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 ce2864751b..5f8de2b81d 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);