This commit is contained in:
2008-08-19 05:21:48 +00:00
parent 63014b5fc8
commit 3cbefaa12c
37 changed files with 465 additions and 544 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: err.c 215 2008-06-19 10:27:37Z baconevi $
* $Id: err.c 332 2008-08-18 11:21:48Z baconevi $
*
* {License}
*/
@ -64,7 +64,7 @@ void ase_lsp_seterror (
{
case 0:
lsp->prmfns.misc.sprintf (
lsp->prmfns.misc.custom_data,
lsp->prmfns.misc.data,
lsp->errmsg,
ASE_COUNTOF(lsp->errmsg),
errfmt);
@ -72,7 +72,7 @@ void ase_lsp_seterror (
case 1:
lsp->prmfns.misc.sprintf (
lsp->prmfns.misc.custom_data,
lsp->prmfns.misc.data,
lsp->errmsg,
ASE_COUNTOF(lsp->errmsg),
errfmt,
@ -81,7 +81,7 @@ void ase_lsp_seterror (
case 2:
lsp->prmfns.misc.sprintf (
lsp->prmfns.misc.custom_data,
lsp->prmfns.misc.data,
lsp->errmsg,
ASE_COUNTOF(lsp->errmsg),
errfmt,
@ -91,7 +91,7 @@ void ase_lsp_seterror (
case 3:
lsp->prmfns.misc.sprintf (
lsp->prmfns.misc.custom_data,
lsp->prmfns.misc.data,
lsp->errmsg,
ASE_COUNTOF(lsp->errmsg),
errfmt,
@ -102,7 +102,7 @@ void ase_lsp_seterror (
case 4:
lsp->prmfns.misc.sprintf (
lsp->prmfns.misc.custom_data,
lsp->prmfns.misc.data,
lsp->errmsg,
ASE_COUNTOF(lsp->errmsg),
errfmt,
@ -114,7 +114,7 @@ void ase_lsp_seterror (
case 5:
lsp->prmfns.misc.sprintf (
lsp->prmfns.misc.custom_data,
lsp->prmfns.misc.data,
lsp->errmsg,
ASE_COUNTOF(lsp->errmsg),
errfmt,

View File

@ -1,5 +1,5 @@
/*
* $Id: lsp.c 232 2008-06-28 09:38:00Z baconevi $
* $Id: lsp.c 332 2008-08-18 11:21:48Z baconevi $
*
* {License}
*/
@ -46,14 +46,14 @@ ase_lsp_t* ase_lsp_open (
lsp = (ase_lsp_t*) malloc (ASE_SIZEOF(ase_lsp_t));
#else
lsp = (ase_lsp_t*) prmfns->mmgr.malloc (
prmfns->mmgr.custom_data, ASE_SIZEOF(ase_lsp_t));
prmfns->mmgr.data, ASE_SIZEOF(ase_lsp_t));
#endif
if (lsp == ASE_NULL) return ASE_NULL;
/* it uses the built-in ase_lsp_memset because lsp is not
* fully initialized yet */
ase_memset (lsp, 0, ASE_SIZEOF(ase_lsp_t));
ase_memcpy (&lsp->prmfns, prmfns, ASE_SIZEOF(lsp->prmfns));
ASE_MEMSET (lsp, 0, ASE_SIZEOF(ase_lsp_t));
ASE_MEMCPY (&lsp->prmfns, prmfns, ASE_SIZEOF(lsp->prmfns));
lsp->assoc_data = ASE_NULL;
if (ase_lsp_name_open(&lsp->token.name, 0, lsp) == ASE_NULL)

View File

@ -1,5 +1,5 @@
/*
* $Id: lsp_i.h 232 2008-06-28 09:38:00Z baconevi $
* $Id: lsp_i.h 332 2008-08-18 11:21:48Z baconevi $
*
* {License}
*/
@ -7,7 +7,7 @@
#ifndef _ASE_LSP_LSPI_H_
#define _ASE_LSP_LSPI_H_
#include <ase/cmn/mem.h>
#include "../cmn/mem.h"
#include <ase/cmn/str.h>
#include <ase/lsp/lsp.h>

View File

@ -1,5 +1,5 @@
/*
* $Id: mem.c 215 2008-06-19 10:27:37Z baconevi $
* $Id: mem.c 332 2008-08-18 11:21:48Z baconevi $
*
* {License}
*/
@ -16,7 +16,7 @@ ase_lsp_mem_t* ase_lsp_openmem (
mem = (ase_lsp_mem_t*) ASE_LSP_MALLOC (lsp, ASE_SIZEOF(ase_lsp_mem_t));
if (mem == ASE_NULL) return ASE_NULL;
ase_memset (mem, 0, ASE_SIZEOF(ase_lsp_mem_t));
ASE_MEMSET (mem, 0, ASE_SIZEOF(ase_lsp_mem_t));
mem->lsp = lsp;
/* create a new root environment frame */

View File

@ -1,5 +1,5 @@
/*
* $Id: name.c 215 2008-06-19 10:27:37Z baconevi $
* $Id: name.c 332 2008-08-18 11:21:48Z baconevi $
*
* {License}
*/
@ -71,7 +71,7 @@ int ase_lsp_name_addc (ase_lsp_name_t* name, ase_cint_t c)
if (space == ASE_NULL) return -1;
/* don't need to copy up to the terminating null */
ase_memcpy (space, name->buf, name->capa*ASE_SIZEOF(ase_char_t));
ASE_MEMCPY (space, name->buf, name->capa*ASE_SIZEOF(ase_char_t));
}
else
{

View File

@ -1,5 +1,5 @@
/*
* $Id: print.c 215 2008-06-19 10:27:37Z baconevi $
* $Id: print.c 332 2008-08-18 11:21:48Z baconevi $
*
* {License}
*/
@ -45,22 +45,22 @@ static int __print (ase_lsp_t* lsp, const ase_lsp_obj_t* obj, ase_bool_t prt_con
case ASE_LSP_OBJ_INT:
#if ASE_SIZEOF_LONG_LONG > 0
lsp->prmfns.misc.sprintf (
lsp->prmfns.misc.custom_data,
lsp->prmfns.misc.data,
buf, ASE_COUNTOF(buf),
ASE_T("%lld"), (long long)ASE_LSP_IVAL(obj));
#elif ASE_SIZEOF___INT64 > 0
lsp->prmfns.misc.sprintf (
lsp->prmfns.misc.custom_data,
lsp->prmfns.misc.data,
buf, ASE_COUNTOF(buf),
ASE_T("%I64d"), (__int64)ASE_LSP_IVAL(obj));
#elif ASE_SIZEOF_LONG > 0
lsp->prmfns.misc.sprintf (
lsp->prmfns.misc.custom_data,
lsp->prmfns.misc.data,
buf, ASE_COUNTOF(buf),
ASE_T("%ld"), (long)ASE_LSP_IVAL(obj));
#elif ASE_SIZEOF_INT > 0
lsp->prmfns.misc.sprintf (
lsp->prmfns.misc.custom_data,
lsp->prmfns.misc.data,
buf, ASE_COUNTOF(buf),
ASE_T("%d"), (int)ASE_LSP_IVAL(obj));
#else
@ -71,7 +71,7 @@ static int __print (ase_lsp_t* lsp, const ase_lsp_obj_t* obj, ase_bool_t prt_con
case ASE_LSP_OBJ_REAL:
lsp->prmfns.misc.sprintf (
lsp->prmfns.misc.custom_data,
lsp->prmfns.misc.data,
buf, ASE_COUNTOF(buf),
ASE_T("%Lf"), (long double)ASE_LSP_RVAL(obj));
@ -135,7 +135,7 @@ static int __print (ase_lsp_t* lsp, const ase_lsp_obj_t* obj, ase_bool_t prt_con
default:
lsp->prmfns.misc.sprintf (
lsp->prmfns.misc.custom_data,
lsp->prmfns.misc.data,
buf, ASE_COUNTOF(buf),
ASE_T("unknown object type: %d"), ASE_LSP_TYPE(obj));
OUTPUT_STR (lsp, buf);