search for: setvareq

Displaying 8 results from an estimated 8 matches for "setvareq".

Did you mean: setvar
2020 Mar 28
0
[klibc:update-dash] dash: eval: Replace with listsetvar with mklocal/setvareq
...e61bc7e49b8863901ef0bf85483af5861f Author: Herbert Xu <herbert at gondor.apana.org.au> AuthorDate: Sat, 19 May 2018 02:39:55 +0800 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sat, 28 Mar 2020 21:42:55 +0000 [klibc] dash: eval: Replace with listsetvar with mklocal/setvareq [ dash commit 811a36120aef848cd308d56e06bf62e721be853c ] This patch replaces listsetvar with mklocal/setvareq. As we now determine special built-in status prior to variable assignment, we no longer have to do a second pass listsetvar. Instead we will call setvareq directly instead of mklocal wh...
2019 Jan 25
0
[klibc:update-dash] [VAR] Use setvareq to set OPTIND initially
...p=libs/klibc/klibc.git;a=commit;h=c70ab0138910d5351ca0386e0220e4e0944c439d Author: Herbert Xu <herbert at gondor.apana.org.au> AuthorDate: Tue, 7 Oct 2014 22:24:42 +0800 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Fri, 25 Jan 2019 02:57:21 +0000 [klibc] [VAR] Use setvareq to set OPTIND initially There is no need to setvarint to set the initial value of OPTIND of one. This patch switchs to setvareq which also lets us avoid an unnecessary memory allocation. Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au> Signed-off-by: Ben Hutchings <ben at deca...
2020 Mar 28
0
[klibc:update-dash] dash: [VAR] Use setvareq to set OPTIND initially
.../klibc/klibc.git;a=commit;h=2a6d1412a44d0a9caf1e70dd74e6cd549fa47373 Author: Herbert Xu <herbert at gondor.apana.org.au> AuthorDate: Tue, 7 Oct 2014 22:24:42 +0800 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sat, 28 Mar 2020 21:42:54 +0000 [klibc] dash: [VAR] Use setvareq to set OPTIND initially [ dash commit f20dcdd0948d7ebb7d462a0288ea218468ad4f6c ] There is no need to setvarint to set the initial value of OPTIND of one. This patch switchs to setvareq which also lets us avoid an unnecessary memory allocation. Signed-off-by: Herbert Xu <herbert at gondor.apa...
2020 Mar 28
0
[klibc:update-dash] dash: var: Set IFS to fixed value at start time
...STRFIXED|VTEXTFIXED|VUNSET, "IFS\0", 0 }, -#endif { 0, VSTRFIXED|VTEXTFIXED|VUNSET, "MAIL\0", changemail }, { 0, VSTRFIXED|VTEXTFIXED|VUNSET, "MAILPATH\0", changemail }, { 0, VSTRFIXED|VTEXTFIXED, defpathvar, changepath }, @@ -143,6 +135,7 @@ INIT { } } + setvareq(defifsvar, VTEXTFIXED); setvareq(defoptindvar, VTEXTFIXED); fmtstr(ppid + 5, sizeof(ppid) - 5, "%ld", (long) getppid()); diff --git a/usr/dash/var.h b/usr/dash/var.h index 11ce9b7d..52f559d1 100644 --- a/usr/dash/var.h +++ b/usr/dash/var.h @@ -100,12 +100,8 @@ extern struct var vari...
2019 Jan 25
0
[klibc:update-dash] [VAR] Initialise OPTIND after importing environment
...changed, 2 insertions(+) diff --git a/usr/dash/var.c b/usr/dash/var.c index c35e925e..fa248544 100644 --- a/usr/dash/var.c +++ b/usr/dash/var.c @@ -142,6 +142,8 @@ INIT { } } + setvarint("OPTIND", 1, 0); + fmtstr(ppid + 5, sizeof(ppid) - 5, "%ld", (long) getppid()); setvareq(ppid, VTEXTFIXED);
2020 Mar 28
0
[klibc:update-dash] dash: [VAR] Initialise OPTIND after importing environment
...changed, 2 insertions(+) diff --git a/usr/dash/var.c b/usr/dash/var.c index c35e925e..fa248544 100644 --- a/usr/dash/var.c +++ b/usr/dash/var.c @@ -142,6 +142,8 @@ INIT { } } + setvarint("OPTIND", 1, 0); + fmtstr(ppid + 5, sizeof(ppid) - 5, "%ld", (long) getppid()); setvareq(ppid, VTEXTFIXED);
2012 Jul 02
0
[klibc:master] [VAR] Sanitise environment variable names on entry
...dash/var.c b/usr/dash/var.c index 027beff..dc90249 100644 --- a/usr/dash/var.c +++ b/usr/dash/var.c @@ -136,7 +136,8 @@ INIT { initvar(); for (envp = environ ; *envp ; envp++) { - if (strchr(*envp, '=')) { + p = endofname(*envp); + if (p != *envp && *p == '=') { setvareq(*envp, VEXPORT|VTEXTFIXED); } }
2011 Jun 14
0
klibc 1.5.23 release
...ijk (2): [klibc] [EVAL] Let funcnode refer to a function definition, not its first command [klibc] [SHELL] Improve LINENO support Herbert Xu (22): [klibc] [VAR] Add localvars nesting [klibc] [VAR] Fix poplocalvar leak [klibc] [VAR] Move unsetvar functionality into setvareq [klibc] [VAR] Replace cmdenviron with localvars [klibc] [VAR] Fix poplocalvar on abnormal exit from function [klibc] [VAR] Do not poplocalvars prematurely on regular utilities [klibc] [REDIR] Move null redirect checks into caller [klibc] [REDIR] Fix popredir on abnorma...