fgetname

Returns the file specification associated with a file pointer.

Format

#include  <stdio.h>

char *fgetname  (FILE *file_ptr, char
                *buffer, . . . );
Function Variants This function also has variants named _fgetname32 and _fgetname64 for use with 32-bit and 64-bit pointer sizes, respectively. See Section 1.8 for more information on using pointer-size-specific functions.

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 file name according to your current command language interpreter. For more information about UNIX style file specifications, see Section 1.4.3.

Description

This 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).

Return Values
The address of the buffer. 
Indicates an error. 

Restriction

This function is specific to the DEC C RTL and is not portable.


Previous Page | Next Page | Table of Contents | Index