mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-14 16:59:08 +00:00
9890c6e8b0
- env.sh now also uses DYLD_LIBRARY_PATH - Fixes in ollyasm/dis to link with no global variables - Remove double definition of global _state - Same for asm_java - Split -shared and -Wl,-R into LDFLAGS_{LIB|LINKPATH} - Fixes linkage in osx - anal_x86_bea plugin now links correctly against BeaEgine.o - dietline is now #include'd from line.c - no debugger support yet - Do not externalize any variable. Some linkage does not support it * Remove bininfo dependency .. aims to be merged into bin soon * Added r_str_case() method to change to lower/upper case a string
64 lines
1.3 KiB
C
64 lines
1.3 KiB
C
#ifndef _INCLUDE_R_LINE_H_
|
|
#define _INCLUDE_R_LINE_H_
|
|
|
|
#include <r_types.h>
|
|
#include <r_cons.h>
|
|
#include <r_util.h>
|
|
|
|
#define R_LINE_BUFSIZE 1024
|
|
#define R_LINE_HISTSIZE 256
|
|
|
|
typedef struct r_line_hist_t {
|
|
char **data;
|
|
int size;
|
|
int index;
|
|
int top;
|
|
int autosave;
|
|
} RLineHistory;
|
|
|
|
typedef struct r_line_buffer_t {
|
|
char data[R_LINE_BUFSIZE];
|
|
int index;
|
|
int length;
|
|
} RLineBuffer;
|
|
|
|
struct r_line_t; // ugly forward declaration
|
|
typedef int (*RLineCallback)(struct r_line_t *line);
|
|
|
|
typedef struct r_line_comp_t {
|
|
int argc;
|
|
const char **argv;
|
|
RLineCallback run;
|
|
} RLineCompletion;
|
|
|
|
typedef struct r_line_t {
|
|
RLineCompletion completion;
|
|
RLineHistory history;
|
|
RLineBuffer buffer;
|
|
int echo;
|
|
int has_echo;
|
|
const char *prompt;
|
|
char *clipboard;
|
|
int disable; // NOT YET USED
|
|
} RLine;
|
|
|
|
|
|
#ifdef R_API
|
|
// XXX : Kill extern variables
|
|
//extern RLine r_line_instance;
|
|
R_API RLine *r_line_new ();
|
|
R_API RLine *r_line_singleton ();
|
|
R_API RLine *r_line_init();
|
|
R_API void r_line_free ();
|
|
|
|
R_API int r_line_hist_load(const char *file);
|
|
R_API char *r_line_readline();
|
|
/* label ?! */
|
|
R_API int r_line_hist_add(const char *line);
|
|
R_API int r_line_hist_save(const char *file);
|
|
R_API int r_line_hist_label(const char *label, void (*cb)(const char*));
|
|
R_API void r_line_label_show();
|
|
#endif
|
|
|
|
#endif
|