Displaying 4 results from an estimated 4 matches for "grabstackstr".
2020 Mar 28
0
[klibc:update-dash] dash: expand: Do not reprocess data when expanding words
...@@ expandarg(union node *arg, struct arglist *arglist, int flag)
argbackq = arg->narg.backquote;
STARTSTACKSTR(expdest);
argstr(arg->narg.text, flag);
- p = _STPUTC('\0', expdest);
- expdest = p - 1;
if (arglist == NULL) {
/* here document expanded */
goto out;
}
- p = grabstackstr(p);
+ p = grabstackstr(expdest);
exparg.lastp = &exparg.list;
/*
* TODO - EXP_REDIR
@@ -232,8 +230,7 @@ out:
* $@ like $* since no splitting will be performed.
*/
-STATIC void
-argstr(char *p, int flag)
+static char *argstr(char *p, int flag)
{
static const char spclchars[] = {...
2019 Jan 25
0
[klibc:update-dash] builtin: Fix handling of trailing IFS white spaces
...uding trailing '\0'
*/
static void
-readcmd_handle_line(char *s, char **ap)
+readcmd_handle_line(char *s, int ac, char **ap)
{
struct arglist arglist;
struct strlist *sl;
- char *backup;
- char *line;
- /* ifsbreakup will fiddle with stack region... */
- line = stackblock();
s = grabstackstr(s);
- /* need a copy, so that delimiters aren't lost
- * in case there are more fields than variables */
- backup = sstrdup(line);
-
arglist.lastp = &arglist.list;
- ifsbreakup(s, &arglist);
+ ifsbreakup(s, ac, &arglist);
*arglist.lastp = NULL;
ifsfree();
@@ -105,21 +98...
2020 Mar 28
0
[klibc:update-dash] dash: builtin: Fix handling of trailing IFS white spaces
...uding trailing '\0'
*/
static void
-readcmd_handle_line(char *s, char **ap)
+readcmd_handle_line(char *s, int ac, char **ap)
{
struct arglist arglist;
struct strlist *sl;
- char *backup;
- char *line;
- /* ifsbreakup will fiddle with stack region... */
- line = stackblock();
s = grabstackstr(s);
- /* need a copy, so that delimiters aren't lost
- * in case there are more fields than variables */
- backup = sstrdup(line);
-
arglist.lastp = &arglist.list;
- ifsbreakup(s, &arglist);
+ ifsbreakup(s, ac, &arglist);
*arglist.lastp = NULL;
ifsfree();
@@ -105,21 +98...
2007 Aug 23
0
[git patch] klibc dash 0.5.4 update
...maximilian attems <max at stro.at>
diff --git a/usr/dash/eval.c b/usr/dash/eval.c
index 44ba850..23b9608 100644
--- a/usr/dash/eval.c
+++ b/usr/dash/eval.c
@@ -150,10 +150,9 @@ evalcmd(int argc, char **argv)
STPUTC('\0', concat);
p = grabstackstr(concat);
}
- evalstring(p, ~SKIPEVAL);
-
+ return evalstring(p, ~SKIPEVAL);
}
- return exitstatus;
+ return 0;
}
@@ -166,24 +165,23 @@ evalstring(char *s, int mask)
{
union node *n;
struct stackmark smark;
- int skip;
+...