Add sexp_read_atom()

This commit is contained in:
Tony Garnock-Jones 2010-12-29 18:34:09 -05:00
parent 20ef8dfd46
commit 23cb773630
2 changed files with 5 additions and 0 deletions

View File

@ -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 \
if (h->error_kind) goto error;

View File

@ -4,6 +4,7 @@
#define SEXP_ERROR_OVERFLOW 0x8000
#define SEXP_ERROR_SYNTAX 0x8001
extern sexp_t *sexp_read_atom(IOHandle *h);
extern sexp_t *sexp_read(IOHandle *h);
extern unsigned short sexp_write(IOHandle *h, sexp_t *x);