2 Jul 2012 11:51
About variable name
yafo lee <yafo.lee <at> live.cn>
2012-07-02 09:51:48 GMT
2012-07-02 09:51:48 GMT
Hi guys,
I know there must be a variable of type "struct alx_adapter*" in a
function.
sometimes it is in the funcion's argument list such as:
int bar(struct alx_adapter *adpt) {
...
}
sometimes it is in the function's body:
int foo(int a{
...
struct alx_adapter *adpt= NULL;
...
}
I want to write a single rule to find the name of that pointer, and
using it, such as:
<at> <at>
statement S1;
statement S2;
<at> <at>
f(...) {
... when != S1
+ printf("%s: hello world\n", adpt->name);
S2
... when any
}
Is that possible? how to achieve that?
Thanks.
RSS Feed