src/thirdparty/binreloc/binreloc.c
char *
br_find_data_dir (const char *default_data_dir)
{
	char *prefix, *dir;

	prefix = br_find_prefix ((const char *) NULL);
	if (prefix == (char *) NULL) {
		/* BinReloc not initialized. */
		if (default_data_dir != (const char *) NULL)
			return strdup (default_data_dir);
		else
			return (char *) NULL;
	}

	dir = br_build_path (prefix, "share");
	free (prefix);
	return dir;
}
/** Locate the application's data folder.
 *
 * The path is generated by the following pseudo-code evaluation:
 * \code
 * prefix + "/share"
 * \endcode
 *
 * @param default_data_dir  A default path which will used as fallback.
 * @return A string containing the data folder's path, which must be freed when
 *         no longer necessary. If BinReloc is not initialized, or if the
 *         initialization function failed, then a copy of default_data_dir
 *         will be returned. If default_data_dir is NULL, then NULL will be
 *         returned.
 */
Locate the application's data folder.
The path is generated by the following pseudo-code evaluation:
\code
prefix + "/share"
\endcode

@param default_data_dir  A default path which will used as fallback.
@return A string containing the data folder's path, which must be freed when
no longer necessary. If BinReloc is not initialized, or if the
initialization function failed, then a copy of default_data_dir
will be returned. If default_data_dir is NULL, then NULL will be
returned.
Locate the application ' s data folder . The path is generated by the following pseudo - code evaluation : \ code prefix + " / share " \ endcode @param default_data_dir A default path which will used as fallback . @return A string containing the data folder ' s path which must be freed when no longer necessary . If BinReloc is not initialized or if the initialization function failed then a copy of default_data_dir will be returned . If default_data_dir is NULL then NULL will be returned .
char *
br_find_data_dir (const char *default_data_dir)
{
	char *prefix, *dir;
	prefix = br_find_prefix ((const char *) NULL);
	if (prefix == (char *) NULL) {
		if (default_data_dir != (const char *) NULL)
			return strdup (default_data_dir);
		else
			return (char *) NULL;
	}
	dir = br_build_path (prefix, "share");
	free (prefix);
	return dir;
}
char * br_find_data_dir ( const char * default_data_dir ) { char * prefix , * dir ; prefix = br_find_prefix ( ( const char * ) NULL ) ; if ( prefix == ( char * ) NULL ) { if ( default_data_dir != ( const char * ) NULL ) return strdup ( default_data_dir ) ; else return ( char * ) NULL ; } dir = br_build_path ( prefix , " " ) ; free ( prefix ) ; return dir ; }
Locate the application's data folder.
Locate the application ' s data folder .
/* BinReloc not initialized. */