2010-01-30 13:02:53 +00:00
|
|
|
/* radare - LGPL - Copyright 2007-2010 pancake<nopcode.org> */
|
|
|
|
|
|
|
|
#include <r_line.h>
|
|
|
|
|
|
|
|
RLine r_line_instance;
|
|
|
|
#define I r_line_instance
|
|
|
|
|
|
|
|
/* definitions to be removed */
|
|
|
|
int r_line_dietline_init();
|
|
|
|
void r_line_hist_free();
|
|
|
|
|
|
|
|
R_API RLine *r_line_init () {
|
|
|
|
I.prompt = strdup ("> ");
|
|
|
|
if (!r_line_dietline_init ())
|
|
|
|
eprintf ("error: r_line_dietline_init\n");
|
|
|
|
return &I;
|
|
|
|
}
|
|
|
|
|
|
|
|
R_API RLine *r_line_new () {
|
|
|
|
return r_line_init ();
|
|
|
|
}
|
|
|
|
|
|
|
|
R_API void r_line_free () {
|
|
|
|
// XXX: prompt out of the heap?
|
2010-02-02 10:09:52 +00:00
|
|
|
free ((void*)I.prompt);
|
2010-01-30 13:02:53 +00:00
|
|
|
I.prompt = NULL;
|
|
|
|
r_line_hist_free ();
|
|
|
|
}
|