diff --git a/ase/awk/awk.c b/ase/awk/awk.c index 083df070..fd56aba6 100644 --- a/ase/awk/awk.c +++ b/ase/awk/awk.c @@ -1,5 +1,5 @@ /* - * $Id: awk.c,v 1.3 2005-11-14 15:23:53 bacon Exp $ + * $Id: awk.c,v 1.4 2005-12-05 15:11:29 bacon Exp $ */ #include @@ -11,12 +11,12 @@ xp_awk_t* xp_awk_open (xp_awk_t* awk) if (awk == XP_NULL) { awk = (xp_awk_t*) xp_malloc (xp_sizeof(awk)); if (awk == XP_NULL) return XP_NULL; - awk->__malloced = xp_true; + awk->__dynamic = xp_true; } - else awk->__malloced = xp_false; + else awk->__dynamic = xp_false; if (xp_str_open(&awk->token.name, 128) == XP_NULL) { - if (awk->__malloced) xp_free (awk); + if (awk->__dynamic) xp_free (awk); return XP_NULL; } @@ -40,7 +40,7 @@ int xp_awk_close (xp_awk_t* awk) { if (xp_awk_detach_source(awk) == -1) return -1; xp_str_close (&awk->token.name); - if (awk->__malloced) xp_free (awk); + if (awk->__dynamic) xp_free (awk); return 0; } diff --git a/ase/awk/awk.h b/ase/awk/awk.h index 2f5a2d4d..e95753d7 100644 --- a/ase/awk/awk.h +++ b/ase/awk/awk.h @@ -1,5 +1,5 @@ /* - * $Id: awk.h,v 1.4 2005-11-14 15:23:53 bacon Exp $ + * $Id: awk.h,v 1.5 2005-12-05 15:11:29 bacon Exp $ */ #ifndef _XP_AWK_AWK_H_ @@ -64,7 +64,7 @@ struct xp_awk_t /* housekeeping */ int errnum; - xp_bool_t __malloced; + xp_bool_t __dynamic; }; #ifdef __cplusplus diff --git a/ase/awk/mem.c b/ase/awk/mem.c index e1e0d908..9dd633cd 100644 --- a/ase/awk/mem.c +++ b/ase/awk/mem.c @@ -1,5 +1,5 @@ /* - * $Id: mem.c,v 1.1 2005-09-30 09:40:15 bacon Exp $ + * $Id: mem.c,v 1.2 2005-12-05 15:11:29 bacon Exp $ */ #include @@ -15,14 +15,14 @@ xp_sce_mem_t* xp_sce_mem_open ( if (mem == XP_NULL) { mem = (xp_sce_mem_t*)xp_malloc(xp_sizeof(xp_sce_mem_t)); if (mem == XP_NULL) return XP_NULL; - mem->__malloced = xp_true; + mem->__dynamic = xp_true; } - else mem->__malloced = xp_false; + else mem->__dynamic = xp_false; slots = (xp_sce_obj_t**)xp_malloc ( capacity * xp_sizeof(xp_sce_obj_t*)); if (slots == XP_NULL) { - if (mem->__malloced) xp_free (mem); + if (mem->__dynamic) xp_free (mem); mem = XP_NULL; } @@ -47,7 +47,7 @@ void xp_sce_mem_close (xp_sce_mem_t* mem) mem->capacity = 0; mem->slots = XP_NULL; mem->free = XP_NULL; - if (mem->__malloced) xp_free (mem); + if (mem->__dynamic) xp_free (mem); } void xp_sce_mem_gc (xp_sce_mem_t* mem) diff --git a/ase/lsp/init.c b/ase/lsp/init.c index dacdbf69..38267f42 100644 --- a/ase/lsp/init.c +++ b/ase/lsp/init.c @@ -1,5 +1,5 @@ /* - * $Id: init.c,v 1.10 2005-09-21 11:52:36 bacon Exp $ + * $Id: init.c,v 1.11 2005-12-05 15:11:29 bacon Exp $ */ #include @@ -15,12 +15,12 @@ xp_lsp_t* xp_lsp_open (xp_lsp_t* lsp, if (lsp == XP_NULL) { lsp = (xp_lsp_t*)xp_malloc(xp_sizeof(xp_lsp_t)); if (lsp == XP_NULL) return lsp; - lsp->__malloced = xp_true; + lsp->__dynamic = xp_true; } - else lsp->__malloced = xp_false; + else lsp->__dynamic = xp_false; if (xp_lsp_token_open(&lsp->token, 0) == XP_NULL) { - if (lsp->__malloced) xp_free (lsp); + if (lsp->__dynamic) xp_free (lsp); return XP_NULL; } @@ -37,14 +37,14 @@ xp_lsp_t* xp_lsp_open (xp_lsp_t* lsp, lsp->mem = xp_lsp_mem_new (mem_ubound, mem_ubound_inc); if (lsp->mem == XP_NULL) { xp_lsp_token_close (&lsp->token); - if (lsp->__malloced) xp_free (lsp); + if (lsp->__dynamic) xp_free (lsp); return XP_NULL; } if (__add_builtin_prims(lsp) == -1) { xp_lsp_mem_free (lsp->mem); xp_lsp_token_close (&lsp->token); - if (lsp->__malloced) xp_free (lsp); + if (lsp->__dynamic) xp_free (lsp); return XP_NULL; } @@ -59,7 +59,7 @@ void xp_lsp_close (xp_lsp_t* lsp) xp_assert (lsp != XP_NULL); xp_lsp_mem_free (lsp->mem); xp_lsp_token_close (&lsp->token); - if (lsp->__malloced) xp_free (lsp); + if (lsp->__dynamic) xp_free (lsp); } int xp_lsp_attach_input (xp_lsp_t* lsp, xp_lsp_io_t input, void* arg) diff --git a/ase/lsp/lsp.h b/ase/lsp/lsp.h index 355aebb7..0893f46f 100644 --- a/ase/lsp/lsp.h +++ b/ase/lsp/lsp.h @@ -1,5 +1,5 @@ /* - * $Id: lsp.h,v 1.19 2005-10-19 15:44:29 bacon Exp $ + * $Id: lsp.h,v 1.20 2005-12-05 15:11:29 bacon Exp $ */ #ifndef _XP_LSP_LSP_H_ @@ -91,7 +91,7 @@ struct xp_lsp_t /* memory manager */ xp_lsp_mem_t* mem; - xp_bool_t __malloced; + xp_bool_t __dynamic; }; #ifdef __cplusplus diff --git a/ase/lsp/name.c b/ase/lsp/name.c index e89df7ee..4923467e 100644 --- a/ase/lsp/name.c +++ b/ase/lsp/name.c @@ -1,5 +1,5 @@ /* - * $Id: name.c,v 1.2 2005-09-18 11:34:35 bacon Exp $ + * $Id: name.c,v 1.3 2005-12-05 15:11:29 bacon Exp $ */ #include @@ -16,9 +16,9 @@ xp_lsp_name_t* xp_lsp_name_open ( name = (xp_lsp_name_t*) xp_malloc (xp_sizeof(xp_lsp_name_t)); if (name == XP_NULL) return XP_NULL; - name->__malloced = xp_true; + name->__dynamic = xp_true; } - else name->__malloced = xp_false; + else name->__dynamic = xp_false; if (capacity < xp_countof(name->static_buffer)) { name->buffer = name->static_buffer; @@ -27,7 +27,7 @@ xp_lsp_name_t* xp_lsp_name_open ( name->buffer = (xp_char_t*) xp_malloc ((capacity + 1) * xp_sizeof(xp_char_t)); if (name->buffer == XP_NULL) { - if (name->__malloced) xp_free (name); + if (name->__dynamic) xp_free (name); return XP_NULL; } } @@ -45,7 +45,7 @@ void xp_lsp_name_close (xp_lsp_name_t* name) xp_assert (name->buffer != name->static_buffer); xp_free (name->buffer); } - if (name->__malloced) xp_free (name); + if (name->__dynamic) xp_free (name); } int xp_lsp_name_addc (xp_lsp_name_t* name, xp_cint_t c) diff --git a/ase/lsp/name.h b/ase/lsp/name.h index 5cfc196b..9416c95a 100644 --- a/ase/lsp/name.h +++ b/ase/lsp/name.h @@ -1,5 +1,5 @@ /* - * $Id: name.h,v 1.2 2005-09-18 10:18:35 bacon Exp $ + * $Id: name.h,v 1.3 2005-12-05 15:11:29 bacon Exp $ */ #ifndef _XP_LSP_NAME_H_ @@ -14,7 +14,7 @@ struct xp_lsp_name_t xp_word_t size; xp_char_t* buffer; xp_char_t static_buffer[128]; - xp_bool_t __malloced; + xp_bool_t __dynamic; }; typedef struct xp_lsp_name_t xp_lsp_name_t; diff --git a/ase/lsp/token.c b/ase/lsp/token.c index 069ff36e..7a0456d9 100644 --- a/ase/lsp/token.c +++ b/ase/lsp/token.c @@ -1,5 +1,5 @@ /* - * $Id: token.c,v 1.11 2005-09-18 08:10:50 bacon Exp $ + * $Id: token.c,v 1.12 2005-12-05 15:11:29 bacon Exp $ */ #include @@ -12,12 +12,12 @@ xp_lsp_token_t* xp_lsp_token_open ( token = (xp_lsp_token_t*) xp_malloc (xp_sizeof(xp_lsp_token_t)); if (token == XP_NULL) return XP_NULL; - token->__malloced = xp_true; + token->__dynamic = xp_true; } - else token->__malloced = xp_false; + else token->__dynamic = xp_false; if (xp_lsp_name_open(&token->name, capacity) == XP_NULL) { - if (token->__malloced) xp_free (token); + if (token->__dynamic) xp_free (token); return XP_NULL; } @@ -32,7 +32,7 @@ xp_lsp_token_t* xp_lsp_token_open ( void xp_lsp_token_close (xp_lsp_token_t* token) { xp_lsp_name_close (&token->name); - if (token->__malloced) xp_free (token); + if (token->__dynamic) xp_free (token); } int xp_lsp_token_addc (xp_lsp_token_t* token, xp_cint_t c) diff --git a/ase/lsp/token.h b/ase/lsp/token.h index d516ae0c..7a6a65ef 100644 --- a/ase/lsp/token.h +++ b/ase/lsp/token.h @@ -1,5 +1,5 @@ /* - * $Id: token.h,v 1.10 2005-09-20 11:19:15 bacon Exp $ + * $Id: token.h,v 1.11 2005-12-05 15:11:29 bacon Exp $ */ #ifndef _XP_LSP_TOKEN_H_ @@ -21,7 +21,7 @@ struct xp_lsp_token_t xp_lsp_real_t rvalue; xp_lsp_name_t name; - xp_bool_t __malloced; + xp_bool_t __dynamic; }; typedef struct xp_lsp_token_t xp_lsp_token_t; diff --git a/ase/stx/memory.c b/ase/stx/memory.c index 36769150..84631579 100644 --- a/ase/stx/memory.c +++ b/ase/stx/memory.c @@ -1,5 +1,5 @@ /* - * $Id: memory.c,v 1.12 2005-06-08 16:00:51 bacon Exp $ + * $Id: memory.c,v 1.13 2005-12-05 15:11:29 bacon Exp $ */ #include @@ -15,14 +15,14 @@ xp_stx_memory_t* xp_stx_memory_open ( if (mem == XP_NULL) { mem = (xp_stx_memory_t*)xp_malloc(xp_sizeof(xp_stx_memory_t)); if (mem == XP_NULL) return XP_NULL; - mem->__malloced = xp_true; + mem->__dynamic = xp_true; } - else mem->__malloced = xp_false; + else mem->__dynamic = xp_false; slots = (xp_stx_object_t**)xp_malloc ( capacity * xp_sizeof(xp_stx_object_t*)); if (slots == XP_NULL) { - if (mem->__malloced) xp_free (mem); + if (mem->__dynamic) xp_free (mem); mem = XP_NULL; } @@ -47,7 +47,7 @@ void xp_stx_memory_close (xp_stx_memory_t* mem) mem->capacity = 0; mem->slots = XP_NULL; mem->free = XP_NULL; - if (mem->__malloced) xp_free (mem); + if (mem->__dynamic) xp_free (mem); } void xp_stx_memory_gc (xp_stx_memory_t* mem) diff --git a/ase/stx/name.c b/ase/stx/name.c index 8cecdd6e..4926fb4f 100644 --- a/ase/stx/name.c +++ b/ase/stx/name.c @@ -1,5 +1,5 @@ /* - * $Id: name.c,v 1.2 2005-07-12 16:16:42 bacon Exp $ + * $Id: name.c,v 1.3 2005-12-05 15:11:29 bacon Exp $ */ #include @@ -15,9 +15,9 @@ xp_stx_name_t* xp_stx_name_open ( name = (xp_stx_name_t*) xp_malloc (xp_sizeof(xp_stx_name_t)); if (name == XP_NULL) return XP_NULL; - name->__malloced = xp_true; + name->__dynamic = xp_true; } - else name->__malloced = xp_false; + else name->__dynamic = xp_false; if (capacity < xp_countof(name->static_buffer)) { name->buffer = name->static_buffer; @@ -26,7 +26,7 @@ xp_stx_name_t* xp_stx_name_open ( name->buffer = (xp_char_t*) xp_malloc ((capacity + 1) * xp_sizeof(xp_char_t)); if (name->buffer == XP_NULL) { - if (name->__malloced) xp_free (name); + if (name->__dynamic) xp_free (name); return XP_NULL; } } @@ -44,7 +44,7 @@ void xp_stx_name_close (xp_stx_name_t* name) xp_assert (name->buffer != name->static_buffer); xp_free (name->buffer); } - if (name->__malloced) xp_free (name); + if (name->__dynamic) xp_free (name); } int xp_stx_name_addc (xp_stx_name_t* name, xp_cint_t c) diff --git a/ase/stx/name.h b/ase/stx/name.h index d793b2b4..33765a60 100644 --- a/ase/stx/name.h +++ b/ase/stx/name.h @@ -1,5 +1,5 @@ /* - * $Id: name.h,v 1.3 2005-08-18 15:28:18 bacon Exp $ + * $Id: name.h,v 1.4 2005-12-05 15:11:29 bacon Exp $ */ #ifndef _XP_STX_NAME_H_ @@ -13,7 +13,7 @@ struct xp_stx_name_t xp_word_t size; xp_char_t* buffer; xp_char_t static_buffer[128]; - xp_bool_t __malloced; + xp_bool_t __dynamic; }; typedef struct xp_stx_name_t xp_stx_name_t; diff --git a/ase/stx/parser.c b/ase/stx/parser.c index ce125cba..994d2d88 100644 --- a/ase/stx/parser.c +++ b/ase/stx/parser.c @@ -1,5 +1,5 @@ /* - * $Id: parser.c,v 1.78 2005-10-02 15:45:09 bacon Exp $ + * $Id: parser.c,v 1.79 2005-12-05 15:11:29 bacon Exp $ */ #include @@ -66,18 +66,18 @@ xp_stx_parser_t* xp_stx_parser_open (xp_stx_parser_t* parser, xp_stx_t* stx) parser = (xp_stx_parser_t*) xp_malloc (xp_sizeof(xp_stx_parser_t)); if (parser == XP_NULL) return XP_NULL; - parser->__malloced = xp_true; + parser->__dynamic = xp_true; } - else parser->__malloced = xp_false; + else parser->__dynamic = xp_false; if (xp_stx_name_open (&parser->method_name, 0) == XP_NULL) { - if (parser->__malloced) xp_free (parser); + if (parser->__dynamic) xp_free (parser); return XP_NULL; } if (xp_stx_token_open (&parser->token, 0) == XP_NULL) { xp_stx_name_close (&parser->method_name); - if (parser->__malloced) xp_free (parser); + if (parser->__dynamic) xp_free (parser); return XP_NULL; } @@ -86,7 +86,7 @@ xp_stx_parser_t* xp_stx_parser_open (xp_stx_parser_t* parser, xp_stx_t* stx) xp_sizeof(xp_byte_t), XP_NULL) == XP_NULL) { xp_stx_name_close (&parser->method_name); xp_stx_token_close (&parser->token); - if (parser->__malloced) xp_free (parser); + if (parser->__dynamic) xp_free (parser); return XP_NULL; } @@ -116,7 +116,7 @@ void xp_stx_parser_close (xp_stx_parser_t* parser) xp_stx_name_close (&parser->method_name); xp_stx_token_close (&parser->token); - if (parser->__malloced) xp_free (parser); + if (parser->__dynamic) xp_free (parser); } #define GET_CHAR(parser) \ diff --git a/ase/stx/parser.h b/ase/stx/parser.h index 44d53fb6..887e99cf 100644 --- a/ase/stx/parser.h +++ b/ase/stx/parser.h @@ -1,5 +1,5 @@ /* - * $Id: parser.h,v 1.34 2005-08-18 15:28:18 bacon Exp $ + * $Id: parser.h,v 1.35 2005-12-05 15:11:29 bacon Exp $ */ #ifndef _XP_STX_PARSER_H_ @@ -86,7 +86,7 @@ struct xp_stx_parser_t void* input_owner; int (*input_func) (int cmd, void* owner, void* arg); - xp_bool_t __malloced; + xp_bool_t __dynamic; }; #ifdef __cplusplus diff --git a/ase/stx/stx.c b/ase/stx/stx.c index 8db775e7..b9777876 100644 --- a/ase/stx/stx.c +++ b/ase/stx/stx.c @@ -1,5 +1,5 @@ /* - * $Id: stx.c,v 1.39 2005-08-18 15:28:18 bacon Exp $ + * $Id: stx.c,v 1.40 2005-12-05 15:11:29 bacon Exp $ */ #include @@ -13,12 +13,12 @@ xp_stx_t* xp_stx_open (xp_stx_t* stx, xp_word_t capacity) if (stx == XP_NULL) { stx = (xp_stx_t*)xp_malloc (xp_sizeof(stx)); if (stx == XP_NULL) return XP_NULL; - stx->__malloced = xp_true; + stx->__dynamic = xp_true; } - else stx->__malloced = xp_false; + else stx->__dynamic = xp_false; if (xp_stx_memory_open (&stx->memory, capacity) == XP_NULL) { - if (stx->__malloced) xp_free (stx); + if (stx->__dynamic) xp_free (stx); return XP_NULL; } @@ -28,7 +28,7 @@ xp_stx_t* xp_stx_open (xp_stx_t* stx, xp_word_t capacity) xp_sizeof(xp_word_t) * stx->symtab.capacity); if (stx->symtab.datum == XP_NULL) { xp_stx_memory_close (&stx->memory); - if (stx->__malloced) xp_free (stx); + if (stx->__dynamic) xp_free (stx); return XP_NULL; } @@ -65,6 +65,6 @@ void xp_stx_close (xp_stx_t* stx) { xp_free (stx->symtab.datum); xp_stx_memory_close (&stx->memory); - if (stx->__malloced) xp_free (stx); + if (stx->__dynamic) xp_free (stx); } diff --git a/ase/stx/stx.h b/ase/stx/stx.h index 3ae83492..ee803287 100644 --- a/ase/stx/stx.h +++ b/ase/stx/stx.h @@ -1,5 +1,5 @@ /* - * $Id: stx.h,v 1.44 2005-09-30 12:19:00 bacon Exp $ + * $Id: stx.h,v 1.45 2005-12-05 15:11:29 bacon Exp $ */ #ifndef _XP_STX_STX_H_ @@ -56,7 +56,7 @@ struct xp_stx_memory_t xp_word_t capacity; xp_stx_object_t** slots; xp_stx_object_t** free; - xp_bool_t __malloced; + xp_bool_t __dynamic; }; struct xp_stx_symtab_t @@ -92,7 +92,7 @@ struct xp_stx_t xp_word_t class_method; xp_word_t class_smallinteger; - xp_bool_t __malloced; + xp_bool_t __dynamic; xp_bool_t __wantabort; /* TODO: make it a function pointer */ }; diff --git a/ase/stx/token.c b/ase/stx/token.c index 4437ca1a..bc4ece88 100644 --- a/ase/stx/token.c +++ b/ase/stx/token.c @@ -1,5 +1,5 @@ /* - * $Id: token.c,v 1.9 2005-06-12 16:22:03 bacon Exp $ + * $Id: token.c,v 1.10 2005-12-05 15:11:29 bacon Exp $ */ #include @@ -12,12 +12,12 @@ xp_stx_token_t* xp_stx_token_open ( token = (xp_stx_token_t*) xp_malloc (xp_sizeof(xp_stx_token_t)); if (token == XP_NULL) return XP_NULL; - token->__malloced = xp_true; + token->__dynamic = xp_true; } - else token->__malloced = xp_false; + else token->__dynamic = xp_false; if (xp_stx_name_open(&token->name, capacity) == XP_NULL) { - if (token->__malloced) xp_free (token); + if (token->__dynamic) xp_free (token); return XP_NULL; } @@ -32,7 +32,7 @@ xp_stx_token_t* xp_stx_token_open ( void xp_stx_token_close (xp_stx_token_t* token) { xp_stx_name_close (&token->name); - if (token->__malloced) xp_free (token); + if (token->__dynamic) xp_free (token); } int xp_stx_token_addc (xp_stx_token_t* token, xp_cint_t c) diff --git a/ase/stx/token.h b/ase/stx/token.h index f39b914f..317d5f12 100644 --- a/ase/stx/token.h +++ b/ase/stx/token.h @@ -1,5 +1,5 @@ /* - * $Id: token.h,v 1.17 2005-06-23 04:55:44 bacon Exp $ + * $Id: token.h,v 1.18 2005-12-05 15:11:29 bacon Exp $ */ #ifndef _XP_STX_TOKEN_H_ @@ -40,7 +40,7 @@ struct xp_stx_token_t xp_stx_real_t fvalue; */ xp_stx_name_t name; - xp_bool_t __malloced; + xp_bool_t __dynamic; }; typedef struct xp_stx_token_t xp_stx_token_t;