-\f
-/* File handle functions. */
-
-/* Creates and returns a new file handle with the given values
- and defaults for other values. Adds the created file handle
- to the global list. */
-static struct file_handle *
-create_file_handle (const char *handle_name, const char *filename)
-{
- struct file_handle *handle;
- struct file_handle_list *list;
-
- /* Create and initialize file handle. */
- handle = xmalloc (sizeof *handle);
- handle->private = xmalloc (sizeof *handle->private);
- handle->private->name = xstrdup (handle_name);
- handle->private->filename = xstrdup (filename);
- handle->private->identity = fn_get_identity (filename);
- handle->private->where.filename = handle->private->filename;
- handle->private->where.line_number = 0;
- handle->private->mode = MODE_TEXT;
- handle->private->length = 1024;
- handle->private->tab_width = 4;
- handle->ext = NULL;
- handle->class = NULL;
-
- /* Add file handle to global list. */
- list = xmalloc (sizeof *list);
- list->handle = handle;
- list->next = file_handles;
- file_handles = list;