Renamed some file name functions.
[pspp-builds.git] / src / data / filename.h
index 93fa6e2a3dbe3662c1722b2674e17f159eece54a..89b8aca42acfef1795f9b7c36566694fb24f4dca 100644 (file)
 #ifndef __MSDOS__
 #define DIR_SEPARATOR '/'
 #define PATH_DELIMITER ':'
+#define DIR_SEPARATOR_STRING "/"
+#define PATH_DELIMITER_STRING ":"
 #else
 #define DIR_SEPARATOR '\\'
 #define PATH_DELIMITER ';'
+#define DIR_SEPARATOR_STRING "\\"
+#define PATH_DELIMITER_STRING ";"
 #endif
 
 /* Search path for configuration files. */
@@ -38,21 +42,19 @@ void fn_init (void);
 
 struct string;
 void fn_interp_vars (struct string *target, 
-                       const char *(*getenv) (const char *));
+                     const char *(*getenv) (const char *));
 char *fn_tilde_expand (const char *fn);
-char *fn_search_path (const char *basename, const char *path,
-                     const char *prepend);
-char *fn_prepend_dir (const char *filename, const char *directory);
+char *fn_search_path (const char *base_name, const char *path,
+                     const char *prefix);
 char *fn_normalize (const char *fn);
-char *fn_dirname (const char *fn);
-char *fn_basename (const char *fn);
+char *fn_dir_name (const char *fn);
 char *fn_extension (const char *fn);
 
 char *fn_get_cwd (void);
 
-int fn_absolute_p (const char *fn);
-int fn_special_p (const char *fn);
-int fn_exists_p (const char *fn);
+int fn_is_absolute (const char *fn);
+int fn_is_special (const char *fn);
+int fn_exists (const char *fn);
 char *fn_readlink (const char *fn);
 
 const char *fn_getenv (const char *variable);
@@ -65,26 +67,5 @@ struct file_identity *fn_get_identity (const char *filename);
 void fn_free_identity (struct file_identity *);
 int fn_compare_file_identities (const struct file_identity *,
                                 const struct file_identity *);
-\f
-/* Extended file routines. */
-struct file_ext;
-
-typedef int (*file_callback) (struct file_ext *);
-
-/* File callbacks may not return zero to indicate failure unless they
-   set errno to a sensible value. */
-struct file_ext
-  {
-    char *filename;            /* Filename. */
-    const char *mode;          /* Open mode, i.e, "wb". */
-    FILE *file;                        /* File. */
-    int *sequence_no;          /* Page number, etc. */
-    void *param;               /* User data. */
-    file_callback postopen;    /* Called after FILE opened. */
-    file_callback preclose;    /* Called before FILE closed. */
-  };
-
-int fn_open_ext (struct file_ext *file);
-int fn_close_ext (struct file_ext *file);
 
 #endif /* filename_h */