This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] More completion improvements
- To: Kevin Buettner <kevinb at cygnus dot com>
- Subject: Re: [RFA] More completion improvements
- From: Fernando Nasser <fnasser at redhat dot com>
- Date: Sun, 18 Feb 2001 12:53:33 -0500
- CC: Eli Zaretskii <eliz at is dot elta dot co dot il>, gdb-patches at sources dot redhat dot com
- Organization: Red Hat Canada
- References: <Pine.SUN.3.91.1010218092227.4804N-100000@is> <1010218164030.ZM21263@ocotillo.lan>
Kevin,
This style for the add_show_from_set() call is everywhere. As we need to
revise the creation of CLI commands anyway, this will not last long
enough for us to consider a major cleanup. It will just go away
naturally...
Regards,
Fernando
Kevin Buettner wrote:
>
> On Feb 18, 9:31am, Eli Zaretskii wrote:
>
> > * solib.c (_initialize_solib): Ditto for `solib-search-path' and
> > `solib-absolute-prefix'.
>
> Eli,
>
> Your solib.c changes are approved.
>
> I have a minor style criticism. I would prefer to see function calls
> with an embedded assignment expression written as a separate assignment
> statement followed by the function call. E.g, instead of writing...
>
> add_show_from_set
> (c = add_set_cmd ("solib-absolute-prefix", class_support, var_filename,
> (char *) &solib_absolute_prefix,
> "Set prefix for loading absolute shared library symbol files.\n\
> For other (relative) files, you can add values using `set solib-search-path'.",
> &setlist),
> &showlist);
>
> ...write this instead:
>
> c = add_set_cmd ("solib-absolute-prefix", class_support, var_filename,
> (char *) &solib_absolute_prefix,
> "Set prefix for loading absolute shared library symbol files.\n\
> For other (relative) files, you can add values using `set solib-search-path'.",
> &setlist);
> add_show_from_set (c, &showlist);
>
> The GNU coding standards do not explicitly address this case, but they
> do address a similar case regarding if-conditions. See:
>
> http://www.gnu.org/prep/standards_24.html#SEC24
>
> Kevin
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9