diff --git a/ase/lsp/lisp.c b/ase/lsp/lisp.c index f0b486d0..97b0582d 100644 --- a/ase/lsp/lisp.c +++ b/ase/lsp/lisp.c @@ -1,9 +1,10 @@ /* - * $Id: lisp.c,v 1.4 2005-02-05 05:18:20 bacon Exp $ + * $Id: lisp.c,v 1.5 2005-02-05 05:30:25 bacon Exp $ */ #include #include +#include xp_lisp_t* xp_lisp_new (xp_size_t mem_ubound, xp_size_t mem_ubound_inc) { diff --git a/ase/lsp/memory.c b/ase/lsp/memory.c index bde784bb..d8980c6e 100644 --- a/ase/lsp/memory.c +++ b/ase/lsp/memory.c @@ -1,10 +1,11 @@ /* - * $Id: memory.c,v 1.4 2005-02-05 05:18:20 bacon Exp $ + * $Id: memory.c,v 1.5 2005-02-05 05:30:25 bacon Exp $ */ #include #include #include +#include xp_lisp_mem_t* xp_lisp_mem_new (xp_size_t ubound, xp_size_t ubound_inc) { diff --git a/ase/lsp/primitive.c b/ase/lsp/primitive.c index 0c22449b..4459d208 100644 --- a/ase/lsp/primitive.c +++ b/ase/lsp/primitive.c @@ -1,10 +1,11 @@ /* - * $Id: primitive.c,v 1.3 2005-02-05 05:18:20 bacon Exp $ + * $Id: primitive.c,v 1.4 2005-02-05 05:30:25 bacon Exp $ */ #include #include #include +#include xp_lisp_obj_t* xp_lisp_prim_abort (xp_lisp_t* lsp, xp_lisp_obj_t* args) { diff --git a/ase/lsp/read.c b/ase/lsp/read.c index e2bf0444..ca7db3f1 100644 --- a/ase/lsp/read.c +++ b/ase/lsp/read.c @@ -1,9 +1,10 @@ /* - * $Id: read.c,v 1.4 2005-02-05 05:18:20 bacon Exp $ + * $Id: read.c,v 1.5 2005-02-05 05:30:25 bacon Exp $ */ #include #include +#include #define IS_SPACE(x) xp_isspace(x) #define IS_DIGIT(x) xp_isdigit(x) diff --git a/ase/lsp/token.c b/ase/lsp/token.c index 858d5af2..f4dcbfa5 100644 --- a/ase/lsp/token.c +++ b/ase/lsp/token.c @@ -1,9 +1,10 @@ /* - * $Id: token.c,v 1.4 2005-02-05 05:18:20 bacon Exp $ + * $Id: token.c,v 1.5 2005-02-05 05:30:25 bacon Exp $ */ -#include "token.h" -#include +#include +#include +#include xp_lisp_token_t* xp_lisp_token_new (xp_size_t capacity) { @@ -11,12 +12,12 @@ xp_lisp_token_t* xp_lisp_token_new (xp_size_t capacity) xp_assert (capacity > 0); - token = (xp_lisp_token_t*)malloc (sizeof(xp_lisp_token_t)); + token = (xp_lisp_token_t*)xp_malloc (sizeof(xp_lisp_token_t)); if (token == XP_NULL) return XP_NULL; - token->buffer = (xp_lisp_char*)malloc ((capacity + 1) * sizeof(xp_lisp_char)); + token->buffer = (xp_lisp_char*)xp_malloc ((capacity + 1) * sizeof(xp_lisp_char)); if (token->buffer == XP_NULL) { - free (token); + xp_free (token); return XP_NULL; } @@ -32,8 +33,8 @@ xp_lisp_token_t* xp_lisp_token_new (xp_size_t capacity) void xp_lisp_token_free (xp_lisp_token_t* token) { - free (token->buffer); - free (token); + xp_free (token->buffer); + xp_free (token); } int xp_lisp_token_addc (xp_lisp_token_t* token, xp_lisp_cint c) @@ -65,7 +66,7 @@ xp_lisp_char* xp_lisp_token_transfer (xp_lisp_token_t* token, xp_size_t capacity { xp_lisp_char* old_buffer, * new_buffer; - new_buffer = (xp_lisp_char*)malloc((capacity + 1) * sizeof(xp_lisp_char)); + new_buffer = (xp_lisp_char*)xp_malloc((capacity + 1) * sizeof(xp_lisp_char)); if (new_buffer == XP_NULL) return XP_NULL; old_buffer = token->buffer;