From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Received: (qmail 3334 invoked from network); 19 Mar 2004 00:09:57 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 19 Mar 2004 00:09:57 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 601A42B9C; Thu, 18 Mar 2004 14:55:21 -0500 (EST) Message-ID: <4059FEA9.4030401@gnu.org> Date: Fri, 19 Mar 2004 00:09:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Jason Molenda Cc: gdb-patches@sources.redhat.com Subject: Re: RFC patch mi-cmds.c table format (pedantic) References: <6994FFF8-786D-11D8-9229-000393D457E2@apple.com> In-Reply-To: <6994FFF8-786D-11D8-9229-000393D457E2@apple.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03/txt/msg00440.txt.bz2 First, have a look at: http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=496 > Hi Andrew, in this change: > http://sources.redhat.com/ml/gdb-patches/2003-08/msg00052.html > > the mi-cmds table changed from this format: > > {"break-info", "info break %s", 0}, > {"break-insert", 0, 0, mi_cmd_break_insert}, > > to this format: > > { "break-info", { "info break", 1 }, NULL, NULL }, > { "break-insert", { NULL, 0 }, 0, mi_cmd_break_insert}, > > As you can see here, the use of 0 vs NULL is inconsistent, That's cos it was converted using an emacs macro. > and the spacing on the close parens on the last arg is inconsistent. > The implied initialization of 0 is also used in many places. > All of this is valid, but it could be a bit more consistent. > So instead of > > - { "break-insert", { NULL, 0 }, 0, mi_cmd_break_insert}, > + { "break-insert", { NULL, 0 }, NULL, mi_cmd_break_insert}, > > - { "exec-step", { NULL, 0 }, mi_cmd_exec_step}, > + { "exec-step", { NULL, 0 }, mi_cmd_exec_step, NULL}, > > - { NULL, } > + { NULL, { NULL, 0 }, NULL, NULL} ok, but perhaps don't bother with the trailing initializers. Should I ask what motived this? Andrew