aboutsummaryrefslogtreecommitdiffhomepage
path: root/env.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-04-25 16:09:26 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-04-25 16:09:26 -0700
commita475dd15e65759f2d20822cd3b19b874575c7f5e (patch)
tree02c1a3ec93c4b77d2f017aae181314f773eecb9a /env.h
parentbb0b82a110075ee12ee8f75affb7ccd68d80540e (diff)
Migrate universal variables to env_var_t structure. Encapsulate
universal variable storage into a class for better testability.
Diffstat (limited to 'env.h')
-rw-r--r--env.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/env.h b/env.h
index 3525d465..7898a125 100644
--- a/env.h
+++ b/env.h
@@ -242,5 +242,18 @@ extern int g_fork_count;
extern bool g_use_posix_spawn;
+/**
+ A variable entry. Stores the value of a variable and whether it
+ should be exported.
+ */
+struct var_entry_t
+{
+ wcstring val; /**< The value of the variable */
+ bool exportv; /**< Whether the variable should be exported */
+
+ var_entry_t() : exportv(false) { }
+};
+
+typedef std::map<wcstring, var_entry_t> var_table_t;
#endif