Re: [PATCH] Add extern of output_command to utils.h

Hui Zhu
2013-01-06T07:33:43Z

On Sun, Jan 6, 2013 at 2:50 PM, Joel Brobecker <brobecker@adacore.com> wrote:
>> 2013-01-05 Hui Zhu <hui_zhu@mentor.com>
>>
>> * tracepoint.c: Remove extern of function output_command.
>> * valprint.h.h (output_command): New extern.
>
> If I may, can we try to provide the names of the arguments
> in function declarations?
>
>> --- a/valprint.h
>> +++ b/valprint.h
>> @@ -205,4 +205,6 @@ extern void generic_printstr (struct ui_
>> int quote_char, int c_style_terminator,
>> const struct value_print_options *options);
>>
>> +extern void output_command (char *, int);
>> +
>
> Thanks,
> --
> Joel

OK. I post a new version according to your comments.

Thanks,
Hui

2013-01-05 Hui Zhu <hui_zhu@mentor.com>

* printcmd.c: Remove define of function output_command.
* tracepoint.c: Remove extern of function output_command.
* valprint.h.h (output_command): New extern.

--- a/printcmd.c
+++ b/printcmd.c
@@ -172,8 +172,6 @@ static int display_number;

/* Prototypes for exported functions. */

-void output_command (char *, int);
-
void _initialize_printcmd (void);

/* Prototypes for local functions. */
--- a/tracepoint.c
+++ b/tracepoint.c
@@ -93,11 +93,6 @@ extern void (*deprecated_readline_begin_
extern char *(*deprecated_readline_hook) (char *);
extern void (*deprecated_readline_end_hook) (void);

-/* GDB commands implemented in other modules:
- */
-
-extern void output_command (char *, int);
-
/*
Tracepoint.c:

--- a/valprint.h
+++ b/valprint.h
@@ -205,4 +205,6 @@ extern void generic_printstr (struct ui_
int quote_char, int c_style_terminator,
const struct value_print_options *options);

+extern void output_command (char *exp, int from_tty);
+
#endif