added builtin unicode character class functions
This commit is contained in:
parent
25e711fc02
commit
207c12ea1e
@ -5,9 +5,9 @@ EXTRA_DIST =
|
||||
SUBDIRS =
|
||||
|
||||
if ENABLE_STATIC_MODULE
|
||||
SUBDIRS += mod lib bin
|
||||
SUBDIRS += tools mod lib bin
|
||||
else
|
||||
SUBDIRS += lib mod bin
|
||||
SUBDIRS += tools lib mod bin
|
||||
endif
|
||||
|
||||
DIST_SUBDIRS = $(SUBDIRS) t wasm
|
||||
|
@ -87,8 +87,8 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
@ENABLE_STATIC_MODULE_TRUE@am__append_1 = mod lib bin
|
||||
@ENABLE_STATIC_MODULE_FALSE@am__append_2 = lib mod bin
|
||||
@ENABLE_STATIC_MODULE_TRUE@am__append_1 = tools mod lib bin
|
||||
@ENABLE_STATIC_MODULE_FALSE@am__append_2 = tools lib mod bin
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_sign.m4 \
|
||||
@ -166,8 +166,8 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/ac/ar-lib \
|
||||
$(top_srcdir)/ac/compile $(top_srcdir)/ac/config.guess \
|
||||
$(top_srcdir)/ac/config.sub $(top_srcdir)/ac/install-sh \
|
||||
$(top_srcdir)/ac/ltmain.sh $(top_srcdir)/ac/missing ac/ar-lib \
|
||||
ac/compile ac/config.guess ac/config.sub ac/install-sh \
|
||||
ac/ltmain.sh ac/missing
|
||||
ac/compile ac/config.guess ac/config.sub ac/depcomp \
|
||||
ac/install-sh ac/ltmain.sh ac/missing
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
3
moo/configure
vendored
3
moo/configure
vendored
@ -22047,7 +22047,7 @@ MOO_PROJECT_AUTHOR="${PACKAGE_BUGREPORT}"
|
||||
MOO_PROJECT_URL="${PACKAGE_URL}"
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files Makefile lib/Makefile mod/Makefile bin/Makefile t/Makefile wasm/Makefile"
|
||||
ac_config_files="$ac_config_files Makefile tools/Makefile lib/Makefile mod/Makefile bin/Makefile t/Makefile wasm/Makefile"
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
@ -23217,6 +23217,7 @@ do
|
||||
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
|
||||
"libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
|
||||
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
|
||||
"tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;;
|
||||
"lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
|
||||
"mod/Makefile") CONFIG_FILES="$CONFIG_FILES mod/Makefile" ;;
|
||||
"bin/Makefile") CONFIG_FILES="$CONFIG_FILES bin/Makefile" ;;
|
||||
|
@ -871,6 +871,7 @@ AC_SUBST(MOO_PROJECT_URL, "${PACKAGE_URL}")
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
tools/Makefile
|
||||
lib/Makefile
|
||||
mod/Makefile
|
||||
bin/Makefile
|
||||
|
@ -37,6 +37,7 @@ pkgincludedir = $(includedir)
|
||||
|
||||
pkginclude_HEADERS = \
|
||||
moo.h \
|
||||
moo-chr.h \
|
||||
moo-cmn.h \
|
||||
moo-opt.h \
|
||||
moo-rbt.h \
|
||||
@ -54,6 +55,7 @@ pkglib_LTLIBRARIES = libmoo.la libmoox.la
|
||||
##################################################
|
||||
libmoo_la_SOURCES = \
|
||||
bct-lab.h \
|
||||
chr.c \
|
||||
moo.h \
|
||||
moo-cmn.h \
|
||||
moo-rbt.h \
|
||||
@ -80,6 +82,8 @@ libmoo_la_SOURCES = \
|
||||
pf-utf8.c \
|
||||
rbt.c \
|
||||
sym.c \
|
||||
uch-case.h \
|
||||
uch-prop.h \
|
||||
utf8.c \
|
||||
utf16.c \
|
||||
utl.c
|
||||
@ -121,9 +125,8 @@ endif
|
||||
# libmoox
|
||||
##############################################################
|
||||
libmoox_la_SOURCES = \
|
||||
moo-opt.h \
|
||||
moo-std.h \
|
||||
opt-impl.h \
|
||||
opt-imp.h \
|
||||
opt.c \
|
||||
std.c
|
||||
if WIN32
|
||||
|
@ -153,14 +153,14 @@ am__installdirs = "$(DESTDIR)$(pkglibdir)" \
|
||||
"$(DESTDIR)$(pkgincludedir)"
|
||||
LTLIBRARIES = $(pkglib_LTLIBRARIES)
|
||||
am__DEPENDENCIES_1 =
|
||||
am_libmoo_la_OBJECTS = libmoo_la-bigint.lo libmoo_la-comp.lo \
|
||||
libmoo_la-debug.lo libmoo_la-decode.lo libmoo_la-dic.lo \
|
||||
libmoo_la-err.lo libmoo_la-exec.lo libmoo_la-fmt.lo \
|
||||
libmoo_la-gc.lo libmoo_la-heap.lo libmoo_la-mb8.lo \
|
||||
libmoo_la-moo.lo libmoo_la-number.lo libmoo_la-obj.lo \
|
||||
libmoo_la-pf-basic.lo libmoo_la-pf-sys.lo libmoo_la-pf-utf8.lo \
|
||||
libmoo_la-rbt.lo libmoo_la-sym.lo libmoo_la-utf8.lo \
|
||||
libmoo_la-utf16.lo libmoo_la-utl.lo
|
||||
am_libmoo_la_OBJECTS = libmoo_la-chr.lo libmoo_la-bigint.lo \
|
||||
libmoo_la-comp.lo libmoo_la-debug.lo libmoo_la-decode.lo \
|
||||
libmoo_la-dic.lo libmoo_la-err.lo libmoo_la-exec.lo \
|
||||
libmoo_la-fmt.lo libmoo_la-gc.lo libmoo_la-heap.lo \
|
||||
libmoo_la-mb8.lo libmoo_la-moo.lo libmoo_la-number.lo \
|
||||
libmoo_la-obj.lo libmoo_la-pf-basic.lo libmoo_la-pf-sys.lo \
|
||||
libmoo_la-pf-utf8.lo libmoo_la-rbt.lo libmoo_la-sym.lo \
|
||||
libmoo_la-utf8.lo libmoo_la-utf16.lo libmoo_la-utl.lo
|
||||
libmoo_la_OBJECTS = $(am_libmoo_la_OBJECTS)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
@ -173,8 +173,8 @@ libmoo_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
@ENABLE_LIBLTDL_FALSE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1)
|
||||
@ENABLE_LIBUNWIND_TRUE@am__DEPENDENCIES_4 = $(am__DEPENDENCIES_1)
|
||||
@WIN32_TRUE@am__DEPENDENCIES_5 = $(am__DEPENDENCIES_1)
|
||||
am__libmoox_la_SOURCES_DIST = moo-opt.h moo-std.h opt-impl.h opt.c \
|
||||
std.c poll-msw.c poll-msw.h
|
||||
am__libmoox_la_SOURCES_DIST = moo-std.h opt-imp.h opt.c std.c \
|
||||
poll-msw.c poll-msw.h
|
||||
@WIN32_TRUE@am__objects_1 = libmoox_la-poll-msw.lo
|
||||
am_libmoox_la_OBJECTS = libmoox_la-opt.lo libmoox_la-std.lo \
|
||||
$(am__objects_1)
|
||||
@ -198,7 +198,8 @@ DEFAULT_INCLUDES =
|
||||
depcomp = $(SHELL) $(top_srcdir)/ac/depcomp
|
||||
am__maybe_remake_depfiles = depfiles
|
||||
am__depfiles_remade = ./$(DEPDIR)/libmoo_la-bigint.Plo \
|
||||
./$(DEPDIR)/libmoo_la-comp.Plo ./$(DEPDIR)/libmoo_la-debug.Plo \
|
||||
./$(DEPDIR)/libmoo_la-chr.Plo ./$(DEPDIR)/libmoo_la-comp.Plo \
|
||||
./$(DEPDIR)/libmoo_la-debug.Plo \
|
||||
./$(DEPDIR)/libmoo_la-decode.Plo ./$(DEPDIR)/libmoo_la-dic.Plo \
|
||||
./$(DEPDIR)/libmoo_la-err.Plo ./$(DEPDIR)/libmoo_la-exec.Plo \
|
||||
./$(DEPDIR)/libmoo_la-fmt.Plo ./$(DEPDIR)/libmoo_la-gc.Plo \
|
||||
@ -450,6 +451,7 @@ LIBADD_LIB_COMMON =
|
||||
@WIN32_TRUE@ $(am__append_1) $(am__append_2)
|
||||
pkginclude_HEADERS = \
|
||||
moo.h \
|
||||
moo-chr.h \
|
||||
moo-cmn.h \
|
||||
moo-opt.h \
|
||||
moo-rbt.h \
|
||||
@ -463,6 +465,7 @@ pkglib_LTLIBRARIES = libmoo.la libmoox.la
|
||||
##################################################
|
||||
libmoo_la_SOURCES = \
|
||||
bct-lab.h \
|
||||
chr.c \
|
||||
moo.h \
|
||||
moo-cmn.h \
|
||||
moo-rbt.h \
|
||||
@ -489,6 +492,8 @@ libmoo_la_SOURCES = \
|
||||
pf-utf8.c \
|
||||
rbt.c \
|
||||
sym.c \
|
||||
uch-case.h \
|
||||
uch-prop.h \
|
||||
utf8.c \
|
||||
utf16.c \
|
||||
utl.c
|
||||
@ -505,8 +510,7 @@ libmoo_la_DEPENDENCIES = $(am__append_4) $(am__append_6) \
|
||||
##############################################################
|
||||
# libmoox
|
||||
##############################################################
|
||||
libmoox_la_SOURCES = moo-opt.h moo-std.h opt-impl.h opt.c std.c \
|
||||
$(am__append_15)
|
||||
libmoox_la_SOURCES = moo-std.h opt-imp.h opt.c std.c $(am__append_15)
|
||||
libmoox_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) $(CPPFLAGS_PFMOD)
|
||||
libmoox_la_LDFLAGS = $(LDFLAGS_LIB_COMMON)
|
||||
libmoox_la_LIBADD = $(LIBADD_LIB_COMMON) -lmoo $(LIBM) $(PTHREAD_LIBS) \
|
||||
@ -611,6 +615,7 @@ distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmoo_la-bigint.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmoo_la-chr.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmoo_la-comp.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmoo_la-debug.Plo@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmoo_la-decode.Plo@am__quote@ # am--include-marker
|
||||
@ -666,6 +671,13 @@ am--depfiles: $(am__depfiles_remade)
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
libmoo_la-chr.lo: chr.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmoo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmoo_la-chr.lo -MD -MP -MF $(DEPDIR)/libmoo_la-chr.Tpo -c -o libmoo_la-chr.lo `test -f 'chr.c' || echo '$(srcdir)/'`chr.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmoo_la-chr.Tpo $(DEPDIR)/libmoo_la-chr.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='chr.c' object='libmoo_la-chr.lo' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmoo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmoo_la-chr.lo `test -f 'chr.c' || echo '$(srcdir)/'`chr.c
|
||||
|
||||
libmoo_la-bigint.lo: bigint.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmoo_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmoo_la-bigint.lo -MD -MP -MF $(DEPDIR)/libmoo_la-bigint.Tpo -c -o libmoo_la-bigint.lo `test -f 'bigint.c' || echo '$(srcdir)/'`bigint.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmoo_la-bigint.Tpo $(DEPDIR)/libmoo_la-bigint.Plo
|
||||
@ -997,6 +1009,7 @@ clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f ./$(DEPDIR)/libmoo_la-bigint.Plo
|
||||
-rm -f ./$(DEPDIR)/libmoo_la-chr.Plo
|
||||
-rm -f ./$(DEPDIR)/libmoo_la-comp.Plo
|
||||
-rm -f ./$(DEPDIR)/libmoo_la-debug.Plo
|
||||
-rm -f ./$(DEPDIR)/libmoo_la-decode.Plo
|
||||
@ -1068,6 +1081,7 @@ installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f ./$(DEPDIR)/libmoo_la-bigint.Plo
|
||||
-rm -f ./$(DEPDIR)/libmoo_la-chr.Plo
|
||||
-rm -f ./$(DEPDIR)/libmoo_la-comp.Plo
|
||||
-rm -f ./$(DEPDIR)/libmoo_la-debug.Plo
|
||||
-rm -f ./$(DEPDIR)/libmoo_la-decode.Plo
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
184
moo/lib/chr.c
Normal file
184
moo/lib/chr.c
Normal file
@ -0,0 +1,184 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <moo-chr.h>
|
||||
|
||||
/* ---------------------------------------------------------- */
|
||||
#include "uch-prop.h"
|
||||
#include "uch-case.h"
|
||||
/* ---------------------------------------------------------- */
|
||||
|
||||
#define UCH_PROP_MAP_INDEX(c) ((c) / MOO_COUNTOF(uch_prop_page_0000))
|
||||
#define UCH_PROP_PAGE_INDEX(c) ((c) % MOO_COUNTOF(uch_prop_page_0000))
|
||||
|
||||
#define UCH_CASE_MAP_INDEX(c) ((c) / MOO_COUNTOF(uch_case_page_0000))
|
||||
#define UCH_CASE_PAGE_INDEX(c) ((c) % MOO_COUNTOF(uch_case_page_0000))
|
||||
|
||||
#define UCH_IS_TYPE(c,type) \
|
||||
((c) >= 0 && (c) <= UCH_PROP_MAX && \
|
||||
(uch_prop_map[UCH_PROP_MAP_INDEX(c)][UCH_PROP_PAGE_INDEX(c)] & (type)) != 0)
|
||||
|
||||
int moo_is_uch_type (moo_uch_t c, moo_uch_prop_t type)
|
||||
{
|
||||
return UCH_IS_TYPE((moo_uchu_t)c, type);
|
||||
}
|
||||
|
||||
int moo_is_uch_upper (moo_uch_t c)
|
||||
{
|
||||
return UCH_IS_TYPE((moo_uchu_t)c, MOO_UCH_PROP_UPPER);
|
||||
}
|
||||
|
||||
int moo_is_uch_lower (moo_uch_t c)
|
||||
{
|
||||
return UCH_IS_TYPE((moo_uchu_t)c, MOO_UCH_PROP_LOWER);
|
||||
}
|
||||
|
||||
int moo_is_uch_alpha (moo_uch_t c)
|
||||
{
|
||||
return UCH_IS_TYPE((moo_uchu_t)c, MOO_UCH_PROP_ALPHA);
|
||||
}
|
||||
|
||||
int moo_is_uch_digit (moo_uch_t c)
|
||||
{
|
||||
return UCH_IS_TYPE((moo_uchu_t)c, MOO_UCH_PROP_DIGIT);
|
||||
}
|
||||
|
||||
int moo_is_uch_xdigit (moo_uch_t c)
|
||||
{
|
||||
return UCH_IS_TYPE((moo_uchu_t)c, MOO_UCH_PROP_XDIGIT);
|
||||
}
|
||||
|
||||
int moo_is_uch_alnum (moo_uch_t c)
|
||||
{
|
||||
return UCH_IS_TYPE((moo_uchu_t)c, MOO_UCH_PROP_ALNUM);
|
||||
}
|
||||
|
||||
int moo_is_uch_space (moo_uch_t c)
|
||||
{
|
||||
return UCH_IS_TYPE((moo_uchu_t)c, MOO_UCH_PROP_SPACE);
|
||||
}
|
||||
|
||||
int moo_is_uch_print (moo_uch_t c)
|
||||
{
|
||||
return UCH_IS_TYPE((moo_uchu_t)c, MOO_UCH_PROP_PRINT);
|
||||
}
|
||||
|
||||
int moo_is_uch_graph (moo_uch_t c)
|
||||
{
|
||||
return UCH_IS_TYPE((moo_uchu_t)c, MOO_UCH_PROP_GRAPH);
|
||||
}
|
||||
|
||||
int moo_is_uch_cntrl (moo_uch_t c)
|
||||
{
|
||||
return UCH_IS_TYPE((moo_uchu_t)c, MOO_UCH_PROP_CNTRL);
|
||||
}
|
||||
|
||||
int moo_is_uch_punct (moo_uch_t c)
|
||||
{
|
||||
return UCH_IS_TYPE((moo_uchu_t)c, MOO_UCH_PROP_PUNCT);
|
||||
}
|
||||
|
||||
int moo_is_uch_blank (moo_uch_t c)
|
||||
{
|
||||
return UCH_IS_TYPE((moo_uchu_t)c, MOO_UCH_PROP_BLANK);
|
||||
}
|
||||
|
||||
moo_uch_t moo_to_uch_upper (moo_uch_t c)
|
||||
{
|
||||
moo_uchu_t uc = (moo_uchu_t)c;
|
||||
if (uc >= 0 && uc <= UCH_CASE_MAX)
|
||||
{
|
||||
uch_case_page_t* page;
|
||||
page = uch_case_map[UCH_CASE_MAP_INDEX(uc)];
|
||||
return uc - page[UCH_CASE_PAGE_INDEX(uc)].upper;
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
moo_uch_t moo_to_uch_lower (moo_uch_t c)
|
||||
{
|
||||
moo_uchu_t uc = (moo_uchu_t)c;
|
||||
if (uc >= 0 && uc <= UCH_CASE_MAX)
|
||||
{
|
||||
uch_case_page_t* page;
|
||||
page = uch_case_map[UCH_CASE_MAP_INDEX(uc)];
|
||||
return uc + page[UCH_CASE_PAGE_INDEX(uc)].lower;
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------- */
|
||||
|
||||
int moo_is_bch_type (moo_bch_t c, moo_bch_prop_t type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case MOO_OOCH_PROP_UPPER:
|
||||
return moo_is_bch_upper(c);
|
||||
case MOO_OOCH_PROP_LOWER:
|
||||
return moo_is_bch_lower(c);
|
||||
case MOO_OOCH_PROP_ALPHA:
|
||||
return moo_is_bch_alpha(c);
|
||||
case MOO_OOCH_PROP_DIGIT:
|
||||
return moo_is_bch_digit(c);
|
||||
case MOO_OOCH_PROP_XDIGIT:
|
||||
return moo_is_bch_xdigit(c);
|
||||
case MOO_OOCH_PROP_ALNUM:
|
||||
return moo_is_bch_alnum(c);
|
||||
case MOO_OOCH_PROP_SPACE:
|
||||
return moo_is_bch_space(c);
|
||||
case MOO_OOCH_PROP_PRINT:
|
||||
return moo_is_bch_print(c);
|
||||
case MOO_OOCH_PROP_GRAPH:
|
||||
return moo_is_bch_graph(c);
|
||||
case MOO_OOCH_PROP_CNTRL:
|
||||
return moo_is_bch_cntrl(c);
|
||||
case MOO_OOCH_PROP_PUNCT:
|
||||
return moo_is_bch_punct(c);
|
||||
case MOO_OOCH_PROP_BLANK:
|
||||
return moo_is_bch_blank(c);
|
||||
}
|
||||
|
||||
/* must not reach here */
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if !defined(moo_to_bch_upper)
|
||||
moo_bch_t moo_to_bch_upper (moo_bch_t c)
|
||||
{
|
||||
if(moo_is_bch_lower(c)) return c & 95;
|
||||
return c;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(moo_to_bch_lower)
|
||||
moo_bch_t moo_to_bch_lower (moo_bch_t c)
|
||||
{
|
||||
if(moo_is_bch_upper(c)) return c | 32;
|
||||
return c;
|
||||
}
|
||||
#endif
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
@ -25,6 +25,7 @@
|
||||
*/
|
||||
|
||||
#include "moo-prv.h"
|
||||
#include <moo-chr.h>
|
||||
|
||||
#define CLASS_BUFFER_ALIGN 64
|
||||
#define LITERAL_BUFFER_ALIGN 64
|
||||
@ -287,26 +288,29 @@ static MOO_INLINE int is_spacechar (moo_ooci_t c)
|
||||
|
||||
static MOO_INLINE int is_alphachar (moo_ooci_t c)
|
||||
{
|
||||
/* TODO: support full unicode */
|
||||
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
|
||||
/*return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');*/
|
||||
return moo_is_ooch_alpha(c);
|
||||
}
|
||||
|
||||
static MOO_INLINE int is_digitchar (moo_ooci_t c)
|
||||
{
|
||||
/* TODO: support full unicode */
|
||||
return (c >= '0' && c <= '9');
|
||||
/*return (c >= '0' && c <= '9');*/
|
||||
return moo_is_ooch_digit(c);
|
||||
}
|
||||
|
||||
static MOO_INLINE int is_xdigitchar (moo_ooci_t c)
|
||||
{
|
||||
/* TODO: support full unicode */
|
||||
return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F');
|
||||
/*return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F');*/
|
||||
return moo_is_ooch_xdigit(c);
|
||||
}
|
||||
|
||||
static MOO_INLINE int is_alnumchar (moo_ooci_t c)
|
||||
{
|
||||
/* TODO: support full unicode */
|
||||
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9');
|
||||
/*return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9');*/
|
||||
return moo_is_ooch_alnum(c);
|
||||
}
|
||||
|
||||
static MOO_INLINE int is_binselchar (moo_ooci_t c)
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
292
moo/lib/moo-chr.h
Normal file
292
moo/lib/moo-chr.h
Normal file
@ -0,0 +1,292 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _MOO_CHR_H_
|
||||
#define _MOO_CHR_H_
|
||||
|
||||
#include <moo-cmn.h>
|
||||
|
||||
enum moo_ooch_prop_t
|
||||
{
|
||||
MOO_OOCH_PROP_UPPER = (1 << 0),
|
||||
#define MOO_UCH_PROP_UPPER MOO_OOCH_PROP_UPPER
|
||||
#define MOO_BCH_PROP_UPPER MOO_OOCH_PROP_UPPER
|
||||
|
||||
MOO_OOCH_PROP_LOWER = (1 << 1),
|
||||
#define MOO_UCH_PROP_LOWER MOO_OOCH_PROP_LOWER
|
||||
#define MOO_BCH_PROP_LOWER MOO_OOCH_PROP_LOWER
|
||||
|
||||
MOO_OOCH_PROP_ALPHA = (1 << 2),
|
||||
#define MOO_UCH_PROP_ALPHA MOO_OOCH_PROP_ALPHA
|
||||
#define MOO_BCH_PROP_ALPHA MOO_OOCH_PROP_ALPHA
|
||||
|
||||
MOO_OOCH_PROP_DIGIT = (1 << 3),
|
||||
#define MOO_UCH_PROP_DIGIT MOO_OOCH_PROP_DIGIT
|
||||
#define MOO_BCH_PROP_DIGIT MOO_OOCH_PROP_DIGIT
|
||||
|
||||
MOO_OOCH_PROP_XDIGIT = (1 << 4),
|
||||
#define MOO_UCH_PROP_XDIGIT MOO_OOCH_PROP_XDIGIT
|
||||
#define MOO_BCH_PROP_XDIGIT MOO_OOCH_PROP_XDIGIT
|
||||
|
||||
MOO_OOCH_PROP_ALNUM = (1 << 5),
|
||||
#define MOO_UCH_PROP_ALNUM MOO_OOCH_PROP_XDIGIT
|
||||
#define MOO_BCH_PROP_ALNUM MOO_OOCH_PROP_XDIGIT
|
||||
|
||||
MOO_OOCH_PROP_SPACE = (1 << 6),
|
||||
#define MOO_UCH_PROP_SPACE MOO_OOCH_PROP_SPACE
|
||||
#define MOO_BCH_PROP_SPACE MOO_OOCH_PROP_SPACE
|
||||
|
||||
MOO_OOCH_PROP_PRINT = (1 << 8),
|
||||
#define MOO_UCH_PROP_PRINT MOO_OOCH_PROP_PRINT
|
||||
#define MOO_BCH_PROP_PRINT MOO_OOCH_PROP_PRINT
|
||||
|
||||
MOO_OOCH_PROP_GRAPH = (1 << 9),
|
||||
#define MOO_UCH_PROP_GRAPH MOO_OOCH_PROP_GRAPH
|
||||
#define MOO_BCH_PROP_GRAPH MOO_OOCH_PROP_GRAPH
|
||||
|
||||
MOO_OOCH_PROP_CNTRL = (1 << 10),
|
||||
#define MOO_UCH_PROP_CNTRL MOO_OOCH_PROP_CNTRL
|
||||
#define MOO_BCH_PROP_CNTRL MOO_OOCH_PROP_CNTRL
|
||||
|
||||
MOO_OOCH_PROP_PUNCT = (1 << 11),
|
||||
#define MOO_UCH_PROP_PUNCT MOO_OOCH_PROP_PUNCT
|
||||
#define MOO_BCH_PROP_PUNCT MOO_OOCH_PROP_PUNCT
|
||||
|
||||
MOO_OOCH_PROP_BLANK = (1 << 12)
|
||||
#define MOO_UCH_PROP_BLANK MOO_OOCH_PROP_BLANK
|
||||
#define MOO_BCH_PROP_BLANK MOO_OOCH_PROP_BLANK
|
||||
};
|
||||
|
||||
typedef enum moo_ooch_prop_t moo_ooch_prop_t;
|
||||
typedef enum moo_ooch_prop_t moo_uch_prop_t;
|
||||
typedef enum moo_ooch_prop_t moo_bch_prop_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
MOO_EXPORT int moo_is_uch_type (moo_uch_t c, moo_uch_prop_t type);
|
||||
MOO_EXPORT int moo_is_uch_upper (moo_uch_t c);
|
||||
MOO_EXPORT int moo_is_uch_lower (moo_uch_t c);
|
||||
MOO_EXPORT int moo_is_uch_alpha (moo_uch_t c);
|
||||
MOO_EXPORT int moo_is_uch_digit (moo_uch_t c);
|
||||
MOO_EXPORT int moo_is_uch_xdigit (moo_uch_t c);
|
||||
MOO_EXPORT int moo_is_uch_alnum (moo_uch_t c);
|
||||
MOO_EXPORT int moo_is_uch_space (moo_uch_t c);
|
||||
MOO_EXPORT int moo_is_uch_print (moo_uch_t c);
|
||||
MOO_EXPORT int moo_is_uch_graph (moo_uch_t c);
|
||||
MOO_EXPORT int moo_is_uch_cntrl (moo_uch_t c);
|
||||
MOO_EXPORT int moo_is_uch_punct (moo_uch_t c);
|
||||
MOO_EXPORT int moo_is_uch_blank (moo_uch_t c);
|
||||
MOO_EXPORT moo_uch_t moo_to_uch_upper (moo_uch_t c);
|
||||
MOO_EXPORT moo_uch_t moo_to_uch_lower (moo_uch_t c);
|
||||
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
MOO_EXPORT int moo_is_bch_type (moo_bch_t c, moo_bch_prop_t type);
|
||||
|
||||
#if defined(__has_builtin)
|
||||
# if __has_builtin(__builtin_isupper)
|
||||
# define moo_is_bch_upper __builtin_isupper
|
||||
# endif
|
||||
# if __has_builtin(__builtin_islower)
|
||||
# define moo_is_bch_lower __builtin_islower
|
||||
# endif
|
||||
# if __has_builtin(__builtin_isalpha)
|
||||
# define moo_is_bch_alpha __builtin_isalpha
|
||||
# endif
|
||||
# if __has_builtin(__builtin_isdigit)
|
||||
# define moo_is_bch_digit __builtin_isdigit
|
||||
# endif
|
||||
# if __has_builtin(__builtin_isxdigit)
|
||||
# define moo_is_bch_xdigit __builtin_isxdigit
|
||||
# endif
|
||||
# if __has_builtin(__builtin_isalnum)
|
||||
# define moo_is_bch_alnum __builtin_isalnum
|
||||
# endif
|
||||
# if __has_builtin(__builtin_isspace)
|
||||
# define moo_is_bch_space __builtin_isspace
|
||||
# endif
|
||||
# if __has_builtin(__builtin_isprint)
|
||||
# define moo_is_bch_print __builtin_isprint
|
||||
# endif
|
||||
# if __has_builtin(__builtin_isgraph)
|
||||
# define moo_is_bch_graph __builtin_isgraph
|
||||
# endif
|
||||
# if __has_builtin(__builtin_iscntrl)
|
||||
# define moo_is_bch_cntrl __builtin_iscntrl
|
||||
# endif
|
||||
# if __has_builtin(__builtin_ispunct)
|
||||
# define moo_is_bch_punct __builtin_ispunct
|
||||
# endif
|
||||
# if __has_builtin(__builtin_isblank)
|
||||
# define moo_is_bch_blank __builtin_isblank
|
||||
# endif
|
||||
# if __has_builtin(__builtin_toupper)
|
||||
# define moo_to_bch_upper __builtin_toupper
|
||||
# endif
|
||||
# if __has_builtin(__builtin_tolower)
|
||||
# define moo_to_bch_lower __builtin_tolower
|
||||
# endif
|
||||
#elif (__GNUC__ >= 4)
|
||||
# define moo_is_bch_upper __builtin_isupper
|
||||
# define moo_is_bch_lower __builtin_islower
|
||||
# define moo_is_bch_alpha __builtin_isalpha
|
||||
# define moo_is_bch_digit __builtin_isdigit
|
||||
# define moo_is_bch_xdigit __builtin_isxdigit
|
||||
# define moo_is_bch_alnum __builtin_isalnum
|
||||
# define moo_is_bch_space __builtin_isspace
|
||||
# define moo_is_bch_print __builtin_isprint
|
||||
# define moo_is_bch_graph __builtin_isgraph
|
||||
# define moo_is_bch_cntrl __builtin_iscntrl
|
||||
# define moo_is_bch_punct __builtin_ispunct
|
||||
# define moo_is_bch_blank __builtin_isblank
|
||||
# define moo_to_bch_upper __builtin_toupper
|
||||
# define moo_to_bch_lower __builtin_tolower
|
||||
#endif
|
||||
|
||||
/* the bch class functions support no locale.
|
||||
* these implemenent latin-1 only */
|
||||
|
||||
#if !defined(moo_is_bch_upper) && defined(MOO_HAVE_INLINE)
|
||||
static MOO_INLINE int moo_is_bch_upper (moo_bch_t c) { return (moo_bchu_t)c - 'A' < 26; }
|
||||
#elif !defined(moo_is_bch_upper)
|
||||
# define moo_is_bch_upper(c) ((moo_bchu_t)(c) - 'A' < 26)
|
||||
#endif
|
||||
|
||||
#if !defined(moo_is_bch_lower) && defined(MOO_HAVE_INLINE)
|
||||
static MOO_INLINE int moo_is_bch_lower (moo_bch_t c) { return (moo_bchu_t)c - 'a' < 26; }
|
||||
#elif !defined(moo_is_bch_lower)
|
||||
# define moo_is_bch_lower(c) ((moo_bchu_t)(c) - 'a' < 26)
|
||||
#endif
|
||||
|
||||
#if !defined(moo_is_bch_alpha) && defined(MOO_HAVE_INLINE)
|
||||
static MOO_INLINE int moo_is_bch_alpha (moo_bch_t c) { return ((moo_bchu_t)c | 32) - 'a' < 26; }
|
||||
#elif !defined(moo_is_bch_alpha)
|
||||
# define moo_is_bch_alpha(c) (((moo_bchu_t)(c) | 32) - 'a' < 26)
|
||||
#endif
|
||||
|
||||
#if !defined(moo_is_bch_digit) && defined(MOO_HAVE_INLINE)
|
||||
static MOO_INLINE int moo_is_bch_digit (moo_bch_t c) { return (moo_bchu_t)c - '0' < 10; }
|
||||
#elif !defined(moo_is_bch_digit)
|
||||
# define moo_is_bch_digit(c) ((moo_bchu_t)(c) - '0' < 10)
|
||||
#endif
|
||||
|
||||
#if !defined(moo_is_bch_xdigit) && defined(MOO_HAVE_INLINE)
|
||||
static MOO_INLINE int moo_is_bch_xdigit (moo_bch_t c) { return moo_is_bch_digit(c) || ((moo_bchu_t)c | 32) - 'a' < 6; }
|
||||
#elif !defined(moo_is_bch_xdigit)
|
||||
# define moo_is_bch_xdigit(c) (moo_is_bch_digit(c) || ((moo_bchu_t)(c) | 32) - 'a' < 6)
|
||||
#endif
|
||||
|
||||
#if !defined(moo_is_bch_alnum) && defined(MOO_HAVE_INLINE)
|
||||
static MOO_INLINE int moo_is_bch_alnum (moo_bch_t c) { return moo_is_bch_alpha(c) || moo_is_bch_digit(c); }
|
||||
#elif !defined(moo_is_bch_alnum)
|
||||
# define moo_is_bch_alnum(c) (moo_is_bch_alpha(c) || moo_is_bch_digit(c))
|
||||
#endif
|
||||
|
||||
#if !defined(moo_is_bch_space) && defined(MOO_HAVE_INLINE)
|
||||
static MOO_INLINE int moo_is_bch_space (moo_bch_t c) { return c == ' ' || (moo_bchu_t)c - '\t' < 5; }
|
||||
#elif !defined(moo_is_bch_space)
|
||||
# define moo_is_bch_space(c) ((c) == ' ' || (moo_bchu_t)(c) - '\t' < 5)
|
||||
#endif
|
||||
|
||||
#if !defined(moo_is_bch_print) && defined(MOO_HAVE_INLINE)
|
||||
static MOO_INLINE int moo_is_bch_print (moo_bch_t c) { return (moo_bchu_t)c - ' ' < 95; }
|
||||
#elif !defined(moo_is_bch_print)
|
||||
# define moo_is_bch_print(c) ((moo_bchu_t)(c) - ' ' < 95)
|
||||
#endif
|
||||
|
||||
#if !defined(moo_is_bch_graph) && defined(MOO_HAVE_INLINE)
|
||||
static MOO_INLINE int moo_is_bch_graph (moo_bch_t c) { return (moo_bchu_t)c - '!' < 94; }
|
||||
#elif !defined(moo_is_bch_graph)
|
||||
# define moo_is_bch_graph(c) ((moo_bchu_t)(c) - '!' < 94)
|
||||
#endif
|
||||
|
||||
#if !defined(moo_is_bch_cntrl) && defined(MOO_HAVE_INLINE)
|
||||
static MOO_INLINE int moo_is_bch_cntrl (moo_bch_t c) { return (moo_bchu_t)c < ' ' || (moo_bchu_t)c == 127; }
|
||||
#elif !defined(moo_is_bch_cntrl)
|
||||
# define moo_is_bch_cntrl(c) ((moo_bchu_t)(c) < ' ' || (moo_bchu_t)(c) == 127)
|
||||
#endif
|
||||
|
||||
#if !defined(moo_is_bch_punct) && defined(MOO_HAVE_INLINE)
|
||||
static MOO_INLINE int moo_is_bch_punct (moo_bch_t c) { return moo_is_bch_graph(c) && !moo_is_bch_alnum(c); }
|
||||
#elif !defined(moo_is_bch_punct)
|
||||
# define moo_is_bch_punct(c) (moo_is_bch_graph(c) && !moo_is_bch_alnum(c))
|
||||
#endif
|
||||
|
||||
#if !defined(moo_is_bch_blank) && defined(MOO_HAVE_INLINE)
|
||||
static MOO_INLINE int moo_is_bch_blank (moo_bch_t c) { return c == ' ' || c == '\t'; }
|
||||
#elif !defined(moo_is_bch_blank)
|
||||
# define moo_is_bch_blank(c) ((c) == ' ' || (c) == '\t')
|
||||
#endif
|
||||
|
||||
#if !defined(moo_to_bch_upper)
|
||||
MOO_EXPORT moo_bch_t moo_to_bch_upper (moo_bch_t c);
|
||||
#endif
|
||||
#if !defined(moo_to_bch_lower)
|
||||
MOO_EXPORT moo_bch_t moo_to_bch_lower (moo_bch_t c);
|
||||
#endif
|
||||
|
||||
#if defined(MOO_OOCH_IS_UCH)
|
||||
# define moo_is_ooch_type moo_is_uch_type
|
||||
# define moo_is_ooch_upper moo_is_uch_upper
|
||||
# define moo_is_ooch_lower moo_is_uch_lower
|
||||
# define moo_is_ooch_alpha moo_is_uch_alpha
|
||||
# define moo_is_ooch_digit moo_is_uch_digit
|
||||
# define moo_is_ooch_xdigit moo_is_uch_xdigit
|
||||
# define moo_is_ooch_alnum moo_is_uch_alnum
|
||||
# define moo_is_ooch_space moo_is_uch_space
|
||||
# define moo_is_ooch_print moo_is_uch_print
|
||||
# define moo_is_ooch_graph moo_is_uch_graph
|
||||
# define moo_is_ooch_cntrl moo_is_uch_cntrl
|
||||
# define moo_is_ooch_punct moo_is_uch_punct
|
||||
# define moo_is_ooch_blank moo_is_uch_blank
|
||||
# define moo_to_ooch_upper moo_to_uch_upper
|
||||
# define moo_to_ooch_lower moo_to_uch_lower
|
||||
#else
|
||||
# define moo_is_ooch_type moo_is_bch_type
|
||||
# define moo_is_ooch_upper moo_is_bch_upper
|
||||
# define moo_is_ooch_lower moo_is_bch_lower
|
||||
# define moo_is_ooch_alpha moo_is_bch_alpha
|
||||
# define moo_is_ooch_digit moo_is_bch_digit
|
||||
# define moo_is_ooch_xdigit moo_is_bch_xdigit
|
||||
# define moo_is_ooch_alnum moo_is_bch_alnum
|
||||
# define moo_is_ooch_space moo_is_bch_space
|
||||
# define moo_is_ooch_print moo_is_bch_print
|
||||
# define moo_is_ooch_graph moo_is_bch_graph
|
||||
# define moo_is_ooch_cntrl moo_is_bch_cntrl
|
||||
# define moo_is_ooch_punct moo_is_bch_punct
|
||||
# define moo_is_ooch_blank moo_is_bch_blank
|
||||
# define moo_to_ooch_upper moo_to_bch_upper
|
||||
# define moo_to_ooch_lower moo_to_bch_lower
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
@ -2604,6 +2604,17 @@ static MOO_INLINE moo_uch_t* moo_dupbtoucstr (moo_t* moo, const moo_bch_t* bcs,
|
||||
# define moo_dupbtoucstr(moo, bcs, ucslen) moo_dupbtoucstrwithheadroom(moo, 0, bcs, ucslen)
|
||||
#endif
|
||||
|
||||
MOO_EXPORT moo_uch_t* moo_dupucstr (
|
||||
moo_t* moo,
|
||||
const moo_uch_t* ucs,
|
||||
moo_oow_t* ucslen
|
||||
);
|
||||
|
||||
MOO_EXPORT moo_bch_t* moo_dupbcstr (
|
||||
moo_t* moo,
|
||||
const moo_bch_t* bcs,
|
||||
moo_oow_t* bcslen
|
||||
);
|
||||
|
||||
MOO_EXPORT moo_uch_t* moo_dupuchars (
|
||||
moo_t* moo,
|
||||
@ -2627,6 +2638,8 @@ MOO_EXPORT moo_bch_t* moo_dupbchars (
|
||||
# define moo_dupbtooocstrwithheadroom(moo,hrb,bcs,oocslen) moo_dupbtoucstrwithheadroom(moo,hrb,bcs,oocslen)
|
||||
# define moo_dupootobcstr(moo,oocs,bcslen) moo_duputobcstr(moo,oocs,bcslen)
|
||||
# define moo_dupbtooocstr(moo,bcs,oocslen) moo_dupbtoucstr(moo,bcs,oocslen)
|
||||
# define moo_dupoocstr(moo,oocs,oocslen) moo_dupucstr(moo,oocs,oocslen)
|
||||
# define moo_duputooocstr(moo,ucs,oocslen) moo_dupucstr(moo,ucs,oocslen)
|
||||
# define moo_dupoochars(moo,oocs,oocslen) moo_dupuchars(moo,oocs,oocslen)
|
||||
#else
|
||||
# define moo_dupootoucharswithheadroom(moo,hrb,oocs,oocslen,ucslen) moo_dupbtoucharswithheadroom(moo,hrb,oocs,oocslen,ucslen)
|
||||
@ -2638,6 +2651,8 @@ MOO_EXPORT moo_bch_t* moo_dupbchars (
|
||||
# define moo_duputooocstrwithheadroom(moo,hrb,ucs,oocslen) moo_duputobcstrwithheadroom(moo,hrb,ucs,oocslen)
|
||||
# define moo_dupootoucstr(moo,oocs,ucslen) moo_dupbtoucstr(moo,oocs,ucslen)
|
||||
# define moo_duputooocstr(moo,ucs,oocslen) moo_duputobcstr(moo,ucs,oocslen)
|
||||
# define moo_dupoocstr(moo,oocs,oocslen) moo_dupbcstr(moo,oocs,oocslen)
|
||||
# define moo_dupbtooocstr(moo,bcs,oocslen) moo_dupucstr(moo,bcs,oocslen)
|
||||
# define moo_dupoochars(moo,oocs,oocslen) moo_dupbchars(moo,oocs,oocslen)
|
||||
#endif
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
@ -54,7 +54,7 @@ static moo_bch_t EMSG_BCH[] = { '\0' };
|
||||
#define xcompcharscstr moo_comp_uchars_ucstr
|
||||
#define xfindcharincstr moo_find_uchar_in_ucstr
|
||||
#define XCI_EOF MOO_BCI_EOF
|
||||
#include "opt-impl.h"
|
||||
#include "opt-imp.h"
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
||||
@ -77,6 +77,6 @@ static moo_bch_t EMSG_BCH[] = { '\0' };
|
||||
#define xcompcharscstr moo_comp_bchars_bcstr
|
||||
#define xfindcharincstr moo_find_bchar_in_bcstr
|
||||
#define XCI_EOF MOO_UCI_EOF
|
||||
#include "opt-impl.h"
|
||||
#include "opt-imp.h"
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
7367
moo/lib/uch-case.h
Normal file
7367
moo/lib/uch-case.h
Normal file
File diff suppressed because it is too large
Load Diff
15603
moo/lib/uch-prop.h
Normal file
15603
moo/lib/uch-prop.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
@ -1099,6 +1099,39 @@ moo_bch_t* moo_duputobcstrwithheadroom (moo_t* moo, moo_oow_t headroom_bytes, co
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------- */
|
||||
moo_uch_t* moo_dupucstr (moo_t* moo, const moo_uch_t* ucs, moo_oow_t* ucslen)
|
||||
{
|
||||
moo_uch_t* ptr;
|
||||
moo_oow_t len;
|
||||
|
||||
len = moo_count_ucstr(ucs);
|
||||
|
||||
ptr = (moo_uch_t*)moo_allocmem(moo, (len + 1) * MOO_SIZEOF(moo_uch_t));
|
||||
if (!ptr) return MOO_NULL;
|
||||
|
||||
moo_copy_uchars (ptr, ucs, len);
|
||||
ptr[len] = '\0';
|
||||
|
||||
if (ucslen) *ucslen = len;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
moo_bch_t* moo_dupbcstr (moo_t* moo, const moo_bch_t* bcs, moo_oow_t* bcslen)
|
||||
{
|
||||
moo_bch_t* ptr;
|
||||
moo_oow_t len;
|
||||
|
||||
len = moo_count_bcstr(bcs);
|
||||
|
||||
ptr = (moo_bch_t*)moo_allocmem(moo, (len + 1) * MOO_SIZEOF(moo_bch_t));
|
||||
if (!ptr) return MOO_NULL;
|
||||
|
||||
moo_copy_bchars (ptr, bcs, len);
|
||||
ptr[len] = '\0';
|
||||
|
||||
if (bcslen) *bcslen = len;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
moo_uch_t* moo_dupuchars (moo_t* moo, const moo_uch_t* ucs, moo_oow_t ucslen)
|
||||
{
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*
|
||||
Copyright (c) 2014-2018 Chung, Hyung-Hwan. All rights reserved.
|
||||
Copyright (c) 2014-2019 Chung, Hyung-Hwan. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
28
moo/tools/Makefile.am
Normal file
28
moo/tools/Makefile.am
Normal file
@ -0,0 +1,28 @@
|
||||
AUTOMAKE_OPTIONS = nostdinc
|
||||
|
||||
CPPFLAGS_ALL_COMMON = \
|
||||
-I$(abs_builddir) \
|
||||
-I$(abs_builddir)/../lib \
|
||||
-I$(abs_srcdir) \
|
||||
-I$(abs_srcdir)/../lib \
|
||||
-I$(includedir)
|
||||
|
||||
LDFLAGS_ALL_COMMON = -L$(abs_builddir) -L$(abs_builddir)/../lib -L$(libdir)
|
||||
|
||||
CPPFLAGS_BIN_COMMON = $(CPPFLAGS_ALL_COMMON)
|
||||
LDFLAGS_BIN_COMMON = $(LDFLAGS_ALL_COMMON) -version-info 1:0:0 -no-undefined
|
||||
LIBADD_BIN_COMMON = $(LIBM)
|
||||
|
||||
bin_PROGRAMS = uni-case uni-prop
|
||||
|
||||
uni_case_SOURCES = uni-case.c
|
||||
uni_case_CPPFLAGS = $(CPPFLAGS_ALL_COMMON)
|
||||
uni_case_LDFLAGS = $(LDFLAGS_ALL_COMMON)
|
||||
uni_case_LDADD = $(LIBADD_BIN_COMMON)
|
||||
uni_case_DEPENDENCIES =
|
||||
|
||||
uni_prop_SOURCES = uni-prop.c
|
||||
uni_prop_CPPFLAGS = $(CPPFLAGS_ALL_COMMON)
|
||||
uni_prop_LDFLAGS = $(LDFLAGS_ALL_COMMON)
|
||||
uni_prop_LDADD = $(LIBADD_BIN_COMMON)
|
||||
uni_prop_DEPENDENCIES =
|
744
moo/tools/Makefile.in
Normal file
744
moo/tools/Makefile.in
Normal file
@ -0,0 +1,744 @@
|
||||
# Makefile.in generated by automake 1.16.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2018 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
bin_PROGRAMS = uni-case$(EXEEXT) uni-prop$(EXEEXT)
|
||||
subdir = tools
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_sign.m4 \
|
||||
$(top_srcdir)/m4/ax_cxx_namespace.m4 \
|
||||
$(top_srcdir)/m4/ax_numval.m4 $(top_srcdir)/m4/ax_pthread.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/lib/moo-cfg.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am_uni_case_OBJECTS = uni_case-uni-case.$(OBJEXT)
|
||||
uni_case_OBJECTS = $(am_uni_case_OBJECTS)
|
||||
am__DEPENDENCIES_1 =
|
||||
am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
uni_case_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(uni_case_LDFLAGS) $(LDFLAGS) -o $@
|
||||
am_uni_prop_OBJECTS = uni_prop-uni-prop.$(OBJEXT)
|
||||
uni_prop_OBJECTS = $(am_uni_prop_OBJECTS)
|
||||
uni_prop_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(uni_prop_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES =
|
||||
depcomp = $(SHELL) $(top_srcdir)/ac/depcomp
|
||||
am__maybe_remake_depfiles = depfiles
|
||||
am__depfiles_remade = ./$(DEPDIR)/uni_case-uni-case.Po \
|
||||
./$(DEPDIR)/uni_prop-uni-prop.Po
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
am__v_CC_1 =
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
SOURCES = $(uni_case_SOURCES) $(uni_prop_SOURCES)
|
||||
DIST_SOURCES = $(uni_case_SOURCES) $(uni_prop_SOURCES)
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/ac/depcomp
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_MODE = @BUILD_MODE@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DL_LIBS = @DL_LIBS@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
DYNCALL_LIBS = @DYNCALL_LIBS@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FFI_LIBS = @FFI_LIBS@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
HAVE_CXX = @HAVE_CXX@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBM = @LIBM@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTDL_LIBS = @LTDL_LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MOO_PROJECT_AUTHOR = @MOO_PROJECT_AUTHOR@
|
||||
MOO_PROJECT_URL = @MOO_PROJECT_URL@
|
||||
MOO_SIZEOF_CHAR = @MOO_SIZEOF_CHAR@
|
||||
MOO_SIZEOF_DOUBLE = @MOO_SIZEOF_DOUBLE@
|
||||
MOO_SIZEOF_FLOAT = @MOO_SIZEOF_FLOAT@
|
||||
MOO_SIZEOF_INT = @MOO_SIZEOF_INT@
|
||||
MOO_SIZEOF_LONG = @MOO_SIZEOF_LONG@
|
||||
MOO_SIZEOF_LONG_DOUBLE = @MOO_SIZEOF_LONG_DOUBLE@
|
||||
MOO_SIZEOF_LONG_LONG = @MOO_SIZEOF_LONG_LONG@
|
||||
MOO_SIZEOF_OFF64_T = @MOO_SIZEOF_OFF64_T@
|
||||
MOO_SIZEOF_OFF_T = @MOO_SIZEOF_OFF_T@
|
||||
MOO_SIZEOF_SHORT = @MOO_SIZEOF_SHORT@
|
||||
MOO_SIZEOF_VOID_P = @MOO_SIZEOF_VOID_P@
|
||||
MOO_SIZEOF_WCHAR_T = @MOO_SIZEOF_WCHAR_T@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PACKAGE_VERSION_MAJOR = @PACKAGE_VERSION_MAJOR@
|
||||
PACKAGE_VERSION_MINOR = @PACKAGE_VERSION_MINOR@
|
||||
PACKAGE_VERSION_PATCH = @PACKAGE_VERSION_PATCH@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PTHREAD_CC = @PTHREAD_CC@
|
||||
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
|
||||
PTHREAD_LIBS = @PTHREAD_LIBS@
|
||||
QUADMATH_LIBS = @QUADMATH_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
SOCKET_LIBS = @SOCKET_LIBS@
|
||||
STRIP = @STRIP@
|
||||
TERMINAL_LIBS = @TERMINAL_LIBS@
|
||||
UNICOWS_LIBS = @UNICOWS_LIBS@
|
||||
UNWIND_LIBS = @UNWIND_LIBS@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
ax_pthread_config = @ax_pthread_config@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AUTOMAKE_OPTIONS = nostdinc
|
||||
CPPFLAGS_ALL_COMMON = \
|
||||
-I$(abs_builddir) \
|
||||
-I$(abs_builddir)/../lib \
|
||||
-I$(abs_srcdir) \
|
||||
-I$(abs_srcdir)/../lib \
|
||||
-I$(includedir)
|
||||
|
||||
LDFLAGS_ALL_COMMON = -L$(abs_builddir) -L$(abs_builddir)/../lib -L$(libdir)
|
||||
CPPFLAGS_BIN_COMMON = $(CPPFLAGS_ALL_COMMON)
|
||||
LDFLAGS_BIN_COMMON = $(LDFLAGS_ALL_COMMON) -version-info 1:0:0 -no-undefined
|
||||
LIBADD_BIN_COMMON = $(LIBM)
|
||||
uni_case_SOURCES = uni-case.c
|
||||
uni_case_CPPFLAGS = $(CPPFLAGS_ALL_COMMON)
|
||||
uni_case_LDFLAGS = $(LDFLAGS_ALL_COMMON)
|
||||
uni_case_LDADD = $(LIBADD_BIN_COMMON)
|
||||
uni_case_DEPENDENCIES =
|
||||
uni_prop_SOURCES = uni-prop.c
|
||||
uni_prop_CPPFLAGS = $(CPPFLAGS_ALL_COMMON)
|
||||
uni_prop_LDFLAGS = $(LDFLAGS_ALL_COMMON)
|
||||
uni_prop_LDADD = $(LIBADD_BIN_COMMON)
|
||||
uni_prop_DEPENDENCIES =
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign tools/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed 's/$(EXEEXT)$$//' | \
|
||||
while read p p1; do if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then echo "$$p"; echo "$$p"; else :; fi; \
|
||||
done | \
|
||||
sed -e 'p;s,.*/,,;n;h' \
|
||||
-e 's|.*|.|' \
|
||||
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
|
||||
sed 'N;N;N;s,\n, ,g' | \
|
||||
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
|
||||
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
|
||||
if ($$2 == $$4) files[d] = files[d] " " $$1; \
|
||||
else { print "f", $$3 "/" $$4, $$1; } } \
|
||||
END { for (d in files) print "f", d, files[d] }' | \
|
||||
while read type dir files; do \
|
||||
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
|
||||
} \
|
||||
; done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
|
||||
files=`for p in $$list; do echo "$$p"; done | \
|
||||
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
|
||||
-e 's/$$/$(EXEEXT)/' \
|
||||
`; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(bindir)" && rm -f $$files
|
||||
|
||||
clean-binPROGRAMS:
|
||||
@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list || exit $$?; \
|
||||
test -n "$(EXEEXT)" || exit 0; \
|
||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
|
||||
uni-case$(EXEEXT): $(uni_case_OBJECTS) $(uni_case_DEPENDENCIES) $(EXTRA_uni_case_DEPENDENCIES)
|
||||
@rm -f uni-case$(EXEEXT)
|
||||
$(AM_V_CCLD)$(uni_case_LINK) $(uni_case_OBJECTS) $(uni_case_LDADD) $(LIBS)
|
||||
|
||||
uni-prop$(EXEEXT): $(uni_prop_OBJECTS) $(uni_prop_DEPENDENCIES) $(EXTRA_uni_prop_DEPENDENCIES)
|
||||
@rm -f uni-prop$(EXEEXT)
|
||||
$(AM_V_CCLD)$(uni_prop_LINK) $(uni_prop_OBJECTS) $(uni_prop_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uni_case-uni-case.Po@am__quote@ # am--include-marker
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uni_prop-uni-prop.Po@am__quote@ # am--include-marker
|
||||
|
||||
$(am__depfiles_remade):
|
||||
@$(MKDIR_P) $(@D)
|
||||
@echo '# dummy' >$@-t && $(am__mv) $@-t $@
|
||||
|
||||
am--depfiles: $(am__depfiles_remade)
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
|
||||
@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
uni_case-uni-case.o: uni-case.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uni_case_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uni_case-uni-case.o -MD -MP -MF $(DEPDIR)/uni_case-uni-case.Tpo -c -o uni_case-uni-case.o `test -f 'uni-case.c' || echo '$(srcdir)/'`uni-case.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/uni_case-uni-case.Tpo $(DEPDIR)/uni_case-uni-case.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uni-case.c' object='uni_case-uni-case.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uni_case_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uni_case-uni-case.o `test -f 'uni-case.c' || echo '$(srcdir)/'`uni-case.c
|
||||
|
||||
uni_case-uni-case.obj: uni-case.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uni_case_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uni_case-uni-case.obj -MD -MP -MF $(DEPDIR)/uni_case-uni-case.Tpo -c -o uni_case-uni-case.obj `if test -f 'uni-case.c'; then $(CYGPATH_W) 'uni-case.c'; else $(CYGPATH_W) '$(srcdir)/uni-case.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/uni_case-uni-case.Tpo $(DEPDIR)/uni_case-uni-case.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uni-case.c' object='uni_case-uni-case.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uni_case_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uni_case-uni-case.obj `if test -f 'uni-case.c'; then $(CYGPATH_W) 'uni-case.c'; else $(CYGPATH_W) '$(srcdir)/uni-case.c'; fi`
|
||||
|
||||
uni_prop-uni-prop.o: uni-prop.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uni_prop_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uni_prop-uni-prop.o -MD -MP -MF $(DEPDIR)/uni_prop-uni-prop.Tpo -c -o uni_prop-uni-prop.o `test -f 'uni-prop.c' || echo '$(srcdir)/'`uni-prop.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/uni_prop-uni-prop.Tpo $(DEPDIR)/uni_prop-uni-prop.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uni-prop.c' object='uni_prop-uni-prop.o' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uni_prop_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uni_prop-uni-prop.o `test -f 'uni-prop.c' || echo '$(srcdir)/'`uni-prop.c
|
||||
|
||||
uni_prop-uni-prop.obj: uni-prop.c
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uni_prop_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT uni_prop-uni-prop.obj -MD -MP -MF $(DEPDIR)/uni_prop-uni-prop.Tpo -c -o uni_prop-uni-prop.obj `if test -f 'uni-prop.c'; then $(CYGPATH_W) 'uni-prop.c'; else $(CYGPATH_W) '$(srcdir)/uni-prop.c'; fi`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/uni_prop-uni-prop.Tpo $(DEPDIR)/uni_prop-uni-prop.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='uni-prop.c' object='uni_prop-uni-prop.obj' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(uni_prop_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o uni_prop-uni-prop.obj `if test -f 'uni-prop.c'; then $(CYGPATH_W) 'uni-prop.c'; else $(CYGPATH_W) '$(srcdir)/uni-prop.c'; fi`
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-am
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-am
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-am
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(BUILT_SOURCES)
|
||||
$(MAKE) $(AM_MAKEFLAGS) distdir-am
|
||||
|
||||
distdir-am: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(PROGRAMS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f ./$(DEPDIR)/uni_case-uni-case.Po
|
||||
-rm -f ./$(DEPDIR)/uni_prop-uni-prop.Po
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f ./$(DEPDIR)/uni_case-uni-case.Po
|
||||
-rm -f ./$(DEPDIR)/uni_prop-uni-prop.Po
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binPROGRAMS
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \
|
||||
clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \
|
||||
ctags ctags-am distclean distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-binPROGRAMS \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags tags-am uninstall uninstall-am uninstall-binPROGRAMS
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
175
moo/tools/uni-case.c
Normal file
175
moo/tools/uni-case.c
Normal file
@ -0,0 +1,175 @@
|
||||
#include <moo-cmn.h>
|
||||
#include <locale.h>
|
||||
#include <wchar.h>
|
||||
#include <wctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
#if MOO_SIZEOF_WCHAR_T == MOO_SIZEOF_INT16_T
|
||||
#define MAX_CHAR 0xFFFF
|
||||
#else
|
||||
/*#define MAX_CHAR 0xE01EF*/
|
||||
#define MAX_CHAR 0x10FFFF
|
||||
#endif
|
||||
|
||||
#define CASE_PAGE_SIZE 512
|
||||
#define MAX_CASE_PAGE_COUNT ((MAX_CHAR + CASE_PAGE_SIZE) / CASE_PAGE_SIZE)
|
||||
|
||||
/*
|
||||
* short is enough as the diff does not exceed
|
||||
* the maixmum value of the short type.
|
||||
*/
|
||||
typedef long int wcdiff_t;
|
||||
|
||||
typedef struct case_page_t case_page_t;
|
||||
struct case_page_t
|
||||
{
|
||||
size_t no;
|
||||
wcdiff_t upper[CASE_PAGE_SIZE];
|
||||
wcdiff_t lower[CASE_PAGE_SIZE];
|
||||
case_page_t* next;
|
||||
};
|
||||
|
||||
size_t case_page_count = 0;
|
||||
case_page_t* case_pages = NULL;
|
||||
|
||||
size_t case_map_count = 0;
|
||||
case_page_t* case_maps[MAX_CASE_PAGE_COUNT];
|
||||
|
||||
void make_case_page (moo_uci_t start, moo_uci_t end)
|
||||
{
|
||||
moo_uci_t code, c;
|
||||
wcdiff_t upper[CASE_PAGE_SIZE];
|
||||
wcdiff_t lower[CASE_PAGE_SIZE];
|
||||
case_page_t* page;
|
||||
|
||||
memset (upper, 0, sizeof(upper));
|
||||
memset (lower, 0, sizeof(lower));
|
||||
for (code = start; code <= end; code++)
|
||||
{
|
||||
c = code - start;
|
||||
upper[c] = (wcdiff_t)code - (wcdiff_t)towupper(code);
|
||||
lower[c] = (wcdiff_t)towlower(code) - (wcdiff_t)code;
|
||||
}
|
||||
|
||||
for (page = case_pages; page != NULL; page = page->next)
|
||||
{
|
||||
if (memcmp(upper, page->upper, sizeof(upper)) == 0 &&
|
||||
memcmp(lower, page->lower, sizeof(lower)) == 0)
|
||||
{
|
||||
case_maps[case_map_count++] = page;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
page = (case_page_t*)malloc(sizeof(case_page_t));
|
||||
page->no = case_page_count++;
|
||||
memcpy (page->upper, upper, sizeof(upper));
|
||||
memcpy (page->lower, lower, sizeof(lower));
|
||||
page->next = case_pages;
|
||||
|
||||
case_pages = page;
|
||||
case_maps[case_map_count++] = page;
|
||||
}
|
||||
|
||||
void emit_case_page (case_page_t* page, int page_seq)
|
||||
{
|
||||
size_t i;
|
||||
wcdiff_t upper, lower;
|
||||
|
||||
printf ("static uch_case_page_t uch_case_page_%04X[%u] =\n{\n",
|
||||
(unsigned int)page->no, (unsigned int)CASE_PAGE_SIZE);
|
||||
|
||||
for (i = 0; i < CASE_PAGE_SIZE; i++)
|
||||
{
|
||||
upper = page->upper[i];
|
||||
lower = page->lower[i];
|
||||
|
||||
if (i != 0) printf (",\n");
|
||||
printf ("\t");
|
||||
|
||||
#if 0
|
||||
if (upper > SHRT_MAX || upper < SHRT_MIN ||
|
||||
lower > SHRT_MAX || lower < SHRT_MIN)
|
||||
{
|
||||
fprintf (stderr, "WARNING: page %u, index %u: value out of range - upper %ld lower %ld\n",
|
||||
(unsigned int)page->no, (unsigned int)i, (long int)upper, (long int)lower);
|
||||
}
|
||||
#endif
|
||||
|
||||
printf ("{%ld, %ld}", (long int)upper, (long int)lower);
|
||||
}
|
||||
|
||||
printf ("\n};\n");
|
||||
}
|
||||
|
||||
void emit_case_map ()
|
||||
{
|
||||
size_t i;
|
||||
|
||||
|
||||
printf ("static uch_case_page_t* uch_case_map[%u] =\n{\n", (unsigned int)case_map_count);
|
||||
|
||||
for (i = 0; i < case_map_count; i++) {
|
||||
if (i != 0) printf (",\n");
|
||||
printf ("\t /* 0x%lX-0x%lX */ ",
|
||||
(unsigned long int)(i * CASE_PAGE_SIZE),
|
||||
(unsigned long int)((i + 1) * CASE_PAGE_SIZE - 1));
|
||||
printf ("uch_case_page_%04X", (int)case_maps[i]->no);
|
||||
}
|
||||
|
||||
printf ("\n};\n");
|
||||
}
|
||||
|
||||
static void emit_case_macros (void)
|
||||
{
|
||||
printf ("/* generated by tools/uni-case.c */\n\n");
|
||||
printf ("#define UCH_CASE_MAX 0x%lX\n\n", (unsigned long)MAX_CHAR);
|
||||
printf ("typedef struct uch_case_page_t uch_case_page_t;\n\n");
|
||||
printf ("struct uch_case_page_t {\n");
|
||||
|
||||
printf (" moo_int32_t upper;\n");
|
||||
printf (" moo_int32_t lower;\n");
|
||||
printf ("};\n\n");
|
||||
printf ("\n");
|
||||
}
|
||||
|
||||
int main ()
|
||||
{
|
||||
moo_uci_t code;
|
||||
case_page_t* page;
|
||||
char* locale;
|
||||
int page_seq = 0;
|
||||
|
||||
locale = setlocale (LC_ALL, "");
|
||||
if (locale == NULL ||
|
||||
(strstr(locale, ".utf8") == NULL && strstr(locale, ".UTF8") == NULL &&
|
||||
strstr(locale, ".utf-8") == NULL && strstr(locale, ".UTF-8") == NULL))
|
||||
{
|
||||
fprintf (stderr, "error: the locale should be utf-8 compatible\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
for (code = 0; code < MAX_CHAR; code += CASE_PAGE_SIZE)
|
||||
{
|
||||
make_case_page (code, code + CASE_PAGE_SIZE - 1);
|
||||
}
|
||||
|
||||
emit_case_macros ();
|
||||
|
||||
for (page = case_pages; page != NULL; page = page->next)
|
||||
{
|
||||
emit_case_page (page, page_seq);
|
||||
printf ("\n");
|
||||
page_seq++;
|
||||
}
|
||||
|
||||
emit_case_map ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
282
moo/tools/uni-prop.c
Normal file
282
moo/tools/uni-prop.c
Normal file
@ -0,0 +1,282 @@
|
||||
#include <moo-cmn.h>
|
||||
#include <locale.h>
|
||||
#include <wchar.h>
|
||||
#include <wctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#if MOO_SIZEOF_UCH_T == MOO_SIZEOF_INT16_T
|
||||
#define MAX_CHAR 0xFFFF
|
||||
#else
|
||||
/*#define MAX_CHAR 0xE01EF*/
|
||||
#define MAX_CHAR 0x10FFFF
|
||||
#endif
|
||||
|
||||
#define UCH_PROP_PAGE_SIZE 256
|
||||
#define MAX_UCH_PROP_PAGE_COUNT ((MAX_CHAR + UCH_PROP_PAGE_SIZE) / UCH_PROP_PAGE_SIZE)
|
||||
|
||||
typedef struct prop_page_t prop_page_t;
|
||||
struct prop_page_t
|
||||
{
|
||||
size_t no;
|
||||
moo_uint16_t props[UCH_PROP_PAGE_SIZE];
|
||||
prop_page_t* next;
|
||||
};
|
||||
|
||||
size_t prop_page_count = 0;
|
||||
prop_page_t* prop_pages = NULL;
|
||||
|
||||
size_t prop_map_count = 0;
|
||||
prop_page_t* prop_maps[MAX_UCH_PROP_PAGE_COUNT];
|
||||
|
||||
enum
|
||||
{
|
||||
UCH_PROP_UPPER = (1 << 0),
|
||||
UCH_PROP_LOWER = (1 << 1),
|
||||
UCH_PROP_ALPHA = (1 << 2),
|
||||
UCH_PROP_DIGIT = (1 << 3),
|
||||
UCH_PROP_XDIGIT = (1 << 4),
|
||||
UCH_PROP_ALNUM = (1 << 5),
|
||||
UCH_PROP_SPACE = (1 << 6),
|
||||
UCH_PROP_PRINT = (1 << 8),
|
||||
UCH_PROP_GRAPH = (1 << 9),
|
||||
UCH_PROP_CNTRL = (1 << 10),
|
||||
UCH_PROP_PUNCT = (1 << 11),
|
||||
UCH_PROP_BLANK = (1 << 12)
|
||||
};
|
||||
|
||||
int get_prop (moo_uci_t code)
|
||||
{
|
||||
int prop = 0;
|
||||
|
||||
if (iswupper(code)) prop |= UCH_PROP_UPPER;
|
||||
if (iswlower(code)) prop |= UCH_PROP_LOWER;
|
||||
if (iswalpha(code)) prop |= UCH_PROP_ALPHA;
|
||||
if (iswdigit(code)) prop |= UCH_PROP_DIGIT;
|
||||
if (iswxdigit(code)) prop |= UCH_PROP_XDIGIT;
|
||||
if (iswalnum(code)) prop |= UCH_PROP_ALNUM;
|
||||
if (iswspace(code)) prop |= UCH_PROP_SPACE;
|
||||
if (iswprint(code)) prop |= UCH_PROP_PRINT;
|
||||
if (iswgraph(code)) prop |= UCH_PROP_GRAPH;
|
||||
if (iswcntrl(code)) prop |= UCH_PROP_CNTRL;
|
||||
if (iswpunct(code)) prop |= UCH_PROP_PUNCT;
|
||||
if (iswblank(code)) prop |= UCH_PROP_BLANK;
|
||||
/*
|
||||
if (iswascii(code)) prop |= UCH_PROP_ASCII;
|
||||
if (isphonogram(code)) prop |= UCH_PROP_PHONO;
|
||||
if (isideogram(code)) prop |= UCH_PROP_IDEOG;
|
||||
if (isenglish(code)) prop |= UCH_PROP_ENGLI;
|
||||
*/
|
||||
|
||||
return prop;
|
||||
}
|
||||
|
||||
void make_prop_page (moo_uci_t start, moo_uci_t end)
|
||||
{
|
||||
moo_uci_t code;
|
||||
moo_uint16_t props[UCH_PROP_PAGE_SIZE];
|
||||
prop_page_t* page;
|
||||
|
||||
memset (props, 0, sizeof(props));
|
||||
for (code = start; code <= end; code++) {
|
||||
props[code - start] = get_prop(code);
|
||||
}
|
||||
|
||||
for (page = prop_pages; page != NULL; page = page->next) {
|
||||
if (memcmp (props, page->props, sizeof(props)) == 0) {
|
||||
prop_maps[prop_map_count++] = page;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
page = (prop_page_t*)malloc (sizeof(prop_page_t));
|
||||
page->no = prop_page_count++;
|
||||
memcpy (page->props, props, sizeof(props));
|
||||
page->next = prop_pages;
|
||||
|
||||
prop_pages = page;
|
||||
prop_maps[prop_map_count++] = page;
|
||||
}
|
||||
|
||||
void emit_prop_page (prop_page_t* page)
|
||||
{
|
||||
size_t i;
|
||||
int prop, need_or;
|
||||
|
||||
printf ("static moo_uint16_t uch_prop_page_%04X[%u] =\n{\n",
|
||||
(unsigned int)page->no, (unsigned int)UCH_PROP_PAGE_SIZE);
|
||||
|
||||
for (i = 0; i < UCH_PROP_PAGE_SIZE; i++) {
|
||||
|
||||
need_or = 0;
|
||||
prop = page->props[i];
|
||||
|
||||
if (i != 0) printf (",\n");
|
||||
printf ("\t");
|
||||
|
||||
if (prop == 0) {
|
||||
printf ("0");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (prop & UCH_PROP_UPPER) {
|
||||
if (need_or) printf (" | ");
|
||||
printf ("MOO_UCH_PROP_UPPER");
|
||||
need_or = 1;
|
||||
}
|
||||
|
||||
if (prop & UCH_PROP_LOWER) {
|
||||
if (need_or) printf (" | ");
|
||||
printf ("MOO_UCH_PROP_LOWER");
|
||||
need_or = 1;
|
||||
}
|
||||
|
||||
if (prop & UCH_PROP_ALPHA) {
|
||||
if (need_or) printf (" | ");
|
||||
printf ("MOO_UCH_PROP_ALPHA");
|
||||
need_or = 1;
|
||||
}
|
||||
|
||||
if (prop & UCH_PROP_DIGIT) {
|
||||
if (need_or) printf (" | ");
|
||||
printf ("MOO_UCH_PROP_DIGIT");
|
||||
need_or = 1;
|
||||
}
|
||||
|
||||
if (prop & UCH_PROP_XDIGIT) {
|
||||
if (need_or) printf (" | ");
|
||||
printf ("MOO_UCH_PROP_XDIGIT");
|
||||
need_or = 1;
|
||||
}
|
||||
|
||||
if (prop & UCH_PROP_ALNUM) {
|
||||
if (need_or) printf (" | ");
|
||||
printf ("MOO_UCH_PROP_ALNUM");
|
||||
need_or = 1;
|
||||
}
|
||||
|
||||
if (prop & UCH_PROP_SPACE) {
|
||||
if (need_or) printf (" | ");
|
||||
printf ("MOO_UCH_PROP_SPACE");
|
||||
need_or = 1;
|
||||
}
|
||||
|
||||
if (prop & UCH_PROP_PRINT) {
|
||||
if (need_or) printf (" | ");
|
||||
printf ("MOO_UCH_PROP_PRINT");
|
||||
need_or = 1;
|
||||
}
|
||||
|
||||
if (prop & UCH_PROP_GRAPH) {
|
||||
if (need_or) printf (" | ");
|
||||
printf ("MOO_UCH_PROP_GRAPH");
|
||||
need_or = 1;
|
||||
}
|
||||
|
||||
if (prop & UCH_PROP_CNTRL) {
|
||||
if (need_or) printf (" | ");
|
||||
printf ("MOO_UCH_PROP_CNTRL");
|
||||
need_or = 1;
|
||||
}
|
||||
|
||||
if (prop & UCH_PROP_PUNCT) {
|
||||
if (need_or) printf (" | ");
|
||||
printf ("MOO_UCH_PROP_PUNCT");
|
||||
need_or = 1;
|
||||
}
|
||||
|
||||
if (prop & UCH_PROP_BLANK) {
|
||||
if (need_or) printf (" | ");
|
||||
printf ("MOO_UCH_PROP_BLANK");
|
||||
need_or = 1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
if (prop & UCH_PROP_ASCII) {
|
||||
if (need_or) printf (" | ");
|
||||
printf ("MOO_UCH_PROP_ASCII");
|
||||
need_or = 1;
|
||||
}
|
||||
|
||||
if (prop & UCH_PROP_IDEOG) {
|
||||
if (need_or) printf (" | ");
|
||||
printf ("MOO_UCH_PROP_IDEOG");
|
||||
need_or = 1;
|
||||
}
|
||||
|
||||
if (prop & UCH_PROP_PHONO) {
|
||||
if (need_or) printf (" | ");
|
||||
printf ("MOO_UCH_PROP_PHONO");
|
||||
need_or = 1;
|
||||
}
|
||||
|
||||
if (prop & UCH_PROP_ENGLI) {
|
||||
if (need_or) printf (" | ");
|
||||
printf ("MOO_UCH_PROP_ENGLI");
|
||||
need_or = 1;
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
printf ("\n};\n");
|
||||
}
|
||||
|
||||
void emit_prop_map ()
|
||||
{
|
||||
size_t i;
|
||||
|
||||
printf ("static moo_uint16_t* uch_prop_map[%u] =\n{\n", (unsigned int)prop_map_count);
|
||||
|
||||
for (i = 0; i < prop_map_count; i++) {
|
||||
if (i != 0) printf (",\n");
|
||||
printf ("\t /* 0x%lX-0x%lX */ ",
|
||||
(unsigned long int)(i * UCH_PROP_PAGE_SIZE),
|
||||
(unsigned long int)((i + 1) * UCH_PROP_PAGE_SIZE - 1));
|
||||
printf ("uch_prop_page_%04X", (int)prop_maps[i]->no);
|
||||
}
|
||||
|
||||
printf ("\n};\n");
|
||||
}
|
||||
|
||||
static void emit_prop_macros (void)
|
||||
{
|
||||
printf ("/* generated by tools/uni-prop.c */\n\n");
|
||||
printf ("#define UCH_PROP_MAX 0x%lX\n", (unsigned long)MAX_CHAR);
|
||||
printf ("\n");
|
||||
}
|
||||
|
||||
int main ()
|
||||
{
|
||||
moo_uci_t code;
|
||||
prop_page_t* page;
|
||||
char* locale;
|
||||
|
||||
locale = setlocale (LC_ALL, "");
|
||||
if (locale == NULL ||
|
||||
(strstr(locale, ".utf8") == NULL && strstr(locale, ".UTF8") == NULL &&
|
||||
strstr(locale, ".utf-8") == NULL && strstr(locale, ".UTF-8") == NULL)) {
|
||||
fprintf (stderr, "error: the locale should be utf-8 compatible\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
for (code = 0; code < MAX_CHAR; code += UCH_PROP_PAGE_SIZE) {
|
||||
make_prop_page (code, code + UCH_PROP_PAGE_SIZE - 1);
|
||||
}
|
||||
|
||||
emit_prop_macros ();
|
||||
|
||||
for (page = prop_pages; page != NULL; page = page->next) {
|
||||
emit_prop_page (page);
|
||||
printf ("\n");
|
||||
}
|
||||
|
||||
emit_prop_map ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user