PERFORCE change 149930 for review
Marko Zec
zec at FreeBSD.org
Wed Sep 17 09:50:21 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=149930
Change 149930 by zec at zec_tpx32 on 2008/09/17 09:49:59
Back out command list sorting hacks in DDB.
Affected files ...
.. //depot/projects/vimage/src/sys/ddb/db_command.c#7 edit
Differences ...
==== //depot/projects/vimage/src/sys/ddb/db_command.c#7 (text+ko) ====
@@ -311,39 +311,16 @@
return (result);
}
-/*
- * Print out a sorted command table.
- */
static void
db_cmd_list(table)
struct command_table *table;
{
register struct command *cmd;
- char *last;
- char *next = "";
- do {
- last = next;
- LIST_FOREACH(cmd, table, next) {
- if (strcmp(cmd->name, last) > 0 &&
- (last == next || strcmp(cmd->name, next) < 0))
- next = cmd->name;
- }
- if (table->aux_tablep != NULL) {
- for (aux_cmdp = table->aux_tablep;
- aux_cmdp < table->aux_tablep_end; aux_cmdp++) {
- cmd = *aux_cmdp;
- if (strcmp(cmd->name, last) > 0 &&
- (last == next ||
- strcmp(cmd->name, next) < 0))
- next = cmd->name;
- }
- }
- if (next != last) {
- db_printf("%-12s", next);
- db_end_line(12);
- }
- } while (next != last);
+ LIST_FOREACH(cmd, table, next) {
+ db_printf("%-12s", cmd->name);
+ db_end_line(12);
+ }
}
static void
More information about the p4-projects
mailing list