ctags 可以可靠地给你一个功能名称列表,例如
$ cat test.c
#include <stdio.h>
void foo(void)
{
printf ("Hello World!\n");
}
int main(int argc, char *argv[])
{
foo();
return 0;
}
$ ctags -x --c-types=f test.c
foo function 3 test.c void foo(void)
main function 8 test.c int main(int argc, char *argv[])
Run Code Online (Sandbox Code Playgroud)
这有助于您入门吗?