+2009-06-19 Samuel Bronson <naesten@gmail.com>
+
+ PR cli/9930:
+ * cli/cli-decode.c (apropos_cmd): Fix avoidance of double
+ printing.
+
2009-06-19 Jerome Guitton <guitton@adacore.com>
* breakpoint.c (expand_line_sal_maybe): When explicit_line,
struct re_pattern_buffer *regex, char *prefix)
{
struct cmd_list_element *c;
- int returnvalue=1; /*Needed to avoid double printing*/
+ int returnvalue;
/* Walk through the commands */
for (c=commandlist;c;c=c->next)
{
+ returnvalue = -1; /*Needed to avoid double printing*/
if (c->name != NULL)
{
/* Try to match against the name*/
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)