Remove unused functions fn_dir_name fn_getenv and fn_getenv_default
[pspp] / src / data / file-name.c
index 3e9fa6914a72d3a5dcc8e011bbcde94d274a782e..b5cc43deaa2c81b8e5137f5b6a6340c1d7a3acc1 100644 (file)
@@ -82,14 +82,6 @@ fn_search_path (const char *base_name, char **path)
   return NULL;
 }
 
-/* Returns the directory part of FILE_NAME, as a malloc()'d
-   string. */
-char *
-fn_dir_name (const char *file_name)
-{
-  return dir_name (file_name);
-}
-
 /* Returns the extension part of FILE_NAME as a malloc()'d string.
    If FILE_NAME does not have an extension, returns an empty
    string. */
@@ -111,23 +103,6 @@ fn_is_absolute (const char *name)
   return IS_ABSOLUTE_FILE_NAME (name);
 }
 
-/* Returns true if FILE_NAME is a virtual file that doesn't
-   really exist on disk, false if it's a real file name. */
-bool
-fn_is_special (const char *file_name)
-{
-  if (!strcmp (file_name, "-") || !strcmp (file_name, "stdin")
-      || !strcmp (file_name, "stdout") || !strcmp (file_name, "stderr")
-#ifdef HAVE_POPEN
-      || file_name[0] == '|'
-      || (*file_name && file_name[strlen (file_name) - 1] == '|')
-#endif
-      )
-    return true;
-
-  return false;
-}
-
 /* Returns true if file with name NAME exists, and that file is not a
    directory */
 bool
@@ -139,28 +114,7 @@ fn_exists (const char *name)
 
   return ! S_ISDIR (temp.st_mode);
 }
-\f
-/* Environment variables. */
-
-/* Simulates $VER and $ARCH environment variables. */
-const char *
-fn_getenv (const char *s)
-{
-  if (!strcmp (s, "VER"))
-    return fn_getenv_default ("STAT_VER", bare_version);
-  else if (!strcmp (s, "ARCH"))
-    return fn_getenv_default ("STAT_ARCH", host_system);
-  else
-    return getenv (s);
-}
 
-/* Returns getenv(KEY) if that's non-NULL; else returns DEF. */
-const char *
-fn_getenv_default (const char *key, const char *def)
-{
-  const char *value = getenv (key);
-  return value ? value : def;
-}
 \f
 /* Basic file handling. */