mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-12 01:25:35 +00:00
![pancake](/assets/img/avatar_default.png)
- Fixes ruby warnings - Follow java syntax conventions - Helped to identify and fix bugs in many vapis - Sync swig examples - Add test-r_core.rb (ruby test for RCore) * Some work in r_cons, some refactoring and cleanup - scr.html is now working again - w32 cons support should work now - Rename r_cons_get_columns -> r_cons_get_size() - But it needs more work * Typedef all r_range, r_parse and r_anal structs - Add missing r_lib.pc in configure.acr * 'make' clean now removes the libr* in swig/${LANG}/
40 lines
1.1 KiB
C
40 lines
1.1 KiB
C
/* radare - LGPL - Copyright 2009 nibble<.ds@gmail.com> */
|
|
|
|
#ifndef _INCLUDE_R_PARSE_H_
|
|
#define _INCLUDE_R_PARSE_H_
|
|
|
|
#include <r_types.h>
|
|
#include <list.h>
|
|
|
|
// XXX : remove this define???
|
|
#define R_PARSE_STRLEN 256
|
|
|
|
typedef struct r_parse_t {
|
|
void *user;
|
|
struct r_parse_handle_t *cur;
|
|
struct list_head parsers;
|
|
} RParse;
|
|
|
|
typedef struct r_parse_handle_t {
|
|
char *name;
|
|
char *desc;
|
|
int (*init)(void *user);
|
|
int (*fini)(void *user);
|
|
int (*parse)(struct r_parse_t *p, void *data, char *str);
|
|
int (*assemble)(struct r_parse_t *p, char *data, char *str);
|
|
struct list_head list;
|
|
} RParseHandle;
|
|
|
|
/* parse.c */
|
|
R_API struct r_parse_t *r_parse_new();
|
|
R_API void r_parse_free(struct r_parse_t *p);
|
|
R_API struct r_parse_t *r_parse_init(struct r_parse_t *p);
|
|
R_API void r_parse_set_user_ptr(struct r_parse_t *p, void *user);
|
|
R_API int r_parse_add(struct r_parse_t *p, struct r_parse_handle_t *foo);
|
|
R_API int r_parse_list(struct r_parse_t *p);
|
|
R_API int r_parse_use(struct r_parse_t *p, const char *name);
|
|
R_API int r_parse_parse(struct r_parse_t *p, void *data, char *str);
|
|
R_API int r_parse_assemble(struct r_parse_t *p, char *data, char *str);
|
|
|
|
#endif
|