public inbox for archer-commits@sourceware.org
help / color / mirror / Atom feed
* [SCM] archer-ratmice-compile-Wc++-compat: rename variables of type 'command_class' to cmd_class.
@ 2010-09-15 13:35 ratmice
0 siblings, 0 replies; only message in thread
From: ratmice @ 2010-09-15 13:35 UTC (permalink / raw)
To: archer-commits
The branch, archer-ratmice-compile-Wc++-compat has been updated
via c0f78e92a50f7ad5a049cbf1a9dcb6ccd138bc64 (commit)
from 584e049d4ac847fe6af33741ece6597b3d7b0e14 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit c0f78e92a50f7ad5a049cbf1a9dcb6ccd138bc64
Author: matt rice <ratmice@gmail.com>
Date: Wed Sep 15 06:28:00 2010 -0700
rename variables of type 'command_class' to cmd_class.
-----------------------------------------------------------------------
Summary of changes:
gdb/cli/cli-cmds.c | 4 +-
gdb/cli/cli-decode.c | 110 +++++++++++++++++++++++++-------------------------
gdb/cli/cli-decode.h | 2 +-
gdb/cli/cli-script.c | 10 ++--
gdb/command.h | 22 +++++-----
gdb/top.c | 2 +-
6 files changed, 75 insertions(+), 75 deletions(-)
First 500 lines of diff:
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index aa2a37f..406272b 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -1215,7 +1215,7 @@ show_user (char *args, int from_tty)
char *comname = args;
c = lookup_cmd (&comname, cmdlist, "", 0, 1);
- if (c->class != class_user)
+ if (c->cmd_class != class_user)
error (_("Not a user command."));
show_user_1 (c, "", args, gdb_stdout);
}
@@ -1223,7 +1223,7 @@ show_user (char *args, int from_tty)
{
for (c = cmdlist; c; c = c->next)
{
- if (c->class == class_user || c->prefixlist != NULL)
+ if (c->cmd_class == class_user || c->prefixlist != NULL)
show_user_1 (c, "", c->name, gdb_stdout);
}
}
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 374bd19..0088363 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -145,7 +145,7 @@ set_cmd_completer (struct cmd_list_element *cmd,
of *LIST). */
struct cmd_list_element *
-add_cmd (char *name, enum command_class class, void (*fun) (char *, int),
+add_cmd (char *name, enum command_class cmd_class, void (*fun) (char *, int),
char *doc, struct cmd_list_element **list)
{
struct cmd_list_element *c
@@ -184,7 +184,7 @@ add_cmd (char *name, enum command_class class, void (*fun) (char *, int),
}
c->name = name;
- c->class = class;
+ c->cmd_class = cmd_class;
set_cmd_cfunc (c, fun);
set_cmd_context (c, NULL);
c->doc = doc;
@@ -233,7 +233,7 @@ deprecate_cmd (struct cmd_list_element *cmd, char *replacement)
}
struct cmd_list_element *
-add_alias_cmd (char *name, char *oldname, enum command_class class,
+add_alias_cmd (char *name, char *oldname, enum command_class cmd_class,
int abbrev_flag, struct cmd_list_element **list)
{
/* Must do this since lookup_cmd tries to side-effect its first arg */
@@ -258,7 +258,7 @@ add_alias_cmd (char *name, char *oldname, enum command_class class,
return 0;
}
- c = add_cmd (name, class, NULL, old->doc, list);
+ c = add_cmd (name, cmd_class, NULL, old->doc, list);
/* NOTE: Both FUNC and all the FUNCTIONs need to be copied. */
c->func = old->func;
c->function = old->function;
@@ -278,12 +278,12 @@ add_alias_cmd (char *name, char *oldname, enum command_class class,
of the variable containing that list. */
struct cmd_list_element *
-add_prefix_cmd (char *name, enum command_class class, void (*fun) (char *, int),
+add_prefix_cmd (char *name, enum command_class cmd_class, void (*fun) (char *, int),
char *doc, struct cmd_list_element **prefixlist,
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, cmd_class, fun, doc, list);
c->prefixlist = prefixlist;
c->prefixname = prefixname;
@@ -294,12 +294,12 @@ add_prefix_cmd (char *name, enum command_class class, void (*fun) (char *, int),
/* Like add_prefix_cmd but sets the abbrev_flag on the new command. */
struct cmd_list_element *
-add_abbrev_prefix_cmd (char *name, enum command_class class,
+add_abbrev_prefix_cmd (char *name, enum command_class cmd_class,
void (*fun) (char *, int), char *doc,
struct cmd_list_element **prefixlist, 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, cmd_class, fun, doc, list);
c->prefixlist = prefixlist;
c->prefixname = prefixname;
@@ -333,13 +333,13 @@ empty_sfunc (char *args, int from_tty, struct cmd_list_element *c)
static struct cmd_list_element *
add_set_or_show_cmd (char *name,
enum cmd_types type,
- enum command_class class,
+ enum command_class cmd_class,
var_types var_type,
void *var,
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, cmd_class, NULL, doc, list);
gdb_assert (type == set_cmd || type == show_cmd);
c->type = type;
@@ -362,7 +362,7 @@ add_set_or_show_cmd (char *name,
static void
add_setshow_cmd_full (char *name,
- enum command_class class,
+ enum command_class cmd_class,
var_types var_type, void *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@@ -388,11 +388,11 @@ add_setshow_cmd_full (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, cmd_class, var_type, var,
full_set_doc, set_list);
if (set_func != NULL)
set_cmd_sfunc (set, set_func);
- show = add_set_or_show_cmd (name, show_cmd, class, var_type, var,
+ show = add_set_or_show_cmd (name, show_cmd, cmd_class, var_type, var,
full_show_doc, show_list);
show->show_value_func = show_func;
@@ -409,7 +409,7 @@ add_setshow_cmd_full (char *name,
void
add_setshow_enum_cmd (char *name,
- enum command_class class,
+ enum command_class cmd_class,
const char *enumlist[],
const char **var,
const char *set_doc,
@@ -422,7 +422,7 @@ add_setshow_enum_cmd (char *name,
{
struct cmd_list_element *c;
- add_setshow_cmd_full (name, class, var_enum, var,
+ add_setshow_cmd_full (name, cmd_class, var_enum, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@@ -436,7 +436,7 @@ add_setshow_enum_cmd (char *name,
string. FUNC is the corresponding callback. */
void
add_setshow_auto_boolean_cmd (char *name,
- enum command_class class,
+ enum command_class cmd_class,
enum auto_boolean *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@@ -448,7 +448,7 @@ add_setshow_auto_boolean_cmd (char *name,
static const char *auto_boolean_enums[] = { "on", "off", "auto", NULL };
struct cmd_list_element *c;
- add_setshow_cmd_full (name, class, var_auto_boolean, var,
+ add_setshow_cmd_full (name, cmd_class, var_auto_boolean, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@@ -461,7 +461,7 @@ add_setshow_auto_boolean_cmd (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 (char *name, enum command_class class, int *var,
+add_setshow_boolean_cmd (char *name, enum command_class cmd_class, int *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
cmd_sfunc_ftype *set_func,
@@ -472,7 +472,7 @@ add_setshow_boolean_cmd (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, cmd_class, var_boolean, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@@ -483,7 +483,7 @@ add_setshow_boolean_cmd (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 (char *name, enum command_class class,
+add_setshow_filename_cmd (char *name, enum command_class cmd_class,
char **var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@@ -494,7 +494,7 @@ add_setshow_filename_cmd (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, cmd_class, var_filename, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@@ -505,7 +505,7 @@ add_setshow_filename_cmd (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 (char *name, enum command_class class,
+add_setshow_string_cmd (char *name, enum command_class cmd_class,
char **var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@@ -514,7 +514,7 @@ add_setshow_string_cmd (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, cmd_class, var_string, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@@ -524,7 +524,7 @@ add_setshow_string_cmd (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_noescape_cmd (char *name, enum command_class class,
+add_setshow_string_noescape_cmd (char *name, enum command_class cmd_class,
char **var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@@ -533,7 +533,7 @@ add_setshow_string_noescape_cmd (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_noescape, var,
+ add_setshow_cmd_full (name, cmd_class, var_string_noescape, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@@ -543,7 +543,7 @@ add_setshow_string_noescape_cmd (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 (char *name, enum command_class class,
+add_setshow_optional_filename_cmd (char *name, enum command_class cmd_class,
char **var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@@ -554,7 +554,7 @@ add_setshow_optional_filename_cmd (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, cmd_class, var_optional_filename, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@@ -569,7 +569,7 @@ add_setshow_optional_filename_cmd (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_integer_cmd (char *name, enum command_class class,
+add_setshow_integer_cmd (char *name, enum command_class cmd_class,
int *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@@ -578,7 +578,7 @@ add_setshow_integer_cmd (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_integer, var,
+ add_setshow_cmd_full (name, cmd_class, var_integer, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@@ -590,7 +590,7 @@ add_setshow_integer_cmd (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 (char *name, enum command_class class,
+add_setshow_uinteger_cmd (char *name, enum command_class cmd_class,
unsigned int *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@@ -599,7 +599,7 @@ add_setshow_uinteger_cmd (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_uinteger, var,
+ add_setshow_cmd_full (name, cmd_class, var_uinteger, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@@ -611,7 +611,7 @@ add_setshow_uinteger_cmd (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 (char *name, enum command_class class,
+add_setshow_zinteger_cmd (char *name, enum command_class cmd_class,
int *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@@ -620,7 +620,7 @@ add_setshow_zinteger_cmd (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, cmd_class, var_zinteger, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@@ -632,7 +632,7 @@ add_setshow_zinteger_cmd (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_zuinteger_cmd (char *name, enum command_class class,
+add_setshow_zuinteger_cmd (char *name, enum command_class cmd_class,
unsigned int *var,
const char *set_doc, const char *show_doc,
const char *help_doc,
@@ -641,7 +641,7 @@ add_setshow_zuinteger_cmd (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, cmd_class, var_zuinteger, var,
set_doc, show_doc, help_doc,
set_func, show_func,
set_list, show_list,
@@ -740,19 +740,19 @@ add_info_alias (char *name, char *oldname, int abbrev_flag)
/* Add an element to the list of commands. */
struct cmd_list_element *
-add_com (char *name, enum command_class class, void (*fun) (char *, int),
+add_com (char *name, enum command_class cmd_class, void (*fun) (char *, int),
char *doc)
{
- return add_cmd (name, class, fun, doc, &cmdlist);
+ return add_cmd (name, cmd_class, fun, doc, &cmdlist);
}
/* Add an alias or abbreviation command to the list of commands. */
struct cmd_list_element *
-add_com_alias (char *name, char *oldname, enum command_class class,
+add_com_alias (char *name, char *oldname, enum command_class cmd_class,
int abbrev_flag)
{
- return add_alias_cmd (name, oldname, class, abbrev_flag, &cmdlist);
+ return add_alias_cmd (name, oldname, cmd_class, abbrev_flag, &cmdlist);
}
\f
/* Recursively walk the commandlist structures, and print out the
@@ -846,7 +846,7 @@ help_cmd (char *command, struct ui_file *stream)
documentation and return.
If c->func is NULL, we have a class name. Print its
- documentation (as if it were a command) and then set class to the
+ documentation (as if it were a command) and then set cmd_class to the
number of this class so that the commands in the class will be
listed. */
@@ -863,7 +863,7 @@ help_cmd (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->cmd_class, stream);
if (c->hook_pre || c->hook_post)
fprintf_filtered (stream,
@@ -884,16 +884,16 @@ help_cmd (char *command, struct ui_file *stream)
*
* LIST is the list.
* CMDTYPE is the prefix to use in the title string.
- * CLASS is the class with which to list the nodes of this list (see
+ * CMD_CLASS is the command class with which to list the nodes of this list (see
* documentation for help_cmd_list below), As usual, ALL_COMMANDS for
* everything, ALL_CLASSES for just classes, and non-negative for only things
* in a specific class.
* and STREAM is the output stream on which to print things.
- * If you call this routine with a class >= 0, it recurses.
+ * If you call this routine with a cmd_class >= 0, it recurses.
*/
void
help_list (struct cmd_list_element *list, char *cmdtype,
- enum command_class class, struct ui_file *stream)
+ enum command_class cmd_class, struct ui_file *stream)
{
int len;
char *cmdtype1, *cmdtype2;
@@ -913,14 +913,14 @@ help_list (struct cmd_list_element *list, char *cmdtype,
strcpy (cmdtype2 + len - 1, " sub");
}
- if (class == all_classes)
+ if (cmd_class == 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, cmd_class, cmdtype, (int) cmd_class >= 0, stream);
- if (class == all_classes)
+ if (cmd_class == all_classes)
{
fprintf_filtered (stream, "\n\
Type \"help%s\" followed by a class name for a list of commands in ",
@@ -962,7 +962,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->cmd_class, "", 1, stream);
}
}
@@ -975,7 +975,7 @@ help_all (struct ui_file *stream)
if (c->abbrev_flag)
continue;
- if (c->class == no_class)
+ if (c->cmd_class == no_class)
{
if (!seen_unclassified)
{
@@ -1055,7 +1055,7 @@ print_help_for_command (struct cmd_list_element *c, char *prefix, int recurse,
* 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 cmd_class,
char *prefix, int recurse, struct ui_file *stream)
{
struct cmd_list_element *c;
@@ -1063,16 +1063,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)))
+ && (cmd_class == all_commands
+ || (cmd_class == all_classes && c->func == NULL)
+ || (cmd_class == c->cmd_class && c->func != NULL)))
{
print_help_for_command (c, prefix, recurse, stream);
}
else if (c->abbrev_flag == 0 && recurse
- && class == class_user && c->prefixlist != NULL)
+ && cmd_class == class_user && c->prefixlist != NULL)
/* User-defined commands may be subcommands. */
- help_cmd_list (*c->prefixlist, class, c->prefixname, recurse, stream);
+ help_cmd_list (*c->prefixlist, cmd_class, c->prefixname, recurse, stream);
}
}
\f
diff --git a/gdb/cli/cli-decode.h b/gdb/cli/cli-decode.h
index 2764d41..41d6d74 100644
--- a/gdb/cli/cli-decode.h
+++ b/gdb/cli/cli-decode.h
@@ -58,7 +58,7 @@ struct cmd_list_element
char *name;
/* Command class; class values are chosen by application program. */
- enum command_class class;
+ enum command_class cmd_class;
/* Function definition of this command. NULL for command class
names and for help topics that are not really commands. NOTE:
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index fbea81c..90fbc20 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -1440,7 +1440,7 @@ define_command (char *comname, int from_tty)
{
int q;
- if (c->class == class_user || c->class == class_alias)
+ if (c->cmd_class == class_user || c->cmd_class == class_alias)
q = query (_("Redefine command \"%s\"? "), c->name);
else
q = query (_("Really redefine built-in command \"%s\"? "), c->name);
@@ -1490,11 +1490,11 @@ define_command (char *comname, int from_tty)
sprintf (tmpbuf, "Type commands for definition of \"%s\".", comfull);
cmds = read_command_lines (tmpbuf, from_tty, 1, 0, 0);
- if (c && c->class == class_user)
+ if (c && c->cmd_class == class_user)
free_command_lines (&c->user_commands);
newc = add_cmd (comname, class_user, user_defined_command,
- (c && c->class == class_user)
+ (c && c->cmd_class == class_user)
? c->doc : xstrdup ("User-defined."), list);
newc->user_commands = cmds;
@@ -1533,7 +1533,7 @@ document_command (char *comname, int from_tty)
tem = comname;
hooks/post-receive
--
Repository for Project Archer.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-09-15 13:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-15 13:35 [SCM] archer-ratmice-compile-Wc++-compat: rename variables of type 'command_class' to cmd_class ratmice
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).