com php-src: - Fix conflict: phpdbg_prompt.c

From: Date: Sun, 17 Nov 2013 12:12:10 +0000
Subject: com php-src: - Fix conflict: phpdbg_prompt.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-74892@lists.php.net to get a copy of this message
Commit: f51a08b6d665fd7635130ac16dcb9af1aa310bba Author: Felipe Pena <felipensp@gmail.com> Sun, 17 Nov 2013 10:12:10 -0200 Parents: 4eb20ecfe756f46fec536ebfbd94066a1275ab37 ced99e1b1d05c12ebb798a9d93d2025628b68b59 Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f51a08b6d665fd7635130ac16dcb9af1aa310bba Log: - Fix conflict Changed paths: MM phpdbg_prompt.c Diff: diff --cc phpdbg_prompt.c index cb5d83b,89acbc7..91f5c39 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@@ -190,44 -190,44 +190,44 @@@ void phpdbg_welcome(zend_bool cleaning static PHPDBG_COMMAND(exec) /* {{{ */ { - switch (param->type) { - case STR_PARAM: { - struct stat sb; - - if (VCWD_STAT(param->str, &sb) != FAILURE) { - if (sb.st_mode & (S_IFREG|S_IFLNK)) { - if (PHPDBG_G(exec)) { - phpdbg_notice("Unsetting old execution context: %s", PHPDBG_G(exec)); - efree(PHPDBG_G(exec)); - PHPDBG_G(exec) = NULL; - } - - if (PHPDBG_G(ops)) { - phpdbg_notice("Destroying compiled opcodes"); - phpdbg_clean(0 TSRMLS_CC); - } - - PHPDBG_G(exec) = phpdbg_resolve_path(param->str TSRMLS_CC); - - if (!PHPDBG_G(exec)) { - phpdbg_error("Cannot get real file path"); - return SUCCESS; - } - - PHPDBG_G(exec_len) = strlen(PHPDBG_G(exec)); - - phpdbg_notice("Set execution context: %s", PHPDBG_G(exec)); - - } else { - phpdbg_error("Cannot use %s as execution context, not a valid file or symlink", param->str); - } - } else { - phpdbg_error("Cannot stat %s, ensure the file exists", param->str); - } - } break; - - phpdbg_default_switch_case(); - } + switch (param->type) { + case STR_PARAM: { + struct stat sb; + + if (VCWD_STAT(param->str, &sb) != FAILURE) { - if (sb.st_mode & S_IFREG|S_IFLNK) { ++ if (sb.st_mode & (S_IFREG|S_IFLNK)) { + if (PHPDBG_G(exec)) { + phpdbg_notice("Unsetting old execution context: %s", PHPDBG_G(exec)); + efree(PHPDBG_G(exec)); + PHPDBG_G(exec) = NULL; + } + + if (PHPDBG_G(ops)) { + phpdbg_notice("Destroying compiled opcodes"); + phpdbg_clean(0 TSRMLS_CC); + } + + PHPDBG_G(exec) = phpdbg_resolve_path(param->str TSRMLS_CC); + + if (!PHPDBG_G(exec)) { + phpdbg_error("Cannot get real file path"); + return SUCCESS; + } + + PHPDBG_G(exec_len) = strlen(PHPDBG_G(exec)); + + phpdbg_notice("Set execution context: %s", PHPDBG_G(exec)); + + } else { + phpdbg_error("Cannot use %s as execution context, not a valid file or symlink", param->str); + } + } else { + phpdbg_error("Cannot stat %s, ensure the file exists", param->str); + } + } break; + + phpdbg_default_switch_case(); + } return SUCCESS; } /* }}} */ @@@ -729,42 -729,42 +729,41 @@@ int phpdbg_do_cmd( const phpdbg_command #endif size_t expr_len = (cmd != NULL) ? strlen(cmd) : 0; - phpdbg_param_t *param = NULL; + phpdbg_param_t *param = NULL; while (command && command->name && command->handler) { -- if ((command->name_len == expr_len - && memcmp(cmd, command->name, expr_len) == 0) - || (expr_len == 1 && command->alias && command->alias == cmd_line[0])) { - && memcmp(cmd, command->name, expr_len) == 0) - || ((expr_len == 1) && (command->alias && command->alias == cmd_line[0]))) { ++ if ((command->name_len == expr_len && memcmp(cmd, command->name, expr_len) == 0) ++ || (expr_len == 1 && command->alias && command->alias == cmd_line[0])) { - param = emalloc(sizeof(phpdbg_param_t)); + param = emalloc(sizeof(phpdbg_param_t)); PHPDBG_G(last) = (phpdbg_command_t*) command; - /* urm ... */ - if (PHPDBG_G(lparam)) { - //phpdbg_clear_param( - // PHPDBG_G(lparam) TSRMLS_CC); - //efree(PHPDBG_G(lparam)); - } + /* urm ... */ + if (PHPDBG_G(lparam)) { + //phpdbg_clear_param( + // PHPDBG_G(lparam) TSRMLS_CC); + //efree(PHPDBG_G(lparam)); + } - phpdbg_parse_param( - expr, - (cmd_len - expr_len) ? (((cmd_len - expr_len) - sizeof(" "))+1) : 0, - param TSRMLS_CC); + phpdbg_parse_param( + expr, + (cmd_len - expr_len) ? (((cmd_len - expr_len) - sizeof(" "))+1) : 0, + param TSRMLS_CC); - PHPDBG_G(lparam) = param; + PHPDBG_G(lparam) = param; - if (command->subs && param->type == STR_PARAM) { - if (phpdbg_do_cmd(command->subs, selected, param->str, param->len TSRMLS_CC) == SUCCESS) { - rc = SUCCESS; - /* because we can */ - phpdbg_clear_param(param TSRMLS_CC); - efree(param); - goto done; - } - } - if (command->subs && (param->type == STR_PARAM)) { ++ if (command->subs && param->type == STR_PARAM) { + if (phpdbg_do_cmd(command->subs, selected, param->str, param->len TSRMLS_CC) == SUCCESS) { + rc = SUCCESS; + /* because we can */ + phpdbg_clear_param(param TSRMLS_CC); + efree(param); + goto done; + } + } - *selected = (phpdbg_command_t*) command; + *selected = (phpdbg_command_t*) command; rc = command->handler(param TSRMLS_CC);

« previous php.cvs (#74892) next »