From e919b16d78c5d98bf824060cca6e55d08376e151 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Sat, 2 Jun 2012 23:09:17 -0300 Subject: [PATCH] b2/boom.c (main): run queries also if no variables are set --- b2/boom.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/b2/boom.c b/b2/boom.c index 1f81871..2cd6df4 100644 --- a/b2/boom.c +++ b/b2/boom.c @@ -132,6 +132,7 @@ static void usage(const char *name) int main(int argc, char **argv) { void (*process)(const char *name) = parse_hierarchy; + int query = 0; int i; dollar = unique("$"); @@ -170,13 +171,15 @@ int main(int argc, char **argv) process = parse_symbols; } else if (!strcmp(argv[i], "-q")) { process = add_var; + query = 1; } else if (!strcmp(argv[i], "-Q")) { process = add_var; + query = 1; select_parts = 1; } else usage(*argv); } - if (vars) + if (query) do_substitutions(); return 0; }