blob: a22bd8d14cfc3cb1c8c655722f795e10ed974967 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#ifndef APLWC_H
#define APLWC_H
#include <stdint.h>
#include <stddef.h>
enum aplwc_rc {
APLWC_OK,
APLWC_OUT_OF_MEMORY,
APLWC_NOT_YET_IMPLEMENTED,
APLWC_INVALID_UTF8,
APLWC_INVALID_SYNTAX,
APLWC_RC_LAST = APLWC_INVALID_SYNTAX
};
struct aplwc;
struct aplwc_line;
struct aplwc_value;
enum aplwc_rc aplwc_new(struct aplwc **, uint8_t *, size_t);
void aplwc_destroy(struct aplwc *);
const char *aplwc_errstr_rc(enum aplwc_rc);
const char *aplwc_errstr(struct aplwc *);
enum aplwc_rc aplwc_last_error(struct aplwc *);
struct aplwc_line *aplwc_read(struct aplwc *, const char *);
void aplwc_free_line(struct aplwc_line *);
struct aplwc_value *aplwc_eval(struct aplwc_line *);
void aplwc_free_value(struct aplwc_value *);
const char *aplwc_value_string(struct aplwc_value *);
enum aplwc_rc aplwc_load_module(struct aplwc *, const char *, const char *, int n);
#define APLWC_MIN_MEM (2048)
#endif /* APLWC_H */
|