Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 96d2433d3..e91566994 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -12123,18 +12123,19 @@ simplecmd(void)
if (args && app == &args->narg.next
&& !vars && !redir
) {
- struct builtincmd *bcmd;
- const char *name;
+// struct builtincmd *bcmd;
+// const char *name;
/* We have a function */
if (IF_BASH_FUNCTION(!function_flag &&) readtoken() != TRP)
raise_error_unexpected_syntax(TRP);
- name = n->narg.text;
- if (!goodname(name)
- || ((bcmd = find_builtin(name)) && IS_BUILTIN_SPECIAL(bcmd))
- ) {
- raise_error_syntax("bad function name");
- }
+//bash allows functions named "123", "..", "return"!
+// name = n->narg.text;
+// if (!goodname(name)
+// || ((bcmd = find_builtin(name)) && IS_BUILTIN_SPECIAL(bcmd))
+// ) {
+// raise_error_syntax("bad function name");
+// }
n->type = NDEFUN;
checkkwd = CHKNL | CHKKWD | CHKALIAS;
n->ndefun.text = n->narg.text;