Re: m4 question
Chris Pickett <[email protected]> Thu, 17 Feb 2005 03:09:34 -0500
| Newsgroups | gmane.comp.java.vm.sablevm.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I checked in the following code. Note that I reversed the order of the
parameters so that the first parameter is the attribute name, as for the
other macros. Jennifer you might want to check you have the same thing
-- I think what I originally wrote for you is wrong.
Chris
/*
----------------------------------------------------------------------
m4svm_parse_attribute_elseifexternal
----------------------------------------------------------------------
*/
/* usage: specify the attribute name as the first parameter and the
package name as the second parameter.
*/
void
m4_dnl ()
{
if (dummy)
m4svm_define_begin = ":], [:m4svm_parse_attribute_elseifexternal:])";
else if (strcmp (name, "$2.$1") == 0)
{
/* m4svm_comment_define([:m4svm_parse_attribute_1:],
* [:[:m4svm_parse_attribute($:][:1):][::]m4_dnl:]) */
m4svm_parse_attribute_1 = dummy;
}
m4svm_define_end = ":])";
}
Etienne Gagnon wrote:
> Hi David and Chris,
>
> Any chance to see some of these apparently clean solutions added into
> staging?
>
> Thanks.
>
> Etienne
>
> Chris Pickett wrote:
>
>> David Bélanger wrote:
>>
>>> Patch adds 2nd (optionnal) argument for textual comparison.
>>> First arg used for function names etc. as before.
>>
>>
>> I didn't try your patch, but I showed Jennifer a way to do with an
>> extra m4svm_parse_attribute_elseifexternal macro that passes $1 and $2
>> to the strcmp, where $1 would be ca.mcgill.sable and the $2 would be
>> the name of the attribute class, so that you'd get $1.$2 in your
>> strcmp. I was already using something similar in my sandbox, you just
>> happened to respond before me.
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> SableVM-devel mailing list
> [email protected]
> http://sablevm.org/lists/control/listinfo/sablevm-devel