Lines Matching defs:vc

31 #    include <sys/vc.h>
1738 VAR_CONTEXT *vc;
1742 for (vc = vcontext; vc; vc = vc->down)
1743 if (v = hash_lookup (name, vc->table))
1884 VAR_CONTEXT *vc;
1900 for (vc = shell_variables; vc; vc = vc->down)
1901 if (vc_isfuncenv (vc) && vc->scope == variable_context)
1904 if (vc == 0)
1909 else if (vc->table == 0)
1910 vc->table = hash_create (TEMPENV_HASH_BUCKETS);
1928 new_var = make_new_variable (name, vc->table);
1931 new_var = make_new_variable (name, vc->table);
1942 vc->flags |= VC_HASLOCAL;
2251 VAR_CONTEXT *vc;
2265 for (vc = shell_variables; vc; vc = vc->down)
2267 if (vc_isfuncenv (vc) || vc_isbltnenv (vc))
2269 v = hash_lookup (name, vc->table);
2271 return (bind_variable_internal (name, value, vc->table, 0, flags));
2686 makunbound (name, vc)
2688 VAR_CONTEXT *vc;
2695 for (elt = (BUCKET_CONTENTS *)NULL, v = vc; v; v = v->down)
2762 VAR_CONTEXT *vc;
2764 for (vc = shell_variables; vc; vc = vc->down)
2765 if (vc_isfuncenv (vc) && vc->scope == variable_context)
2767 if (vc == 0)
2770 if (vc->table && vc_haslocals (vc))
2772 delete_all_variables (vc->table);
2773 hash_dispose (vc->table);
2775 vc->table = (HASH_TABLE *)NULL;
2926 map_over (function, vc)
2928 VAR_CONTEXT *vc;
2935 for (nentries = 0, v = vc; v; v = v->down)
2943 for (v = vc; v; v = v->down)
3136 VAR_CONTEXT *vc;
3138 vc = shell_variables;
3139 for (vc = shell_variables; vc; vc = vc->down)
3140 if (vc_isfuncenv (vc) && vc->scope == variable_context)
3143 if (vc == 0)
3148 if (vc->table == 0 || HASH_ENTRIES (vc->table) == 0 || vc_haslocals (vc) == 0)
3151 vlist = vlist_alloc (HASH_ENTRIES (vc->table));
3153 flatten (vc->table, variable_in_context, vlist, 0);
3578 VAR_CONTEXT *vc;
3581 for (n = 0, vc = shell_variables; vc; vc = vc->down)
3582 n += HASH_ENTRIES (vc->table);
3718 VAR_CONTEXT *vc;
3720 vc = (VAR_CONTEXT *)xmalloc (sizeof (VAR_CONTEXT));
3721 vc->name = name ? savestring (name) : (char *)NULL;
3722 vc->scope = variable_context;
3723 vc->flags = flags;
3725 vc->up = vc->down = (VAR_CONTEXT *)NULL;
3726 vc->table = (HASH_TABLE *)NULL;
3728 return vc;
3734 dispose_var_context (vc)
3735 VAR_CONTEXT *vc;
3737 FREE (vc->name);
3739 if (vc->table)
3741 delete_all_variables (vc->table);
3742 hash_dispose (vc->table);
3745 free (vc);
3765 VAR_CONTEXT *vc;
3767 vc = new_var_context (name, flags);
3768 vc->table = tempvars;
3774 vc->flags |= VC_HASTMPVAR;
3776 vc->down = shell_variables;
3777 shell_variables->up = vc;
3779 return (shell_variables = vc);