home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Serving the Web
/
ServingTheWeb1995.disc1of1.iso
/
linux
/
slacksrce
/
d
/
libc
/
libc-4.6
/
libc-4
/
libc-linux
/
dirent
/
telldir.c
< prev
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1992-10-18
|
288 b
|
18 lines
#include <dirent.h>
#include <unistd.h>
#include <syscall.h>
#include <errno.h>
#undef lseek
static inline
_syscall3(off_t,lseek,int,fildes,off_t,offset,int,origin)
off_t telldir(DIR * dir)
{
if (!dir) {
errno = EBADF;
return -1;
}
return lseek(dir->dd_fd,0,SEEK_CUR);
}