This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: While on the subject of crufty code...


>>>>> "Hugo" == Hugo Tyson <hmt@redhat.com> writes:

Hugo> Yes it would [work].

Really? I always thought CPP did expansion immediately.... 
<sfx fiddling> Oh yeah, you're right. How strange.

Hugo>    #define GENERIC_FOO LOCAL_BAR

Hugo>    #define LOCAL_BAR "/dev/ser0"

Hugo>    ....  z = fopen( GENERIC_FOO, "r" ) ....

Hugo> I support simply bunging out the define in a define proc +) The
Hugo> GUI CT's display is not cluttered with these redundant extras -)
Hugo> Other CDL cannot refer (eg. requires) these generic values.

Hugo> If you need to refer to the value in CDL, make it calculated,
Hugo> referring to a local (platform-specifically-named) option -) The
Hugo> GUI CT's display is cluttered with these redundant extras, the
Hugo> CDL file is bigger, and so on +) Other CDL can refer
Hugo> (eg. require) the generic value.

I already used CDL, but I'll change that to define_procs when I get to
hack on it the next time. It's on my TODO list.

Thanks!
Jesper

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]