*** empty log message ***

This commit is contained in:
hyung-hwan 2005-09-18 03:57:26 +00:00
parent bfeb8dac69
commit 84badb1a49
2 changed files with 18 additions and 18 deletions

View File

@ -1,15 +1,16 @@
/*
* $Id: lsp.c,v 1.2 2005-09-17 17:50:45 bacon Exp $
* $Id: lsp.c,v 1.3 2005-09-18 03:57:26 bacon Exp $
*/
#include <xp/lsp/lisp.h>
#include <xp/lsp/lsp.h>
#include <xp/bas/memory.h>
#include <xp/bas/assert.h>
xp_lisp_t*xp_lsp_open xp_lsp_t* lsp, xp_size_t mem_ubound, xp_size_t mem_ubound_inc)
xp_lsp_t* xp_lsp_open (xp_lsp_t* lsp,
xp_size_t mem_ubound, xp_size_t mem_ubound_inc)
{
if (lsp == XP_NULL) {
lsp = xp_lsp_t*)xp_malloc(sizeofxp_lsp_t));
lsp = (xp_lsp_t*)xp_malloc(sizeofxp_lsp_t));
if (lsp == XP_NULL) return lsp;
lsp->__malloced = xp_true;
}
@ -34,24 +35,23 @@ xp_lisp_t*xp_lsp_open xp_lsp_t* lsp, xp_size_t mem_ubound, xp_size_t mem_ubound_
lsp->mem = xp_lsp_mem_new (mem_ubound, mem_ubound_inc);
if (lsp->mem == XP_NULL) {
xp_lsp_token_free (lsp->token);
free (lsp);
if (lsp->__malloced) xp_free (lsp);
return XP_NULL;
}
if xp_lsp_add_prims (lsp->mem) == -1) {
if (xp_lsp_add_prims (lsp->mem) == -1) {
xp_lsp_mem_free (lsp->mem);
xp_lsp_token_free (lsp->token);
free (lsp);
if (lsp->__malloced) xp_free (lsp);
return XP_NULL;
}
return lsp;
}
voidxp_lsp_free xp_lsp_t* lsp)
void xp_lsp_close (xp_lsp_t* lsp)
{
xp_assert (lsp != XP_NULL);
xp_lsp_mem_free (lsp->mem);
xp_lsp_token_free (lsp->token);
if (lsp->__malloced) xp_free (lsp);

View File

@ -1,5 +1,5 @@
/*
* $Id: lsp.h,v 1.2 2005-09-17 17:50:45 bacon Exp $
* $Id: lsp.h,v 1.3 2005-09-18 03:57:26 bacon Exp $
*/
#ifndef _XP_LSP_LSP_H_