mirror of
https://github.com/php/php-src.git
synced 2025-08-19 17:04:47 +02:00
Merge branch 'master' of https://github.com/krakjoe/phpdbg
This commit is contained in:
commit
69a8403175
3 changed files with 14 additions and 2 deletions
|
@ -498,7 +498,7 @@ static PHPDBG_COMMAND(quiet) { /* {{{ */
|
||||||
|
|
||||||
static PHPDBG_COMMAND(list) /* {{{ */
|
static PHPDBG_COMMAND(list) /* {{{ */
|
||||||
{
|
{
|
||||||
if (phpdbg_is_numeric(expr)) {
|
if (phpdbg_is_empty(expr) || phpdbg_is_numeric(expr)) {
|
||||||
long offset = 0, count = strtol(expr, NULL, 0);
|
long offset = 0, count = strtol(expr, NULL, 0);
|
||||||
const char *filename = PHPDBG_G(exec);
|
const char *filename = PHPDBG_G(exec);
|
||||||
|
|
||||||
|
|
|
@ -30,3 +30,14 @@ int phpdbg_is_numeric(const char *str) /* {{{ */
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
int phpdbg_is_empty(const char *str) /* {{{ */
|
||||||
|
{
|
||||||
|
for (; *str; str++) {
|
||||||
|
if (isspace(*str)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
} /* }}} */
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#ifndef PHPDBG_UTILS_H
|
#ifndef PHPDBG_UTILS_H
|
||||||
#define PHPDBG_UTILS_H
|
#define PHPDBG_UTILS_H
|
||||||
|
|
||||||
int phpdbg_is_numeric(const char *);
|
int phpdbg_is_numeric(const char*);
|
||||||
|
int phpdbg_is_empty(const char*);
|
||||||
|
|
||||||
#endif /* PHPDBG_UTILS_H */
|
#endif /* PHPDBG_UTILS_H */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue