From 6effdf92ad78e1ef8f30c7515bf6f09c7b904de0 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Wed, 20 Aug 2008 05:00:26 +0000 Subject: [PATCH] --- ase/include/ase/cmn/chr.h | 54 +++++++++++++++++++++++++++++++++ ase/include/ase/cmn/makefile.am | 2 +- ase/include/ase/macros.h | 16 +--------- ase/lib/cmn/makefile.am | 4 +-- 4 files changed, 58 insertions(+), 18 deletions(-) create mode 100644 ase/include/ase/cmn/chr.h diff --git a/ase/include/ase/cmn/chr.h b/ase/include/ase/cmn/chr.h new file mode 100644 index 00000000..862c9b59 --- /dev/null +++ b/ase/include/ase/cmn/chr.h @@ -0,0 +1,54 @@ +/* + * $Id: ctype.h 223 2008-06-26 06:44:41Z baconevi $ + */ + +#ifndef _ASE_CMN_CHR_H_ +#define _ASE_CMN_CHR_H_ + +#include +#include + +/* gets a pointer to the default memory manager */ +#define ASE_CCLS_GETDFL() (ase_ccls) + +/* sets a pointer to the default memory manager */ +#define ASE_CCLS_SETDFL(m) ((ase_ccls)=(m)) + +#define ASE_CCLS_ISUPPER(ccls,c) (ccls)->is_upper((ccls)->data,c) +#define ASE_CCLS_ISLOWER(ccls,c) (ccls)->is_lower((ccls)->data,c) +#define ASE_CCLS_ISALPHA(ccls,c) (ccls)->is_alpha((ccls)->data,c) +#define ASE_CCLS_ISDIGIT(ccls,c) (ccls)->is_digit((ccls)->data,c) +#define ASE_CCLS_ISXDIGIT(ccls,c) (ccls)->is_xdigit((ccls)->data,c) +#define ASE_CCLS_ISALNUM(ccls,c) (ccls)->is_alnum((ccls)->data,c) +#define ASE_CCLS_ISSPACE(ccls,c) (ccls)->is_space((ccls)->data,c) +#define ASE_CCLS_ISPRINT(ccls,c) (ccls)->is_print((ccls)->data,c) +#define ASE_CCLS_ISGRAPH(ccls,c) (ccls)->is_graph((ccls)->data,c) +#define ASE_CCLS_ISCNTRL(ccls,c) (ccls)->is_cntrl((ccls)->data,c) +#define ASE_CCLS_ISPUNCT(ccls,c) (ccls)->is_punct((ccls)->data,c) +#define ASE_CCLS_TOUPPER(ccls,c) (ccls)->to_upper((ccls)->data,c) +#define ASE_CCLS_TOLOWER(ccls,c) (ccls)->to_lower((ccls)->data,c) + +#ifdef __cplusplus +extern "C" { +#endif + +ase_bool_t ase_isupper (ase_cint_t c); +ase_bool_t ase_islower (ase_cint_t c); +ase_bool_t ase_isalpha (ase_cint_t c); +ase_bool_t ase_isdigit (ase_cint_t c); +ase_bool_t ase_isxdigit (ase_cint_t c); +ase_bool_t ase_isalnum (ase_cint_t c); +ase_bool_t ase_isspace (ase_cint_t c); +ase_bool_t ase_isprint (ase_cint_t c); +ase_bool_t ase_isgraph (ase_cint_t c); +ase_bool_t ase_iscntrl (ase_cint_t c); +ase_bool_t ase_ispunct (ase_cint_t c); + +ase_cint_t ase_toupper (ase_cint_t c); +ase_cint_t ase_tolower (ase_cint_t c); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/ase/include/ase/cmn/makefile.am b/ase/include/ase/cmn/makefile.am index 31b5b9f0..e7baaef4 100644 --- a/ase/include/ase/cmn/makefile.am +++ b/ase/include/ase/cmn/makefile.am @@ -1,5 +1,5 @@ -pkginclude_HEADERS = mem.h str.h map.h rex.h sll.h dll.h +pkginclude_HEADERS = mem.h chr.h str.h map.h rex.h sll.h dll.h pkgincludedir= $(includedir)/ase/cmn diff --git a/ase/include/ase/macros.h b/ase/include/ase/macros.h index 8eea3a5f..095e2818 100644 --- a/ase/include/ase/macros.h +++ b/ase/include/ase/macros.h @@ -1,5 +1,5 @@ /* - * $Id: macros.h 332 2008-08-18 11:21:48Z baconevi $ + * $Id: macros.h 334 2008-08-19 11:00:26Z baconevi $ * * {License} */ @@ -130,20 +130,6 @@ (ase_assert_failed (ASE_T(#expr), ASE_T(desc), ASE_T(__FILE__), __LINE__), 0)) #endif -#define ASE_ISUPPER(ccls,c) (ccls)->is_upper((ccls)->data,c) -#define ASE_ISLOWER(ccls,c) (ccls)->is_lower((ccls)->data,c) -#define ASE_ISALPHA(ccls,c) (ccls)->is_alpha((ccls)->data,c) -#define ASE_ISDIGIT(ccls,c) (ccls)->is_digit((ccls)->data,c) -#define ASE_ISXDIGIT(ccls,c) (ccls)->is_xdigit((ccls)->data,c) -#define ASE_ISALNUM(ccls,c) (ccls)->is_alnum((ccls)->data,c) -#define ASE_ISSPACE(ccls,c) (ccls)->is_space((ccls)->data,c) -#define ASE_ISPRINT(ccls,c) (ccls)->is_print((ccls)->data,c) -#define ASE_ISGRAPH(ccls,c) (ccls)->is_graph((ccls)->data,c) -#define ASE_ISCNTRL(ccls,c) (ccls)->is_cntrl((ccls)->data,c) -#define ASE_ISPUNCT(ccls,c) (ccls)->is_punct((ccls)->data,c) -#define ASE_TOUPPER(ccls,c) (ccls)->to_upper((ccls)->data,c) -#define ASE_TOLOWER(ccls,c) (ccls)->to_lower((ccls)->data,c) - #ifdef __cplusplus #define ASE_BEGIN_NAMESPACE(x) namespace x { #define ASE_END_NAMESPACE(x) } diff --git a/ase/lib/cmn/makefile.am b/ase/lib/cmn/makefile.am index 1eb63fc3..c3a20d93 100644 --- a/ase/lib/cmn/makefile.am +++ b/ase/lib/cmn/makefile.am @@ -3,7 +3,7 @@ AUTOMAKE_OPTIONS = nostdinc AM_CFLAGS = -I$(top_builddir)/include lib_LTLIBRARIES = libasecmn.la -libasecmn_la_SOURCES = mem.h \ - map.c mem.c misc.c rex.c str_bas.c str_cnv.c str_dyn.c sll.c dll.c +libasecmn_la_SOURCES = mem.h chr.h \ + mem.c chr.c map.c misc.c rex.c str_bas.c str_cnv.c str_dyn.c sll.c dll.c libasecmn_la_LDFLAGS = -version-info 1:0:0