]> granicus.if.org Git - php/commitdiff
- Move phpdbg_welcome to phpdbg.c and staticfy it
authorFelipe Pena <felipensp@gmail.com>
Mon, 18 Nov 2013 01:07:57 +0000 (23:07 -0200)
committerFelipe Pena <felipensp@gmail.com>
Mon, 18 Nov 2013 01:07:57 +0000 (23:07 -0200)
phpdbg.c
phpdbg_prompt.c
phpdbg_prompt.h

index 4226dc3bdbba69403109e06cb0969c3047db7a6b..14d6625cc64921a9c630a70e973a24a26e0a3261 100644 (file)
--- 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
 
index e4451c5179e3d8dd8bb23464c16c0046bf1416b8..3a5dbf6c5dc70fc133cb2c03319ff286f0b34fe2 100644 (file)
@@ -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) {
index ce2864751b285deb54aed688c828e98dc146b24d..5f8de2b81d3fa209cbe94ebd944d1519862be360 100644 (file)
@@ -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);