2021-05-20 01:34:23 +00:00
|
|
|
/* radare - LGPL - Copyright 2008-2021 - pancake */
|
2019-03-08 13:22:59 +00:00
|
|
|
|
|
|
|
#ifndef R2_MAIN_H
|
|
|
|
#define R2_MAIN_H
|
|
|
|
|
|
|
|
#include <r_types.h>
|
2020-03-27 16:06:40 +00:00
|
|
|
#include <r_getopt.h>
|
2019-03-08 13:22:59 +00:00
|
|
|
|
2021-05-21 10:54:48 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2019-04-08 14:31:21 +00:00
|
|
|
R_LIB_VERSION_HEADER(r_main);
|
|
|
|
|
2019-03-08 13:22:59 +00:00
|
|
|
typedef struct r_main_t {
|
2020-03-27 16:06:40 +00:00
|
|
|
const char *name;
|
|
|
|
int (*main)(int argc, const char **argv);
|
2019-03-08 13:22:59 +00:00
|
|
|
// stdin/stdout
|
|
|
|
} RMain;
|
|
|
|
|
2020-03-27 16:06:40 +00:00
|
|
|
typedef int (*RMainCallback)(int argc, const char **argv);
|
2019-07-10 16:45:20 +00:00
|
|
|
|
2019-03-08 13:22:59 +00:00
|
|
|
R_API RMain *r_main_new(const char *name);
|
|
|
|
R_API void r_main_free(RMain *m);
|
2020-03-27 16:06:40 +00:00
|
|
|
R_API int r_main_run(RMain *m, int argc, const char **argv);
|
2019-03-08 13:22:59 +00:00
|
|
|
|
2019-04-08 14:31:21 +00:00
|
|
|
R_API int r_main_version_print(const char *program);
|
2021-07-25 22:05:35 +00:00
|
|
|
R_API int r_main_ravc2(int argc, const char **argv);
|
2020-03-27 16:06:40 +00:00
|
|
|
R_API int r_main_rax2(int argc, const char **argv);
|
|
|
|
R_API int r_main_rarun2(int argc, const char **argv);
|
|
|
|
R_API int r_main_rahash2(int argc, const char **argv);
|
|
|
|
R_API int r_main_rabin2(int argc, const char **argv);
|
|
|
|
R_API int r_main_radare2(int argc, const char **argv);
|
|
|
|
R_API int r_main_rasm2(int argc, const char **argv);
|
|
|
|
R_API int r_main_r2agent(int argc, const char **argv);
|
|
|
|
R_API int r_main_rafind2(int argc, const char **argv);
|
|
|
|
R_API int r_main_radiff2(int argc, const char **argv);
|
|
|
|
R_API int r_main_ragg2(int argc, const char **argv);
|
2020-05-16 10:36:41 +00:00
|
|
|
R_API int r_main_rasign2(int argc, const char **argv);
|
2021-12-16 11:47:40 +00:00
|
|
|
R_API int r_main_r2pm(int argc, const char **argv);
|
2019-03-08 13:22:59 +00:00
|
|
|
|
2021-05-21 10:54:48 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2019-03-08 13:22:59 +00:00
|
|
|
#endif
|