* 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:
pancake 2009-04-01 01:40:04 +00:00
parent b0b25a6eea
commit 60c3e46651
5 changed files with 15 additions and 2 deletions

View File

@ -12,4 +12,4 @@ RUNTIME_DEBUG=1
OSTYPE?=gnulinux
#-include ../config.mk
-include ../../config.mk
#-include ../../config.mk

View File

@ -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 {

View File

@ -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;
}

View File

@ -1,3 +1,5 @@
/* radare - LGPL - Copyright 2009 pancake<nopcode.org> */
#include <r_util.h>
void r_cache_init(struct r_cache_t *c)

View File

@ -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)