diff options
author | John Denker <jsd@av8n.com> | 2012-07-19 14:56:22 -0700 |
---|---|---|
committer | John Denker <jsd@av8n.com> | 2012-07-29 15:32:33 -0700 |
commit | a356f2e89ba2bc25207f2d9605a1d6bcca15d6d7 (patch) | |
tree | 8c351a7dae90d847c6fffa9a3b33f88e2223b6b6 /tools/hi-test.c | |
parent | 8fe5ccdb4ee79b4d287b82e80004e1acc9ee4b94 (diff) |
log some interesting variables
Diffstat (limited to 'tools/hi-test.c')
-rw-r--r-- | tools/hi-test.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/hi-test.c b/tools/hi-test.c index 0c9a35f..47128a9 100644 --- a/tools/hi-test.c +++ b/tools/hi-test.c @@ -41,13 +41,22 @@ void exeunt(const int sts){ using namespace std; +string progname; + +void dump(const string var){ + char* str = getenv(var.c_str()); + cerr << progname << ": " << var; + if (str) cerr << " is set to '" << str << "'" << endl; + else cerr << " is not set." << endl; +} + int main(int _argc, const char** _argv){ int snooze(0); int status(0); int killmode(0); int argc(_argc); const char **argv(_argv); - string progname(*argv); argv++; argc--; + progname = *argv; argv++; argc--; while (argc) { string arg(*argv); argv++; argc--; |