This commit is contained in:
2008-08-21 03:17:25 +00:00
parent a95dad6655
commit 5e8901042a
40 changed files with 307 additions and 391 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: awk.h 332 2008-08-18 11:21:48Z baconevi $
* $Id: awk.h 337 2008-08-20 09:17:25Z baconevi $
*
* {License}
*/
@ -871,7 +871,7 @@ int ase_awk_setrec (ase_awk_run_t* run, ase_size_t idx, const ase_char_t* str, a
* RETURNS
* the pointer to the memory area allocated on success, ASE_NULL on failure
*/
void* ase_awk_malloc (
void* ase_awk_alloc (
/* the pointer to an ase_awk_t instance */
ase_awk_t* awk,
/* the size of memory to allocate in bytes */

View File

@ -29,15 +29,8 @@ enum ase_ccls_type_t
ASE_CCLS_PUNCT
};
struct ase_ccls_t
{
ase_bool_t(*is) (void* data, ase_cint_t c, ase_ccls_type_t type);
ase_cint_t(*to) (void* data, ase_cint_t c, ase_ccls_type_t type);
void* data;
};
#define ASE_CCLS_IS(ccls,c,is) ((ccls)->is((ccls)->data,c,is))
#define ASE_CCLS_TO(ccls,c,to) ((ccls)->to((ccls)->data,c,to))
#define ASE_CCLS_IS(ccls,c,type) ((ccls)->is((ccls)->data,c,type))
#define ASE_CCLS_TO(ccls,c,type) ((ccls)->to((ccls)->data,c,type))
#define ASE_CCLS_ISUPPER(ccls,c) ASE_CCLS_IS(ccls,c,ASE_CCLS_UPPER)
#define ASE_CCLS_ISLOWER(ccls,c) ASE_CCLS_IS(ccls,c,ASE_CCLS_LOWER)

View File

@ -1,5 +1,5 @@
/*
* $Id: mem.h 335 2008-08-20 08:22:07Z baconevi $
* $Id: mem.h 337 2008-08-20 09:17:25Z baconevi $
*
* {License}
*/
@ -18,24 +18,15 @@
/* allocate a memory block */
#define ASE_MMGR_ALLOC(mmgr,size) \
(mmgr)->alloc((mmgr)->data,size)
((mmgr)->alloc((mmgr)->data,size))
/* reallocate a memory block */
#define ASE_MMGR_REALLOC(mmgr,ptr,size) \
(mmgr)->realloc((mmgr)->data,ptr,size)
((mmgr)->realloc((mmgr)->data,ptr,size))
/* free a memory block */
#define ASE_MMGR_FREE(mmgr,ptr) \
(mmgr)->free((mmgr)->data,ptr)
/* define alias for ASE_MMGR_ALLOC */
#define ASE_MALLOC(mmgr,size) ASE_MMGR_ALLOC(mmgr,size)
/* define alias for ASE_MMGR_REALLOC */
#define ASE_REALLOC(mmgr,ptr,size) ASE_MMGR_REALLOC(mmgr,ptr,size)
/* define alias for ASE_MMGR_FREE */
#define ASE_FREE(mmgr,ptr) ASE_MMGR_FREE(mmgr,ptr)
((mmgr)->free((mmgr)->data,ptr))
#ifdef __cplusplus
extern "C" {

View File

@ -1,5 +1,5 @@
/*
* $Id: types.h 335 2008-08-20 08:22:07Z baconevi $
* $Id: types.h 337 2008-08-20 09:17:25Z baconevi $
*
* {License}
*/
@ -350,6 +350,7 @@ struct ase_mmgr_t
void* data;
};
/*
struct ase_ccls_t
{
ase_isccls_t is_upper;
@ -367,5 +368,13 @@ struct ase_ccls_t
ase_toccls_t to_lower;
void* data;
};
*/
struct ase_ccls_t
{
ase_bool_t (*is) (void* data, ase_cint_t c, int type);
ase_cint_t (*to) (void* data, ase_cint_t c, int type);
void* data;
};
#endif