by any caller. Updated all callers.
+Sat Dec 9 20:08:25 2006 Ben Pfaff <blp@gnu.org>
+
+ * file-name.c (fn_search_path): Remove prefix arg that was unused
+ by any caller. Updated all callers.
+
Sat Dec 9 20:04:22 2006 Ben Pfaff <blp@gnu.org>
* format.c (fmt_dollar_template): Use user's decimal point
given by PATH, which is tilde- and environment-interpolated.
Directories in PATH are delimited by ':'. Returns the
malloc'd full name of the first file found, or NULL if none is
- found.
-
- If PREFIX is non-NULL, then it is prefixed to each file name;
- i.e., it looks like PREFIX/PATH_COMPONENT/NAME. This is not
- done with absolute directories in the path. */
+ found. */
char *
-fn_search_path (const char *base_name, const char *path_, const char *prefix)
+fn_search_path (const char *base_name, const char *path_)
{
struct string path;
struct substring dir_;
/* Construct file name. */
ds_clear (&file);
- if (prefix != NULL && !fn_is_absolute (ds_cstr (&dir)))
- {
- ds_put_cstr (&file, prefix);
- ds_put_char (&file, '/');
- }
ds_put_cstr (&file, ds_cstr (&dir));
if (!ds_is_empty (&file) && ds_last (&file) != '/')
ds_put_char (&file, '/');
const char *(*getenv) (const char *),
struct string *dst);
char *fn_tilde_expand (const char *fn);
-char *fn_search_path (const char *base_name, const char *path,
- const char *prefix);
+char *fn_search_path (const char *base_name, const char *path);
char *fn_normalize (const char *fn);
char *fn_dir_name (const char *fn);
char *fn_extension (const char *fn);
target_fn = ds_cstr (lex_tokstr (lexer));
ss = lex_get_source_stream (lexer);
- found_fn = fn_search_path (target_fn, getl_include_path ( ss ), NULL);
+ found_fn = fn_search_path (target_fn, getl_include_path ( ss ));
if (found_fn != NULL)
{
init_fn = fn_search_path (fn_getenv_default ("STAT_OUTPUT_INIT_FILE",
"devices"),
fn_getenv_default ("STAT_OUTPUT_INIT_PATH",
- config_path),
- NULL);
-
+ config_path));
+
ds_init_empty (&line);
if (init_fn == NULL)
pprsz_fn = fn_search_path (fn_getenv_default ("STAT_OUTPUT_PAPERSIZE_FILE",
"papersize"),
fn_getenv_default ("STAT_OUTPUT_INIT_PATH",
- config_path),
- NULL);
-
+ config_path));
+
ds_init_empty (&line);
if (pprsz_fn == NULL)
else
{
char *base_name = xasprintf ("psfonts/%s", name);
- char *file_name = fn_search_path (base_name, config_path, NULL);
+ char *file_name = fn_search_path (base_name, config_path);
free (base_name);
return file_name;
}
if (process_statrc)
{
- char *pspprc_fn = fn_search_path ("rc", config_path, NULL);
+ char *pspprc_fn = fn_search_path ("rc", config_path);
if (pspprc_fn != NULL)
{
getl_append_source (ss, create_syntax_file_source (pspprc_fn));