radare2/shlr/spp/r_api.h
pancake 4327d8322f
Bring back the mingw32 builds ##windows
* Massage conflicting function signatures spotted by mingw
* Fix the spp visibility issue
* Enable 32 and 64bit mingw builds in the CI
2021-11-28 22:10:51 +01:00

34 lines
810 B
C

#ifndef S_STRBUF_H
#define S_STRBUF_H
#ifndef R_FREE
#define R_FREE(x) { free(x); x = NULL; }
#endif
#ifndef R_NEW0
#define R_NEW0(x) (x*)calloc(1,sizeof(x))
#endif
#if USE_R2
#include <r_util.h>
#else
SStrBuf *r_strbuf_new(const char *s);
bool r_strbuf_set(SStrBuf *sb, const char *s);
bool r_strbuf_append(SStrBuf *sb, const char *s);
char *r_strbuf_get(SStrBuf *sb);
char *r_strbuf_drain(SStrBuf *sb);
void r_strbuf_free(SStrBuf *sb);
void r_strbuf_fini(SStrBuf *sb);
void r_strbuf_init(SStrBuf *sb);
int r_sys_setenv(const char *key, const char *value);
char *r_sys_getenv(const char *key);
int r_sys_getpid(void);
#endif
#ifdef _MSC_VER
S_API void out_printf(Output *out, char *str, ...);
#else
S_API void out_printf(Output *out, char *str, ...) __attribute__ ((format (printf, 2, 3)));
#endif
#endif