*** empty log message ***

This commit is contained in:
hyung-hwan 2005-02-05 05:30:25 +00:00
parent b472d0006a
commit fc5f362c97
5 changed files with 18 additions and 13 deletions

View File

@ -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 <xp/lisp/lisp.h> #include <xp/lisp/lisp.h>
#include <xp/c/stdlib.h> #include <xp/c/stdlib.h>
#include <xp/c/assert.h>
xp_lisp_t* xp_lisp_new (xp_size_t mem_ubound, xp_size_t mem_ubound_inc) xp_lisp_t* xp_lisp_new (xp_size_t mem_ubound, xp_size_t mem_ubound_inc)
{ {

View File

@ -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 <xp/lisp/memory.h> #include <xp/lisp/memory.h>
#include <xp/lisp/primitive.h> #include <xp/lisp/primitive.h>
#include <xp/c/stdlib.h> #include <xp/c/stdlib.h>
#include <xp/c/assert.h>
xp_lisp_mem_t* xp_lisp_mem_new (xp_size_t ubound, xp_size_t ubound_inc) xp_lisp_mem_t* xp_lisp_mem_new (xp_size_t ubound, xp_size_t ubound_inc)
{ {

View File

@ -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 <xp/lisp/lisp.h> #include <xp/lisp/lisp.h>
#include <xp/lisp/memory.h> #include <xp/lisp/memory.h>
#include <xp/lisp/primitive.h> #include <xp/lisp/primitive.h>
#include <xp/c/assert.h>
xp_lisp_obj_t* xp_lisp_prim_abort (xp_lisp_t* lsp, xp_lisp_obj_t* args) xp_lisp_obj_t* xp_lisp_prim_abort (xp_lisp_t* lsp, xp_lisp_obj_t* args)
{ {

View File

@ -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 <xp/lisp/lisp.h> #include <xp/lisp/lisp.h>
#include <xp/lisp/token.h> #include <xp/lisp/token.h>
#include <xp/c/assert.h>
#define IS_SPACE(x) xp_isspace(x) #define IS_SPACE(x) xp_isspace(x)
#define IS_DIGIT(x) xp_isdigit(x) #define IS_DIGIT(x) xp_isdigit(x)

View File

@ -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 <xp/lisp/token.h>
#include <stdlib.h> #include <xp/c/stdlib.h>
#include <xp/c/assert.h>
xp_lisp_token_t* xp_lisp_token_new (xp_size_t capacity) 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); 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; 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) { if (token->buffer == XP_NULL) {
free (token); xp_free (token);
return XP_NULL; 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) void xp_lisp_token_free (xp_lisp_token_t* token)
{ {
free (token->buffer); xp_free (token->buffer);
free (token); xp_free (token);
} }
int xp_lisp_token_addc (xp_lisp_token_t* token, xp_lisp_cint c) 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; 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; if (new_buffer == XP_NULL) return XP_NULL;
old_buffer = token->buffer; old_buffer = token->buffer;