This commit is contained in:
krakjoe 2013-11-12 02:50:44 +00:00
commit 69a8403175
3 changed files with 14 additions and 2 deletions

View file

@ -498,7 +498,7 @@ static PHPDBG_COMMAND(quiet) { /* {{{ */
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);
const char *filename = PHPDBG_G(exec);

View file

@ -30,3 +30,14 @@ int phpdbg_is_numeric(const char *str) /* {{{ */
}
return 0;
} /* }}} */
int phpdbg_is_empty(const char *str) /* {{{ */
{
for (; *str; str++) {
if (isspace(*str)) {
continue;
}
return 0;
}
return 1;
} /* }}} */

View file

@ -21,5 +21,6 @@
#define PHPDBG_UTILS_H
int phpdbg_is_numeric(const char*);
int phpdbg_is_empty(const char*);
#endif /* PHPDBG_UTILS_H */