renamed stix to moo

This commit is contained in:
hyunghwan.chung
2017-01-09 09:54:49 +00:00
parent 064d02d031
commit f7e98b7fc7
68 changed files with 12110 additions and 12097 deletions

View File

@ -10,9 +10,9 @@ CPPFLAGS_COMMON = \
if WIN32
# you must adjust the value of DEFAULT_MODPOSTFIX according
# to the first number in -version-info above
CPPFLAGS_COMMON += -DSTIX_DEFAULT_MODPREFIX=\"libstix-\" -DSTIX_DEFAULT_MODPOSTFIX=\"-1\"
CPPFLAGS_COMMON += -DMOO_DEFAULT_MODPREFIX=\"libmoo-\" -DMOO_DEFAULT_MODPOSTFIX=\"-1\"
else
CPPFLAGS_COMMON += -DSTIX_DEFAULT_MODPREFIX=\"$(libdir)/libstix-\" -DSTIX_DEFAULT_MODPOSTFIX=\"\"
CPPFLAGS_COMMON += -DMOO_DEFAULT_MODPREFIX=\"$(libdir)/libmoo-\" -DMOO_DEFAULT_MODPOSTFIX=\"\"
endif
if ENABLE_STATIC_MODULE
@ -21,13 +21,13 @@ if ENABLE_STATIC_MODULE
# STATIC MODULES BUILT INTO MAIN LIBRARY
##################################################
noinst_LTLIBRARIES = libstix-console.la libstix-stdio.la
noinst_LTLIBRARIES = libmoo-console.la libmoo-stdio.la
libstix_console_la_SOURCES = console.c
libstix_console_la_CPPFLAGS = $(CPPFLAGS_COMMON)
libmoo_console_la_SOURCES = console.c
libmoo_console_la_CPPFLAGS = $(CPPFLAGS_COMMON)
libstix_stdio_la_SOURCES = stdio.c
libstix_stdio_la_CPPFLAGS = $(CPPFLAGS_COMMON)
libmoo_stdio_la_SOURCES = stdio.c
libmoo_stdio_la_CPPFLAGS = $(CPPFLAGS_COMMON)
else
@ -35,21 +35,21 @@ else
# DYNAMIC MODULES
##################################################
LDFLAGS_COMMON = -L$(abs_builddir)/../lib -L$(libdir) -version-info 1:0:0 -no-undefined
LIBADD_COMMON = -lstix
LIBADD_COMMON = -lmoo
pkgmodexecdir = $(libdir)
pkgmodexec_LTLIBRARIES = libstix-stdio.la libstix-console.la
pkgmodexec_LTLIBRARIES = libmoo-stdio.la libmoo-console.la
libstix_stdio_la_SOURCES = stdio.c m-stdio.h
libstix_stdio_la_CPPFLAGS = $(CPPFLAGS_COMMON)
libstix_stdio_la_LDFLAGS = $(LDFLAGS_COMMON)
libstix_stdio_la_LIBADD = $(LIBADD_COMMON)
libmoo_stdio_la_SOURCES = stdio.c m-stdio.h
libmoo_stdio_la_CPPFLAGS = $(CPPFLAGS_COMMON)
libmoo_stdio_la_LDFLAGS = $(LDFLAGS_COMMON)
libmoo_stdio_la_LIBADD = $(LIBADD_COMMON)
libstix_console_la_SOURCES = console.c console.h
libstix_console_la_CPPFLAGS = $(CPPFLAGS_COMMON)
libstix_console_la_LDFLAGS = $(LDFLAGS_COMMON)
libstix_console_la_LIBADD = $(LIBADD_COMMON) -ltermcap
libmoo_console_la_SOURCES = console.c console.h
libmoo_console_la_CPPFLAGS = $(CPPFLAGS_COMMON)
libmoo_console_la_LDFLAGS = $(LDFLAGS_COMMON)
libmoo_console_la_LIBADD = $(LIBADD_COMMON) -ltermcap
endif

View File

@ -81,8 +81,8 @@ host_triplet = @host@
# you must adjust the value of DEFAULT_MODPOSTFIX according
# to the first number in -version-info above
@WIN32_TRUE@am__append_1 = -DSTIX_DEFAULT_MODPREFIX=\"libstix-\" -DSTIX_DEFAULT_MODPOSTFIX=\"-1\"
@WIN32_FALSE@am__append_2 = -DSTIX_DEFAULT_MODPREFIX=\"$(libdir)/libstix-\" -DSTIX_DEFAULT_MODPOSTFIX=\"\"
@WIN32_TRUE@am__append_1 = -DMOO_DEFAULT_MODPREFIX=\"libmoo-\" -DMOO_DEFAULT_MODPOSTFIX=\"-1\"
@WIN32_FALSE@am__append_2 = -DMOO_DEFAULT_MODPREFIX=\"$(libdir)/libmoo-\" -DMOO_DEFAULT_MODPOSTFIX=\"\"
subdir = mod
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/ac/depcomp
@ -96,7 +96,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/lib/stix-cfg.h
CONFIG_HEADER = $(top_builddir)/lib/moo-cfg.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@ -129,40 +129,40 @@ am__uninstall_files_from_dir = { \
am__installdirs = "$(DESTDIR)$(pkgmodexecdir)"
LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkgmodexec_LTLIBRARIES)
am__DEPENDENCIES_1 =
@ENABLE_STATIC_MODULE_FALSE@libstix_console_la_DEPENDENCIES = \
@ENABLE_STATIC_MODULE_FALSE@libmoo_console_la_DEPENDENCIES = \
@ENABLE_STATIC_MODULE_FALSE@ $(am__DEPENDENCIES_1)
am__libstix_console_la_SOURCES_DIST = console.c console.h
@ENABLE_STATIC_MODULE_FALSE@am_libstix_console_la_OBJECTS = \
@ENABLE_STATIC_MODULE_FALSE@ libstix_console_la-console.lo
@ENABLE_STATIC_MODULE_TRUE@am_libstix_console_la_OBJECTS = \
@ENABLE_STATIC_MODULE_TRUE@ libstix_console_la-console.lo
libstix_console_la_OBJECTS = $(am_libstix_console_la_OBJECTS)
am__libmoo_console_la_SOURCES_DIST = console.c console.h
@ENABLE_STATIC_MODULE_FALSE@am_libmoo_console_la_OBJECTS = \
@ENABLE_STATIC_MODULE_FALSE@ libmoo_console_la-console.lo
@ENABLE_STATIC_MODULE_TRUE@am_libmoo_console_la_OBJECTS = \
@ENABLE_STATIC_MODULE_TRUE@ libmoo_console_la-console.lo
libmoo_console_la_OBJECTS = $(am_libmoo_console_la_OBJECTS)
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 =
libstix_console_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
libmoo_console_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(AM_CFLAGS) $(CFLAGS) $(libstix_console_la_LDFLAGS) \
$(LDFLAGS) -o $@
@ENABLE_STATIC_MODULE_FALSE@am_libstix_console_la_rpath = -rpath \
@ENABLE_STATIC_MODULE_FALSE@ $(pkgmodexecdir)
@ENABLE_STATIC_MODULE_TRUE@am_libstix_console_la_rpath =
@ENABLE_STATIC_MODULE_FALSE@libstix_stdio_la_DEPENDENCIES = \
@ENABLE_STATIC_MODULE_FALSE@ $(am__DEPENDENCIES_1)
am__libstix_stdio_la_SOURCES_DIST = stdio.c m-stdio.h
@ENABLE_STATIC_MODULE_FALSE@am_libstix_stdio_la_OBJECTS = \
@ENABLE_STATIC_MODULE_FALSE@ libstix_stdio_la-stdio.lo
@ENABLE_STATIC_MODULE_TRUE@am_libstix_stdio_la_OBJECTS = \
@ENABLE_STATIC_MODULE_TRUE@ libstix_stdio_la-stdio.lo
libstix_stdio_la_OBJECTS = $(am_libstix_stdio_la_OBJECTS)
libstix_stdio_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(AM_CFLAGS) $(CFLAGS) $(libstix_stdio_la_LDFLAGS) $(LDFLAGS) \
$(AM_CFLAGS) $(CFLAGS) $(libmoo_console_la_LDFLAGS) $(LDFLAGS) \
-o $@
@ENABLE_STATIC_MODULE_FALSE@am_libstix_stdio_la_rpath = -rpath \
@ENABLE_STATIC_MODULE_FALSE@am_libmoo_console_la_rpath = -rpath \
@ENABLE_STATIC_MODULE_FALSE@ $(pkgmodexecdir)
@ENABLE_STATIC_MODULE_TRUE@am_libstix_stdio_la_rpath =
@ENABLE_STATIC_MODULE_TRUE@am_libmoo_console_la_rpath =
@ENABLE_STATIC_MODULE_FALSE@libmoo_stdio_la_DEPENDENCIES = \
@ENABLE_STATIC_MODULE_FALSE@ $(am__DEPENDENCIES_1)
am__libmoo_stdio_la_SOURCES_DIST = stdio.c m-stdio.h
@ENABLE_STATIC_MODULE_FALSE@am_libmoo_stdio_la_OBJECTS = \
@ENABLE_STATIC_MODULE_FALSE@ libmoo_stdio_la-stdio.lo
@ENABLE_STATIC_MODULE_TRUE@am_libmoo_stdio_la_OBJECTS = \
@ENABLE_STATIC_MODULE_TRUE@ libmoo_stdio_la-stdio.lo
libmoo_stdio_la_OBJECTS = $(am_libmoo_stdio_la_OBJECTS)
libmoo_stdio_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
$(AM_CFLAGS) $(CFLAGS) $(libmoo_stdio_la_LDFLAGS) $(LDFLAGS) \
-o $@
@ENABLE_STATIC_MODULE_FALSE@am_libmoo_stdio_la_rpath = -rpath \
@ENABLE_STATIC_MODULE_FALSE@ $(pkgmodexecdir)
@ENABLE_STATIC_MODULE_TRUE@am_libmoo_stdio_la_rpath =
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
@ -197,9 +197,9 @@ 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 = $(libstix_console_la_SOURCES) $(libstix_stdio_la_SOURCES)
DIST_SOURCES = $(am__libstix_console_la_SOURCES_DIST) \
$(am__libstix_stdio_la_SOURCES_DIST)
SOURCES = $(libmoo_console_la_SOURCES) $(libmoo_stdio_la_SOURCES)
DIST_SOURCES = $(am__libmoo_console_la_SOURCES_DIST) \
$(am__libmoo_stdio_la_SOURCES_DIST)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@ -288,6 +288,20 @@ LT_DLPREOPEN = @LT_DLPREOPEN@
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@
@ -310,20 +324,6 @@ RANLIB = @RANLIB@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STIX_PROJECT_AUTHOR = @STIX_PROJECT_AUTHOR@
STIX_PROJECT_URL = @STIX_PROJECT_URL@
STIX_SIZEOF_CHAR = @STIX_SIZEOF_CHAR@
STIX_SIZEOF_DOUBLE = @STIX_SIZEOF_DOUBLE@
STIX_SIZEOF_FLOAT = @STIX_SIZEOF_FLOAT@
STIX_SIZEOF_INT = @STIX_SIZEOF_INT@
STIX_SIZEOF_LONG = @STIX_SIZEOF_LONG@
STIX_SIZEOF_LONG_DOUBLE = @STIX_SIZEOF_LONG_DOUBLE@
STIX_SIZEOF_LONG_LONG = @STIX_SIZEOF_LONG_LONG@
STIX_SIZEOF_OFF64_T = @STIX_SIZEOF_OFF64_T@
STIX_SIZEOF_OFF_T = @STIX_SIZEOF_OFF_T@
STIX_SIZEOF_SHORT = @STIX_SIZEOF_SHORT@
STIX_SIZEOF_VOID_P = @STIX_SIZEOF_VOID_P@
STIX_SIZEOF_WCHAR_T = @STIX_SIZEOF_WCHAR_T@
STRIP = @STRIP@
UNICOWS_LIBS = @UNICOWS_LIBS@
VERSION = @VERSION@
@ -392,27 +392,27 @@ CPPFLAGS_COMMON = -I$(abs_builddir) -I$(abs_builddir)/../lib \
##################################################
# STATIC MODULES BUILT INTO MAIN LIBRARY
##################################################
@ENABLE_STATIC_MODULE_TRUE@noinst_LTLIBRARIES = libstix-console.la libstix-stdio.la
@ENABLE_STATIC_MODULE_FALSE@libstix_console_la_SOURCES = console.c console.h
@ENABLE_STATIC_MODULE_TRUE@libstix_console_la_SOURCES = console.c
@ENABLE_STATIC_MODULE_FALSE@libstix_console_la_CPPFLAGS = $(CPPFLAGS_COMMON)
@ENABLE_STATIC_MODULE_TRUE@libstix_console_la_CPPFLAGS = $(CPPFLAGS_COMMON)
@ENABLE_STATIC_MODULE_FALSE@libstix_stdio_la_SOURCES = stdio.c m-stdio.h
@ENABLE_STATIC_MODULE_TRUE@libstix_stdio_la_SOURCES = stdio.c
@ENABLE_STATIC_MODULE_FALSE@libstix_stdio_la_CPPFLAGS = $(CPPFLAGS_COMMON)
@ENABLE_STATIC_MODULE_TRUE@libstix_stdio_la_CPPFLAGS = $(CPPFLAGS_COMMON)
@ENABLE_STATIC_MODULE_TRUE@noinst_LTLIBRARIES = libmoo-console.la libmoo-stdio.la
@ENABLE_STATIC_MODULE_FALSE@libmoo_console_la_SOURCES = console.c console.h
@ENABLE_STATIC_MODULE_TRUE@libmoo_console_la_SOURCES = console.c
@ENABLE_STATIC_MODULE_FALSE@libmoo_console_la_CPPFLAGS = $(CPPFLAGS_COMMON)
@ENABLE_STATIC_MODULE_TRUE@libmoo_console_la_CPPFLAGS = $(CPPFLAGS_COMMON)
@ENABLE_STATIC_MODULE_FALSE@libmoo_stdio_la_SOURCES = stdio.c m-stdio.h
@ENABLE_STATIC_MODULE_TRUE@libmoo_stdio_la_SOURCES = stdio.c
@ENABLE_STATIC_MODULE_FALSE@libmoo_stdio_la_CPPFLAGS = $(CPPFLAGS_COMMON)
@ENABLE_STATIC_MODULE_TRUE@libmoo_stdio_la_CPPFLAGS = $(CPPFLAGS_COMMON)
##################################################
# DYNAMIC MODULES
##################################################
@ENABLE_STATIC_MODULE_FALSE@LDFLAGS_COMMON = -L$(abs_builddir)/../lib -L$(libdir) -version-info 1:0:0 -no-undefined
@ENABLE_STATIC_MODULE_FALSE@LIBADD_COMMON = -lstix
@ENABLE_STATIC_MODULE_FALSE@LIBADD_COMMON = -lmoo
@ENABLE_STATIC_MODULE_FALSE@pkgmodexecdir = $(libdir)
@ENABLE_STATIC_MODULE_FALSE@pkgmodexec_LTLIBRARIES = libstix-stdio.la libstix-console.la
@ENABLE_STATIC_MODULE_FALSE@libstix_stdio_la_LDFLAGS = $(LDFLAGS_COMMON)
@ENABLE_STATIC_MODULE_FALSE@libstix_stdio_la_LIBADD = $(LIBADD_COMMON)
@ENABLE_STATIC_MODULE_FALSE@libstix_console_la_LDFLAGS = $(LDFLAGS_COMMON)
@ENABLE_STATIC_MODULE_FALSE@libstix_console_la_LIBADD = $(LIBADD_COMMON) -ltermcap
@ENABLE_STATIC_MODULE_FALSE@pkgmodexec_LTLIBRARIES = libmoo-stdio.la libmoo-console.la
@ENABLE_STATIC_MODULE_FALSE@libmoo_stdio_la_LDFLAGS = $(LDFLAGS_COMMON)
@ENABLE_STATIC_MODULE_FALSE@libmoo_stdio_la_LIBADD = $(LIBADD_COMMON)
@ENABLE_STATIC_MODULE_FALSE@libmoo_console_la_LDFLAGS = $(LDFLAGS_COMMON)
@ENABLE_STATIC_MODULE_FALSE@libmoo_console_la_LIBADD = $(LIBADD_COMMON) -ltermcap
all: all-am
.SUFFIXES:
@ -494,11 +494,11 @@ clean-pkgmodexecLTLIBRARIES:
rm -f $${locs}; \
}
libstix-console.la: $(libstix_console_la_OBJECTS) $(libstix_console_la_DEPENDENCIES) $(EXTRA_libstix_console_la_DEPENDENCIES)
$(AM_V_CCLD)$(libstix_console_la_LINK) $(am_libstix_console_la_rpath) $(libstix_console_la_OBJECTS) $(libstix_console_la_LIBADD) $(LIBS)
libmoo-console.la: $(libmoo_console_la_OBJECTS) $(libmoo_console_la_DEPENDENCIES) $(EXTRA_libmoo_console_la_DEPENDENCIES)
$(AM_V_CCLD)$(libmoo_console_la_LINK) $(am_libmoo_console_la_rpath) $(libmoo_console_la_OBJECTS) $(libmoo_console_la_LIBADD) $(LIBS)
libstix-stdio.la: $(libstix_stdio_la_OBJECTS) $(libstix_stdio_la_DEPENDENCIES) $(EXTRA_libstix_stdio_la_DEPENDENCIES)
$(AM_V_CCLD)$(libstix_stdio_la_LINK) $(am_libstix_stdio_la_rpath) $(libstix_stdio_la_OBJECTS) $(libstix_stdio_la_LIBADD) $(LIBS)
libmoo-stdio.la: $(libmoo_stdio_la_OBJECTS) $(libmoo_stdio_la_DEPENDENCIES) $(EXTRA_libmoo_stdio_la_DEPENDENCIES)
$(AM_V_CCLD)$(libmoo_stdio_la_LINK) $(am_libmoo_stdio_la_rpath) $(libmoo_stdio_la_OBJECTS) $(libmoo_stdio_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@ -506,8 +506,8 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstix_console_la-console.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libstix_stdio_la-stdio.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmoo_console_la-console.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmoo_stdio_la-stdio.Plo@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@ -533,19 +533,19 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
libstix_console_la-console.lo: console.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstix_console_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libstix_console_la-console.lo -MD -MP -MF $(DEPDIR)/libstix_console_la-console.Tpo -c -o libstix_console_la-console.lo `test -f 'console.c' || echo '$(srcdir)/'`console.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstix_console_la-console.Tpo $(DEPDIR)/libstix_console_la-console.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='console.c' object='libstix_console_la-console.lo' libtool=yes @AMDEPBACKSLASH@
libmoo_console_la-console.lo: console.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmoo_console_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmoo_console_la-console.lo -MD -MP -MF $(DEPDIR)/libmoo_console_la-console.Tpo -c -o libmoo_console_la-console.lo `test -f 'console.c' || echo '$(srcdir)/'`console.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmoo_console_la-console.Tpo $(DEPDIR)/libmoo_console_la-console.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='console.c' object='libmoo_console_la-console.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) $(libstix_console_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libstix_console_la-console.lo `test -f 'console.c' || echo '$(srcdir)/'`console.c
@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_console_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmoo_console_la-console.lo `test -f 'console.c' || echo '$(srcdir)/'`console.c
libstix_stdio_la-stdio.lo: stdio.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libstix_stdio_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libstix_stdio_la-stdio.lo -MD -MP -MF $(DEPDIR)/libstix_stdio_la-stdio.Tpo -c -o libstix_stdio_la-stdio.lo `test -f 'stdio.c' || echo '$(srcdir)/'`stdio.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libstix_stdio_la-stdio.Tpo $(DEPDIR)/libstix_stdio_la-stdio.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stdio.c' object='libstix_stdio_la-stdio.lo' libtool=yes @AMDEPBACKSLASH@
libmoo_stdio_la-stdio.lo: stdio.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmoo_stdio_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmoo_stdio_la-stdio.lo -MD -MP -MF $(DEPDIR)/libmoo_stdio_la-stdio.Tpo -c -o libmoo_stdio_la-stdio.lo `test -f 'stdio.c' || echo '$(srcdir)/'`stdio.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmoo_stdio_la-stdio.Tpo $(DEPDIR)/libmoo_stdio_la-stdio.Plo
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='stdio.c' object='libmoo_stdio_la-stdio.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) $(libstix_stdio_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libstix_stdio_la-stdio.lo `test -f 'stdio.c' || echo '$(srcdir)/'`stdio.c
@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_stdio_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmoo_stdio_la-stdio.lo `test -f 'stdio.c' || echo '$(srcdir)/'`stdio.c
mostlyclean-libtool:
-rm -f *.lo

View File

@ -24,16 +24,16 @@
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _STIX_LIB_MOD_STDIO_H_
#define _STIX_LIB_MOD_STDIO_H_
#ifndef _MOO_LIB_MOD_STDIO_H_
#define _MOO_LIB_MOD_STDIO_H_
#include <stix.h>
#include <moo.h>
#if defined(__cplusplus)
extern "C" {
#endif
STIX_EXPORT int stix_mod_stdio (stix_t* stix, stix_mod_t* mod);
MOO_EXPORT int moo_mod_stdio (moo_t* moo, moo_mod_t* mod);
#if defined(__cplusplus)
}

View File

@ -26,7 +26,7 @@
#include "console.h"
#include <stix-utl.h>
#include <moo-utl.h>
#include <unistd.h>
#include <fcntl.h>
@ -48,11 +48,11 @@ struct console_t
};
/* ------------------------------------------------------------------------ */
static stix_pfrc_t pf_open (stix_t* stix, stix_ooi_t nargs)
static moo_pfrc_t pf_open (moo_t* moo, moo_ooi_t nargs)
{
#if defined(_WIN32)
HANDLE h;
stix_ooi_t immv;
moo_ooi_t immv;
h = GetStdHandle(STD_INPUT_HANDLE);
if (h == INVALID_HANDLE_VALUE) return 0;
@ -60,7 +60,7 @@ static stix_pfrc_t pf_open (stix_t* stix, stix_ooi_t nargs)
{
}
imm = stix_makeimm (stix, h);
imm = moo_makeimm (moo, h);
if (imm <= -1)
{
/* error */
@ -73,7 +73,7 @@ static stix_pfrc_t pf_open (stix_t* stix, stix_ooi_t nargs)
int err;
char* term;
con = stix_callocmem (stix, STIX_SIZEOF(*con));
con = moo_callocmem (moo, MOO_SIZEOF(*con));
if (!con) return 0;
if (isatty(1))
@ -86,7 +86,7 @@ static stix_pfrc_t pf_open (stix_t* stix, stix_ooi_t nargs)
if (con->fd == -1)
{
/* TODO: failed to open /dev/stdout */
stix_freemem (stix, con);
moo_freemem (moo, con);
return 0;
}
@ -118,60 +118,60 @@ static stix_pfrc_t pf_open (stix_t* stix, stix_ooi_t nargs)
#endif
STIX_STACK_SETRET (stix, nargs, STIX_SMOOI_TO_OOP((stix_oow_t)con));
return STIX_PF_SUCCESS;
MOO_STACK_SETRET (moo, nargs, MOO_SMOOI_TO_OOP((moo_oow_t)con));
return MOO_PF_SUCCESS;
}
static stix_pfrc_t pf_close (stix_t* stix, stix_ooi_t nargs)
static moo_pfrc_t pf_close (moo_t* moo, moo_ooi_t nargs)
{
#if defined(_WIN32)
HANDLE h;
h = STIX_STACK_GETARG (stix, nargs, 0);
h = MOO_STACK_GETARG (moo, nargs, 0);
#else
#endif
console_t* con;
con = STIX_OOP_TO_SMOOI(STIX_STACK_GETARG (stix, nargs, 0));
con = MOO_OOP_TO_SMOOI(MOO_STACK_GETARG (moo, nargs, 0));
/* TODO: sanity check */
if (con->fd_opened) close (con->fd);
stix_freemem (stix, con);
STIX_STACK_SETRETTORCV (stix, nargs);
return STIX_PF_SUCCESS;
moo_freemem (moo, con);
MOO_STACK_SETRETTORCV (moo, nargs);
return MOO_PF_SUCCESS;
}
static stix_pfrc_t pf_write (stix_t* stix, stix_ooi_t nargs)
static moo_pfrc_t pf_write (moo_t* moo, moo_ooi_t nargs)
{
console_t* con;
stix_oop_char_t oomsg;
moo_oop_char_t oomsg;
stix_oow_t ucspos, ucsrem, ucslen, bcslen;
stix_bch_t bcs[1024];
moo_oow_t ucspos, ucsrem, ucslen, bcslen;
moo_bch_t bcs[1024];
int n;
con = STIX_OOP_TO_SMOOI(STIX_STACK_GETARG (stix, nargs, 0));
oomsg = (stix_oop_char_t)STIX_STACK_GETARG (stix, nargs, 1);
con = MOO_OOP_TO_SMOOI(MOO_STACK_GETARG (moo, nargs, 0));
oomsg = (moo_oop_char_t)MOO_STACK_GETARG (moo, nargs, 1);
if (STIX_CLASSOF(stix,oomsg) != stix->_string)
if (MOO_CLASSOF(moo,oomsg) != moo->_string)
{
/* TODO: invalid message */
return STIX_PF_FAILURE;
return MOO_PF_FAILURE;
}
ucspos = 0;
ucsrem = STIX_OBJ_GET_SIZE(oomsg);
ucsrem = MOO_OBJ_GET_SIZE(oomsg);
while (ucsrem > 0)
{
ucslen = ucsrem;
bcslen = STIX_COUNTOF(bcs);
if ((n = stix_convootobchars (stix, &oomsg->slot[ucspos], &ucslen, bcs, &bcslen)) <= -1)
bcslen = MOO_COUNTOF(bcs);
if ((n = moo_convootobchars (moo, &oomsg->slot[ucspos], &ucslen, bcs, &bcslen)) <= -1)
{
if (n != -2 || ucslen <= 0)
{
stix_seterrnum (stix, STIX_EECERR);
return STIX_PF_HARD_FAILURE;
moo_seterrnum (moo, MOO_EECERR);
return MOO_PF_HARD_FAILURE;
}
}
@ -181,42 +181,42 @@ static stix_pfrc_t pf_write (stix_t* stix, stix_ooi_t nargs)
ucsrem -= ucslen;
}
STIX_STACK_SETRETTORCV (stix, nargs); /* TODO: change return code */
return STIX_PF_SUCCESS;
MOO_STACK_SETRETTORCV (moo, nargs); /* TODO: change return code */
return MOO_PF_SUCCESS;
}
static stix_pfrc_t pf_clear (stix_t* stix, stix_ooi_t nargs)
static moo_pfrc_t pf_clear (moo_t* moo, moo_ooi_t nargs)
{
console_t* con;
con = STIX_OOP_TO_SMOOI(STIX_STACK_GETARG(stix, nargs, 0));
con = MOO_OOP_TO_SMOOI(MOO_STACK_GETARG(moo, nargs, 0));
write (con->fd, con->clear, strlen(con->clear));
STIX_STACK_SETRETTORCV (stix, nargs);
return STIX_PF_SUCCESS;
MOO_STACK_SETRETTORCV (moo, nargs);
return MOO_PF_SUCCESS;
}
static stix_pfrc_t pf_setcursor (stix_t* stix, stix_ooi_t nargs)
static moo_pfrc_t pf_setcursor (moo_t* moo, moo_ooi_t nargs)
{
console_t* con;
stix_oop_oop_t point;
moo_oop_oop_t point;
char* cup;
con = STIX_OOP_TO_SMOOI(STIX_STACK_GETARG(stix, nargs, 0));
point = STIX_STACK_GETARG(stix, nargs, 1);
con = MOO_OOP_TO_SMOOI(MOO_STACK_GETARG(moo, nargs, 0));
point = MOO_STACK_GETARG(moo, nargs, 1);
/* TODO: error check, class check, size check.. */
if (STIX_OBJ_GET_SIZE(point) != 2)
if (MOO_OBJ_GET_SIZE(point) != 2)
{
return STIX_PF_FAILURE;
return MOO_PF_FAILURE;
}
cup = tiparm (con->cup, STIX_OOP_TO_SMOOI(point->slot[1]), STIX_OOP_TO_SMOOI(point->slot[0]));
cup = tiparm (con->cup, MOO_OOP_TO_SMOOI(point->slot[1]), MOO_OOP_TO_SMOOI(point->slot[0]));
write (con->fd, cup, strlen(cup)); /* TODO: error check */
STIX_STACK_SETRETTORCV (stix, nargs);
return STIX_PF_SUCCESS;
MOO_STACK_SETRETTORCV (moo, nargs);
return MOO_PF_SUCCESS;
}
/* ------------------------------------------------------------------------ */
@ -224,8 +224,8 @@ static stix_pfrc_t pf_setcursor (stix_t* stix, stix_ooi_t nargs)
typedef struct fnctab_t fnctab_t;
struct fnctab_t
{
const stix_bch_t* name;
stix_pfimpl_t handler;
const moo_bch_t* name;
moo_pfimpl_t handler;
};
static fnctab_t fnctab[] =
@ -239,17 +239,17 @@ static fnctab_t fnctab[] =
/* ------------------------------------------------------------------------ */
static stix_pfimpl_t query (stix_t* stix, stix_mod_t* mod, const stix_ooch_t* name)
static moo_pfimpl_t query (moo_t* moo, moo_mod_t* mod, const moo_ooch_t* name)
{
int left, right, mid, n;
left = 0; right = STIX_COUNTOF(fnctab) - 1;
left = 0; right = MOO_COUNTOF(fnctab) - 1;
while (left <= right)
{
mid = (left + right) / 2;
n = stix_compoocbcstr (name, fnctab[mid].name);
n = moo_compoocbcstr (name, fnctab[mid].name);
if (n < 0) right = mid - 1;
else if (n > 0) left = mid + 1;
else
@ -258,21 +258,21 @@ static stix_pfimpl_t query (stix_t* stix, stix_mod_t* mod, const stix_ooch_t* na
}
}
stix->errnum = STIX_ENOENT;
return STIX_NULL;
moo->errnum = MOO_ENOENT;
return MOO_NULL;
}
static void unload (stix_t* stix, stix_mod_t* mod)
static void unload (moo_t* moo, moo_mod_t* mod)
{
/* TODO: close all open handle?? */
}
int stix_mod_console (stix_t* stix, stix_mod_t* mod)
int moo_mod_console (moo_t* moo, moo_mod_t* mod)
{
mod->query = query;
mod->unload = unload;
mod->ctx = STIX_NULL;
mod->ctx = MOO_NULL;
return 0;
}

View File

@ -24,16 +24,16 @@
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _STIX_LIB_MOD_CONSOLE_H_
#define _STIX_LIB_MOD_CONSOLE_H_
#ifndef _MOO_LIB_MOD_CONSOLE_H_
#define _MOO_LIB_MOD_CONSOLE_H_
#include <stix.h>
#include <moo.h>
#if defined(__cplusplus)
extern "C" {
#endif
STIX_EXPORT int stix_mod_console (stix_t* stix, stix_mod_t* mod);
MOO_EXPORT int moo_mod_console (moo_t* moo, moo_mod_t* mod);
#if defined(__cplusplus)
}

View File

@ -26,7 +26,7 @@
#include "_stdio.h"
#include <stix-utl.h>
#include <moo-utl.h>
#include <stdio.h>
#include <errno.h>
@ -35,42 +35,42 @@
typedef struct stdio_t stdio_t;
struct stdio_t
{
STIX_OBJ_HEADER;
MOO_OBJ_HEADER;
FILE* fp;
};
static stix_pfrc_t pf_newinstsize (stix_t* stix, stix_ooi_t nargs)
static moo_pfrc_t pf_newinstsize (moo_t* moo, moo_ooi_t nargs)
{
stix_ooi_t newinstsize = STIX_SIZEOF(stdio_t) - STIX_SIZEOF(stix_obj_t);
STIX_STACK_SETRET (stix, nargs, STIX_SMOOI_TO_OOP(newinstsize));
return STIX_PF_SUCCESS;
moo_ooi_t newinstsize = MOO_SIZEOF(stdio_t) - MOO_SIZEOF(moo_obj_t);
MOO_STACK_SETRET (moo, nargs, MOO_SMOOI_TO_OOP(newinstsize));
return MOO_PF_SUCCESS;
}
static stix_pfrc_t pf_open (stix_t* stix, stix_ooi_t nargs)
static moo_pfrc_t pf_open (moo_t* moo, moo_ooi_t nargs)
{
stix_oop_char_t name;
stix_oop_char_t mode;
moo_oop_char_t name;
moo_oop_char_t mode;
stdio_t* rcv;
#if defined(STIX_OOCH_IS_UCH)
stix_oow_t ucslen, bcslen;
stix_bch_t namebuf[PATH_MAX];
stix_bch_t modebuf[32]; /* TODO: dynamic-sized conversion?? */
#if defined(MOO_OOCH_IS_UCH)
moo_oow_t ucslen, bcslen;
moo_bch_t namebuf[PATH_MAX];
moo_bch_t modebuf[32]; /* TODO: dynamic-sized conversion?? */
#endif
rcv = (stdio_t*)STIX_STACK_GETRCV(stix, nargs);
name = (stix_oop_char_t)STIX_STACK_GETARG(stix, nargs, 0);
mode = (stix_oop_char_t)STIX_STACK_GETARG(stix, nargs, 1);
rcv = (stdio_t*)MOO_STACK_GETRCV(moo, nargs);
name = (moo_oop_char_t)MOO_STACK_GETARG(moo, nargs, 0);
mode = (moo_oop_char_t)MOO_STACK_GETARG(moo, nargs, 1);
#if defined(STIX_OOCH_IS_UCH)
ucslen = STIX_OBJ_GET_SIZE(name);
bcslen = STIX_COUNTOF(namebuf) - 1;
if (stix_convootobchars (stix, name->slot, &ucslen, namebuf, &bcslen) <= -1) goto reterr;
#if defined(MOO_OOCH_IS_UCH)
ucslen = MOO_OBJ_GET_SIZE(name);
bcslen = MOO_COUNTOF(namebuf) - 1;
if (moo_convootobchars (moo, name->slot, &ucslen, namebuf, &bcslen) <= -1) goto reterr;
namebuf[bcslen] = '\0';
ucslen = STIX_OBJ_GET_SIZE(mode);
bcslen = STIX_COUNTOF(modebuf) - 1;
if (stix_convootobchars (stix, mode->slot, &ucslen, modebuf, &bcslen) <= -1) goto reterr;
ucslen = MOO_OBJ_GET_SIZE(mode);
bcslen = MOO_COUNTOF(modebuf) - 1;
if (moo_convootobchars (moo, mode->slot, &ucslen, modebuf, &bcslen) <= -1) goto reterr;
modebuf[bcslen] = '\0';
rcv->fp = fopen (namebuf, modebuf);
@ -79,92 +79,92 @@ static stix_pfrc_t pf_open (stix_t* stix, stix_ooi_t nargs)
#endif
if (!rcv->fp)
{
stix_seterrnum (stix, stix_syserrtoerrnum(errno));
moo_seterrnum (moo, moo_syserrtoerrnum(errno));
goto reterr;
}
STIX_STACK_SETRETTORCV (stix, nargs);
return STIX_PF_SUCCESS;
MOO_STACK_SETRETTORCV (moo, nargs);
return MOO_PF_SUCCESS;
reterr:
STIX_STACK_SETRETTOERROR (stix, nargs);
return STIX_PF_SUCCESS;
MOO_STACK_SETRETTOERROR (moo, nargs);
return MOO_PF_SUCCESS;
}
static stix_pfrc_t pf_close (stix_t* stix, stix_ooi_t nargs)
static moo_pfrc_t pf_close (moo_t* moo, moo_ooi_t nargs)
{
stdio_t* rcv;
rcv = (stdio_t*)STIX_STACK_GETRCV(stix, nargs);
rcv = (stdio_t*)MOO_STACK_GETRCV(moo, nargs);
if (rcv->fp)
{
fclose (rcv->fp);
rcv->fp = NULL;
}
STIX_STACK_SETRETTORCV (stix, nargs);
return STIX_PF_SUCCESS;
MOO_STACK_SETRETTORCV (moo, nargs);
return MOO_PF_SUCCESS;
}
static stix_pfrc_t pf_gets (stix_t* stix, stix_ooi_t nargs)
static moo_pfrc_t pf_gets (moo_t* moo, moo_ooi_t nargs)
{
/* return how many bytes have been written.. */
STIX_STACK_SETRETTORCV (stix, nargs);
return STIX_PF_SUCCESS;
MOO_STACK_SETRETTORCV (moo, nargs);
return MOO_PF_SUCCESS;
}
static stix_pfrc_t __pf_puts (stix_t* stix, stix_ooi_t nargs, stix_oow_t limit)
static moo_pfrc_t __pf_puts (moo_t* moo, moo_ooi_t nargs, moo_oow_t limit)
{
stdio_t* rcv;
stix_ooi_t i;
moo_ooi_t i;
rcv = (stdio_t*)STIX_STACK_GETRCV(stix, nargs);
rcv = (stdio_t*)MOO_STACK_GETRCV(moo, nargs);
for (i = 0; i < nargs; i++)
{
stix_oop_char_t x;
stix_obj_char_t tmpc;
moo_oop_char_t x;
moo_obj_char_t tmpc;
x = (stix_oop_char_t)STIX_STACK_GETARG(stix, nargs, i);
if (STIX_OOP_IS_CHAR(x))
x = (moo_oop_char_t)MOO_STACK_GETARG(moo, nargs, i);
if (MOO_OOP_IS_CHAR(x))
{
/* do some faking. */
STIX_ASSERT (stix, STIX_SIZEOF(tmpc) >= STIX_SIZEOF(stix_obj_t) + STIX_SIZEOF(stix_ooch_t));
MOO_ASSERT (moo, MOO_SIZEOF(tmpc) >= MOO_SIZEOF(moo_obj_t) + MOO_SIZEOF(moo_ooch_t));
tmpc.slot[0] = STIX_OOP_TO_CHAR(x);
x = (stix_oop_char_t)&tmpc;
STIX_OBJ_SET_SIZE(x, 1);
tmpc.slot[0] = MOO_OOP_TO_CHAR(x);
x = (moo_oop_char_t)&tmpc;
MOO_OBJ_SET_SIZE(x, 1);
goto puts_string;
}
else if (STIX_OOP_IS_POINTER(x) && STIX_OBJ_GET_FLAGS_TYPE(x) == STIX_OBJ_TYPE_CHAR)
else if (MOO_OOP_IS_POINTER(x) && MOO_OBJ_GET_FLAGS_TYPE(x) == MOO_OBJ_TYPE_CHAR)
{
int n;
stix_oow_t ucspos, ucsrem, ucslen, bcslen;
stix_bch_t bcs[1024]; /* TODO: choose a better buffer size */
moo_oow_t ucspos, ucsrem, ucslen, bcslen;
moo_bch_t bcs[1024]; /* TODO: choose a better buffer size */
puts_string:
ucspos = 0;
ucsrem = STIX_OBJ_GET_SIZE(x);
ucsrem = MOO_OBJ_GET_SIZE(x);
if (ucsrem > limit) ucsrem = limit;
while (ucsrem > 0)
{
ucslen = ucsrem;
bcslen = STIX_COUNTOF(bcs);
bcslen = MOO_COUNTOF(bcs);
/* TODO: implement character conversion into stdio and use it instead of vm's conversion facility. */
if ((n = stix_convootobchars (stix, &x->slot[ucspos], &ucslen, bcs, &bcslen)) <= -1)
if ((n = moo_convootobchars (moo, &x->slot[ucspos], &ucslen, bcs, &bcslen)) <= -1)
{
if (n != -2 || ucslen <= 0)
{
stix_seterrnum (stix, STIX_EECERR);
moo_seterrnum (moo, MOO_EECERR);
goto reterr;
}
}
if (fwrite (bcs, 1, bcslen, rcv->fp) < bcslen)
{
stix_seterrnum (stix, stix_syserrtoerrnum(errno));
moo_seterrnum (moo, moo_syserrtoerrnum(errno));
goto reterr;
}
@ -175,27 +175,27 @@ static stix_pfrc_t __pf_puts (stix_t* stix, stix_ooi_t nargs, stix_oow_t limit)
}
else
{
stix_seterrnum (stix, STIX_EINVAL);
moo_seterrnum (moo, MOO_EINVAL);
goto reterr;
}
}
STIX_STACK_SETRETTORCV (stix, nargs);
return STIX_PF_SUCCESS;
MOO_STACK_SETRETTORCV (moo, nargs);
return MOO_PF_SUCCESS;
reterr:
STIX_STACK_SETRETTOERROR (stix, nargs);
return STIX_PF_SUCCESS;
MOO_STACK_SETRETTOERROR (moo, nargs);
return MOO_PF_SUCCESS;
}
static stix_pfrc_t pf_putc (stix_t* stix, stix_ooi_t nargs)
static moo_pfrc_t pf_putc (moo_t* moo, moo_ooi_t nargs)
{
return __pf_puts (stix, nargs, 1);
return __pf_puts (moo, nargs, 1);
}
static stix_pfrc_t pf_puts (stix_t* stix, stix_ooi_t nargs)
static moo_pfrc_t pf_puts (moo_t* moo, moo_ooi_t nargs)
{
return __pf_puts (stix, nargs, STIX_TYPE_MAX(stix_oow_t));
return __pf_puts (moo, nargs, MOO_TYPE_MAX(moo_oow_t));
}
/*TODO: add print function that can accept ByteArray
@ -207,14 +207,14 @@ static stix_pfrc_t pf_puts (stix_t* stix, stix_ooi_t nargs)
typedef struct fnctab_t fnctab_t;
struct fnctab_t
{
stix_method_type_t type;
stix_ooch_t mthname[15];
moo_method_type_t type;
moo_ooch_t mthname[15];
int variadic;
stix_pfimpl_t handler;
moo_pfimpl_t handler;
};
#define C STIX_METHOD_CLASS
#define I STIX_METHOD_INSTANCE
#define C MOO_METHOD_CLASS
#define I MOO_METHOD_INSTANCE
static fnctab_t fnctab[] =
{
@ -230,15 +230,15 @@ static fnctab_t fnctab[] =
/* ------------------------------------------------------------------------ */
static int import (stix_t* stix, stix_mod_t* mod, stix_oop_t _class)
static int import (moo_t* moo, moo_mod_t* mod, moo_oop_t _class)
{
int ret = 0;
stix_oow_t i;
moo_oow_t i;
stix_pushtmp (stix, &_class);
for (i = 0; i < STIX_COUNTOF(fnctab); i++)
moo_pushtmp (moo, &_class);
for (i = 0; i < MOO_COUNTOF(fnctab); i++)
{
if (stix_genpfmethod (stix, mod, _class, fnctab[i].type, fnctab[i].mthname, fnctab[i].variadic, STIX_NULL) <= -1)
if (moo_genpfmethod (moo, mod, _class, fnctab[i].type, fnctab[i].mthname, fnctab[i].variadic, MOO_NULL) <= -1)
{
/* TODO: delete pfmethod generated??? */
ret = -1;
@ -246,21 +246,21 @@ static int import (stix_t* stix, stix_mod_t* mod, stix_oop_t _class)
}
}
stix_poptmp (stix);
moo_poptmp (moo);
return ret;
}
static stix_pfimpl_t query (stix_t* stix, stix_mod_t* mod, const stix_ooch_t* name)
static moo_pfimpl_t query (moo_t* moo, moo_mod_t* mod, const moo_ooch_t* name)
{
int left, right, mid, n;
left = 0; right = STIX_COUNTOF(fnctab) - 1;
left = 0; right = MOO_COUNTOF(fnctab) - 1;
while (left <= right)
{
mid = (left + right) / 2;
n = stix_compoocstr (name, fnctab[mid].mthname);
n = moo_compoocstr (name, fnctab[mid].mthname);
if (n < 0) right = mid - 1;
else if (n > 0) left = mid + 1;
else
@ -269,8 +269,8 @@ static stix_pfimpl_t query (stix_t* stix, stix_mod_t* mod, const stix_ooch_t* na
}
}
stix->errnum = STIX_ENOENT;
return STIX_NULL;
moo->errnum = MOO_ENOENT;
return MOO_NULL;
}
#if 0
@ -279,22 +279,22 @@ static stix_pfimpl_t query (stix_t* stix, stix_mod_t* mod, const stix_ooch_t* na
* check if receiver is at a certain size?
* etc...
*/
static int sanity_check (stix_t* stix)
static int sanity_check (moo_t* moo)
{
}
#endif
static void unload (stix_t* stix, stix_mod_t* mod)
static void unload (moo_t* moo, moo_mod_t* mod)
{
/* TODO: close all open handle?? */
}
int stix_mod_stdio (stix_t* stix, stix_mod_t* mod)
int moo_mod_stdio (moo_t* moo, moo_mod_t* mod)
{
mod->import = import;
mod->query = query;
mod->unload = unload;
mod->ctx = STIX_NULL;
mod->ctx = MOO_NULL;
return 0;
}