From e8cadd9bc3f72dc2d4cb23c8ca9024a41b1e1e81 Mon Sep 17 00:00:00 2001 From: "hyunghwan.chung" Date: Wed, 22 May 2019 08:49:27 +0000 Subject: [PATCH] gui log view experiment with gtk --- moo/Makefile.in | 4 ++-- moo/bin/Makefile.am | 18 ++++++++++++++--- moo/bin/Makefile.in | 48 +++++++++++++++++++++++++++++++++++++++------ moo/bin/main.c | 2 ++ moo/configure | 26 +++++++++++++++++++++++- moo/configure.ac | 8 +++++++- moo/lib/Makefile.am | 10 +++++----- moo/lib/Makefile.in | 11 ++++++----- moo/lib/moo-std.h | 1 + moo/lib/std.c | 3 +-- 10 files changed, 106 insertions(+), 25 deletions(-) diff --git a/moo/Makefile.in b/moo/Makefile.in index 28ff8c8..c5f890b 100644 --- a/moo/Makefile.in +++ b/moo/Makefile.in @@ -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) diff --git a/moo/bin/Makefile.am b/moo/bin/Makefile.am index 1f76c27..a861e34 100644 --- a/moo/bin/Makefile.am +++ b/moo/bin/Makefile.am @@ -5,7 +5,7 @@ CPPFLAGS_ALL_COMMON = \ -I$(abs_builddir)/../lib \ -I$(abs_srcdir) \ -I$(abs_srcdir)/../lib \ - -I$(includedir) + -I$(includedir) LDFLAGS_ALL_COMMON = -L$(abs_builddir) -L$(abs_builddir)/../lib -L$(libdir) @@ -22,7 +22,19 @@ moo_SOURCES = main.c moo_CPPFLAGS = $(CPPFLAGS_ALL_COMMON) moo_LDFLAGS = $(LDFLAGS_ALL_COMMON) moo_LDADD = $(LIBADD_BIN_COMMON) -lmoox -if ENABLE_STATIC_MODULE moo_DEPENDENCIES = ../lib/libmoox.la -endif + +if ENABLE_EXPERIMENTAL + +################################################## +# moo-gtk - experimental. the following configuration is temporary only. +################################################## +bin_PROGRAMS += moo-gtk +moo_gtk_SOURCES = gtk-main.c +moo_gtk_CPPFLAGS = $(CPPFLAGS_ALL_COMMON) -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include +moo_gtk_LDFLAGS = $(LDFLAGS_ALL_COMMON) +moo_gtk_LDADD = $(LIBADD_BIN_COMMON) -lmoox -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 +moo_gtk_DEPENDENCIES = ../lib/libmoox.la + +endif diff --git a/moo/bin/Makefile.in b/moo/bin/Makefile.in index 68c936e..bdda8ab 100644 --- a/moo/bin/Makefile.in +++ b/moo/bin/Makefile.in @@ -88,8 +88,12 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = moo$(EXEEXT) -@ENABLE_STATIC_MODULE_FALSE@moo_DEPENDENCIES = $(am__DEPENDENCIES_2) +bin_PROGRAMS = moo$(EXEEXT) $(am__EXEEXT_1) + +################################################## +# moo-gtk - experimental. the following configuration is temporary only. +################################################## +@ENABLE_EXPERIMENTAL_TRUE@am__append_1 = moo-gtk subdir = bin ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_sign.m4 \ @@ -105,6 +109,7 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/lib/moo-cfg.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +@ENABLE_EXPERIMENTAL_TRUE@am__EXEEXT_1 = moo-gtk$(EXEEXT) am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_moo_OBJECTS = moo-main.$(OBJEXT) @@ -118,6 +123,13 @@ am__v_lt_1 = moo_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(moo_LDFLAGS) $(LDFLAGS) -o $@ +am__moo_gtk_SOURCES_DIST = gtk-main.c +@ENABLE_EXPERIMENTAL_TRUE@am_moo_gtk_OBJECTS = \ +@ENABLE_EXPERIMENTAL_TRUE@ moo_gtk-gtk-main.$(OBJEXT) +moo_gtk_OBJECTS = $(am_moo_gtk_OBJECTS) +moo_gtk_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(moo_gtk_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 @@ -152,8 +164,8 @@ 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 = $(moo_SOURCES) -DIST_SOURCES = $(moo_SOURCES) +SOURCES = $(moo_SOURCES) $(moo_gtk_SOURCES) +DIST_SOURCES = $(moo_SOURCES) $(am__moo_gtk_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -339,7 +351,7 @@ CPPFLAGS_ALL_COMMON = \ -I$(abs_builddir)/../lib \ -I$(abs_srcdir) \ -I$(abs_srcdir)/../lib \ - -I$(includedir) + -I$(includedir) LDFLAGS_ALL_COMMON = -L$(abs_builddir) -L$(abs_builddir)/../lib -L$(libdir) CPPFLAGS_BIN_COMMON = $(CPPFLAGS_ALL_COMMON) @@ -353,7 +365,12 @@ moo_SOURCES = main.c moo_CPPFLAGS = $(CPPFLAGS_ALL_COMMON) moo_LDFLAGS = $(LDFLAGS_ALL_COMMON) moo_LDADD = $(LIBADD_BIN_COMMON) -lmoox -@ENABLE_STATIC_MODULE_TRUE@moo_DEPENDENCIES = ../lib/libmoox.la +moo_DEPENDENCIES = ../lib/libmoox.la +@ENABLE_EXPERIMENTAL_TRUE@moo_gtk_SOURCES = gtk-main.c +@ENABLE_EXPERIMENTAL_TRUE@moo_gtk_CPPFLAGS = $(CPPFLAGS_ALL_COMMON) -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include +@ENABLE_EXPERIMENTAL_TRUE@moo_gtk_LDFLAGS = $(LDFLAGS_ALL_COMMON) +@ENABLE_EXPERIMENTAL_TRUE@moo_gtk_LDADD = $(LIBADD_BIN_COMMON) -lmoox -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 +@ENABLE_EXPERIMENTAL_TRUE@moo_gtk_DEPENDENCIES = ../lib/libmoox.la all: all-am .SUFFIXES: @@ -441,6 +458,10 @@ moo$(EXEEXT): $(moo_OBJECTS) $(moo_DEPENDENCIES) $(EXTRA_moo_DEPENDENCIES) @rm -f moo$(EXEEXT) $(AM_V_CCLD)$(moo_LINK) $(moo_OBJECTS) $(moo_LDADD) $(LIBS) +moo-gtk$(EXEEXT): $(moo_gtk_OBJECTS) $(moo_gtk_DEPENDENCIES) $(EXTRA_moo_gtk_DEPENDENCIES) + @rm -f moo-gtk$(EXEEXT) + $(AM_V_CCLD)$(moo_gtk_LINK) $(moo_gtk_OBJECTS) $(moo_gtk_LDADD) $(LIBS) + mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -448,6 +469,7 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/moo-main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/moo_gtk-gtk-main.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @@ -487,6 +509,20 @@ moo-main.obj: main.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(moo_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o moo-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` +moo_gtk-gtk-main.o: gtk-main.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(moo_gtk_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT moo_gtk-gtk-main.o -MD -MP -MF $(DEPDIR)/moo_gtk-gtk-main.Tpo -c -o moo_gtk-gtk-main.o `test -f 'gtk-main.c' || echo '$(srcdir)/'`gtk-main.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/moo_gtk-gtk-main.Tpo $(DEPDIR)/moo_gtk-gtk-main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gtk-main.c' object='moo_gtk-gtk-main.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) $(moo_gtk_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o moo_gtk-gtk-main.o `test -f 'gtk-main.c' || echo '$(srcdir)/'`gtk-main.c + +moo_gtk-gtk-main.obj: gtk-main.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(moo_gtk_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT moo_gtk-gtk-main.obj -MD -MP -MF $(DEPDIR)/moo_gtk-gtk-main.Tpo -c -o moo_gtk-gtk-main.obj `if test -f 'gtk-main.c'; then $(CYGPATH_W) 'gtk-main.c'; else $(CYGPATH_W) '$(srcdir)/gtk-main.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/moo_gtk-gtk-main.Tpo $(DEPDIR)/moo_gtk-gtk-main.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gtk-main.c' object='moo_gtk-gtk-main.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) $(moo_gtk_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o moo_gtk-gtk-main.obj `if test -f 'gtk-main.c'; then $(CYGPATH_W) 'gtk-main.c'; else $(CYGPATH_W) '$(srcdir)/gtk-main.c'; fi` + mostlyclean-libtool: -rm -f *.lo diff --git a/moo/bin/main.c b/moo/bin/main.c index 6e6c938..b68cc4a 100644 --- a/moo/bin/main.c +++ b/moo/bin/main.c @@ -250,6 +250,8 @@ int main (int argc, char* argv[]) for (i = opt.ind; i < argc; i++) { moo_iostd_t in; + + memset (&in, 0, MOO_SIZEOF(in)); #if 1 in.type = MOO_IOSTD_FILEB; in.u.fileb.path = argv[i]; diff --git a/moo/configure b/moo/configure index 791c048..a982d3f 100755 --- a/moo/configure +++ b/moo/configure @@ -668,6 +668,8 @@ ENABLE_DYNAMIC_MODULE_TRUE ENABLE_CXX_FALSE ENABLE_CXX_TRUE BUILD_MODE +ENABLE_EXPERIMENTAL_FALSE +ENABLE_EXPERIMENTAL_TRUE PACKAGE_VERSION_PATCH PACKAGE_VERSION_MINOR PACKAGE_VERSION_MAJOR @@ -823,6 +825,7 @@ with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock +enable_experimental enable_debug enable_unicode enable_full_liw @@ -1479,7 +1482,8 @@ Optional Features: --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) - --enable-debug build the library in the debug mode (default. no) + --enable-experimental enable experimental feature(default. no) + --enable-debug compile the code in the debug mode (default. no) --enable-unicode Use the unicode character type as the default character type. one of yes, no, yes:2, yes:4, no:2, no:4 (default. yes) @@ -21420,6 +21424,22 @@ $as_echo "#define MOO_ENDIAN_UNKNOWN /**/" >>confdefs.h esac +# Check whether --enable-experimental was given. +if test "${enable_experimental+set}" = set; then : + enableval=$enable_experimental; enable_experimental_is=$enableval +else + enable_experimental_is=no +fi + + if test "${enable_experimental_is}" = "yes" ; then + ENABLE_EXPERIMENTAL_TRUE= + ENABLE_EXPERIMENTAL_FALSE='#' +else + ENABLE_EXPERIMENTAL_TRUE='#' + ENABLE_EXPERIMENTAL_FALSE= +fi + + # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; enable_debug_is=$enableval @@ -21930,6 +21950,10 @@ if test -z "${MACOSX_TRUE}" && test -z "${MACOSX_FALSE}"; then Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${ENABLE_EXPERIMENTAL_TRUE}" && test -z "${ENABLE_EXPERIMENTAL_FALSE}"; then + as_fn_error $? "conditional \"ENABLE_EXPERIMENTAL\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ENABLE_CXX_TRUE}" && test -z "${ENABLE_CXX_FALSE}"; then as_fn_error $? "conditional \"ENABLE_CXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 diff --git a/moo/configure.ac b/moo/configure.ac index 6fbee7d..fac7da0 100644 --- a/moo/configure.ac +++ b/moo/configure.ac @@ -643,8 +643,14 @@ AC_C_BIGENDIAN( [AC_DEFINE([MOO_ENDIAN_LITTLE],[],[Little Endian])], [AC_DEFINE([MOO_ENDIAN_UNKNOWN],[],[Unknown Endian])]) +AC_ARG_ENABLE([experimental], + [AS_HELP_STRING([--enable-experimental],[enable experimental feature(default. no)])], + enable_experimental_is=$enableval, + enable_experimental_is=no) +AM_CONDITIONAL(ENABLE_EXPERIMENTAL, test "${enable_experimental_is}" = "yes" ) + AC_ARG_ENABLE([debug], - [AS_HELP_STRING([--enable-debug],[build the library in the debug mode (default. no)])], + [AS_HELP_STRING([--enable-debug],[compile the code in the debug mode (default. no)])], enable_debug_is=$enableval, enable_debug_is=no) if test "$enable_debug_is" = "yes" diff --git a/moo/lib/Makefile.am b/moo/lib/Makefile.am index 83b5b57..f720d65 100644 --- a/moo/lib/Makefile.am +++ b/moo/lib/Makefile.am @@ -91,23 +91,23 @@ libmoo_la_LIBADD = $(LIBADD_LIB_COMMON) if ENABLE_STATIC_MODULE libmoo_la_LIBADD += -lmoo-stdio -libmoo_la_DEPENDENCIES = $(abs_builddir)/../mod/libmoo-stdio.la +libmoo_la_DEPENDENCIES = ../mod/libmoo-stdio.la if ENABLE_MOD_CON libmoo_la_LIBADD += -lmoo-con -libmoo_la_DEPENDENCIES += $(abs_builddir)/../mod/libmoo-con.la +libmoo_la_DEPENDENCIES += ../mod/libmoo-con.la endif if ENABLE_MOD_FFI libmoo_la_LIBADD += -lmoo-ffi -libmoo_la_DEPENDENCIES += $(abs_builddir)/../mod/libmoo-ffi.la +libmoo_la_DEPENDENCIES += ../mod/libmoo-ffi.la endif if ENABLE_MOD_SCK libmoo_la_LIBADD += -lmoo-sck -libmoo_la_DEPENDENCIES += $(abs_builddir)/../mod/libmoo-sck.la +libmoo_la_DEPENDENCIES += ../mod/libmoo-sck.la endif if ENABLE_MOD_X11 libmoo_la_LIBADD += -lmoo-x11 -libmoo_la_DEPENDENCIES += $(abs_builddir)/../mod/libmoo-x11.la +libmoo_la_DEPENDENCIES += ../mod/libmoo-x11.la endif endif diff --git a/moo/lib/Makefile.in b/moo/lib/Makefile.in index 167eb96..b579024 100644 --- a/moo/lib/Makefile.in +++ b/moo/lib/Makefile.in @@ -98,13 +98,13 @@ host_triplet = @host@ @ENABLE_STATIC_MODULE_FALSE@ $(am__DEPENDENCIES_1) \ @ENABLE_STATIC_MODULE_FALSE@ $(am__DEPENDENCIES_1) @ENABLE_MOD_CON_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_4 = -lmoo-con -@ENABLE_MOD_CON_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_5 = $(abs_builddir)/../mod/libmoo-con.la +@ENABLE_MOD_CON_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_5 = ../mod/libmoo-con.la @ENABLE_MOD_FFI_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_6 = -lmoo-ffi -@ENABLE_MOD_FFI_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_7 = $(abs_builddir)/../mod/libmoo-ffi.la +@ENABLE_MOD_FFI_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_7 = ../mod/libmoo-ffi.la @ENABLE_MOD_SCK_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_8 = -lmoo-sck -@ENABLE_MOD_SCK_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_9 = $(abs_builddir)/../mod/libmoo-sck.la +@ENABLE_MOD_SCK_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_9 = ../mod/libmoo-sck.la @ENABLE_MOD_X11_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_10 = -lmoo-x11 -@ENABLE_MOD_X11_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_11 = $(abs_builddir)/../mod/libmoo-x11.la +@ENABLE_MOD_X11_TRUE@@ENABLE_STATIC_MODULE_TRUE@am__append_11 = ../mod/libmoo-x11.la @WIN32_TRUE@am__append_12 = poll-msw.c poll-msw.h @ENABLE_LIBLTDL_TRUE@am__append_13 = $(LTDL_LIBS) @ENABLE_LIBLTDL_FALSE@am__append_14 = $(DL_LIBS) @@ -487,7 +487,8 @@ libmoo_la_LDFLAGS = $(LDFLAGS_LIB_COMMON) libmoo_la_LIBADD = $(LIBADD_LIB_COMMON) $(am__append_3) \ $(am__append_4) $(am__append_6) $(am__append_8) \ $(am__append_10) -@ENABLE_STATIC_MODULE_TRUE@libmoo_la_DEPENDENCIES = $(abs_builddir)/../mod/libmoo-stdio.la \ +@ENABLE_STATIC_MODULE_TRUE@libmoo_la_DEPENDENCIES = \ +@ENABLE_STATIC_MODULE_TRUE@ ../mod/libmoo-stdio.la \ @ENABLE_STATIC_MODULE_TRUE@ $(am__append_5) $(am__append_7) \ @ENABLE_STATIC_MODULE_TRUE@ $(am__append_9) $(am__append_11) diff --git a/moo/lib/moo-std.h b/moo/lib/moo-std.h index 3a3fdfa..38bd683 100644 --- a/moo/lib/moo-std.h +++ b/moo/lib/moo-std.h @@ -19,6 +19,7 @@ struct moo_cfgstd_t moo_cmgr_t* cmgr; moo_cmgr_t* input_cmgr; moo_cmgr_t* log_cmgr; + moo_log_write_t log_write; union { diff --git a/moo/lib/std.c b/moo/lib/std.c index af44864..9f37a12 100644 --- a/moo/lib/std.c +++ b/moo/lib/std.c @@ -3629,7 +3629,7 @@ static void fini_moo (moo_t* moo) vmprim.alloc_heap = alloc_heap; vmprim.free_heap = free_heap; } - vmprim.log_write = log_write; + vmprim.log_write = (cfg->log_write? cfg->log_write: log_write); vmprim.syserrstrb = syserrstrb; vmprim.assertfail = assert_fail; vmprim.dl_startup = dl_startup; @@ -3907,4 +3907,3 @@ void moo_uncatch_termreq (void) } #endif -