* Applied minimalistic version of the Graz's patch adding history load/save

functionalities to radare2 command
* Set 'asm_x86' disassembler after loading the plugins
* Remove 'No file specified' message
This commit is contained in:
pancake 2009-04-01 00:51:02 +00:00
parent 103d23cd48
commit 4c8f851485
3 changed files with 4 additions and 2 deletions

View File

@ -78,6 +78,7 @@ static int cmd_quit(void *data, const char *input)
case ' ':
case '!':
default:
r_line_hist_save(".radare2_history");
exit(r_num_math(&core->num, input+1));
break;
}

View File

@ -49,7 +49,6 @@ R_API int r_core_init(struct r_core_t *core)
r_anal_init(&core->anal);
r_anal_set_user_ptr(&core->anal, core);
r_asm_init(&core->assembler);
r_asm_set(&core->assembler, "asm_x86"); // XXX should be done by r_asm on init?
r_asm_set_user_ptr(&core->assembler, core);
r_parse_init(&core->parser);
r_parse_set_user_ptr(&core->parser, core);
@ -58,6 +57,7 @@ R_API int r_core_init(struct r_core_t *core)
r_bin_set_user_ptr(&core->bin, core);
r_meta_init(&core->meta);
r_cons_init();
r_line_hist_load(".radare2_history");
core->search = r_search_new(R_SEARCH_KEYWORD);
r_io_init(&core->io);
@ -78,6 +78,7 @@ R_API int r_core_init(struct r_core_t *core)
/* load plugins */
r_core_loadlibs(core);
r_asm_set(&core->assembler, "asm_x86"); // XXX should be done by r_asm on init?
return 0;
}

View File

@ -126,7 +126,7 @@ int main(int argc, char **argv)
}
if (r.file == NULL) {
fprintf (stderr, "No file specified\n");
//fprintf (stderr, "No file specified\n");
return 1;
}