BBS水木清华站∶精华区
发信人: althea (痛并快乐着), 信区: Linux
标 题: 如何找到一些结构的细节(ctags+vim的使用方法)
发信站: BBS 水木清华站 (Mon Apr 3 17:47:48 2000)
【 在 ghxiang (henry) 的大作中提到: 】
∶ 偶初涉linux下编程,要设置一些结构参数,(例如fpos_t),但
∶ 偶不知这些结构中包含谢什么成员变量?该如何找到该细节,请
∶ 指教!
∶ 授人以鱼,不如授之以渔!
^^^^^^^^^^^^^^^^^^^^^^
//nod
try this with vim:
cd /usr/include
ctags -R
vi -t fpos_t
then you'll see the definition of fpos_t
and you can use CTRL-] in vim to find definitions of other "tags"
you'll find:
#ifndef __USE_FILE_OFFSET64
typedef _G_fpos_t fpos_t;
#else
typedef _G_fpos64_t fpos_t;
#endif
find the definition of _G_fpos_t by moving cursor to this word and
pressing CTRL-]
you can repeat this procedure till you finally reach this line:
typedef long int __off_t;
--
※ 来源:·BBS 水木清华站 smth.org·[FROM: 162.105.179.14]
BBS水木清华站∶精华区