*** empty log message ***
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: err.c,v 1.12 2007-02-23 10:53:38 bacon Exp $
|
||||
* $Id: err.c,v 1.13 2007-02-24 14:32:10 bacon Exp $
|
||||
*
|
||||
* {License}
|
||||
*/
|
||||
@ -64,6 +64,7 @@ void ase_lsp_seterror (
|
||||
{
|
||||
case 0:
|
||||
lsp->prmfns.misc.sprintf (
|
||||
lsp->prmfns.misc.custom_data,
|
||||
lsp->errmsg,
|
||||
ASE_COUNTOF(lsp->errmsg),
|
||||
errfmt);
|
||||
@ -71,6 +72,7 @@ void ase_lsp_seterror (
|
||||
|
||||
case 1:
|
||||
lsp->prmfns.misc.sprintf (
|
||||
lsp->prmfns.misc.custom_data,
|
||||
lsp->errmsg,
|
||||
ASE_COUNTOF(lsp->errmsg),
|
||||
errfmt,
|
||||
@ -79,6 +81,7 @@ void ase_lsp_seterror (
|
||||
|
||||
case 2:
|
||||
lsp->prmfns.misc.sprintf (
|
||||
lsp->prmfns.misc.custom_data,
|
||||
lsp->errmsg,
|
||||
ASE_COUNTOF(lsp->errmsg),
|
||||
errfmt,
|
||||
@ -88,6 +91,7 @@ void ase_lsp_seterror (
|
||||
|
||||
case 3:
|
||||
lsp->prmfns.misc.sprintf (
|
||||
lsp->prmfns.misc.custom_data,
|
||||
lsp->errmsg,
|
||||
ASE_COUNTOF(lsp->errmsg),
|
||||
errfmt,
|
||||
@ -98,6 +102,7 @@ void ase_lsp_seterror (
|
||||
|
||||
case 4:
|
||||
lsp->prmfns.misc.sprintf (
|
||||
lsp->prmfns.misc.custom_data,
|
||||
lsp->errmsg,
|
||||
ASE_COUNTOF(lsp->errmsg),
|
||||
errfmt,
|
||||
@ -109,6 +114,7 @@ void ase_lsp_seterror (
|
||||
|
||||
case 5:
|
||||
lsp->prmfns.misc.sprintf (
|
||||
lsp->prmfns.misc.custom_data,
|
||||
lsp->errmsg,
|
||||
ASE_COUNTOF(lsp->errmsg),
|
||||
errfmt,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: lsp.c,v 1.25 2007-02-23 10:53:38 bacon Exp $
|
||||
* $Id: lsp.c,v 1.26 2007-02-24 14:32:11 bacon Exp $
|
||||
*
|
||||
* {License}
|
||||
*/
|
||||
@ -48,7 +48,7 @@ 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, ASE_SIZEOF(ase_lsp_t));
|
||||
prmfns->mmgr.custom_data, ASE_SIZEOF(ase_lsp_t));
|
||||
#endif
|
||||
if (lsp == ASE_NULL) return ASE_NULL;
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: lsp.h,v 1.39 2007-02-23 10:53:38 bacon Exp $
|
||||
* $Id: lsp.h,v 1.40 2007-02-24 14:32:11 bacon Exp $
|
||||
*
|
||||
* {License}
|
||||
*/
|
||||
@ -17,13 +17,14 @@ typedef struct ase_lsp_prmfns_t ase_lsp_prmfns_t;
|
||||
typedef ase_ssize_t (*ase_lsp_io_t) (
|
||||
int cmd, void* arg, ase_char_t* data, ase_size_t count);
|
||||
|
||||
typedef ase_real_t (*ase_lsp_pow_t) (ase_real_t x, ase_real_t y);
|
||||
|
||||
typedef ase_real_t (*ase_lsp_pow_t) (
|
||||
void* custom, ase_real_t x, ase_real_t y);
|
||||
typedef int (*ase_lsp_sprintf_t) (
|
||||
ase_char_t* buf, ase_size_t size, const ase_char_t* fmt, ...);
|
||||
typedef void (*ase_lsp_aprintf_t) (const ase_char_t* fmt, ...);
|
||||
typedef void (*ase_lsp_dprintf_t) (const ase_char_t* fmt, ...);
|
||||
typedef void (*ase_lsp_abort_t) (void* custom_data);
|
||||
void* custom, ase_char_t* buf, ase_size_t size,
|
||||
const ase_char_t* fmt, ...);
|
||||
typedef void (*ase_lsp_aprintf_t) (void* custom, const ase_char_t* fmt, ...);
|
||||
typedef void (*ase_lsp_dprintf_t) (void* custom, const ase_char_t* fmt, ...);
|
||||
typedef void (*ase_lsp_abort_t) (void* custom);
|
||||
|
||||
struct ase_lsp_prmfns_t
|
||||
{
|
||||
@ -39,7 +40,6 @@ struct ase_lsp_prmfns_t
|
||||
ase_lsp_abort_t abort;
|
||||
void* custom_data;
|
||||
} misc;
|
||||
|
||||
};
|
||||
|
||||
/* io function commands */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: mem.c,v 1.31 2007-02-23 10:53:38 bacon Exp $
|
||||
* $Id: mem.c,v 1.32 2007-02-24 14:32:11 bacon Exp $
|
||||
*
|
||||
* {License}
|
||||
*/
|
||||
@ -96,6 +96,7 @@ ase_lsp_obj_t* ase_lsp_alloc (ase_lsp_mem_t* mem, int type, ase_size_t size)
|
||||
|
||||
/* TODO: remove the following line... */
|
||||
ase_lsp_gc (mem);
|
||||
|
||||
if (mem->count >= mem->ubound) ase_lsp_gc (mem);
|
||||
if (mem->count >= mem->ubound)
|
||||
{
|
||||
@ -326,6 +327,7 @@ static void __mark_objs_in_use (ase_lsp_mem_t* mem)
|
||||
if (mem->macro != ASE_NULL) __mark_obj (mem->lsp, mem->macro);
|
||||
}
|
||||
|
||||
#include <ase/utl/stdio.h>
|
||||
static void __sweep_unmarked_objs (ase_lsp_mem_t* mem)
|
||||
{
|
||||
ase_lsp_obj_t* obj, * prev, * next;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: misc.c,v 1.9 2007-02-23 10:53:39 bacon Exp $
|
||||
* $Id: misc.c,v 1.10 2007-02-24 14:32:11 bacon Exp $
|
||||
*
|
||||
* {License}
|
||||
*/
|
||||
@ -580,12 +580,14 @@ int ase_lsp_assertfail (ase_lsp_t* lsp,
|
||||
if (desc == ASE_NULL)
|
||||
{
|
||||
lsp->prmfns.misc.aprintf (
|
||||
lsp->prmfns.misc.custom_data,
|
||||
ASE_T("ASSERTION FAILURE AT FILE %s LINE %d\n%s\n"),
|
||||
file, line, expr);
|
||||
}
|
||||
else
|
||||
{
|
||||
lsp->prmfns.misc.aprintf (
|
||||
lsp->prmfns.misc.custom_data,
|
||||
ASE_T("ASSERTION FAILURE AT FILE %s LINE %d\n%s\n\nDESCRIPTION:\n%s\n"),
|
||||
file, line, expr, desc);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: print.c,v 1.25 2007-02-23 10:53:39 bacon Exp $
|
||||
* $Id: print.c,v 1.26 2007-02-24 14:32:11 bacon Exp $
|
||||
*
|
||||
* {License}
|
||||
*/
|
||||
@ -45,18 +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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
buf, ASE_COUNTOF(buf),
|
||||
ASE_T("%d"), (int)ASE_LSP_IVAL(obj));
|
||||
#else
|
||||
@ -66,7 +70,9 @@ static int __print (ase_lsp_t* lsp, const ase_lsp_obj_t* obj, ase_bool_t prt_con
|
||||
break;
|
||||
|
||||
case ASE_LSP_OBJ_REAL:
|
||||
lsp->prmfns.misc.sprintf (buf, ASE_COUNTOF(buf),
|
||||
lsp->prmfns.misc.sprintf (
|
||||
lsp->prmfns.misc.custom_data,
|
||||
buf, ASE_COUNTOF(buf),
|
||||
ASE_T("%Lf"), (long double)ASE_LSP_RVAL(obj));
|
||||
|
||||
OUTPUT_STR (lsp, buf);
|
||||
@ -128,7 +134,9 @@ static int __print (ase_lsp_t* lsp, const ase_lsp_obj_t* obj, ase_bool_t prt_con
|
||||
break;
|
||||
|
||||
default:
|
||||
lsp->prmfns.misc.sprintf (buf, ASE_COUNTOF(buf),
|
||||
lsp->prmfns.misc.sprintf (
|
||||
lsp->prmfns.misc.custom_data,
|
||||
buf, ASE_COUNTOF(buf),
|
||||
ASE_T("unknown object type: %d"), ASE_LSP_TYPE(obj));
|
||||
OUTPUT_STR (lsp, buf);
|
||||
}
|
||||
|
Reference in New Issue
Block a user