#include <stdio.h>#include <stdlib.h>#include <limits.h>#include <string.h>#include "binreloc.h"Include dependency graph for binreloc.c:

Go to the source code of this file.
Defines | |
| #define | NULL ((void *) 0) |
Functions | |
| static char * | _br_find_exe (BrInitError *error) |
| static char * | _br_find_exe_for_symbol (const void *symbol, BrInitError *error) |
| int | br_init (BrInitError *error) |
| int | br_init_lib (BrInitError *error) |
| char * | br_find_exe (const char *default_exe) |
| char * | br_find_exe_dir (const char *default_dir) |
| char * | br_find_prefix (const char *default_prefix) |
| char * | br_find_bin_dir (const char *default_bin_dir) |
| char * | br_find_sbin_dir (const char *default_sbin_dir) |
| char * | br_find_data_dir (const char *default_data_dir) |
| char * | br_find_locale_dir (const char *default_locale_dir) |
| char * | br_find_lib_dir (const char *default_lib_dir) |
| char * | br_find_libexec_dir (const char *default_libexec_dir) |
| char * | br_find_etc_dir (const char *default_etc_dir) |
| char * | br_strcat (const char *str1, const char *str2) |
| char * | br_build_path (const char *dir, const char *file) |
| static char * | br_strndup (const char *str, size_t size) |
| char * | br_dirname (const char *path) |
Variables | |
| static char * | exe = (char *) NULL |
|
|
|
Definition at line 39 of file binreloc.c. References BR_INIT_ERROR_DISABLED, BR_INIT_ERROR_INVALID_MAPS, BR_INIT_ERROR_NOMEM, BR_INIT_ERROR_OPEN_MAPS, BR_INIT_ERROR_READ_MAPS, and NULL. Referenced by br_init(). |
|
||||||||||||
|
Definition at line 178 of file binreloc.c. References BR_INIT_ERROR_DISABLED, and NULL. Referenced by br_init_lib(). |
|
||||||||||||
|
Definition at line 684 of file binreloc.c. References br_strcat. |
|
|
Extracts the directory component of a path. Similar to g_dirname() or the dirname commandline application. Example: br_dirname ("/usr/local/foobar"); --> Returns: "/usr/local"
Definition at line 740 of file binreloc.c. References br_strndup(), and NULL. |
|
|
Locate the application's binary folder. The path is generated by the following pseudo-code evaluation: prefix + "/bin"
Definition at line 432 of file binreloc.c. References br_build_path, br_find_prefix, and NULL. |
|
|
Locate the application's data folder. The path is generated by the following pseudo-code evaluation: prefix + "/share"
Definition at line 499 of file binreloc.c. References br_build_path, br_find_prefix, and NULL. |
|
|
Locate the application's configuration files folder. The path is generated by the following pseudo-code evaluation: prefix + "/etc"
Definition at line 631 of file binreloc.c. References br_build_path, br_find_prefix, and NULL. |
|
|
Find the canonical filename of the current application.
Definition at line 343 of file binreloc.c. References NULL. |
|
|
Locate the directory in which the current application is installed. The prefix is generated by the following pseudo-code evaluation: dirname(exename)
Definition at line 371 of file binreloc.c. References br_dirname, and NULL. |
|
|
Locate the application's library folder. The path is generated by the following pseudo-code evaluation: prefix + "/lib"
Definition at line 565 of file binreloc.c. References br_build_path, br_find_prefix, and NULL. |
|
|
Locate the application's libexec folder. The path is generated by the following pseudo-code evaluation: prefix + "/libexec"
Definition at line 598 of file binreloc.c. References br_build_path, br_find_prefix, and NULL. |
|
|
Locate the application's localization folder. The path is generated by the following pseudo-code evaluation: prefix + "/share/locale"
Definition at line 532 of file binreloc.c. References br_build_path, br_find_data_dir, data_dir, and NULL. |
|
|
Locate the prefix in which the current application is installed. The prefix is generated by the following pseudo-code evaluation: dirname(dirname(exename))
Definition at line 399 of file binreloc.c. References br_dirname, and NULL. |
|
|
Locate the application's superuser binary folder. The path is generated by the following pseudo-code evaluation: prefix + "/sbin"
Definition at line 465 of file binreloc.c. References br_build_path, br_find_prefix, and NULL. |
|
|
Initialize the BinReloc library (for applications). This function must be called before using any other BinReloc functions. It attempts to locate the application's canonical filename.
Definition at line 304 of file binreloc.c. References _br_find_exe(), and NULL. |
|
|
Initialize the BinReloc library (for libraries). This function must be called before using any other BinReloc functions. It attempts to locate the calling library's canonical filename.
Definition at line 326 of file binreloc.c. References _br_find_exe_for_symbol(), and NULL. |
|
||||||||||||
|
Concatenate str1 and str2 to a newly allocated string.
Definition at line 661 of file binreloc.c. References NULL. |
|
||||||||||||
|
Definition at line 706 of file binreloc.c. References NULL. Referenced by br_dirname(). |
|
|
Definition at line 286 of file binreloc.c. |
1.4.6