com php-src: ...: phpdbg_prompt.c phpdbg_prompt.h
| From: | Bob Weinand | Date: | Fri, 15 Nov 2013 15:26:51 +0000 |
| Subject: | com php-src: ...: phpdbg_prompt.c phpdbg_prompt.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-74942@lists.php.net to get a copy of this message | ||
Commit: a3f21371733e92b7e89abcb4bc8f4662d00af54f
Author: krakjoe <joe.watkins@live.co.uk> Fri, 15 Nov 2013 15:26:51 +0000
Parents: b63fd6d26158eee50cdabc4ef12b26b3fa0dfa88
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a3f21371733e92b7e89abcb4bc8f4662d00af54f
Log:
..
Changed paths:
M phpdbg_prompt.c
M phpdbg_prompt.h
Diff:
diff --git a/phpdbg_prompt..c b/phpdbg_prompt.c
index ed5b61f..73db793 100644
--- a/phpdbg_prompt.c
+++ b/phpdbg_prompt.c
@@ -73,71 +73,10 @@ static const phpdbg_command_t phpdbg_prompt_commands[] = {
ZEND_EXTERN_MODULE_GLOBALS(phpdbg);
-int phpdbg_confirm(char *message TSRMLS_DC)
-{
- char cmd[PHPDBG_MAX_CMD];
-
- zend_bool confirmed = 0,
- result = 0;
-
- phpdbg_writeln(message);
-
- do {
- phpdbg_error("Confirm (y or n) ?");
-
- if ((fgets(cmd, PHPDBG_MAX_CMD, stdin) != NULL)) {
- switch (cmd[0]) {
- case 'y':
- case 'Y': {
- result = 1;
- confirmed = 1;
- } break;
-
- case 'n':
- case 'N': {
- confirmed = 1;
- } break;
- }
- }
- } while (!confirmed);
-
- return result;
-}
-
-void phpdbg_sigint_handler(int signum)
-{
- TSRMLS_FETCH();
-
- phpdbg_writeln(EMPTY);
-
- signal(signum, SIG_IGN);
-
- if (EG(in_execution)) {
- if (phpdbg_confirm(
- "Do you really want to quit while executing ?" TSRMLS_CC)) {
- PHPDBG_G(flags) |= PHPDBG_IS_QUITTING;
-
- zend_bailout();
- } else {
- signal(
- SIGINT, phpdbg_sigint_handler);
- phpdbg_interactive(TSRMLS_C);
- }
- } else {
- phpdbg_notice("Interrupted ...");
-
- PHPDBG_G(flags) = PHPDBG_IS_QUITTING;
-
- zend_bailout();
- }
-}
-
void phpdbg_init(char *init_file, size_t init_file_len, zend_bool use_default TSRMLS_DC) /* {{{ */
{
zend_bool init_default = 0;
-
- signal(SIGINT, phpdbg_sigint_handler);
-
+
if (!init_file && use_default) {
struct stat sb;
diff --git a/phpdbg_prompt.h b/phpdbg_prompt.h
index 3937940..690d767 100644
--- a/phpdbg_prompt.h
+++ b/phpdbg_prompt.h
@@ -63,7 +63,6 @@ int phpdbg_do_cmd(const phpdbg_command_t *command, char *cmd_line, size_t cmd_le
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_confirm(char *message TSRMLS_DC);
int phpdbg_interactive(TSRMLS_D);
void phpdbg_print_opline(zend_execute_data *execute_data, zend_bool ignore_flags TSRMLS_DC);
void phpdbg_clean(zend_bool full TSRMLS_DC);