From: Felipe Pena Date: Sun, 17 Nov 2013 12:12:10 +0000 (-0200) Subject: - Fix conflict X-Git-Tag: php-5.6.0alpha1~110^2~274 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f51a08b6d665fd7635130ac16dcb9af1aa310bba;p=php - Fix conflict --- f51a08b6d665fd7635130ac16dcb9af1aa310bba diff --cc phpdbg_prompt.c index cb5d83b2e0,89acbc7f46..91f5c39f85 --- 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);