Rizin
unix-like reverse engineering framework and cli tools
rz_strpool.h
Go to the documentation of this file.
1 #ifndef RZ_STRPOOL_H
2 #define RZ_STRPOOL_H
3 
4 #include <rz_types.h>
5 
6 #define RZ_STRPOOL_INC 1024
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 typedef struct {
13  char *str;
14  int len;
15  int size;
16 } RzStrpool;
17 
19 RZ_API char *rz_strpool_alloc(RzStrpool *p, int l);
20 RZ_API int rz_strpool_memcat(RzStrpool *p, const char *s, int len);
22 RZ_API int rz_strpool_append(RzStrpool *p, const char *s);
25 RZ_API char *rz_strpool_get(RzStrpool *p, int index);
26 RZ_API char *rz_strpool_get_i(RzStrpool *p, int index);
27 RZ_API int rz_strpool_get_index(RzStrpool *p, const char *s);
28 RZ_API char *rz_strpool_next(RzStrpool *p, int index);
29 RZ_API char *rz_strpool_slice(RzStrpool *p, int index);
31 
32 #ifdef __cplusplus
33 }
34 #endif
35 
36 #endif // RZ_STRPOOL_H
size_t len
Definition: 6502dis.c:15
#define RZ_API
void * p
Definition: libc.cpp:67
int n
Definition: mipsasm.c:19
static RzSocket * s
Definition: rtr.c:28
RZ_API int rz_strpool_get_index(RzStrpool *p, const char *s)
Definition: strpool.c:122
RZ_API int rz_strpool_append(RzStrpool *p, const char *s)
Definition: strpool.c:70
RZ_API int rz_strpool_ansi_chop(RzStrpool *p, int n)
Definition: strpool.c:75
RZ_API char * rz_strpool_get(RzStrpool *p, int index)
Definition: strpool.c:103
RZ_API int rz_strpool_fit(RzStrpool *p)
Definition: strpool.c:87
RZ_API char * rz_strpool_get_i(RzStrpool *p, int index)
Definition: strpool.c:110
RZ_API char * rz_strpool_slice(RzStrpool *p, int index)
Definition: strpool.c:142
RZ_API char * rz_strpool_empty(RzStrpool *p)
Definition: strpool.c:27
RZ_API void rz_strpool_free(RzStrpool *p)
Definition: strpool.c:82
RZ_API char * rz_strpool_next(RzStrpool *p, int index)
Definition: strpool.c:127
RZ_API char * rz_strpool_alloc(RzStrpool *p, int l)
Definition: strpool.c:34
RZ_API RzStrpool * rz_strpool_new(int sz)
Definition: strpool.c:6
RZ_API int rz_strpool_memcat(RzStrpool *p, const char *s, int len)
Definition: strpool.c:61
char * str
Definition: rz_strpool.h:13
int size
Definition: rz_strpool.h:15