[Dctrl-tools-devel] [SCM] Debian control file query tools branch, master, updated. 2.18-19-gcb69847

Antti-Juhani Kaijanaho ajk at debian.org
Wed Oct 19 18:11:50 UTC 2011


The following commit has been merged in the master branch:
commit cb69847d307ccf15ef7505129d602046ffe487a8
Author: Antti-Juhani Kaijanaho <ajk at debian.org>
Date:   Wed Oct 19 21:11:43 2011 +0300

    Clean up some cruft
    
    Signed-off-by: Antti-Juhani Kaijanaho <ajk at debian.org>

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 at jidanni.org>.
+  * grep-dctrl/grep-dctrl.c: Clean up some dead code.
 
- -- Antti-Juhani Kaijanaho <ajk at debian.org>  Thu, 28 Jul 2011 19:10:42 +0300
+ -- Antti-Juhani Kaijanaho <ajk at 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);

-- 
Debian control file query tools



More information about the Dctrl-tools-devel mailing list