- return h->name;
-}
-
-/* Closes the stdio FILE associated with handle H. Frees internal
- buffers associated with that file. Does *not* destroy the file
- handle H. (File handles are permanent during a session.) */
-void
-fh_close_handle (struct file_handle *h)
-{
- if (h == NULL)
- return;
-
- debug_printf (("Closing %s%s.\n", fh_handle_name (h),
- h->class == NULL ? " (already closed)" : ""));
-
- if (h->class)
- h->class->close (h);
- h->class = NULL;
- h->ext = NULL;
-}
-
-/* Compares names of file handles A and B. */
-static int
-cmp_file_handle (const void *a, const void *b, void *foo unused)
-{
- return strcmp (((struct file_handle *) a)->name,
- ((struct file_handle *) b)->name);
-}
-
-/* Initialize the AVL tree of file handles; inserts the "inline file"
- inline_file. */
-void
-fh_init_files (void)
-{
- /* Create AVL tree. */
- files = avl_create (NULL, cmp_file_handle, NULL);
-
- /* Insert inline file. */
- inline_file = xmalloc (sizeof *inline_file);
- init_file_handle (inline_file);
- inline_file->name = "INLINE";
- inline_file->where.filename
- = inline_file->fn = inline_file->norm_fn = (char *) _("<Inline File>");
- inline_file->where.line_number = 0;
- avl_force_insert (files, inline_file);