From cbe5815b0e8379124093f6fa57c0dfaceaf4dfbb Mon Sep 17 00:00:00 2001 From: ellson Date: Wed, 25 Feb 2009 17:46:45 +0000 Subject: [PATCH] Pass demand_loading flag into libgvc similar to builtins --- tclpkg/gv/gv.cpp | 3 ++- tclpkg/gv/gv_builtins.c | 20 ++++++++++++++++++++ tclpkg/tcldot/Makefile.am | 6 +++--- 3 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 tclpkg/gv/gv_builtins.c diff --git a/tclpkg/gv/gv.cpp b/tclpkg/gv/gv.cpp index 43410420d..242f48e37 100644 --- a/tclpkg/gv/gv.cpp +++ b/tclpkg/gv/gv.cpp @@ -28,7 +28,8 @@ static char emptystring[] = {'\0'}; static GVC_t *gvc; static void gv_init(void) { - gvc = gvContextBuiltins(lt_preloaded_symbols); + /* list of builtins, enable demand loading */ + gvc = gvContextPlugins(lt_preloaded_symbols, DEMAND_LOADING); } Agraph_t *graph(char *name) diff --git a/tclpkg/gv/gv_builtins.c b/tclpkg/gv/gv_builtins.c new file mode 100644 index 000000000..dc62ea9cd --- /dev/null +++ b/tclpkg/gv/gv_builtins.c @@ -0,0 +1,20 @@ +/* $Id$ $Revision$ */ +/* vim:set shiftwidth=4 ts=8: */ + +/********************************************************** +* This software is part of the graphviz package * +* http://www.graphviz.org/ * +* * +* Copyright (c) 1994-2004 AT&T Corp. * +* and is licensed under the * +* Common Public License, Version 1.0 * +* by AT&T Corp. * +* * +* Information and Software Systems Research * +* AT&T Research, Florham Park NJ * +**********************************************************/ + +#include "gvplugin.h" + +lt_symlist_t lt_preloaded_symbols[] = { { 0, 0 } }; + diff --git a/tclpkg/tcldot/Makefile.am b/tclpkg/tcldot/Makefile.am index 6c1c5ba02..6cac0b08a 100644 --- a/tclpkg/tcldot/Makefile.am +++ b/tclpkg/tcldot/Makefile.am @@ -44,6 +44,7 @@ GDTCLFT = $(top_srcdir)/tclpkg/gdtclft/gdtclft.c endif libtcldot_la_SOURCES = tcldot.c no_builtins.c $(CODEGENS) $(GDTCLFT) +libtcldot_la_CPPFLAGS = $(AM_CPPFLAGS) -DDEMAND_LOADING=1 libtcldot_la_LDFLAGS = -no-undefined libtcldot_la_LIBADD = $(top_builddir)/tclpkg/tclhandle/libtclhandle_C.la \ @@ -64,9 +65,8 @@ endif libtcldot_la_LIBADD += $(LIBGEN_LIBS) $(ICONV_LIBS) $(MATH_LIBS) -libtcldot_builtin_la_SOURCES = \ - tcldot.c tcldot_builtins.c $(CODEGENS) $(GDTCLFT) \ - $(top_srcdir)/lib/gvc/no_demand_loading.c +libtcldot_builtin_la_SOURCES = tcldot.c tcldot_builtins.c $(CODEGENS) $(GDTCLFT) +libtcldot_builtin_la_CPPFLAGS = $(AM_CPPFLAGS) -DDEMAND_LOADING=1 libtcldot_builtin_la_LDFLAGS = libtcldot_builtin_la_LIBADD = \ -- 2.40.0