C++ keyword cleanliness, mostly auto-generated

This patch renames symbols that happen to have names which are
reserved keywords in C++.

Most of this was generated with Tromey's cxx-conversion.el script.
Some places where later hand massaged a bit, to fix formatting, etc.
And this was rebased several times meanwhile, along with re-running
the script, so re-running the script from scratch probably does not
result in the exact same output.  I don't think that matters anyway.

gdb/
2015-02-27  Tom Tromey  <tromey@redhat.com>
	    Pedro Alves  <palves@redhat.com>

	Rename symbols whose names are reserved C++ keywords throughout.

gdb/gdbserver/
2015-02-27  Tom Tromey  <tromey@redhat.com>
	    Pedro Alves  <palves@redhat.com>

	Rename symbols whose names are reserved C++ keywords throughout.
This commit is contained in:
Pedro Alves 2015-02-27 16:33:07 +00:00
parent 3bc3d82a00
commit fe978cb071
99 changed files with 1140 additions and 1127 deletions

View file

@ -189,7 +189,7 @@ set_cmd_completer_handle_brkchars (struct cmd_list_element *cmd,
of *LIST). */
struct cmd_list_element *
add_cmd (const char *name, enum command_class class, cmd_cfunc_ftype *fun,
add_cmd (const char *name, enum command_class theclass, cmd_cfunc_ftype *fun,
const char *doc, struct cmd_list_element **list)
{
struct cmd_list_element *c
@ -228,7 +228,7 @@ add_cmd (const char *name, enum command_class class, cmd_cfunc_ftype *fun,
}
c->name = name;
c->class = class;
c->theclass = theclass;
set_cmd_cfunc (c, fun);
set_cmd_context (c, NULL);
c->doc = doc;
@ -283,7 +283,7 @@ deprecate_cmd (struct cmd_list_element *cmd, const char *replacement)
}
struct cmd_list_element *
add_alias_cmd (const char *name, const char *oldname, enum command_class class,
add_alias_cmd (const char *name, const char *oldname, enum command_class theclass,
int abbrev_flag, struct cmd_list_element **list)
{
const char *tmp;
@ -306,7 +306,7 @@ add_alias_cmd (const char *name, const char *oldname, enum command_class class,
return 0;
}
c = add_cmd (name, class, NULL, old->doc, list);
c = add_cmd (name, theclass, NULL, old->doc, list);
/* If OLD->DOC can be freed, we should make another copy. */
if (old->doc_allocated)
@ -335,13 +335,13 @@ add_alias_cmd (const char *name, const char *oldname, enum command_class class,
containing that list. */
struct cmd_list_element *
add_prefix_cmd (const char *name, enum command_class class,
add_prefix_cmd (const char *name, enum command_class theclass,
cmd_cfunc_ftype *fun,
const char *doc, struct cmd_list_element **prefixlist,
const char *prefixname, int allow_unknown,
struct cmd_list_element **list)
{
struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
struct cmd_list_element *c = add_cmd (name, theclass, fun, doc, list);
struct cmd_list_element *p;
c->prefixlist = prefixlist;
@ -363,13 +363,13 @@ add_prefix_cmd (const char *name, enum command_class class,
/* Like add_prefix_cmd but sets the abbrev_flag on the new command. */
struct cmd_list_element *
add_abbrev_prefix_cmd (const char *name, enum command_class class,
add_abbrev_prefix_cmd (const char *name, enum command_class theclass,
cmd_cfunc_ftype *fun, const char *doc,
struct cmd_list_element **prefixlist,
const char *prefixname,
int allow_unknown, struct cmd_list_element **list)
{
struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
struct cmd_list_element *c = add_cmd (name, theclass, fun, doc, list);
c->prefixlist = prefixlist;
c->prefixname = prefixname;
@ -403,13 +403,13 @@ empty_sfunc (char *args, int from_tty, struct cmd_list_element *c)
static struct cmd_list_element *
add_set_or_show_cmd (const char *name,
enum cmd_types type,
enum command_class class,
enum command_class theclass,
var_types var_type,
void *var,
const char *doc,
struct cmd_list_element **list)
{
struct cmd_list_element *c = add_cmd (name, class, NULL, doc, list);
struct cmd_list_element *c = add_cmd (name, theclass, NULL, doc, list);
gdb_assert (type == set_cmd || type == show_cmd);
c->type = type;
@ -432,7 +432,7 @@ add_set_or_show_cmd (const char *name,
static void
add_setshow_cmd_full (const char *name,
enum command_class class,
enum command_class theclass,
var_types var_type, void *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@ -458,7 +458,7 @@ add_setshow_cmd_full (const char *name,
full_set_doc = xstrdup (set_doc);
full_show_doc = xstrdup (show_doc);
}
set = add_set_or_show_cmd (name, set_cmd, class, var_type, var,
set = add_set_or_show_cmd (name, set_cmd, theclass, var_type, var,
full_set_doc, set_list);
set->doc_allocated = 1;
@ -467,7 +467,7 @@ add_setshow_cmd_full (const char *name,
set_cmd_prefix (set, set_list);
show = add_set_or_show_cmd (name, show_cmd, class, var_type, var,
show = add_set_or_show_cmd (name, show_cmd, theclass, var_type, var,
full_show_doc, show_list);
show->doc_allocated = 1;
show->show_value_func = show_func;
@ -485,7 +485,7 @@ add_setshow_cmd_full (const char *name,
void
add_setshow_enum_cmd (const char *name,
enum command_class class,
enum command_class theclass,
const char *const *enumlist,
const char **var,
const char *set_doc,
@ -498,7 +498,7 @@ add_setshow_enum_cmd (const char *name,
{
struct cmd_list_element *c;
add_setshow_cmd_full (name, class, var_enum, var,
add_setshow_cmd_full (name, theclass, var_enum, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@ -514,7 +514,7 @@ const char * const auto_boolean_enums[] = { "on", "off", "auto", NULL };
string. FUNC is the corresponding callback. */
void
add_setshow_auto_boolean_cmd (const char *name,
enum command_class class,
enum command_class theclass,
enum auto_boolean *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@ -525,7 +525,7 @@ add_setshow_auto_boolean_cmd (const char *name,
{
struct cmd_list_element *c;
add_setshow_cmd_full (name, class, var_auto_boolean, var,
add_setshow_cmd_full (name, theclass, var_auto_boolean, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@ -538,7 +538,7 @@ add_setshow_auto_boolean_cmd (const char *name,
add_cmd. VAR is address of the variable which will contain the
value. SET_DOC and SHOW_DOC are the documentation strings. */
void
add_setshow_boolean_cmd (const char *name, enum command_class class, int *var,
add_setshow_boolean_cmd (const char *name, enum command_class theclass, int *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
cmd_sfunc_ftype *set_func,
@ -549,7 +549,7 @@ add_setshow_boolean_cmd (const char *name, enum command_class class, int *var,
static const char *boolean_enums[] = { "on", "off", NULL };
struct cmd_list_element *c;
add_setshow_cmd_full (name, class, var_boolean, var,
add_setshow_cmd_full (name, theclass, var_boolean, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@ -560,7 +560,7 @@ add_setshow_boolean_cmd (const char *name, enum command_class class, int *var,
/* Add element named NAME to both the set and show command LISTs (the
list for set/show or some sublist thereof). */
void
add_setshow_filename_cmd (const char *name, enum command_class class,
add_setshow_filename_cmd (const char *name, enum command_class theclass,
char **var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@ -571,7 +571,7 @@ add_setshow_filename_cmd (const char *name, enum command_class class,
{
struct cmd_list_element *set_result;
add_setshow_cmd_full (name, class, var_filename, var,
add_setshow_cmd_full (name, theclass, var_filename, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@ -582,7 +582,7 @@ add_setshow_filename_cmd (const char *name, enum command_class class,
/* Add element named NAME to both the set and show command LISTs (the
list for set/show or some sublist thereof). */
void
add_setshow_string_cmd (const char *name, enum command_class class,
add_setshow_string_cmd (const char *name, enum command_class theclass,
char **var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@ -591,7 +591,7 @@ add_setshow_string_cmd (const char *name, enum command_class class,
struct cmd_list_element **set_list,
struct cmd_list_element **show_list)
{
add_setshow_cmd_full (name, class, var_string, var,
add_setshow_cmd_full (name, theclass, var_string, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@ -601,7 +601,7 @@ add_setshow_string_cmd (const char *name, enum command_class class,
/* Add element named NAME to both the set and show command LISTs (the
list for set/show or some sublist thereof). */
struct cmd_list_element *
add_setshow_string_noescape_cmd (const char *name, enum command_class class,
add_setshow_string_noescape_cmd (const char *name, enum command_class theclass,
char **var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@ -612,7 +612,7 @@ add_setshow_string_noescape_cmd (const char *name, enum command_class class,
{
struct cmd_list_element *set_cmd;
add_setshow_cmd_full (name, class, var_string_noescape, var,
add_setshow_cmd_full (name, theclass, var_string_noescape, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@ -623,7 +623,7 @@ add_setshow_string_noescape_cmd (const char *name, enum command_class class,
/* Add element named NAME to both the set and show command LISTs (the
list for set/show or some sublist thereof). */
void
add_setshow_optional_filename_cmd (const char *name, enum command_class class,
add_setshow_optional_filename_cmd (const char *name, enum command_class theclass,
char **var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@ -634,7 +634,7 @@ add_setshow_optional_filename_cmd (const char *name, enum command_class class,
{
struct cmd_list_element *set_result;
add_setshow_cmd_full (name, class, var_optional_filename, var,
add_setshow_cmd_full (name, theclass, var_optional_filename, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@ -666,7 +666,7 @@ integer_unlimited_completer (struct cmd_list_element *ignore,
value. SET_DOC and SHOW_DOC are the documentation strings. This
function is only used in Python API. Please don't use it elsewhere. */
void
add_setshow_integer_cmd (const char *name, enum command_class class,
add_setshow_integer_cmd (const char *name, enum command_class theclass,
int *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@ -677,7 +677,7 @@ add_setshow_integer_cmd (const char *name, enum command_class class,
{
struct cmd_list_element *set;
add_setshow_cmd_full (name, class, var_integer, var,
add_setshow_cmd_full (name, theclass, var_integer, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@ -691,7 +691,7 @@ add_setshow_integer_cmd (const char *name, enum command_class class,
add_cmd. VAR is address of the variable which will contain the
value. SET_DOC and SHOW_DOC are the documentation strings. */
void
add_setshow_uinteger_cmd (const char *name, enum command_class class,
add_setshow_uinteger_cmd (const char *name, enum command_class theclass,
unsigned int *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@ -702,7 +702,7 @@ add_setshow_uinteger_cmd (const char *name, enum command_class class,
{
struct cmd_list_element *set;
add_setshow_cmd_full (name, class, var_uinteger, var,
add_setshow_cmd_full (name, theclass, var_uinteger, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@ -716,7 +716,7 @@ add_setshow_uinteger_cmd (const char *name, enum command_class class,
add_cmd. VAR is address of the variable which will contain the
value. SET_DOC and SHOW_DOC are the documentation strings. */
void
add_setshow_zinteger_cmd (const char *name, enum command_class class,
add_setshow_zinteger_cmd (const char *name, enum command_class theclass,
int *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@ -725,7 +725,7 @@ add_setshow_zinteger_cmd (const char *name, enum command_class class,
struct cmd_list_element **set_list,
struct cmd_list_element **show_list)
{
add_setshow_cmd_full (name, class, var_zinteger, var,
add_setshow_cmd_full (name, theclass, var_zinteger, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@ -734,7 +734,7 @@ add_setshow_zinteger_cmd (const char *name, enum command_class class,
void
add_setshow_zuinteger_unlimited_cmd (const char *name,
enum command_class class,
enum command_class theclass,
int *var,
const char *set_doc,
const char *show_doc,
@ -746,7 +746,7 @@ add_setshow_zuinteger_unlimited_cmd (const char *name,
{
struct cmd_list_element *set;
add_setshow_cmd_full (name, class, var_zuinteger_unlimited, var,
add_setshow_cmd_full (name, theclass, var_zuinteger_unlimited, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@ -760,7 +760,7 @@ add_setshow_zuinteger_unlimited_cmd (const char *name,
add_cmd. VAR is address of the variable which will contain the
value. SET_DOC and SHOW_DOC are the documentation strings. */
void
add_setshow_zuinteger_cmd (const char *name, enum command_class class,
add_setshow_zuinteger_cmd (const char *name, enum command_class theclass,
unsigned int *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@ -769,7 +769,7 @@ add_setshow_zuinteger_cmd (const char *name, enum command_class class,
struct cmd_list_element **set_list,
struct cmd_list_element **show_list)
{
add_setshow_cmd_full (name, class, var_zuinteger, var,
add_setshow_cmd_full (name, theclass, var_zuinteger, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@ -870,19 +870,19 @@ add_info_alias (const char *name, const char *oldname, int abbrev_flag)
/* Add an element to the list of commands. */
struct cmd_list_element *
add_com (const char *name, enum command_class class, cmd_cfunc_ftype *fun,
add_com (const char *name, enum command_class theclass, cmd_cfunc_ftype *fun,
const char *doc)
{
return add_cmd (name, class, fun, doc, &cmdlist);
return add_cmd (name, theclass, fun, doc, &cmdlist);
}
/* Add an alias or abbreviation command to the list of commands. */
struct cmd_list_element *
add_com_alias (const char *name, const char *oldname, enum command_class class,
add_com_alias (const char *name, const char *oldname, enum command_class theclass,
int abbrev_flag)
{
return add_alias_cmd (name, oldname, class, abbrev_flag, &cmdlist);
return add_alias_cmd (name, oldname, theclass, abbrev_flag, &cmdlist);
}
/* Recursively walk the commandlist structures, and print out the
@ -991,7 +991,7 @@ help_cmd (const char *command, struct ui_file *stream)
/* If this is a class name, print all of the commands in the class. */
if (c->func == NULL)
help_list (cmdlist, "", c->class, stream);
help_list (cmdlist, "", c->theclass, stream);
if (c->hook_pre || c->hook_post)
fprintf_filtered (stream,
@ -1021,7 +1021,7 @@ help_cmd (const char *command, struct ui_file *stream)
*/
void
help_list (struct cmd_list_element *list, const char *cmdtype,
enum command_class class, struct ui_file *stream)
enum command_class theclass, struct ui_file *stream)
{
int len;
char *cmdtype1, *cmdtype2;
@ -1042,14 +1042,14 @@ help_list (struct cmd_list_element *list, const char *cmdtype,
strcpy (cmdtype2 + len - 1, " sub");
}
if (class == all_classes)
if (theclass == all_classes)
fprintf_filtered (stream, "List of classes of %scommands:\n\n", cmdtype2);
else
fprintf_filtered (stream, "List of %scommands:\n\n", cmdtype2);
help_cmd_list (list, class, cmdtype, (int) class >= 0, stream);
help_cmd_list (list, theclass, cmdtype, (int) theclass >= 0, stream);
if (class == all_classes)
if (theclass == all_classes)
{
fprintf_filtered (stream, "\n\
Type \"help%s\" followed by a class name for a list of commands in ",
@ -1091,7 +1091,7 @@ help_all (struct ui_file *stream)
if (c->func == NULL)
{
fprintf_filtered (stream, "\nCommand class: %s\n\n", c->name);
help_cmd_list (cmdlist, c->class, "", 1, stream);
help_cmd_list (cmdlist, c->theclass, "", 1, stream);
}
}
@ -1104,7 +1104,7 @@ help_all (struct ui_file *stream)
if (c->abbrev_flag)
continue;
if (c->class == no_class)
if (c->theclass == no_class)
{
if (!seen_unclassified)
{
@ -1187,7 +1187,7 @@ print_help_for_command (struct cmd_list_element *c, const char *prefix,
* is at the low level, not the high-level).
*/
void
help_cmd_list (struct cmd_list_element *list, enum command_class class,
help_cmd_list (struct cmd_list_element *list, enum command_class theclass,
const char *prefix, int recurse, struct ui_file *stream)
{
struct cmd_list_element *c;
@ -1195,16 +1195,16 @@ help_cmd_list (struct cmd_list_element *list, enum command_class class,
for (c = list; c; c = c->next)
{
if (c->abbrev_flag == 0
&& (class == all_commands
|| (class == all_classes && c->func == NULL)
|| (class == c->class && c->func != NULL)))
&& (theclass == all_commands
|| (theclass == all_classes && c->func == NULL)
|| (theclass == c->theclass && c->func != NULL)))
{
print_help_for_command (c, prefix, recurse, stream);
}
else if (c->abbrev_flag == 0 && recurse
&& class == class_user && c->prefixlist != NULL)
&& theclass == class_user && c->prefixlist != NULL)
/* User-defined commands may be subcommands. */
help_cmd_list (*c->prefixlist, class, c->prefixname,
help_cmd_list (*c->prefixlist, theclass, c->prefixname,
recurse, stream);
}
}
@ -1898,6 +1898,6 @@ cmd_func (struct cmd_list_element *cmd, char *args, int from_tty)
int
cli_user_command_p (struct cmd_list_element *cmd)
{
return (cmd->class == class_user
return (cmd->theclass == class_user
&& (cmd->func == do_cfunc || cmd->func == do_sfunc));
}