com php-src: Merge branch 'master' of https://github.com/krakjoe/phpdbg: phpdbg_cmd.c phpdbg_cmd.h

From: Date: Wed, 20 Nov 2013 10:06:29 +0000
Subject: com php-src: Merge branch 'master' of https://github.com/krakjoe/phpdbg: phpdbg_cmd.c phpdbg_cmd.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-74781@lists.php.net to get a copy of this message
Commit: dd71744d4858499bb009b89643a3a1a98b311fcd Author: krakjoe <joe.watkins@live.co.uk> Wed, 20 Nov 2013 10:06:29 +0000 Parents: 6417e472b4aa73cf760593815e602dde66e818e0 3e6f942d1ad3b9ec7b96e9f822da1e6f1123332f Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=dd71744d4858499bb009b89643a3a1a98b311fcd Log: Merge branch 'master' of https://github.com/krakjoe/phpdbg Changed paths: MM phpdbg_cmd.c MM phpdbg_cmd.h Diff: diff --cc phpdbg_cmd.c index d730001,d1767b0..27470be --- a/phpdbg_cmd.c +++ b/phpdbg_cmd.c @@@ -250,32 -247,26 +250,26 @@@ phpdbg_input_t *phpdbg_read_input(char buffer->string = phpdbg_trim(cmd, strlen(cmd), &buffer->length); - if (buffer->string) { - /* temporary, when we switch to argv/argc handling - will be unnecessary */ - char *store = (char*) estrdup(buffer->string); + /* store constant pointer to start of buffer */ + buffer->start = (char* const*) buffer->string; - /* store constant pointer to start of buffer */ - buffer->start = (char* const*) buffer->string; + buffer->argv = phpdbg_read_argv( + buffer->string, &buffer->argc TSRMLS_CC); - buffer->argv = phpdbg_read_argv( - store, &buffer->argc TSRMLS_CC); + #ifdef PHPDBG_DEBUG + if (buffer->argc) { + int arg = 0; - if (buffer->argc) { - int arg = 0; - - while (arg < buffer->argc) { - phpdbg_debug( - "argv %d=%s", arg, buffer->argv[arg]->string); - arg++; - } + while (arg < buffer->argc) { + phpdbg_debug( + "argv %d=%s", arg, buffer->argv[arg]->string); + arg++; } - - efree(store); } + #endif #ifdef HAVE_LIBREADLINE - if (cmd) { + if (!buffered && cmd) { free(cmd); } #endif @@@ -333,10 -324,10 +327,9 @@@ int phpdbg_do_cmd(const phpdbg_command_ sub.argv = &input->argv[1]; phpdbg_debug( - "trying sub commands in \"%s\" for \"%s\" with %d arguments", + "trying sub commands in \"%s\" for \"%s\" with %d arguments", command->name, sub.argv[0]->string, sub.argc-1); - - - return phpdbg_do_cmd_ex(command->subs, &sub TSRMLS_CC); + return phpdbg_do_cmd(command->subs, &sub TSRMLS_CC); } else { phpdbg_parse_param( input->argv[1]->string,

« previous php.cvs (#74781) next »