search for: padvanc

Displaying 5 results from an estimated 5 matches for "padvanc".

Did you mean: advanc
2020 Mar 28
0
[klibc:update-dash] dash: exec: Do not allocate stack string in padvance
...e48f19172d90268f524bf1a3788f7c023b24391 Author: Herbert Xu <herbert at gondor.apana.org.au> AuthorDate: Sat, 19 May 2018 02:39:48 +0800 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sat, 28 Mar 2020 21:42:55 +0000 [klibc] dash: exec: Do not allocate stack string in padvance [ dash commit 4f7527f8e49276894751a9b100e68bc46568bb85 ] Many callers of padvance immediately free the allocated string so this patch moves the stalloc call to the caller. Instead of returning the allocated string, padvance now returns the length to allocate (this may be longer than the actual...
2020 Mar 28
0
[klibc:update-dash] dash: exec: Stricter pathopt parsing
...rather than after it. In fact, a future version may remove support for pathopt suffixes. Wherever the pathopt is placed, an optional % may be placed after it to terminate the pathopt. This is so that it is less likely that a genuine directory containing a % sign is parsed as a pathopt. Users of padvance outside of exec.c have also been modified: 1) cd(1) will always treat % characters as part of the path. 2) chkmail will continue to accept arbitrary pathopt. 3) find_dot_file will ignore the %builtin pathopt instead of trying to do a stat in the accompanying directory (which is usually the curren...
2020 Mar 28
0
[klibc:update-dash] dash: memalloc: Add growstackto helper
...sr/dash/memalloc.c | 20 +++++++++----------- usr/dash/memalloc.h | 1 + usr/dash/parser.c | 4 +--- 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/usr/dash/exec.c b/usr/dash/exec.c index d7ced357..c98f14c0 100644 --- a/usr/dash/exec.c +++ b/usr/dash/exec.c @@ -195,9 +195,7 @@ padvance(const char **path, const char *name) start = *path; for (p = start ; *p && *p != ':' && *p != '%' ; p++); len = p - start + strlen(name) + 2; /* "2" is for '/' and '\0' */ - while (stackblocksize() < len) - growstackblock(); - q =...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add vfork support
...ash/exec.h index 2b318257..423b07e6 100644 --- a/usr/dash/exec.h +++ b/usr/dash/exec.h @@ -58,6 +58,8 @@ struct cmdentry { #define DO_ALTPATH 0x08 /* using alternate path */ #define DO_REGBLTIN 0x10 /* regular built-ins and functions only */ +union node; + extern const char *pathopt; /* set by padvance */ void shellexec(char **, const char *, int) diff --git a/usr/dash/jobs.c b/usr/dash/jobs.c index 9e7244e1..989907ed 100644 --- a/usr/dash/jobs.c +++ b/usr/dash/jobs.c @@ -53,6 +53,7 @@ #include <termios.h> #undef CEOF /* syntax.h redefines this */ #endif +#include "exec.h&quot...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add assignment built-in support again
...aths */ #define DO_NOFUNC 0x04 /* don't return shell functions, for command */ #define DO_ALTPATH 0x08 /* using alternate path */ -#define DO_ALTBLTIN 0x20 /* %builtin in alt. path */ +#define DO_REGBLTIN 0x10 /* regular built-ins and functions only */ extern const char *pathopt; /* set by padvance */ diff --git a/usr/dash/parser.c b/usr/dash/parser.c index 3de977c1..c4e63781 100644 --- a/usr/dash/parser.c +++ b/usr/dash/parser.c @@ -125,8 +125,7 @@ STATIC void synerror(const char *) __attribute__((__noreturn__)); STATIC void setprompt(int); -static inline int -isassignment(const char...