#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <string.h>
#include "normal.h"
Enumerations | |
| enum | BrInitError { BR_INIT_ERROR_NOMEM, BR_INIT_ERROR_OPEN_MAPS, BR_INIT_ERROR_READ_MAPS, BR_INIT_ERROR_INVALID_MAPS, BR_INIT_ERROR_DISABLED } |
Functions | |
| 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) |
| char * | br_dirname (const char *path) |
|
|
These error codes can be returned by br_init(), br_init_lib(), gbr_init() or gbr_init_lib().
|
|
||||||||||||
|
|
|
|
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"
|
|
|
Locate the application's binary folder. The path is generated by the following pseudo-code evaluation: prefix + "/bin"
|
|
|
Locate the application's data folder. The path is generated by the following pseudo-code evaluation: prefix + "/share"
|
|
|
Locate the application's configuration files folder. The path is generated by the following pseudo-code evaluation: prefix + "/etc"
|
|
|
Find the canonical filename of the current application.
|
|
|
Locate the directory in which the current application is installed. The prefix is generated by the following pseudo-code evaluation: dirname(exename)
|
|
|
Locate the application's library folder. The path is generated by the following pseudo-code evaluation: prefix + "/lib"
|
|
|
Locate the application's libexec folder. The path is generated by the following pseudo-code evaluation: prefix + "/libexec"
|
|
|
Locate the application's localization folder. The path is generated by the following pseudo-code evaluation: prefix + "/share/locale"
|
|
|
Locate the prefix in which the current application is installed. The prefix is generated by the following pseudo-code evaluation: dirname(dirname(exename))
|
|
|
Locate the application's superuser binary folder. The path is generated by the following pseudo-code evaluation: prefix + "/sbin"
|
|
|
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.
|
|
|
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.
|
|
||||||||||||
|
Concatenate str1 and str2 to a newly allocated string.
|
1.4.4