Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] * cli/cli-decode.c (apropos_cmd): Fix avoidance of double printing.
@ 2009-06-17  3:31 Samuel Bronson
  2009-06-17  3:31 ` [PATCH 2/2] * cli/cli-decode.c (apropos_cmd): Skip traversing abbreviations for prefix commands to avoid duplicates in the output Samuel Bronson
  2009-06-17 17:26 ` [PATCH 1/2] * cli/cli-decode.c (apropos_cmd): Fix avoidance of double printing Tom Tromey
  0 siblings, 2 replies; 8+ messages in thread
From: Samuel Bronson @ 2009-06-17  3:31 UTC (permalink / raw)
  To: gdb-patches; +Cc: Samuel Bronson

Signed-off-by: Samuel Bronson <naesten@gmail.com>
---
 gdb/cli/cli-decode.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 4ebf6dc..e2647fc 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -766,7 +766,7 @@ apropos_cmd (struct ui_file *stream, struct cmd_list_element *commandlist,
 			 struct re_pattern_buffer *regex, char *prefix)
 {
   struct cmd_list_element *c;
-  int returnvalue=1; /*Needed to avoid double printing*/
+  int returnvalue=-1; /*Needed to avoid double printing*/
   /* Walk through the commands */
   for (c=commandlist;c;c=c->next)
     {
@@ -780,7 +780,7 @@ apropos_cmd (struct ui_file *stream, struct cmd_list_element *commandlist,
 				      0 /* don't recurse */, stream);
 	    }
 	}
-      if (c->doc != NULL && returnvalue != 0)
+      if (c->doc != NULL && returnvalue < 0)
 	{
 	  /* Try to match against documentation */
 	  if (re_search(regex,c->doc,strlen(c->doc),0,strlen(c->doc),NULL) >=0)
-- 
1.6.3.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-06-18 17:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-17  3:31 [PATCH 1/2] * cli/cli-decode.c (apropos_cmd): Fix avoidance of double printing Samuel Bronson
2009-06-17  3:31 ` [PATCH 2/2] * cli/cli-decode.c (apropos_cmd): Skip traversing abbreviations for prefix commands to avoid duplicates in the output Samuel Bronson
2009-06-17 17:27   ` Tom Tromey
2009-06-17 17:26 ` [PATCH 1/2] * cli/cli-decode.c (apropos_cmd): Fix avoidance of double printing Tom Tromey
2009-06-17 20:15   ` Samuel Bronson
2009-06-17 22:22   ` [PATCH 1/2] Fix for PR gdb/9903 (part 1) Samuel Bronson
2009-06-17 22:23     ` [PATCH 2/2] Fix for PR gdb/9903 (part 2) Samuel Bronson
2009-06-18 17:59     ` [PATCH 1/2] Fix for PR gdb/9903 (part 1) Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox