From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13830 invoked by alias); 5 Feb 2010 22:52:40 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 13818 invoked by uid 22791); 5 Feb 2010 22:52:39 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <4B6CA130.5070307@redhat.com> Date: Fri, 05 Feb 2010 22:52:00 -0000 From: Chris Moller User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Thunderbird/3.0b2 MIME-Version: 1.0 To: archer@sourceware.org Subject: Re: PR 11067 References: <4B68A35E.2050301@redhat.com> <4B68DC25.1090808@redhat.com> <4B69F028.9070006@redhat.com> <20100203224239.04338AA@magilla.sf.frob.com> <20100203231408.GA6397@caradoc.them.org> <20100203232506.B073AAA@magilla.sf.frob.com> <20100203232819.GK9493@caradoc.them.org> <4B6A07E0.6020306@redhat.com> <4B6B041A.4030307@redhat.com> <4B6B6659.4020805@redhat.com> <20100205201844.28539815D@magilla.sf.frob.com> In-Reply-To: <20100205201844.28539815D@magilla.sf.frob.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2010-q1/txt/msg00071.txt.bz2 No matter what format I use, someone won't like it, so how about this: I'll add a new "set" option, "set enum-fmt" or something like that that can take a printf-style format string. Default format if the string isn't set is current behaviour, otherwise the string is parsed, looking for %-directives, %v for the numeric value of the enum, %s for the symbolic value, and %e for the enum decl. My spaceless format, e.g., would be set with a format of set enum-fmt "%s=(enum %e)%d" If Roland wants spaces, he can use set enum-fmt "%s = (enum %e) %d" or whatever. I've never been a big fan of breaking historical behaviour, and this avoids that. It's a bigger patch, but I think it's a better one. cm On 02/05/10 15:18, Roland McGrath wrote: >> Based on what people were saying yesterday, I thought I'd go with >> >> $1 = Val1=(enum E)56 >> >> It looks like a legitimate C expression. Lacking spaces, it's cohesive, >> and it's easily understood to present the same information in multiple >> formats. >> > > Please don't skimp on the spaces. >