Add sexp_read_atom()
This commit is contained in:
parent
20ef8dfd46
commit
23cb773630
4
sexpio.c
4
sexpio.c
|
@ -55,6 +55,10 @@ static sexp_t *read_simple_string(IOHandle *h, cmsg_bytes_t buf) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sexp_t *sexp_read_atom(IOHandle *h) {
|
||||||
|
return read_simple_string(h, EMPTY_BYTES);
|
||||||
|
}
|
||||||
|
|
||||||
#define CHECKH \
|
#define CHECKH \
|
||||||
if (h->error_kind) goto error;
|
if (h->error_kind) goto error;
|
||||||
|
|
||||||
|
|
1
sexpio.h
1
sexpio.h
|
@ -4,6 +4,7 @@
|
||||||
#define SEXP_ERROR_OVERFLOW 0x8000
|
#define SEXP_ERROR_OVERFLOW 0x8000
|
||||||
#define SEXP_ERROR_SYNTAX 0x8001
|
#define SEXP_ERROR_SYNTAX 0x8001
|
||||||
|
|
||||||
|
extern sexp_t *sexp_read_atom(IOHandle *h);
|
||||||
extern sexp_t *sexp_read(IOHandle *h);
|
extern sexp_t *sexp_read(IOHandle *h);
|
||||||
extern unsigned short sexp_write(IOHandle *h, sexp_t *x);
|
extern unsigned short sexp_write(IOHandle *h, sexp_t *x);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue