Commit | Line | Data |
---|---|---|
bb0cfa24 DF |
1 | /* |
2 | * Copyright (c) 1983 Regents of the University of California. | |
3 | * All rights reserved. The Berkeley software License Agreement | |
4 | * specifies the terms and conditions for redistribution. | |
5 | */ | |
6 | ||
455b164d | 7 | #ifndef lint |
bb0cfa24 DF |
8 | static char sccsid[] = "@(#)telldir.c 5.1 (Berkeley) %G%"; |
9 | #endif not lint | |
d0ecd57b | 10 | |
c4a04593 | 11 | #include <sys/param.h> |
455b164d | 12 | #include <sys/dir.h> |
d0ecd57b KM |
13 | |
14 | /* | |
15 | * return a pointer into a directory | |
16 | */ | |
17 | long | |
18 | telldir(dirp) | |
19 | DIR *dirp; | |
20 | { | |
55e81f97 KM |
21 | extern long lseek(); |
22 | ||
d0ecd57b KM |
23 | return (lseek(dirp->dd_fd, 0L, 1) - dirp->dd_size + dirp->dd_loc); |
24 | } |