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:
+1
-1
@@ -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);
|
||||
|
||||
|
||||
@@ -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
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user