aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-01-19 13:21:55 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-01-19 13:32:12 -0800
commit6d619199416599206d03ee12dcb42d13b0e41e4c (patch)
tree734c3aa7a54fcd404ffce7424ebf9f801d074b68
parente07de09460a81fcf020ff989041ec2116992c02f (diff)
Rearrange some variables for possibly better alignment. int -> bool
-rw-r--r--builtin.cpp2
-rw-r--r--env.cpp8
-rw-r--r--env.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/builtin.cpp b/builtin.cpp
index 12c02d6b..d20dd27e 100644
--- a/builtin.cpp
+++ b/builtin.cpp
@@ -3619,7 +3619,7 @@ static int builtin_else(parser_t &parser, wchar_t **argv)
if_block->skip = ! run_else;
if_block->else_evaluated = true;
env_pop();
- env_push(0);
+ env_push(false);
}
/*
diff --git a/env.cpp b/env.cpp
index 2c0ceb3d..cced1c3d 100644
--- a/env.cpp
+++ b/env.cpp
@@ -91,8 +91,8 @@ extern char **__environ;
*/
struct var_entry_t
{
- bool exportv; /**< Whether the variable should be exported */
wcstring val; /**< The value of the variable */
+ bool exportv; /**< Whether the variable should be exported */
var_entry_t() : exportv(false) { }
};
@@ -118,7 +118,7 @@ struct env_node_t
invisible. If new_scope is set for the global variable node,
the universe will explode.
*/
- int new_scope;
+ bool new_scope;
/**
Does this node contain any variables which are exported to subshells
*/
@@ -130,7 +130,7 @@ struct env_node_t
struct env_node_t *next;
- env_node_t() : new_scope(0), exportv(false), next(NULL) { }
+ env_node_t() : new_scope(false), exportv(false), next(NULL) { }
};
class variable_entry_t
@@ -1244,7 +1244,7 @@ static int local_scope_exports(env_node_t *n)
return local_scope_exports(n->next);
}
-void env_push(int new_scope)
+void env_push(bool new_scope)
{
env_node_t *node = new env_node_t;
node->next = top;
diff --git a/env.h b/env.h
index e8d2fa04..e2110a92 100644
--- a/env.h
+++ b/env.h
@@ -167,7 +167,7 @@ int env_remove(const wcstring &key, int mode);
/**
Push the variable stack. Used for implementing local variables for functions and for-loops.
*/
-void env_push(int new_scope);
+void env_push(bool new_scope);
/**
Pop the variable stack. Used for implementing local variables for functions and for-loops.