From 811a36120aef848cd308d56e06bf62e721be853c Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Sat, 19 May 2018 02:39:55 +0800 Subject: eval: Replace with listsetvar with mklocal/setvareq 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 when necessary. In order to do this mklocal can now take a flag in order to mark a variable for export. Signed-off-by: Herbert Xu --- src/var.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/var.h') diff --git a/src/var.h b/src/var.h index 55fed1b..b2054f7 100644 --- a/src/var.h +++ b/src/var.h @@ -139,7 +139,6 @@ struct var *setvar(const char *name, const char *val, int flags); intmax_t setvarint(const char *, intmax_t, int); struct var *setvareq(char *s, int flags); struct strlist; -void listsetvar(struct strlist *, int); char *lookupvar(const char *); intmax_t lookupvarint(const char *); char **listvars(int, int, char ***); @@ -147,7 +146,7 @@ char **listvars(int, int, char ***); int showvars(const char *, int, int); int exportcmd(int, char **); int localcmd(int, char **); -void mklocal(char *); +void mklocal(char *name, int flags); struct localvar_list *pushlocalvars(void); void poplocalvars(int); void unwindlocalvars(struct localvar_list *stop); -- cgit 1.4.1