]> granicus.if.org Git - php/commitdiff
- Fix conflict
authorFelipe Pena <felipensp@gmail.com>
Sun, 17 Nov 2013 12:12:10 +0000 (10:12 -0200)
committerFelipe Pena <felipensp@gmail.com>
Sun, 17 Nov 2013 12:12:10 +0000 (10:12 -0200)
1  2 
phpdbg_prompt.c

diff --cc phpdbg_prompt.c
index cb5d83b2e0566e181c4ce2224215f9d11a2cf08f,89acbc7f4617aed3579d984a76b53e04f1de8744..91f5c39f85bbb01332e51bc9eb36e74ac67d06cc
@@@ -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);