date and time created 82/02/21 14:47:03 by mckusick
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Mon, 22 Feb 1982 06:47:03 +0000 (22:47 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Mon, 22 Feb 1982 06:47:03 +0000 (22:47 -0800)
SCCS-vsn: lib/libc/gen/telldir.c 1.1

usr/src/lib/libc/gen/telldir.c [new file with mode: 0644]

diff --git a/usr/src/lib/libc/gen/telldir.c b/usr/src/lib/libc/gen/telldir.c
new file mode 100644 (file)
index 0000000..ccf4075
--- /dev/null
@@ -0,0 +1,16 @@
+/* Copyright (c) 1982 Regents of the University of California */
+
+static char sccsid[] = "@(#)telldir.c 1.1 %G%";
+
+#include <sys/types.h>
+#include <ndir.h>
+
+/*
+ * return a pointer into a directory
+ */
+long
+telldir(dirp)
+       DIR *dirp;
+{
+       return (lseek(dirp->dd_fd, 0L, 1) - dirp->dd_size + dirp->dd_loc);
+}