This commit is contained in:
117
ase/lib/utl/helper.c
Normal file
117
ase/lib/utl/helper.c
Normal file
@ -0,0 +1,117 @@
|
||||
|
||||
/*
|
||||
* $Id: helper.c 231 2008-06-28 08:37:09Z baconevi $
|
||||
*/
|
||||
|
||||
#include <ase/utl/helper.h>
|
||||
#include <ase/utl/ctype.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
static void* mmgr_malloc (void* custom, ase_size_t n)
|
||||
{
|
||||
return malloc (n);
|
||||
}
|
||||
|
||||
static void* mmgr_realloc (void* custom, void* ptr, ase_size_t n)
|
||||
{
|
||||
return realloc (ptr, n);
|
||||
}
|
||||
|
||||
static void mmgr_free (void* custom, void* ptr)
|
||||
{
|
||||
free (ptr);
|
||||
}
|
||||
|
||||
static ase_bool_t ccls_isupper (void* custom, ase_cint_t c)
|
||||
{
|
||||
return ase_isupper (c);
|
||||
}
|
||||
|
||||
static ase_bool_t ccls_islower (void* custom, ase_cint_t c)
|
||||
{
|
||||
return ase_islower (c);
|
||||
}
|
||||
|
||||
static ase_bool_t ccls_isalpha (void* custom, ase_cint_t c)
|
||||
{
|
||||
return ase_isalpha (c);
|
||||
}
|
||||
|
||||
static ase_bool_t ccls_isdigit (void* custom, ase_cint_t c)
|
||||
{
|
||||
return ase_isdigit (c);
|
||||
}
|
||||
|
||||
static ase_bool_t ccls_isxdigit (void* custom, ase_cint_t c)
|
||||
{
|
||||
return ase_isxdigit (c);
|
||||
}
|
||||
|
||||
static ase_bool_t ccls_isalnum (void* custom, ase_cint_t c)
|
||||
{
|
||||
return ase_isalnum (c);
|
||||
}
|
||||
|
||||
static ase_bool_t ccls_isspace (void* custom, ase_cint_t c)
|
||||
{
|
||||
return ase_isspace (c);
|
||||
}
|
||||
|
||||
static ase_bool_t ccls_isprint (void* custom, ase_cint_t c)
|
||||
{
|
||||
return ase_isprint (c);
|
||||
}
|
||||
|
||||
static ase_bool_t ccls_isgraph (void* custom, ase_cint_t c)
|
||||
{
|
||||
return ase_isgraph (c);
|
||||
}
|
||||
|
||||
static ase_bool_t ccls_iscntrl (void* custom, ase_cint_t c)
|
||||
{
|
||||
return ase_iscntrl (c);
|
||||
}
|
||||
|
||||
static ase_bool_t ccls_ispunct (void* custom, ase_cint_t c)
|
||||
{
|
||||
return ase_ispunct (c);
|
||||
}
|
||||
|
||||
static ase_cint_t ccls_toupper (void* custom, ase_cint_t c)
|
||||
{
|
||||
return ase_toupper (c);
|
||||
}
|
||||
|
||||
static ase_cint_t ccls_tolower (void* custom, ase_cint_t c)
|
||||
{
|
||||
return ase_tolower (c);
|
||||
}
|
||||
|
||||
static ase_mmgr_t mmgr =
|
||||
{
|
||||
mmgr_malloc,
|
||||
mmgr_realloc,
|
||||
mmgr_free,
|
||||
ASE_NULL
|
||||
};
|
||||
|
||||
static ase_ccls_t ccls =
|
||||
{
|
||||
ccls_isupper,
|
||||
ccls_islower,
|
||||
ccls_isalpha,
|
||||
ccls_isdigit,
|
||||
ccls_isxdigit,
|
||||
ccls_isalnum,
|
||||
ccls_isspace,
|
||||
ccls_isprint,
|
||||
ccls_isgraph,
|
||||
ccls_iscntrl,
|
||||
ccls_ispunct,
|
||||
ccls_toupper,
|
||||
ccls_tolower,
|
||||
ASE_NULL
|
||||
};
|
||||
|
||||
ase_mmgr_t* ase_mmgr = &mmgr;
|
||||
ase_ccls_t* ase_ccls = &ccls;
|
@ -2,5 +2,5 @@
|
||||
AM_CFLAGS = -I$(top_builddir)/include
|
||||
|
||||
lib_LTLIBRARIES = libaseutl.la
|
||||
libaseutl_la_SOURCES = assert.c ctype.c getopt.c http.c main.c stdio.c
|
||||
libaseutl_la_SOURCES = helper.c assert.c ctype.c getopt.c http.c main.c stdio.c
|
||||
libaseutl_la_LDFLAGS = -release $(VERSION)
|
||||
|
@ -55,8 +55,8 @@ am__installdirs = "$(DESTDIR)$(libdir)"
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
libaseutl_la_LIBADD =
|
||||
am_libaseutl_la_OBJECTS = assert.lo ctype.lo getopt.lo http.lo main.lo \
|
||||
stdio.lo
|
||||
am_libaseutl_la_OBJECTS = helper.lo assert.lo ctype.lo getopt.lo \
|
||||
http.lo main.lo stdio.lo
|
||||
libaseutl_la_OBJECTS = $(am_libaseutl_la_OBJECTS)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include/ase
|
||||
depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp
|
||||
@ -191,7 +191,7 @@ sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
AM_CFLAGS = -I$(top_builddir)/include
|
||||
lib_LTLIBRARIES = libaseutl.la
|
||||
libaseutl_la_SOURCES = assert.c ctype.c getopt.c http.c main.c stdio.c
|
||||
libaseutl_la_SOURCES = helper.c assert.c ctype.c getopt.c http.c main.c stdio.c
|
||||
libaseutl_la_LDFLAGS = -release $(VERSION)
|
||||
all: all-am
|
||||
|
||||
@ -265,6 +265,7 @@ distclean-compile:
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/assert.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctype.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/helper.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdio.Plo@am__quote@
|
||||
|
Reference in New Issue
Block a user