diff options
author | Ori Bernstein <ori@eigenstate.org> | 2012-06-20 01:06:30 -0400 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2012-06-20 01:06:30 -0400 |
commit | 96f5d2d5bc1b212d843f8b8aa41ec6ed7c3382b7 (patch) | |
tree | 3beb08bc54a40d38916fa3c0e191016459a26f60 /util | |
parent | 3535b00498a9812b689a8fee281b73d426b92aff (diff) | |
download | mc-96f5d2d5bc1b212d843f8b8aa41ec6ed7c3382b7.tar.gz |
Start to cut down and specialize debug dumps.
They grew to the point of uselessness. Dump them.
Diffstat (limited to 'util')
-rw-r--r-- | util/muse.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/util/muse.c b/util/muse.c index 8437859..6262410 100644 --- a/util/muse.c +++ b/util/muse.c @@ -15,6 +15,7 @@ Node *file; char *outfile; int debug; +char debugopt[128]; char **incpaths; size_t nincpaths; @@ -37,14 +38,16 @@ int main(int argc, char **argv) FILE *tmp; FILE *f; - while ((opt = getopt(argc, argv, "dho:")) != -1) { + while ((opt = getopt(argc, argv, "d::ho:I:")) != -1) { switch (opt) { case 'o': outfile = optarg; break; case 'h': case 'd': - debug++; + debug = 1; + while (optarg && *optarg) + debugopt[*optarg++ & 0x7f] = 1; break; case 'I': lappend(&incpaths, &nincpaths, optarg); @@ -67,7 +70,7 @@ int main(int argc, char **argv) infer(file); /* before we do anything to the parse */ - if (debug) { + if (debugopt['p']) { /* test storing tree to file */ tmp = fopen("a.pkl", "w"); pickle(file, tmp); |