From: Chris Moller <cmoller@redhat.com>
To: archer@sourceware.org
Subject: Re: PR 11067
Date: Fri, 05 Feb 2010 22:52:00 -0000 [thread overview]
Message-ID: <4B6CA130.5070307@redhat.com> (raw)
In-Reply-To: <20100205201844.28539815D@magilla.sf.frob.com>
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.
>
next prev parent reply other threads:[~2010-02-05 22:52 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-02 22:12 patch for pr9067 Chris Moller
2010-02-02 23:28 ` Tom Tromey
2010-02-03 2:25 ` Chris Moller
2010-02-03 20:04 ` Tom Tromey
[not found] ` <m3bpg7yznc.fsf@fleche.redhat.com>
[not found] ` <4B68DC25.1090808@redhat.com>
[not found] ` <m3fx5irwx6.fsf@fleche.redhat.com>
2010-02-03 21:52 ` PR 11067 Chris Moller
2010-02-03 22:43 ` Roland McGrath
2010-02-03 22:48 ` Tom Tromey
2010-02-03 23:14 ` Daniel Jacobowitz
2010-02-03 23:25 ` Roland McGrath
2010-02-03 23:30 ` Daniel Jacobowitz
2010-02-03 23:34 ` Chris Moller
2010-02-04 1:32 ` Tom Tromey
2010-02-04 17:30 ` Chris Moller
2010-02-04 23:53 ` Tom Tromey
2010-02-05 0:29 ` Chris Moller
2010-02-05 20:19 ` Roland McGrath
2010-02-05 22:52 ` Chris Moller [this message]
2010-02-03 23:21 ` Chris Moller
2010-02-03 22:47 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B6CA130.5070307@redhat.com \
--to=cmoller@redhat.com \
--cc=archer@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).