1 #ifndef _INCLUDE_SPP_H_
2 #define _INCLUDE_SPP_H_
12 #define VERSION "1.2.0"
23 #if defined(__GNUC__) && __GNUC__ >= 4
24 #define S_API __attribute__((visibility("default")))
25 #elif defined(_MSC_VER)
26 #define S_API __declspec(dllexport)
32 #if defined(EMSCRIPTEN) || defined(__linux__) || defined(__APPLE__) || defined(__GNU__) || defined(__ANDROID__) || defined(__QNX__)
36 #if __KFBSD__ || defined(__NetBSD__) || defined(__OpenBSD__)
40 #if __WIN32__ || __CYGWIN__ || MINGW32
41 #define __addr_t_defined
44 #if __WIN32__ || MINGW32 && !__CYGWIN__ || _MSC_VER
58 #define pclose _pclose
60 #define snprintf _snprintf
69 #define DLL_LOCAL __attribute__ ((visibility ("hidden")))
73 #define GET_ARG(x,y,i) if (y[i][2]) x = y[i] + 2; else x = y[++i]
75 #define DEFAULT_PROC(x) \
76 struct Tag *tags = (struct Tag *)&x##_tags; \
77 struct Arg *args = (struct Arg *)&x##_args; \
78 struct Proc *proc = &x##_proc;
82 #define SStrBuf RzStrBuf
110 #define ARG_CALLBACK(x) int x (char *arg)
112 #define TAG_CALLBACK(x) int x (SppState *state, Output *out, char *buf)
113 #define PUT_CALLBACK(x) int x (Output *out, char *buf)
114 #define IS_SPACE(x) ((x==' ')||(x=='\t')||(x=='\r')||(x=='\n'))
const lzma_allocator const uint8_t * in
const lzma_allocator const uint8_t size_t uint8_t * out
S_API void spp_proc_eval(SppProc *p, char *buf, Output *out)
S_API void spp_eval(char *buf, Output *out)
struct s_strbuf_t SStrBuf
S_API int spp_run(char *buf, Output *out)
S_API void spp_free(Spp *s)
S_API void spp_proc_set(SppProc *p, const char *arg, int fail)
S_API int spp_file(const char *file, Output *out)
S_API char * spp_parse(Spp *s, const char *input)
S_API void spp_proc_list_kw(void)
S_API void spp_proc_list(void)
S_API Spp * spp_new(SppProc *proc)
S_API void spp_io(FILE *in, Output *out)
ARG_CALLBACK((*callback))
TAG_CALLBACK((*callback))
static bool input(void *ud, zip_uint8_t *data, zip_uint64_t length)