src/ui-prefs.c
static bool process_pref_file_layered(const char *name, bool quiet, bool user,
									  const char *base_search_path,
									  const char *fallback_search_path,
									  bool *used_fallback)
{
	char buf[1024];

	assert(base_search_path != NULL);

	/* Build the filename */
	path_build(buf, sizeof(buf), base_search_path, name);

	if (used_fallback != NULL)
		*used_fallback = FALSE;

	if (!file_exists(buf) && fallback_search_path != NULL) {
		path_build(buf, sizeof(buf), fallback_search_path, name);

		if (used_fallback != NULL)
			*used_fallback = TRUE;
	}

	return process_pref_file_named(buf, quiet, user);
}
/**
 * Process the user pref file with a given name and search paths.
 *
 * \param name is the name of the pref file.
 * \param quiet means "don't complain about not finding the file".
 * \param user should be TRUE if the pref file is user-specific and not a game
 * default.
 * \param base_search_path is the first path that should be checked for the file
 * \param fallback_search_path is the path that should be checked if the file
 * couldn't be found at the base path.
 * \param used_fallback will be set on return to TRUE if the fallback path was
 * used, FALSE otherwise.
 * \returns TRUE if everything worked OK, FALSE otherwise.
 */
Process the user pref file with a given name and search paths.
\param name is the name of the pref file.
\param quiet means "don't complain about not finding the file".
\param user should be TRUE if the pref file is user-specific and not a game
default.
\param base_search_path is the first path that should be checked for the file
\param fallback_search_path is the path that should be checked if the file
couldn't be found at the base path.
\param used_fallback will be set on return to TRUE if the fallback path was
used, FALSE otherwise.
\returns TRUE if everything worked OK, FALSE otherwise.
Process the user pref file with a given name and search paths . \ param name is the name of the pref file . \ param quiet means " don ' t complain about not finding the file " . \ param user should be TRUE if the pref file is user - specific and not a game default . \ param base_search_path is the first path that should be checked for the file \ param fallback_search_path is the path that should be checked if the file couldn ' t be found at the base path . \ param used_fallback will be set on return to TRUE if the fallback path was used FALSE otherwise . \ returns TRUE if everything worked OK FALSE otherwise .
static bool process_pref_file_layered(const char *name, bool quiet, bool user,
									  const char *base_search_path,
									  const char *fallback_search_path,
									  bool *used_fallback)
{
	char buf[1024];
	assert(base_search_path != NULL);
	path_build(buf, sizeof(buf), base_search_path, name);
	if (used_fallback != NULL)
		*used_fallback = FALSE;
	if (!file_exists(buf) && fallback_search_path != NULL) {
		path_build(buf, sizeof(buf), fallback_search_path, name);
		if (used_fallback != NULL)
			*used_fallback = TRUE;
	}
	return process_pref_file_named(buf, quiet, user);
}
static bool process_pref_file_layered ( const char * name , bool quiet , bool user , const char * base_search_path , const char * fallback_search_path , bool * used_fallback ) { char buf [ 1024 ] ; assert ( base_search_path != NULL ) ; path_build ( buf , sizeof ( buf ) , base_search_path , name ) ; if ( used_fallback != NULL ) * used_fallback = FALSE ; if ( ! file_exists ( buf ) && fallback_search_path != NULL ) { path_build ( buf , sizeof ( buf ) , fallback_search_path , name ) ; if ( used_fallback != NULL ) * used_fallback = TRUE ; } return process_pref_file_named ( buf , quiet , user ) ; }
Process the user pref file with a given name and search paths.
Process the user pref file with a given name and search paths .
/* Build the filename */