+
+/* Returns the extension part of FILE_NAME as a malloc()'d string.
+ If FILE_NAME does not have an extension, returns an empty
+ string. */
+char *
+fn_extension (const struct file_handle *fh)
+{
+ const char *file_name = fh_get_file_name (fh);
+
+ const char *extension = strrchr (file_name, '.');
+ if (extension == NULL)
+ extension = "";
+ return xstrdup (extension);
+}
+\f
+/* Find out information about files. */
+
+/* Returns true iff NAME specifies an absolute file name. */
+static bool
+fn_is_absolute (const char *name)
+{
+ return IS_ABSOLUTE_FILE_NAME (name);
+}
+
+
+/* Searches for a file with name NAME in the directories given in