|

楼主 |
发表于 2006-11-7 14:22:51
|
显示全部楼层
我是在《Unix环境高级编程》第99页看到的(能不能正确运行,我没试过)
typedef int Myfunc(const char *,const struct star *,int);
static Myfunc myfunc;
...
int main(int argc,char *argv[])
{
...
ret = myftw(argv[1],myfunc);
...
}
...
static int myftw(char *pathname,Myfunc *func)
{
...
}
...
static int myfunc(const char *pathname,const struct stat *statptr,int type)
{
...
} |
|