From e6d55b0287b09f816b91bc48d3fde152ce2270b1 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Sun, 25 May 2008 07:05:11 +0000 Subject: [PATCH] --- ase/configure | 3 ++- ase/configure.ac | 2 +- ase/tgp/tgp.c | 35 +++++++++++++++++++++++++++++++++++ ase/tgp/tgp.h | 20 ++++++++++++++++++++ 4 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 ase/tgp/tgp.c create mode 100644 ase/tgp/tgp.h diff --git a/ase/configure b/ase/configure index f1f50a16..88a9fa90 100755 --- a/ase/configure +++ b/ase/configure @@ -26631,7 +26631,7 @@ CJFLAGS=$CJFLAGS BUILD_CJ=$BUILD_CJ -ac_config_files="$ac_config_files makefile cmn/makefile awk/makefile lsp/makefile utl/makefile cmd/awk/makefile cmd/lsp/makefile" +ac_config_files="$ac_config_files makefile cmn/makefile awk/makefile lsp/makefile tgp/makefile utl/makefile cmd/awk/makefile cmd/lsp/makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -27190,6 +27190,7 @@ do "cmn/makefile") CONFIG_FILES="$CONFIG_FILES cmn/makefile" ;; "awk/makefile") CONFIG_FILES="$CONFIG_FILES awk/makefile" ;; "lsp/makefile") CONFIG_FILES="$CONFIG_FILES lsp/makefile" ;; + "tgp/makefile") CONFIG_FILES="$CONFIG_FILES tgp/makefile" ;; "utl/makefile") CONFIG_FILES="$CONFIG_FILES utl/makefile" ;; "cmd/awk/makefile") CONFIG_FILES="$CONFIG_FILES cmd/awk/makefile" ;; "cmd/lsp/makefile") CONFIG_FILES="$CONFIG_FILES cmd/lsp/makefile" ;; diff --git a/ase/configure.ac b/ase/configure.ac index 2f0cb524..b294ae89 100644 --- a/ase/configure.ac +++ b/ase/configure.ac @@ -248,5 +248,5 @@ AC_SUBST(BUILD_JNI, $BUILD_JNI) AC_SUBST(CJFLAGS, $CJFLAGS) AC_SUBST(BUILD_CJ, $BUILD_CJ) -AC_CONFIG_FILES([makefile cmn/makefile awk/makefile lsp/makefile utl/makefile cmd/awk/makefile cmd/lsp/makefile]) +AC_CONFIG_FILES([makefile cmn/makefile awk/makefile lsp/makefile tgp/makefile utl/makefile cmd/awk/makefile cmd/lsp/makefile]) AC_OUTPUT diff --git a/ase/tgp/tgp.c b/ase/tgp/tgp.c new file mode 100644 index 00000000..83efa8de --- /dev/null +++ b/ase/tgp/tgp.c @@ -0,0 +1,35 @@ +/* + * $Id$ + */ + +#include +#include + +struct ase_tgp_t +{ + ase_mmgr_t mmgr; +}; + +ase_tgp_t* ase_tgp_open (ase_mmgr_t* mmgr) +{ + ase_tgp_t* tgp; + + if (mmgr == ASE_NULL) mmgr = ase_get_mmgr (); + ASE_ASSERT (mmgr != ASE_NULL); + + tgp = ASE_MALLOC (mmgr, ASE_SIZEOF(*tgp)); + if (tgp == ASE_NULL) return ASE_NULL; + + + ase_memset (tgp, 0, ASE_SIZEOF(*tgp)); + ase_memcpy (&tgp->mmgr, mmgr, ASE_SIZEOF(*mmgr)); + + + return tgp; +} + +void ase_tgp_close (ase_tgp_t* tgp) +{ + ASE_FREE (&tgp->mmgr, tgp); +} + diff --git a/ase/tgp/tgp.h b/ase/tgp/tgp.h new file mode 100644 index 00000000..9de13a31 --- /dev/null +++ b/ase/tgp/tgp.h @@ -0,0 +1,20 @@ +#ifndef _ASE_TGP_H_ +#define _ASE_TGP_H_ + +#include +#include + +typedef struct ase_tgp_t ase_tgp_t; + +#ifdef __cplusplus +extern "C" { +#endif + +ase_tgp_t* ase_tgp_open (ase_mmgr_t* mmgr); +void ase_tgp_close (ase_tgp_t* tgp); + +#ifdef __cplusplus +} +#endif + +#endif