diff options
author | Antti-Juhani Kaijanaho <ajk@debian.org> | 2011-10-19 21:11:43 +0300 |
---|---|---|
committer | Antti-Juhani Kaijanaho <ajk@debian.org> | 2011-10-19 21:11:43 +0300 |
commit | cb69847d307ccf15ef7505129d602046ffe487a8 (patch) | |
tree | eedb6aa3bc4f2a9cd3a65e6e7f49a246e834c8ef | |
parent | 290113a850da8e2efd075e0ea747e2f13dcfcadb (diff) | |
download | dctrl-tools-cb69847d307ccf15ef7505129d602046ffe487a8.tar.gz |
Clean up some cruft
Signed-off-by: Antti-Juhani Kaijanaho <ajk@debian.org>
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | grep-dctrl/grep-dctrl.c | 27 |
2 files changed, 2 insertions, 28 deletions
diff --git a/debian/changelog b/debian/changelog index badc005..d566927 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,8 +18,9 @@ dctrl-tools (2.19) UNRELEASED; urgency=low field names in output, instead of the command line spelling. Closes: #209134 (keyword case shouldn't be influenced by -s) Reported by Dan Jacobson <jidanni@jidanni.org>. + * grep-dctrl/grep-dctrl.c: Clean up some dead code. - -- Antti-Juhani Kaijanaho <ajk@debian.org> Thu, 28 Jul 2011 19:10:42 +0300 + -- Antti-Juhani Kaijanaho <ajk@debian.org> Wed, 19 Oct 2011 21:09:47 +0300 dctrl-tools (2.18ubuntu1) oneiric; urgency=low diff --git a/grep-dctrl/grep-dctrl.c b/grep-dctrl/grep-dctrl.c index a80ca30..f549e24 100644 --- a/grep-dctrl/grep-dctrl.c +++ b/grep-dctrl/grep-dctrl.c @@ -163,8 +163,6 @@ static int debug_optparse = 0; struct arguments { /* Parser state flag: last token seen was ')' */ bool just_seen_cparen; - /* Top of the parser stack. */ - size_t top; /* Number of file names seen. */ size_t num_fnames; /**/ @@ -271,30 +269,6 @@ static void finish_atom(struct arguments * args) args->num_search_fields = 0; } -#if 0 -/* Pop off one stack state, inserting the associated instructions to - * the predicate program. If paren is true, current state must be - * STATE_PAREN, and if paren is false, it must not be STATE_PAREN. */ -static void leave(struct arguments * args, int paren) -{ - debug_message("leaving...", 0); - assert(paren == (args->state == STATE_PAREN)); - if (args->state == STATE_ATOM) finish_atom(args); - assert(args->top > 0); - --args->top; - for (struct insn_node * it = args->stack[args->top].insns_first; - it != 0;) { - addinsn(&args->p, it->insn); - struct insn_node * next = it->next; - free(it); - it = next; - } - args->stack[args->top].insns_first = 0; - args->stack[args->top].insns_last = 0; - args->state = args->stack[args->top].state; -} -#endif - #define APPTOK(tok) do { apptok(args, (tok)); } while (0) static void apptok(struct arguments * args, const int tok) @@ -624,7 +598,6 @@ static void dump_args(struct arguments * args) { size_t i; assert(args->finished); - assert(args->top == 0); printf("num_atoms = %zi\n", args->p.num_atoms); for (i = 0; i < args->p.num_atoms; i++) { printf("atoms[%zi].field_name = %s\n", i, args->p.atoms[i].field_name); |