Commit e326f14b authored by Niels Möller's avatar Niels Möller
Browse files

* src/parse.c (parse_next_atom): Made static. Use int to represent

atoms.
(parse_atom): Use int to represent atoms.

Rev: src/parse.c:1.28
Rev: src/parse.h:1.21
parent 3e4cb5f3
......@@ -210,7 +210,7 @@ parse_bignum(struct simple_buffer *buffer, mpz_t result)
}
int
parse_atom(struct simple_buffer *buffer, UINT32 *result)
parse_atom(struct simple_buffer *buffer, int *result)
{
UINT32 length;
const UINT8 *start;
......@@ -227,11 +227,13 @@ parse_atom(struct simple_buffer *buffer, UINT32 *result)
/* Returns 1 on success, 0 on failure, and -1 at end of buffer.
* Unknown atoms sets result to zero. */
/* NOTE: The end of buffer indication is never actually used. */
/* NOTE: This functions record the fact that it has read to the end of
* the buffer by setting the position to *beyond* the end of the
* buffer. */
int
parse_next_atom(struct simple_buffer *buffer, UINT32 *result)
static int
parse_next_atom(struct simple_buffer *buffer, int *result)
{
UINT32 i;
......@@ -276,7 +278,6 @@ parse_atoms(struct simple_buffer *buffer, unsigned limit)
for (i = 0; i < count; i++)
{
/* FIXME: Uses int * for UINT32 * argument. */
switch(parse_next_atom(buffer, LIST(res)+i))
{
case 1:
......
......@@ -72,11 +72,13 @@ int parse_boolean(struct simple_buffer *buffer, int *result);
int parse_bignum(struct simple_buffer *buffer, mpz_t result);
int parse_atom(struct simple_buffer *buffer, UINT32 *result);
int parse_atom(struct simple_buffer *buffer, int *result);
#if 0
/* Returns 1 on success, 0 on failure, and -1 at end of buffer.
* Unknown atoms sets result to zero. */
int parse_next_atom(struct simple_buffer *buffer, UINT32 *result);
#endif
/* Reads a list of atoms. The buffer should hold the list body; the
* length field should already be stripped off (usually by
......
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