fixed a minor utf8 check bug.
fixed static linking problem regarding the seq module for awk
This commit is contained in:
parent
35839c9f67
commit
cfb3eb93ec
@ -26,3 +26,8 @@ if WCHAR
|
||||
qseawk_LDADD += $(UNICOWS_LIBS)
|
||||
endif
|
||||
endif
|
||||
|
||||
if ENABLE_STATIC_MODULE
|
||||
qseawk_LDFLAGS += -L../../lib/sed
|
||||
qseawk_LDADD += -lqsesed
|
||||
endif
|
||||
|
@ -41,6 +41,8 @@ host_triplet = @host@
|
||||
@WIN32_FALSE@am__append_2 = -DDEFAULT_MODPREFIX=\"$(libdir)/libqseawk-\" -DDEFAULT_MODPOSTFIX=\"\"
|
||||
bin_PROGRAMS = qseawk$(EXEEXT)
|
||||
@WCHAR_TRUE@@WIN32_TRUE@am__append_3 = $(UNICOWS_LIBS)
|
||||
@ENABLE_STATIC_MODULE_TRUE@am__append_4 = -L../../lib/sed
|
||||
@ENABLE_STATIC_MODULE_TRUE@am__append_5 = -lqsesed
|
||||
subdir = cmd/awk
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
@ -63,7 +65,7 @@ qseawk_OBJECTS = $(am_qseawk_OBJECTS)
|
||||
am__DEPENDENCIES_1 =
|
||||
@WCHAR_TRUE@@WIN32_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
|
||||
qseawk_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
|
||||
$(am__DEPENDENCIES_2)
|
||||
$(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
|
||||
@ -280,8 +282,9 @@ AUTOMAKE_OPTIONS = nostdinc
|
||||
AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include \
|
||||
$(LTDLINCL) $(am__append_1) $(am__append_2)
|
||||
qseawk_SOURCES = awk.c
|
||||
qseawk_LDFLAGS = -L../../lib/awk -L../../lib/cmn
|
||||
qseawk_LDADD = -lqseawk -lqsecmn $(LIBM) $(LIBLTDL) $(am__append_3)
|
||||
qseawk_LDFLAGS = -L../../lib/awk -L../../lib/cmn $(am__append_4)
|
||||
qseawk_LDADD = -lqseawk -lqsecmn $(LIBM) $(LIBLTDL) $(am__append_3) \
|
||||
$(am__append_5)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
|
@ -46,6 +46,7 @@ libqseawk_la_SOURCES += \
|
||||
mod-sed.c mod-sed.h \
|
||||
mod-str.c mod-str.h \
|
||||
mod-sys.c mod-sys.h
|
||||
libqseawk_la_LIBADD += -lqsesed
|
||||
|
||||
if HAVE_C_MPI
|
||||
libqseawk_la_SOURCES += mod-mpi.c mod-mpi.h
|
||||
|
@ -50,13 +50,14 @@ host_triplet = @host@
|
||||
@ENABLE_STATIC_MODULE_TRUE@ mod-str.c mod-str.h \
|
||||
@ENABLE_STATIC_MODULE_TRUE@ mod-sys.c mod-sys.h
|
||||
|
||||
@ENABLE_STATIC_MODULE_TRUE@@HAVE_C_MPI_TRUE@am__append_5 = mod-mpi.c mod-mpi.h
|
||||
@ENABLE_STATIC_MODULE_TRUE@@HAVE_C_MPI_TRUE@am__append_6 = $(MPI_CFLAGS)
|
||||
@ENABLE_STATIC_MODULE_TRUE@@HAVE_C_MPI_TRUE@am__append_7 = $(MPI_CLDFLAGS)
|
||||
@ENABLE_STATIC_MODULE_TRUE@@HAVE_LIBUCI_TRUE@am__append_8 = mod-uci.c mod-uci.h
|
||||
@ENABLE_STATIC_MODULE_TRUE@@HAVE_LIBUCI_TRUE@am__append_9 = $(UCI_LIBS)
|
||||
@ENABLE_STATIC_MODULE_FALSE@@HAVE_C_MPI_TRUE@am__append_10 = libqseawk-mpi.la
|
||||
@ENABLE_STATIC_MODULE_FALSE@@HAVE_LIBUCI_TRUE@am__append_11 = libqseawk-uci.la
|
||||
@ENABLE_STATIC_MODULE_TRUE@am__append_5 = -lqsesed
|
||||
@ENABLE_STATIC_MODULE_TRUE@@HAVE_C_MPI_TRUE@am__append_6 = mod-mpi.c mod-mpi.h
|
||||
@ENABLE_STATIC_MODULE_TRUE@@HAVE_C_MPI_TRUE@am__append_7 = $(MPI_CFLAGS)
|
||||
@ENABLE_STATIC_MODULE_TRUE@@HAVE_C_MPI_TRUE@am__append_8 = $(MPI_CLDFLAGS)
|
||||
@ENABLE_STATIC_MODULE_TRUE@@HAVE_LIBUCI_TRUE@am__append_9 = mod-uci.c mod-uci.h
|
||||
@ENABLE_STATIC_MODULE_TRUE@@HAVE_LIBUCI_TRUE@am__append_10 = $(UCI_LIBS)
|
||||
@ENABLE_STATIC_MODULE_FALSE@@HAVE_C_MPI_TRUE@am__append_11 = libqseawk-mpi.la
|
||||
@ENABLE_STATIC_MODULE_FALSE@@HAVE_LIBUCI_TRUE@am__append_12 = libqseawk-uci.la
|
||||
subdir = lib/awk
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
@ -179,7 +180,7 @@ libqseawk_uci_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
|
||||
am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
|
||||
@ENABLE_STATIC_MODULE_TRUE@@HAVE_LIBUCI_TRUE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1)
|
||||
libqseawk_la_DEPENDENCIES = $(am__DEPENDENCIES_2) \
|
||||
$(am__DEPENDENCIES_3)
|
||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_3)
|
||||
am__libqseawk_la_SOURCES_DIST = awk.c err.c tree.c parse.c run.c rec.c \
|
||||
val.c fnc.c misc.c rio.c std.c awk.h err.h rio.h val.h fnc.h \
|
||||
misc.h parse.h run.h tree.h mod-dir.c mod-dir.h mod-sed.c \
|
||||
@ -459,11 +460,12 @@ LIBADD_LIB_COMMON = -lqsecmn $(LIBM) $(LIBLTDL)
|
||||
lib_LTLIBRARIES = libqseawk.la $(am__append_3)
|
||||
libqseawk_la_SOURCES = awk.c err.c tree.c parse.c run.c rec.c val.c \
|
||||
fnc.c misc.c rio.c std.c awk.h err.h rio.h val.h fnc.h misc.h \
|
||||
parse.h run.h tree.h $(am__append_4) $(am__append_5) \
|
||||
$(am__append_8)
|
||||
libqseawk_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) $(am__append_6)
|
||||
libqseawk_la_LDFLAGS = $(LDFLAGS_LIB_COMMON) $(am__append_7)
|
||||
libqseawk_la_LIBADD = $(LIBADD_LIB_COMMON) $(am__append_9)
|
||||
parse.h run.h tree.h $(am__append_4) $(am__append_6) \
|
||||
$(am__append_9)
|
||||
libqseawk_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) $(am__append_7)
|
||||
libqseawk_la_LDFLAGS = $(LDFLAGS_LIB_COMMON) $(am__append_8)
|
||||
libqseawk_la_LIBADD = $(LIBADD_LIB_COMMON) $(am__append_5) \
|
||||
$(am__append_10)
|
||||
@ENABLE_CXX_TRUE@libqseawkxx_la_SOURCES = Awk.cpp StdAwk.cpp
|
||||
@ENABLE_CXX_TRUE@libqseawkxx_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON)
|
||||
@ENABLE_CXX_TRUE@libqseawkxx_la_LDFLAGS = $(LDFLAGS_LIB_COMMON)
|
||||
@ -478,8 +480,8 @@ libqseawk_la_LIBADD = $(LIBADD_LIB_COMMON) $(am__append_9)
|
||||
@ENABLE_STATIC_MODULE_FALSE@modexecdir = $(libdir)
|
||||
@ENABLE_STATIC_MODULE_FALSE@modexec_LTLIBRARIES = libqseawk-dir.la \
|
||||
@ENABLE_STATIC_MODULE_FALSE@ libqseawk-sed.la libqseawk-str.la \
|
||||
@ENABLE_STATIC_MODULE_FALSE@ libqseawk-sys.la $(am__append_10) \
|
||||
@ENABLE_STATIC_MODULE_FALSE@ $(am__append_11)
|
||||
@ENABLE_STATIC_MODULE_FALSE@ libqseawk-sys.la $(am__append_11) \
|
||||
@ENABLE_STATIC_MODULE_FALSE@ $(am__append_12)
|
||||
@ENABLE_STATIC_MODULE_FALSE@libqseawk_dir_la_SOURCES = mod-dir.c mod-dir.h
|
||||
@ENABLE_STATIC_MODULE_FALSE@libqseawk_dir_la_CPPFLAGS = $(CPPFLAGS_MOD_COMMON)
|
||||
@ENABLE_STATIC_MODULE_FALSE@libqseawk_dir_la_LDFLAGS = $(LDFLAGS_MOD_COMMON)
|
||||
|
@ -50,7 +50,7 @@ enum tok_t
|
||||
TOK_DIV_ASSN,
|
||||
TOK_IDIV_ASSN,
|
||||
TOK_MOD_ASSN,
|
||||
TOK_EXP_ASSN,
|
||||
TOK_EXP_ASSN, /* ^ - exponentiation */
|
||||
TOK_CONCAT_ASSN,
|
||||
TOK_RS_ASSN,
|
||||
TOK_LS_ASSN,
|
||||
@ -67,10 +67,10 @@ enum tok_t
|
||||
TOK_LT,
|
||||
TOK_GE,
|
||||
TOK_GT,
|
||||
TOK_MA, /* match */
|
||||
TOK_NM, /* not match */
|
||||
TOK_LNOT, /* logical negation ! */
|
||||
TOK_BQUOTE, /* ` */
|
||||
TOK_MA, /* ~ - match */
|
||||
TOK_NM, /* !~ - not match */
|
||||
TOK_LNOT, /* ! - logical negation */
|
||||
TOK_BQUOTE, /* ` - is-defined */
|
||||
TOK_PLUS,
|
||||
TOK_PLUSPLUS,
|
||||
TOK_MINUS,
|
||||
@ -82,9 +82,9 @@ enum tok_t
|
||||
TOK_LOR,
|
||||
TOK_LAND,
|
||||
TOK_BOR,
|
||||
TOK_BXOR,
|
||||
TOK_BXOR, /* ^^ - bitwise-xor */
|
||||
TOK_BAND,
|
||||
TOK_BNOT, /* used for unary bitwise-not and regex match */
|
||||
TOK_BNOT, /* ~~ - used for unary bitwise-not */
|
||||
TOK_RS,
|
||||
TOK_LS,
|
||||
TOK_IN,
|
||||
|
@ -134,8 +134,12 @@ qse_size_t qse_utf8touc (
|
||||
for (i = 1; i < cur->length; i++)
|
||||
{
|
||||
/* in utf8, trailing bytes are all
|
||||
* set with 0x80. if not, invalid */
|
||||
if (!(utf8[i] & 0x80)) return 0;
|
||||
* set with 0x80.
|
||||
*
|
||||
* 10XXXXXX & 11000000 => 10000000
|
||||
*
|
||||
* if not, invalid. */
|
||||
if ((utf8[i] & 0xC0) != 0x80) return 0;
|
||||
w = (w << 6) | (utf8[i] & 0x3F);
|
||||
}
|
||||
*uc = w;
|
||||
@ -145,8 +149,12 @@ qse_size_t qse_utf8touc (
|
||||
for (i = 1; i < cur->length; i++)
|
||||
{
|
||||
/* in utf8, trailing bytes are all
|
||||
* set with 0x80. if not, invalid */
|
||||
if (!(utf8[i] & 0x80)) return 0;
|
||||
* set with 0x80.
|
||||
*
|
||||
* 10XXXXXX & 11000000 => 10000000
|
||||
*
|
||||
* if not, invalid. */
|
||||
if ((utf8[i] & 0xC0) != 0x80) return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user