struct file_identity *identity; /* For checking file identity. */
enum fh_mode mode; /* File mode. */
struct file_identity *identity; /* For checking file identity. */
enum fh_mode mode; /* File mode. */
or a null pointer if none exists.
Different names for the same file (e.g. "x" and "./x") are
considered equivalent. */
struct file_handle *
or a null pointer if none exists.
Different names for the same file (e.g. "x" and "./x") are
considered equivalent. */
struct file_handle *
{
struct file_identity *identity;
struct file_handle *iter;
/* First check for a file with the same identity. */
{
struct file_identity *identity;
struct file_handle *iter;
/* First check for a file with the same identity. */
/* Then check for a file with the same name. */
for (iter = file_handles; iter != NULL; iter = iter->next)
if (!iter->deleted
/* Then check for a file with the same name. */
for (iter = file_handles; iter != NULL; iter = iter->next)
if (!iter->deleted
/* Creates a new file handle named HANDLE_NAME, which must not be
the name of an existing file handle. The new handle is
/* Creates a new file handle named HANDLE_NAME, which must not be
the name of an existing file handle. The new handle is
const struct fh_properties *properties)
{
struct file_handle *handle;
assert (fh_from_name (handle_name) == NULL);
handle = create_handle (handle_name, FH_REF_FILE);
const struct fh_properties *properties)
{
struct file_handle *handle;
assert (fh_from_name (handle_name) == NULL);
handle = create_handle (handle_name, FH_REF_FILE);
handle->mode = properties->mode;
handle->record_width = properties->record_width;
handle->tab_width = properties->tab_width;
handle->mode = properties->mode;
handle->record_width = properties->record_width;
handle->tab_width = properties->tab_width;
- by referring to a filename instead of a handle name, returns
- the filename, enclosed in double quotes. Return value is
+ by referring to a file name instead of a handle name, returns
+ the file name, enclosed in double quotes. Return value is