Skip to content

Commit 69a8403

Browse files
committed
Merge branch 'master' of https://github.com/krakjoe/phpdbg
2 parents b9c1c87 + 6658f58 commit 69a8403

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

phpdbg_prompt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ static PHPDBG_COMMAND(quiet) { /* {{{ */
498498

499499
static PHPDBG_COMMAND(list) /* {{{ */
500500
{
501-
if (phpdbg_is_numeric(expr)) {
501+
if (phpdbg_is_empty(expr) || phpdbg_is_numeric(expr)) {
502502
long offset = 0, count = strtol(expr, NULL, 0);
503503
const char *filename = PHPDBG_G(exec);
504504

phpdbg_utils.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,14 @@ int phpdbg_is_numeric(const char *str) /* {{{ */
3030
}
3131
return 0;
3232
} /* }}} */
33+
34+
int phpdbg_is_empty(const char *str) /* {{{ */
35+
{
36+
for (; *str; str++) {
37+
if (isspace(*str)) {
38+
continue;
39+
}
40+
return 0;
41+
}
42+
return 1;
43+
} /* }}} */

phpdbg_utils.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#ifndef PHPDBG_UTILS_H
2121
#define PHPDBG_UTILS_H
2222

23-
int phpdbg_is_numeric(const char *);
23+
int phpdbg_is_numeric(const char*);
24+
int phpdbg_is_empty(const char*);
2425

2526
#endif /* PHPDBG_UTILS_H */

0 commit comments

Comments
 (0)