This commit is contained in:
parent
d0018a31d6
commit
dd55a09215
3
ase/configure
vendored
3
ase/configure
vendored
@ -26837,7 +26837,7 @@ CJFLAGS=$CJFLAGS
|
||||
BUILD_CJ=$BUILD_CJ
|
||||
|
||||
|
||||
ac_config_files="$ac_config_files makefile include/makefile include/ase/makefile include/ase/cmn/makefile include/ase/awk/makefile include/ase/lsp/makefile include/ase/utl/makefile lib/makefile lib/cmn/makefile lib/awk/makefile lib/lsp/makefile lib/tgp/makefile lib/utl/makefile cmd/makefile cmd/awk/makefile cmd/lsp/makefile"
|
||||
ac_config_files="$ac_config_files makefile include/makefile include/ase/makefile include/ase/cmn/makefile include/ase/awk/makefile include/ase/lsp/makefile include/ase/tgp/makefile include/ase/utl/makefile lib/makefile lib/cmn/makefile lib/awk/makefile lib/lsp/makefile lib/tgp/makefile lib/utl/makefile cmd/makefile cmd/awk/makefile cmd/lsp/makefile"
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
@ -27430,6 +27430,7 @@ do
|
||||
"include/ase/cmn/makefile") CONFIG_FILES="$CONFIG_FILES include/ase/cmn/makefile" ;;
|
||||
"include/ase/awk/makefile") CONFIG_FILES="$CONFIG_FILES include/ase/awk/makefile" ;;
|
||||
"include/ase/lsp/makefile") CONFIG_FILES="$CONFIG_FILES include/ase/lsp/makefile" ;;
|
||||
"include/ase/tgp/makefile") CONFIG_FILES="$CONFIG_FILES include/ase/tgp/makefile" ;;
|
||||
"include/ase/utl/makefile") CONFIG_FILES="$CONFIG_FILES include/ase/utl/makefile" ;;
|
||||
"lib/makefile") CONFIG_FILES="$CONFIG_FILES lib/makefile" ;;
|
||||
"lib/cmn/makefile") CONFIG_FILES="$CONFIG_FILES lib/cmn/makefile" ;;
|
||||
|
@ -297,6 +297,7 @@ AC_CONFIG_FILES([
|
||||
include/ase/cmn/makefile
|
||||
include/ase/awk/makefile
|
||||
include/ase/lsp/makefile
|
||||
include/ase/tgp/makefile
|
||||
include/ase/utl/makefile
|
||||
lib/makefile
|
||||
lib/cmn/makefile
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: macros.h 225 2008-06-26 06:48:38Z baconevi $
|
||||
* $Id: macros.h 229 2008-06-26 10:46:39Z baconevi $
|
||||
*
|
||||
* {License}
|
||||
*/
|
||||
@ -162,7 +162,6 @@
|
||||
#define ASE_TOUPPER(ccls,c) (ccls)->to_upper((ccls)->custom_data,c)
|
||||
#define ASE_TOLOWER(ccls,c) (ccls)->to_lower((ccls)->custom_data,c)
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define ASE_BEGIN_NAMESPACE(x) namespace x {
|
||||
#define ASE_END_NAMESPACE(x) }
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
# EXTRA_DIST = README
|
||||
SUBDIRS = cmn awk lsp utl
|
||||
SUBDIRS = cmn awk lsp tgp utl
|
||||
|
||||
pkginclude_HEADERS = config.h.in conf_msw.h conf_vms.h types.h macros.h pack1.h unpack.h
|
||||
|
||||
|
37
ase/include/ase/tgp/tgp.h
Normal file
37
ase/include/ase/tgp/tgp.h
Normal file
@ -0,0 +1,37 @@
|
||||
/*
|
||||
* $Id: tgp.h 229 2008-06-26 10:46:39Z baconevi $
|
||||
*
|
||||
* {License}
|
||||
*/
|
||||
|
||||
#ifndef _ASE_TGP_TGP_H_
|
||||
#define _ASE_TGP_TGP_H_
|
||||
|
||||
#include <ase/types.h>
|
||||
#include <ase/macros.h>
|
||||
|
||||
typedef struct ase_tgp_t ase_tgp_t;
|
||||
|
||||
enum ase_tgp_iocmd_t
|
||||
{
|
||||
ASE_TGP_IO_OPEN = 0,
|
||||
ASE_TGP_IO_CLOSE = 1,
|
||||
ASE_TGP_IO_READ = 2,
|
||||
ASE_TGP_IO_WRITE = 3
|
||||
};
|
||||
|
||||
typedef ase_ssize_t (*ase_tgp_io_t) (
|
||||
int cmd, void* arg, ase_char_t* data, ase_size_t count);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
ase_tgp_t* ase_tgp_open (ase_mmgr_t* mmgr);
|
||||
void ase_tgp_close (ase_tgp_t* tgp);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,10 +1,11 @@
|
||||
/*
|
||||
* $Id: err.c 192 2008-06-06 10:33:44Z baconevi $
|
||||
* $Id: err.c 229 2008-06-26 10:46:39Z baconevi $
|
||||
*
|
||||
* {License}
|
||||
*/
|
||||
|
||||
#include "awk_i.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
static const ase_char_t* __geterrstr (int errnum)
|
||||
{
|
||||
|
10
ase/lib/tgp/makefile.am
Normal file
10
ase/lib/tgp/makefile.am
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = nostdinc
|
||||
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/include
|
||||
|
||||
lib_LTLIBRARIES = libasetgp.la
|
||||
|
||||
libasetgp_la_SOURCES = tgp.c
|
||||
libasetgp_la_LDFLAGS = -L../cmn -release $(VERSION)
|
||||
libasetgp_la_LIBADD = -lasecmn
|
@ -1,93 +1,471 @@
|
||||
#
|
||||
# $Id: makefile.in,v 1.10 2007/10/15 16:15:42 bacon Exp $
|
||||
#
|
||||
# makefile.in generated by automake 1.9.6 from makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
NAME = asetgp
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 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.
|
||||
|
||||
TOP_BUILDDIR = @abs_top_builddir@
|
||||
TOP_INSTALLDIR = @prefix@/ase
|
||||
# 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.
|
||||
|
||||
CC = @CC@
|
||||
CXX = @CXX@
|
||||
@SET_MAKE@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ../..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
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@
|
||||
subdir = lib/tgp
|
||||
DIST_COMMON = $(srcdir)/makefile.am $(srcdir)/makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/include/ase/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(libdir)"
|
||||
libLTLIBRARIES_INSTALL = $(INSTALL)
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
libasetgp_la_DEPENDENCIES =
|
||||
am_libasetgp_la_OBJECTS = tgp.lo
|
||||
libasetgp_la_OBJECTS = $(am_libasetgp_la_OBJECTS)
|
||||
DEFAULT_INCLUDES =
|
||||
depcomp = $(SHELL) $(top_srcdir)/autoconf/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(libasetgp_la_SOURCES)
|
||||
DIST_SOURCES = $(libasetgp_la_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
RANLIB = @RANLIB@
|
||||
|
||||
CFLAGS = @CFLAGS@ -I@abs_top_builddir@/..
|
||||
CXXFLAGS = @CXXFLAGS@ -I@abs_top_builddir@/..
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
MODE = @BUILDMODE@
|
||||
|
||||
CJ = @CJ@
|
||||
CJFLAGS = @CJFLAGS@ --classpath=@abs_top_builddir@/.. -fjni
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILDMODE = @BUILDMODE@
|
||||
BUILD_CJ = @BUILD_CJ@
|
||||
|
||||
JAVAC = @JAVAC@
|
||||
JAR = @JAR@
|
||||
CFLAGS_JNI = @CFLAGS_JNI@
|
||||
BUILD_JNI = @BUILD_JNI@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CFLAGS_JNI = @CFLAGS_JNI@
|
||||
CJ = @CJ@
|
||||
CJFLAGS = @CJFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
JAR = @JAR@
|
||||
JAR_PATH = @JAR_PATH@
|
||||
JAVAC = @JAVAC@
|
||||
JAVAC_PATH = @JAVAC_PATH@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBM = @LIBM@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
RM = @RM@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
|
||||
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
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@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
AUTOMAKE_OPTIONS = nostdinc
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/include
|
||||
lib_LTLIBRARIES = libasetgp.la
|
||||
libasetgp_la_SOURCES = tgp.c
|
||||
libasetgp_la_LDFLAGS = -L../cmn -release $(VERSION)
|
||||
libasetgp_la_LIBADD = -lasecmn
|
||||
all: all-am
|
||||
|
||||
LIBTOOL_COMPILE = ../libtool --mode=compile
|
||||
LIBTOOL_LINK = ../libtool --mode=link
|
||||
.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 \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/tgp/makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign lib/tgp/makefile
|
||||
.PRECIOUS: 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__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
OUT_DIR = ../$(MODE)/lib
|
||||
OUT_FILE_LIB = $(OUT_DIR)/lib$(NAME).a
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
TMP_DIR = $(MODE)
|
||||
$(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
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
OBJ_FILES_LIB = \
|
||||
$(TMP_DIR)/tgp.o
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
p=$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
|
||||
$(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
|
||||
done
|
||||
|
||||
OBJ_FILES_SO = $(OBJ_FILES_LIB:.o=.lo) $(OBJ_FILES_JNI:.o=.lo)
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
|
||||
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||
test "$$dir" != "$$p" || dir=.; \
|
||||
echo "rm -f \"$${dir}/so_locations\""; \
|
||||
rm -f "$${dir}/so_locations"; \
|
||||
done
|
||||
libasetgp.la: $(libasetgp_la_OBJECTS) $(libasetgp_la_DEPENDENCIES)
|
||||
$(LINK) -rpath $(libdir) $(libasetgp_la_LDFLAGS) $(libasetgp_la_OBJECTS) $(libasetgp_la_LIBADD) $(LIBS)
|
||||
|
||||
lib: build
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
build: $(OUT_FILE_LIB)
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
$(OUT_FILE_LIB): $(TMP_DIR) $(OUT_DIR) $(OBJ_FILES_LIB)
|
||||
$(AR) cr $(OUT_FILE_LIB) $(OBJ_FILES_LIB)
|
||||
if [ ! -z "$(RANLIB)" ]; then $(RANLIB) $(OUT_FILE_LIB); fi
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tgp.Plo@am__quote@
|
||||
|
||||
$(TMP_DIR)/tgp.o: tgp.c
|
||||
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c tgp.c
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
$(TMP_DIR)/err.o: err.c
|
||||
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c err.c
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
|
||||
$(TMP_DIR)/tree.o: tree.c
|
||||
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c tree.c
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
$(TMP_DIR)/tab.o: tab.c
|
||||
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c tab.c
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
$(TMP_DIR)/parse.o: parse.c
|
||||
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c parse.c
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
$(TMP_DIR)/run.o: run.c
|
||||
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c run.c
|
||||
distclean-libtool:
|
||||
-rm -f libtool
|
||||
uninstall-info-am:
|
||||
|
||||
$(TMP_DIR)/rec.o: rec.c
|
||||
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c rec.c
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
$(TMP_DIR)/val.o: val.c
|
||||
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c val.c
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
$(TMP_DIR)/func.o: func.c
|
||||
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c func.c
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
$(TMP_DIR)/misc.o: misc.c
|
||||
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c misc.c
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
$(TMP_DIR)/extio.o: extio.c
|
||||
$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) -o $@ -c extio.c
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$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 $(LTLIBRARIES)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
$(OUT_DIR):
|
||||
mkdir -p $(OUT_DIR)
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
$(TMP_DIR):
|
||||
mkdir -p $(TMP_DIR)
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean:
|
||||
rm -rf $(OUT_FILE_LIB)
|
||||
rm -rf $(OBJ_FILES_LIB)
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-generic clean-libLTLIBRARIES clean-libtool \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-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-info-am uninstall-libLTLIBRARIES
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libLTLIBRARIES clean-libtool ctags distclean \
|
||||
distclean-compile distclean-generic distclean-libtool \
|
||||
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am \
|
||||
install-libLTLIBRARIES install-man 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 uninstall uninstall-am uninstall-info-am \
|
||||
uninstall-libLTLIBRARIES
|
||||
|
||||
# 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:
|
||||
|
@ -7,17 +7,46 @@
|
||||
|
||||
struct ase_tgp_t
|
||||
{
|
||||
ase_mmgr_t mmgr;
|
||||
int errnum;
|
||||
|
||||
ase_mmgr_t mmgr;
|
||||
struct
|
||||
{
|
||||
ase_size_t pos;
|
||||
ase_size_t len;
|
||||
ase_char_t ptr[512];
|
||||
} ib;
|
||||
|
||||
struct
|
||||
{
|
||||
ase_size_t len;
|
||||
ase_char_t ptr[512];
|
||||
} ob;
|
||||
|
||||
struct
|
||||
{
|
||||
ase_size_t len;
|
||||
ase_char_t ptr[512];
|
||||
} rb;
|
||||
|
||||
int (*read) (ase_tgp_t* tgp, ase_char_t* buf, int len);
|
||||
int (*write) (ase_tgp_t* tgp, const ase_char_t* buf, int len);
|
||||
int (*run) (ase_tgp_t* tgp, const ase_char_t* buf, int len);
|
||||
};
|
||||
|
||||
ase_tgp_t* ase_tgp_open (ase_mmgr_t* mmgr)
|
||||
{
|
||||
ase_tgp_t* tgp;
|
||||
|
||||
if (mmgr == ASE_NULL) mmgr = ase_getmmgr ();
|
||||
ASE_ASSERT (mmgr != ASE_NULL);
|
||||
/*
|
||||
if (mmgr == ASE_NULL) mmgr = ASE_GETMMGR();
|
||||
if (mmgr == ASE_NULL)
|
||||
{
|
||||
ASE_ASSERTX (mmgr != ASE_NULL,
|
||||
"Provide the memory manager or set the global memory manager with ASE_SETMMGR()");
|
||||
return ASE_NULL;
|
||||
}
|
||||
*/
|
||||
|
||||
tgp = ASE_MALLOC (mmgr, ASE_SIZEOF(*tgp));
|
||||
if (tgp == ASE_NULL) return ASE_NULL;
|
||||
@ -38,17 +67,136 @@ int ase_tgp_geterrnum (ase_tgp_t* tgp)
|
||||
return tgp->errnum;
|
||||
}
|
||||
|
||||
int ase_tgp_read (ase_tgp_t* tgp)
|
||||
static int getc (ase_tgp_t* tgp, ase_char_t* c)
|
||||
{
|
||||
if (tgp->ib.pos >= tgp->ib.len)
|
||||
{
|
||||
ase_ssize_t n;
|
||||
|
||||
n = tgp->read (tgp, tgp->ib.ptr, ASE_COUNTOF(tgp->ib.ptr));
|
||||
if (n < 0) return -1;
|
||||
else if (n == 0)
|
||||
{
|
||||
*c = ASE_CHAR_EOF;
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
tgp->ib.pos = 0;
|
||||
tgp->ib.len = n;
|
||||
}
|
||||
}
|
||||
|
||||
main ()
|
||||
{
|
||||
tgp = ase_tgp_open (ASE_NULL);
|
||||
|
||||
ase_tgp_read (tgp, reader);
|
||||
ase_tgp_exec (tgp, reader);
|
||||
|
||||
ase_tgp_close (tgp);
|
||||
*c = tgp->ib.ptr[tgp->ib.pos++];
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int putc (ase_tgp_t* tgp, ase_char_t c)
|
||||
{
|
||||
if (tgp->ob.len >= ASE_COUNTOF(tgp->ob.ptr))
|
||||
{
|
||||
ase_ssize_t n;
|
||||
|
||||
n = tgp->write (tgp, tgp->ob.ptr, tgp->ob.len);
|
||||
if (n < 0) return -1;
|
||||
else if (n == 0) return 0;
|
||||
}
|
||||
|
||||
tgp->ob.ptr[tgp->ob.len++] = c;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int runc (ase_tgp_t* tgp, ase_char_t c)
|
||||
{
|
||||
if (tgp->rb.len >= ASE_COUNTOF(tgp->rb.ptr))
|
||||
{
|
||||
ase_ssize_t n;
|
||||
|
||||
n = tgp->run (tgp, tgp->rb.ptr, tgp->rb.len);
|
||||
if (n < 0) return -1;
|
||||
else if (n == 0) return 0;
|
||||
}
|
||||
|
||||
tgp->rb.ptr[tgp->rb.len++] = c;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int ase_tgp_run (ase_tgp_t* tgp)
|
||||
{
|
||||
ase_bool_t in_tag = ASE_FALSE;
|
||||
ase_char_t c;
|
||||
int n;
|
||||
|
||||
tgp->ib.pos = 0;
|
||||
tgp->ib.len = 0;
|
||||
tgp->ob.len = 0;
|
||||
tgp->rb.len = 0;
|
||||
|
||||
while (1)
|
||||
{
|
||||
n = getc (tgp, &c);
|
||||
if (n == -1) return -1;
|
||||
if (n == 0) break;
|
||||
|
||||
if (c == ASE_T('<'))
|
||||
{
|
||||
n = getc (tgp, &c);
|
||||
if (n == -1) return -1;
|
||||
if (n == 0)
|
||||
{
|
||||
putc (tgp, ASE_T('<'));
|
||||
break;
|
||||
}
|
||||
|
||||
if (c == ASE_T('?'))
|
||||
{
|
||||
if (in_tag)
|
||||
{
|
||||
/* ERROR - netsted tag */
|
||||
return -1;
|
||||
}
|
||||
else in_tag = ASE_TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (putc (tgp, ASE_T('<')) <= 0) return -1;
|
||||
if (putc (tgp, c) <= 0) return -1;
|
||||
}
|
||||
}
|
||||
else if (c == ASE_T('?'))
|
||||
{
|
||||
n = getc (tgp, &c);
|
||||
if (n == -1) return -1;
|
||||
if (n == 0)
|
||||
{
|
||||
if (putc (tgp, ASE_T('<')) <= 0) return -1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (c == ASE_T('>'))
|
||||
{
|
||||
if (in_tag) in_tag = ASE_FALSE;
|
||||
else
|
||||
{
|
||||
/* ERROR - unpaired tag close */
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (putc (tgp, ASE_T('?')) <= 0) return -1;
|
||||
if (putc (tgp, c) <= 0) return -1;
|
||||
}
|
||||
}
|
||||
else if (in_tag)
|
||||
{
|
||||
runc (tgp, c);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (putc (tgp, c) <= 0) return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -6,6 +6,17 @@
|
||||
|
||||
typedef struct ase_tgp_t ase_tgp_t;
|
||||
|
||||
enum ase_tgp_iocmd_t
|
||||
{
|
||||
ASE_TGP_IO_OPEN = 0,
|
||||
ASE_TGP_IO_CLOSE = 1,
|
||||
ASE_TGP_IO_READ = 2,
|
||||
ASE_TGP_IO_WRITE = 3
|
||||
};
|
||||
|
||||
typedef ase_ssize_t (*ase_tgp_io_t) (
|
||||
int cmd, void* arg, ase_char_t* data, ase_size_t count);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -43,8 +43,7 @@ POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
DIST_COMMON = $(am__configure_deps) $(srcdir)/makefile.am \
|
||||
$(srcdir)/makefile.in $(top_srcdir)/configure \
|
||||
$(top_srcdir)/lib/tgp/makefile.in autoconf/compile \
|
||||
$(srcdir)/makefile.in $(top_srcdir)/configure autoconf/compile \
|
||||
autoconf/config.guess autoconf/config.sub autoconf/depcomp \
|
||||
autoconf/install-sh autoconf/ltmain.sh autoconf/missing
|
||||
subdir = .
|
||||
@ -56,7 +55,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno configure.status.lineno
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/include/ase/config.h
|
||||
CONFIG_CLEAN_FILES = lib/tgp/makefile
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
@ -233,8 +232,6 @@ $(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
lib/tgp/makefile: $(top_builddir)/config.status $(top_srcdir)/lib/tgp/makefile.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
@ -381,7 +378,7 @@ distclean-tags:
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
$(mkdir_p) $(distdir)/autoconf $(distdir)/lib/tgp
|
||||
$(mkdir_p) $(distdir)/autoconf
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
|
Loading…
Reference in New Issue
Block a user