libexplain  1.4.D001
Functions
libexplain/filename.c File Reference
#include <libexplain/ac/stdio.h>
#include <libexplain/fileinfo.h>
#include <libexplain/filename.h>

Go to the source code of this file.

Functions

int explain_filename_from_stream (FILE *stream, char *data, size_t data_size)
int explain_filename_from_fildes (int fildes, char *data, size_t data_size)

Function Documentation

int explain_filename_from_fildes ( int  fildes,
char *  data,
size_t  data_size 
)

The explain_filename_from_stream function may be used to obtain the filename associated with the given I/O stream.

Parameters:
fildesThe file descriptor from which to obtain the filename.
datathe filename will be returned in this buffer, NUL terminated.
data_sizeThe available size of the return buffer, in bytes. If too small, the result will be silently truncated.
Returns:
0 on success, -1 on error (does NOT set errno)

Definition at line 34 of file filename.c.

int explain_filename_from_stream ( FILE *  stream,
char *  data,
size_t  data_size 
)

The explain_filename_from_stream function may be used to obtain the filename associated with the given I/O stream.

Parameters:
streamThe file stream from which to obtain the filename.
datathe filename will be returned in this buffer, NUL terminated.
data_sizeThe available size of the return buffer, in bytes. If too small, the result will be silently truncated.
Returns:
0 on success, -1 on error (does NOT set errno)

Definition at line 27 of file filename.c.