diff options
author | Niels Möller <nisse@lysator.liu.se> | 2002-11-10 14:38:50 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2002-11-10 14:38:50 +0100 |
commit | 1343434e1c21f1ad4441339d1b8a30d2ffe9c268 (patch) | |
tree | 25444ee886799180b952894ab194217b8e05e436 /sexp.h | |
parent | a8ff180596b0f16837bc08cf493c0f9224c6233f (diff) | |
download | nettle-1343434e1c21f1ad4441339d1b8a30d2ffe9c268.tar.gz |
* sexp.h (struct sexp_iterator): New field start.
* sexp.c (sexp_iterator_subexpr): New function.
(sexp_iterator_parse): Initialize ITERATOR->start.
Rev: src/nettle/sexp.c:1.11
Rev: src/nettle/sexp.h:1.8
Diffstat (limited to 'sexp.h')
-rw-r--r-- | sexp.h | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -36,7 +36,9 @@ struct sexp_iterator { unsigned length; const uint8_t *buffer; - + + /* Points at the start of the current sub expression. */ + unsigned start; /* If type is SEXP_LIST, pos points at the start of the current * element. Otherwise, it points at the end. */ unsigned pos; @@ -75,6 +77,12 @@ sexp_iterator_enter_list(struct sexp_iterator *iterator); int sexp_iterator_exit_list(struct sexp_iterator *iterator); +/* Gets start and length of the current subexpression. Implies + * sexp_iterator_next. */ +const uint8_t * +sexp_iterator_subexpr(struct sexp_iterator *iterator, + unsigned *length); + /* Checks the type of the current expression, which should be a list * |