VMS Help  —  CRTL  fgetname
    Returns the file specification associated with a file pointer.

    Format

      #include  <stdio.h>

      char *fgetname  (FILE *file_ptr, char *buffer, . . . );

1  –  Function Variants

    The fgetname function has variants named _fgetname32 and _
    fgetname64 for use with 32-bit and 64-bit pointer sizes,
    respectively.

2  –  Arguments

 file_ptr

    A file pointer.

 buffer

    A pointer to a character string that is large enough to hold the
    file specification.

  . . .

    An optional additional argument that can be either 1 or 0. If you
    specify 1, the fgetname function returns the file specification
    in OpenVMS format. If you specify 0, fgetname returns the file
    specification in UNIX style format. If you do not specify this
    argument, fgetname returns the filename according to your current
    command language interpreter.

3  –  Description

    The fgetname function places the file specification at the
    address given in the buffer. The buffer should be an array large
    enough to contain a fully qualified file specification (the
    maximum length is 256 characters).

4  –  Return Values

    n                  The address of the buffer.
    0                  Indicates an error.

5  –  Restriction

    The fgetname function is specific to the C RTL and is not
    portable.
Close Help