+ matches= 0;
+ do_set(cmdline, 0, cmdset, con);
+ if (matches == 1 &&
+ cmd_found)
+ {
+ int names;
+ con->dd_printf("Names of command:");
+ for (names= 0; names < cmd_found->names->count; names++)
+ con->dd_printf(" %s", (char*)(cmd_found->names->at(names)));
+ con->dd_printf("\n");
+ class cl_cmdset *subset= cmd_found->get_subcommands();
+ if (subset)
+ {
+ con->dd_printf("\"%s\" must be followed by the name of a "
+ "subcommand\nList of subcommands:\n",
+ (char*)(cmd_found->names->at(0)));
+ for (i= 0; i < subset->count; i++)
+ {
+ class cl_cmd *c=
+ dynamic_cast<class cl_cmd *>(subset->object_at(i));
+ con->dd_printf("%s\n", c->short_help);
+ }
+ }
+ if (cmd_found->long_help)
+ con->dd_printf("%s\n", cmd_found->long_help);
+ }
+ if (!matches ||
+ !cmd_found)
+ con->dd_printf("No such command.\n");
+ //return(DD_FALSE);
+ /*
+ int pari;
+ for (pari= 0; pari < cmdline->nuof_params(); pari++)
+ {
+ class cl_cmd_arg *act_param;
+ act_param= (class cl_cmd_arg *)(cmdline->param(pari));
+ for (i= 0; i < cmdset->count; i++)
+ {
+ class cl_cmd *c= (class cl_cmd *)(cmdset->at(i));
+ if (!c->name_match(act_param->s_value, DD_FALSE))
+ continue;
+ if (c->short_help)
+ con->dd_printf("%s\n", c->short_help);
+ else
+ con->dd_printf("%s\n", (char*)(c->names->at(0)));
+ if (pari < cmdline->nuof_params()-1)
+ continue;
+ cmdset= c->get_subcommands();
+ if (!cmdset)
+ return(DD_FALSE);
+ }
+ }
+ return(DD_FALSE);
+ */