blob: 75d9485e6379a72ecb8af74fceaa14ac74279ad9 (
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
|
#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_RC_LAST = APLWC_INVALID_UTF8
};
struct aplwc;
struct aplwc_line;
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 *);
enum aplwc_rc aplwc_eval(struct aplwc_line *);
#define APLWC_MIN_MEM (64)
#endif /* APLWC_H */
|