Date: Wed, 17 Sep 2008 09:50:19 GMT From: Marko Zec <zec@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 149930 for review Message-ID: <200809170950.m8H9oJjZ059890@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=149930 Change 149930 by zec@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200809170950.m8H9oJjZ059890>