com php-src: fix window size on windows: config.w32 phpdbg.c phpdbg_prompt.c
| From: | Bob Weinand | Date: | Mon, 18 Nov 2013 00:23:04 +0000 |
| Subject: | com php-src: fix window size on windows: config.w32 phpdbg.c phpdbg_prompt.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-74868@lists.php.net to get a copy of this message | ||
Commit: 27ae287c49ad3178ba64586a72ab3c62b42faa30
Author: Joe Watkins <joe.watkins@live.co.uk> Mon, 18 Nov 2013 00:23:04 +0000
Parents: 0966cad65159e00e57b049edcb9f66aed30e5396
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=27ae287c49ad3178ba64586a72ab3c62b42faa30
Log:
fix window size on windows
make window as big as possible on windows for readability
Changed paths:
M config.w32
M phpdbg.c
M phpdbg_prompt.c
Diff:
diff --git a/config.w32 b/config.w32
index 955d229..eee355d 100644
--- a/config.w32
+++ b/config.w32
@@ -2,5 +2,6 @@ ARG_ENABLE('phpdbg', 'Build phpdbg', 'yes');
if (PHP_PHPDBG == "yes") {
SAPI('phpdbg', 'phpdbg.c phpdbg_prompt.c phpdbg_cmd.c phpdbg_info.c
phpdbg_help.c phpdbg_break.c phpdbg_print.c phpdbg_bp.c phpdbg_opcode.c phpdbg_list.c
phpdbg_utils.c', 'phpdbg.exe');
+ ADD_FLAG("LIBS_PHPDBG", "ws2_32.lib user32..lib");
}
diff --git a/phpdbg.c b/phpdbg.c
index 1a4dbc1..4226dc3 100644
--- a/phpdbg.c
+++ b/phpdbg.c
@@ -401,23 +401,32 @@ int main(int argc, char **argv) /* {{{ */
size_t oplog_file_len;
zend_ulong flags;
char *php_optarg;
- int php_optind;
- int opt;
- long cleaning = 0;
+ int php_optind;
+ int opt;
+ long cleaning = 0;
#ifdef ZTS
void ***tsrm_ls;
#endif
#ifdef PHP_WIN32
+ HWND console;
+ RECT consoleRect;
_fmode = _O_BINARY; /* sets default for file streams to binary */
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);
+ }
#endif
#ifdef ZTS
- tsrm_startup(1, 1, 0, NULL);
+ tsrm_startup(1, 1, 0, NULL);
tsrm_ls = ts_resource(0);
#endif
diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c
index 60852b4..80c1daa 100644
--- a/phpdbg_prompt.c
+++ b/phpdbg_prompt.c
@@ -596,7 +596,7 @@ static PHPDBG_COMMAND(aliases) /* {{{ */
phpdbg_writeln("\t%c -> %s", prompt_command->alias, prompt_command->name);
while (sub_command && sub_command->name) {
if (sub_command->alias) {
- phpdbg_writeln("\t|------- %c -> %s\t%s", sub_command->alias,
+ phpdbg_writeln("\t|--- %c -> %s\t%s", sub_command->alias,
sub_command->name, sub_command->tip);
}
++sub_command;