*** empty log message ***

This commit is contained in:
2005-12-05 15:11:29 +00:00
parent a9d96b387a
commit 86de8c2da3
18 changed files with 72 additions and 72 deletions

View File

@ -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 <xp/awk/awk.h>
@ -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;
}

View File

@ -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

View File

@ -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 <xp/sce/mem.h>
@ -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)