📄 seekdir.c
字号:
#if !defined(lint) && defined(SCCSIDS)static char sccsid[] = "@(#)seekdir.c 1.1 92/07/30 SMI";#endif#include <sys/param.h>#include <dirent.h>/* * seek to an entry in a directory. * Only values returned by "telldir" should be passed to seekdir. */voidseekdir(dirp, tell) register DIR *dirp; register long tell;{ extern long lseek(); long curloc; curloc = telldir(dirp); if (curloc == tell) return; dirp->dd_loc = 0; (void) lseek(dirp->dd_fd, tell, 0); dirp->dd_size = 0; dirp->dd_off = tell;}#undef rewinddir(dirp)voidrewinddir(dirp) DIR *dirp;{ seekdir(dirp, 0);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -