Commit 5fce20ab authored by Niels Möller's avatar Niels Möller

* src/parse.c (parse_rest, parse_rest_copy): Renamed parse_rest to

parse_rest_copy. New function parse_rest.

* src/parse.c (parse_rest): New function.

Rev: src/parse.c:1.33
Rev: src/parse.h:1.25
parent 8b094b3e
......@@ -306,8 +306,18 @@ parse_atom_list(struct simple_buffer *buffer, unsigned limit)
return parse_atoms(&sub_buffer, limit);
}
void
parse_rest(struct simple_buffer *buffer,
UINT32 *length, const UINT8 **start)
{
*length = LEFT;
*start = HERE;
ADVANCE(*length);
}
struct lsh_string *
parse_rest(struct simple_buffer *buffer)
parse_rest_copy(struct simple_buffer *buffer)
{
UINT32 length = LEFT;
struct lsh_string *s = ssh_format("%ls", length, HERE);
......
......@@ -83,9 +83,13 @@ struct int_list *parse_atoms(struct simple_buffer *buffer, unsigned limit);
* read. Returns a NULL pointer on error. */
struct int_list *parse_atom_list(struct simple_buffer *buffer, unsigned limit);
void
parse_rest(struct simple_buffer *buffer,
UINT32 *length, const UINT8 **start);
/* Copies the rest of the buffer into a string. */
struct lsh_string *
parse_rest(struct simple_buffer *buffer);
parse_rest_copy(struct simple_buffer *buffer);
/* Returns success (i.e. 1) iff there is no data left */
int parse_eod(struct simple_buffer *buffer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment