Add more R2_ prefix for some var

This commit is contained in:
Maijin 2018-08-07 22:14:54 +02:00
parent b3d081abcd
commit b60a25b914
5 changed files with 11 additions and 11 deletions

View File

@ -185,9 +185,9 @@ static int main_help(int line) {
" file ${filename}.r2\n"
"Plugins:\n"
" binrc " R_JOIN_4_PATHS ("~", R2_HOME_BINRC, "bin-<format>", "") " (elf, elf64, mach0, ..)\n"
" USER_PLUGINS " R_JOIN_2_PATHS ("~", R2_HOME_PLUGINS) "\n"
" LIBR_PLUGINS " R_JOIN_2_PATHS ("%s", R2_PLUGINS) "\n"
" USER_ZIGNS " R_JOIN_2_PATHS ("~", R2_HOME_ZIGNS) "\n"
" R2_USER_PLUGINS " R_JOIN_2_PATHS ("~", R2_HOME_PLUGINS) "\n"
" R2_LIBR_PLUGINS " R_JOIN_2_PATHS ("%s", R2_PLUGINS) "\n"
" R2_USER_ZIGNS " R_JOIN_2_PATHS ("~", R2_HOME_ZIGNS) "\n"
"Environment:\n"
" R2_RDATAHOME %s\n" // TODO: rename to RHOME R2HOME?
" RCFILE ~/.radare2rc (user preferences, batch script)\n" // TOO GENERIC
@ -228,9 +228,9 @@ static int main_print_var(const char *var_name) {
{ "R2_RCONFIGHOME", confighome },
{ "R2_RDATAHOME", datahome },
{ "R2_RCACHEHOME", cachehome },
{ "LIBR_PLUGINS", plugins },
{ "USER_PLUGINS", homeplugins },
{ "USER_ZIGNS", homezigns },
{ "R2_LIBR_PLUGINS", plugins },
{ "R2_USER_PLUGINS", homeplugins },
{ "R2_USER_ZIGNS", homezigns },
{ NULL, NULL }
};
if (var_name) {

View File

@ -9,7 +9,7 @@ Libraries can be compiled:
./configure-plugins --enable-shared --enable-dynamic
LIBR_PLUGINS environment variable is honored as another search path for plugins
R2_LIBR_PLUGINS environment variable is honored as another search path for plugins
Plugins can be:
- not compiled

2
env.sh
View File

@ -24,7 +24,7 @@ fi
new_env='
R2_ENV_IS_SET=1
LIBR_PLUGINS=${pfx}/lib/radare2
R2_LIBR_PLUGINS=${pfx}/lib/radare2
PATH=$pfx/bin:${PATH}
LD_LIBRARY_PATH=$pfx/lib:$LD_LIBRARY_PATH
DYLD_LIBRARY_PATH=$pfx/lib:$DYLD_LIBRARY_PATH

View File

@ -15,7 +15,7 @@ R_LIB_VERSION_HEADER (r_lib);
// rename to '.' ??
#define R_LIB_SEPARATOR "."
#define R_LIB_ENV "LIBR_PLUGINS"
#define R_LIB_ENV "R2_LIBR_PLUGINS"
/* XXX : This must depend on HOST_OS */
#if __WINDOWS__

View File

@ -341,9 +341,9 @@ R_API int r_lib_opendir(RLib *lib, const char *path) {
struct dirent *de;
DIR *dh;
#endif
#ifdef LIBR_PLUGINS
#ifdef R2_LIBR_PLUGINS
if (!path) {
path = LIBR_PLUGINS;
path = R2_LIBR_PLUGINS;
}
#endif
if (!path) {