Displaying 3 results from an estimated 3 matches for "bcmd".
Did you mean:
bcd
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add assignment built-in support again
...mp; bit) {
+ if (act & bit & DO_REGBLTIN)
+ goto fail;
+
updatetbl = 0;
cmdp = NULL;
} else if (cmdp->rehash == 0)
@@ -393,11 +393,13 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path)
/* If %builtin not in path, check for builtin next */
bcmd = find_builtin(name);
- if (bcmd && (bcmd->flags & BUILTIN_REGULAR || (
- act & DO_ALTPATH ? !(act & DO_ALTBLTIN) : builtinloc <= 0
- )))
+ if (bcmd && ((bcmd->flags & BUILTIN_REGULAR) | (act & DO_ALTPATH) |
+ (builtinloc <= 0)))
goto builti...
2020 Mar 28
0
[klibc:update-dash] dash: exec: Do not allocate stack string in padvance
...path, cmdp->cmdname);
} while (--idx >= 0);
+ name = stackblock();
out1str(name);
out1fmt(snlfmt, cmdp->rehash ? "*" : nullstr);
}
@@ -291,6 +290,7 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path)
int e;
int updatetbl;
struct builtincmd *bcmd;
+ int len;
/* If name contains a slash, don't use PATH or hash table */
if (strchr(name, '/') != NULL) {
@@ -362,8 +362,8 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path)
e = ENOENT;
idx = -1;
loop:
- while ((fullname = padvance(&path, name)...
2020 Mar 28
0
[klibc:update-dash] dash: exec: Stricter pathopt parsing
...ct, const char *path)
idx = -1;
loop:
while ((len = padvance(&path, name)) >= 0) {
+ const char *lpathopt = pathopt;
+
fullname = stackblock();
idx++;
- if (pathopt) {
- if (prefix(pathopt, "builtin")) {
+ if (lpathopt) {
+ if (*lpathopt == 'b') {
if (bcmd)
goto builtin_success;
continue;
- } else if (!(act & DO_NOFUNC) &&
- prefix(pathopt, "func")) {
+ } else if (!(act & DO_NOFUNC)) {
/* handled below */
} else {
/* ignore unimplemented options */
@@ -397,7 +443,7 @@ loop:
e = EACCES; /...