mirror of
https://github.com/radareorg/radare2.git
synced 2024-10-07 02:23:58 +00:00
* Fix build again O:)
- Remove config.mk includes from config-user.mk - Fix sys.c missing include * Added R_LIB_TYPE_LAST and implement a getter * Add some missing license headers
This commit is contained in:
parent
b0b25a6eea
commit
60c3e46651
@ -12,4 +12,4 @@ RUNTIME_DEBUG=1
|
||||
OSTYPE?=gnulinux
|
||||
|
||||
#-include ../config.mk
|
||||
-include ../../config.mk
|
||||
#-include ../../config.mk
|
||||
|
@ -46,6 +46,7 @@ enum {
|
||||
R_LIB_TYPE_PARSE, /* parsers */
|
||||
R_LIB_TYPE_BIN, /* bins */
|
||||
R_LIB_TYPE_BININFO, /* bin info */
|
||||
R_LIB_TYPE_LAST
|
||||
};
|
||||
|
||||
struct r_lib_t {
|
||||
|
@ -27,6 +27,13 @@ const char *r_lib_types[] = {
|
||||
"io", "dbg", "lang", "asm", "anal", "parse", "bin", "bininfo", NULL
|
||||
};
|
||||
|
||||
const char *r_lib_types_get(int idx)
|
||||
{
|
||||
if (idx<0||idx>R_LIB_TYPE_LAST)
|
||||
return r_lib_types[idx];
|
||||
return "unk";
|
||||
}
|
||||
|
||||
void *r_lib_dl_open(const char *libname)
|
||||
{
|
||||
void *ret;
|
||||
@ -248,7 +255,7 @@ int r_lib_list(struct r_lib_t *lib)
|
||||
//printf("Loaded plugins:\n");
|
||||
list_for_each_prev(pos, &lib->plugins) {
|
||||
struct r_lib_plugin_t *p = list_entry(pos, struct r_lib_plugin_t, list);
|
||||
printf(" %5s : %s (%p)\n", r_lib_types[p->type], p->file, p->handler->destructor);
|
||||
printf(" %5s : %s (%p)\n", r_lib_types_get(p->type), p->file, p->handler->destructor);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
/* radare - LGPL - Copyright 2009 pancake<nopcode.org> */
|
||||
|
||||
#include <r_util.h>
|
||||
|
||||
void r_cache_init(struct r_cache_t *c)
|
||||
|
@ -1,3 +1,6 @@
|
||||
/* radare - LGPL - Copyright 2009 pancake<nopcode.org> */
|
||||
|
||||
#include <r_types.h>
|
||||
/* TODO: import stuff fron bininfo/p/bininfo_addr2line */
|
||||
|
||||
char *r_sys_cmd_str(const char *cmd)
|
||||
|
Loading…
Reference in New Issue
Block a user