From owner-p4-projects@FreeBSD.ORG Wed Sep 17 09:50:20 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C1B661065678; Wed, 17 Sep 2008 09:50:20 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85D7D1065673 for ; Wed, 17 Sep 2008 09:50:20 +0000 (UTC) (envelope-from zec@tel.fer.hr) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 759608FC0C for ; Wed, 17 Sep 2008 09:50:20 +0000 (UTC) (envelope-from zec@tel.fer.hr) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m8H9oKY3059978 for ; Wed, 17 Sep 2008 09:50:20 GMT (envelope-from zec@tel.fer.hr) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m8H9oJjZ059890 for perforce@freebsd.org; Wed, 17 Sep 2008 09:50:19 GMT (envelope-from zec@tel.fer.hr) Date: Wed, 17 Sep 2008 09:50:19 GMT Message-Id: <200809170950.m8H9oJjZ059890@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@tel.fer.hr using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 149930 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Sep 2008 09:50:21 -0000 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