search for: stnput

Displaying 4 results from an estimated 4 matches for "stnput".

Did you mean: sinput
2020 Mar 28
0
[klibc:update-dash] dash: expand: Fix double-decrement in argstr
...d-off-by: Ben Hutchings <ben at decadent.org.uk> --- usr/dash/expand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/dash/expand.c b/usr/dash/expand.c index 20362cef..562a4869 100644 --- a/usr/dash/expand.c +++ b/usr/dash/expand.c @@ -285,7 +285,7 @@ start: q = stnputs(p, length, expdest); q[-1] &= end - 1; expdest = q - (flag & EXP_WORD ? end : 0); - newloc = expdest - (char *)stackblock() - end; + newloc = q - (char *)stackblock() - end; if (breakall && !inquotes && newloc > startloc) { recordregion(startloc, new...
2020 Mar 28
0
[klibc:update-dash] dash: memalloc: Add growstackto helper
...6c..b348d9cc 100644 --- a/usr/dash/memalloc.h +++ b/usr/dash/memalloc.h @@ -57,6 +57,7 @@ void setstackmark(struct stackmark *); void popstackmark(struct stackmark *); void growstackblock(void); void *growstackstr(void); +char *growstackto(size_t len); char *makestrspace(size_t, char *); char *stnputs(const char *, size_t, char *); char *stputs(const char *, char *); diff --git a/usr/dash/parser.c b/usr/dash/parser.c index 809c6a8a..3de977c1 100644 --- a/usr/dash/parser.c +++ b/usr/dash/parser.c @@ -1460,9 +1460,7 @@ done: /* Ignore any pushed back tokens left from the backquote parsing. */...
2020 Mar 28
0
[klibc:update-dash] dash: expand: Do not reprocess data when expanding words
...== '\0' || + * c == CTLENDARI || c == CTLENDVAR + */ length++; + /* c == '\0' || c == CTLENDARI || c == CTLENDVAR */ + end = !!((c - 1) & 0x80); } - if (length > 0) { + if (length > 0 && !(flag & EXP_DISCARD)) { int newloc; - expdest = stnputs(p, length, expdest); - newloc = expdest - (char *)stackblock(); + char *q; + + q = stnputs(p, length, expdest); + q[-1] &= end - 1; + expdest = q - (flag & EXP_WORD ? end : 0); + newloc = expdest - (char *)stackblock() - end; if (breakall && !inquotes && new...
2007 Aug 23
0
[git patch] klibc dash 0.5.4 update
...nt. Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au> Signed-off-by: maximilian attems <max at stro.at> diff --git a/usr/dash/memalloc.h b/usr/dash/memalloc.h index 1691d13..8a41e64 100644 --- a/usr/dash/memalloc.h +++ b/usr/dash/memalloc.h @@ -64,7 +64,7 @@ char *stnputs(const char *, size_t, char *); char *stputs(const char *, char *); -static inline char *_STPUTC(char c, char *p) { +static inline char *_STPUTC(int c, char *p) { if (p == sstrend) p = growstackstr(); *p++ = c;