radare2/libr/include/r_parse.h
pancake 54bdfb22bd * Uppsercase classnames (rCore -> RCore)
- 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}/
2010-01-26 01:28:33 +01:00

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