1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 08:58:28 +02:00

- Added phpdbg_is_empty function

This commit is contained in:
Felipe Pena
2013-11-12 00:50:15 -02:00
parent 79ab9a3f74
commit 6658f58d4a
3 changed files with 14 additions and 2 deletions
+1 -1
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);
+11
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;
} /* }}} */
+2 -1
View File
@@ -20,6 +20,7 @@
#ifndef 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 */