- 论坛徽章:
- 0
|
>1、你想干什么?大家都在猜,现在还不知道猜对没猜对
>2、想知道错误产生的原因?请读新手导航
Sorry about that. I can not keyin any chinese characters in my machine,
but can paste/cut the existing chinese characters.
(黑哥)'s comments reminded me of sed-version dependency. In fact, I tested all commands
in MKS (MK tools in windows). So I re-tested them in Linux. they work in Linux, but not
working what I expect. Below let me talk more in detais:
supposed we have a valid C file [named test.c],
void
foo(int a, int b) {
//impl. skipped
}
void bigfunction() {
int x1, x2, y1, y2, z1, z2;
// after many lines
bar(); foo (x1, x2);
// after many lines
foo(y1,
y2) ;
// after many lines
foo(
z1,
z2
);
baz();
}
Now, let us create a command that populates the output as follows:
---------------
foo (x1, x2);
foo(y1,
y2) ;
foo(
z1,
z2
);
---------------
Note that don't print out the function implementation of foo,
Only print out the function calls of foo !
Hope this helps.
Thank you all ! |
|