Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ftell(3)



  fgetpos(3)                          CLIX                          fgetpos(3)



  NAME

    fgetpos - Returns the positions of a file pointer in a stream

  LIBRARY

    Standard C Library (libc.a)

  SYNOPSIS

    #include <stdio.h>

    int fgetpos(
      FILE *stream ,
      fpos_t *pos );

  PARAMETERS

    stream   Points to a file.

    pos      Points to a location where fgetpos() may store the desired file
             pointer position.

  DESCRIPTION

    The fgetpos() function is a wrapper around the ftell() function.  Upon
    successful completion, fgetpos() puts the value in the location pointed to
    by pos.

  EXAMPLES

    This example gets the position of the file pointer fp.

    FILE *fp;
    fpos_t pos;

    if (fgetpos(fp, &pos)==-1)
    {
        perror("fgetpos failed");
        exit(-1);
    }


  RETURN VALUES

    The fgetpos() function returns a value of 0 if successful.  If an error
    occurs, it returns a value of -1.

  ERRORS

    All values of errno are set by ftell().



  2/94 - Intergraph Corporation                                              1






  fgetpos(3)                          CLIX                          fgetpos(3)



  RELATED INFORMATION

    Functions:  ftell(3)



















































  2                                              Intergraph Corporation - 2/94




Typewritten Software • bear@typewritten.org • Edmonds, WA 98026