This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: PR 11067
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.