From 928395ea568e2d4814ef017fca68ae5dc772a458 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 13 Oct 1998 16:07:38 +0000 Subject: New files. --- c/src/lib/libc/telldir.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 c/src/lib/libc/telldir.c (limited to 'c/src/lib/libc/telldir.c') diff --git a/c/src/lib/libc/telldir.c b/c/src/lib/libc/telldir.c new file mode 100644 index 0000000000..9825f04939 --- /dev/null +++ b/c/src/lib/libc/telldir.c @@ -0,0 +1,40 @@ +/* + * telldir() - XXX + * + * COPYRIGHT (c) 1989-1998. + * On-Line Applications Research Corporation (OAR). + * Copyright assigned to U.S. Government, 1994. + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.OARcorp.com/rtems/license.html. + * + * $Id$ + */ + +#include +#include +#include +#include +#include + +#include "libio_.h" + + +long telldir( + DIR *dirp +) +{ + rtems_libio_t *iop; + + /* + * Get the file control block structure associated with the file descriptor + */ + + iop = rtems_libio_iop( dirp->dd_fd ); + + if (iop == NULL) + assert(0); + + return (long)( iop->offset ); +} -- cgit v1.2.3