p = p->prefix;
}
- /* Don't trigger any observer notification if prefixlist is not
+ /* Don't trigger any observer notification if subcommands is not
setlist. */
i--;
- if (cmds[i]->prefixlist != &setlist)
+ if (cmds[i]->subcommands != &setlist)
{
xfree (cmds);
xfree (name);
versions of code to print the value out. */
if (uiout->is_mi_like_p ())
- uiout->field_string ("value", val.c_str ());
+ uiout->field_string ("value", val);
else
{
if (c->show_value_func != NULL)
/* If we find a prefix, run its list, prefixing our output by its
prefix (with "show " skipped). */
- if (list->prefixlist && list->cmd_pointer == nullptr)
+ if (list->is_prefix () && !list->is_alias ())
{
ui_out_emit_tuple optionlist_emitter (uiout, "optionlist");
std::string prefixname = list->prefixname ();
if (uiout->is_mi_like_p ())
uiout->field_string ("prefix", new_prefix);
- cmd_show_list (*list->prefixlist, from_tty);
+ cmd_show_list (*list->subcommands, from_tty);
}
- else if (list->theclass != no_set_class && list->cmd_pointer == nullptr)
+ else if (list->theclass != no_set_class && !list->is_alias ())
{
ui_out_emit_tuple option_emitter (uiout, "option");
{
/* If we find a prefix, output it (with "show " skipped). */
std::string prefixname = list->prefix->prefixname ();
- prefixname = (list->prefix->prefixlist == nullptr ? ""
+ prefixname = (!list->prefix->is_prefix () ? ""
: strstr (prefixname.c_str (), "show ") + 5);
- uiout->text (prefixname.c_str ());
+ uiout->text (prefixname);
}
uiout->field_string ("name", list->name);
uiout->text (": ");