aboutsummaryrefslogtreecommitdiff
path: root/shell/shell_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/shell_common.c')
-rw-r--r--shell/shell_common.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/shell/shell_common.c b/shell/shell_common.c
index 99bb91c6f..669a18dfd 100644
--- a/shell/shell_common.c
+++ b/shell/shell_common.c
@@ -19,8 +19,17 @@
19#include "libbb.h" 19#include "libbb.h"
20#include "shell_common.h" 20#include "shell_common.h"
21 21
22#if IFS_BROKEN
23const char defifsvar[] ALIGN1 = "IFS= \t\n"; 22const char defifsvar[] ALIGN1 = "IFS= \t\n";
24#else 23
25const char defifs[] ALIGN1 = " \t\n"; 24
26#endif 25int FAST_FUNC is_well_formed_var_name(const char *s, char terminator)
26{
27 if (!s || !(isalpha(*s) || *s == '_'))
28 return 0;
29
30 do
31 s++;
32 while (isalnum(*s) || *s == '_');
33
34 return *s == terminator;
35}