121363Sdist /* 221363Sdist * Copyright (c) 1983 Regents of the University of California. 321363Sdist * All rights reserved. The Berkeley software License Agreement 421363Sdist * specifies the terms and conditions for redistribution. 521363Sdist */ 621363Sdist 7*26604Sdonn #if defined(LIBC_SCCS) && !defined(lint) 8*26604Sdonn static char sccsid[] = "@(#)telldir.c 5.2 (Berkeley) 03/09/86"; 9*26604Sdonn #endif LIBC_SCCS and not lint 105929Smckusick 116370Smckusic #include <sys/param.h> 1213582Ssam #include <sys/dir.h> 135929Smckusick 145929Smckusick /* 155929Smckusick * return a pointer into a directory 165929Smckusick */ 175929Smckusick long 185929Smckusick telldir(dirp) 195929Smckusick DIR *dirp; 205929Smckusick { 2111827Smckusick extern long lseek(); 2211827Smckusick 235929Smckusick return (lseek(dirp->dd_fd, 0L, 1) - dirp->dd_size + dirp->dd_loc); 245929Smckusick } 25