home *** CD-ROM | disk | FTP | other *** search
- /*------------------------------------------------------------------------
- * filename - fgetpos.c
- *
- * function(s)
- * fgetpos - gets the current file pointer
- *-----------------------------------------------------------------------*/
-
- /*[]------------------------------------------------------------[]*/
- /*| |*/
- /*| Turbo C Run Time Library - Version 3.0 |*/
- /*| |*/
- /*| |*/
- /*| Copyright (c) 1987,1988,1990 by Borland International |*/
- /*| All Rights Reserved. |*/
- /*| |*/
- /*[]------------------------------------------------------------[]*/
-
- #include <stdio.h>
-
- /*-----------------------------------------------------------------------*
-
- Name fgetpos - gets the current file pointer
-
- Usage #include <stdio.h>
- int fgetpos(FILE *stream, fpos_t *pos);
-
- Prototype in stdio.h
-
- Description stores the position of the file pointer associated
- with stream in the location pointed to by pos
-
- Return value success : 0
- failure : non-zero
-
- *-----------------------------------------------------------------------*/
-
-
- int fgetpos(FILE *stream, fpos_t *pos)
- {
- return ((*pos = ftell(stream)) == -1) ? -1 : 0;
- }
-