]> granicus.if.org Git - graphviz/commitdiff
always need layout plugin even if disable-gvrender
authorellson <devnull@localhost>
Wed, 5 Jan 2005 22:26:21 +0000 (22:26 +0000)
committerellson <devnull@localhost>
Wed, 5 Jan 2005 22:26:21 +0000 (22:26 +0000)
eliminate public functions lang_select and file_select

cmd/dot/Makefile.am
cmd/dot/plugins.c
cmd/tools/Makefile.am
cmd/tools/plugins.c
lib/common/Makefile.am
lib/common/emit.c
lib/common/output.c
lib/common/renderprocs.h
tclpkg/tcldot/tcldot.c

index 11834b935ad18b91f609b445e0caab3885c44fff..9cf8e8f0cee52727523a0b32e877cdd56f332d53 100644 (file)
@@ -40,13 +40,7 @@ if DISABLE_GVRENDER
 dot_LDADD = \
         $(top_builddir)/lib/common/libcommon.la \
         $(top_builddir)/lib/gvc/libgvc.la \
-       $(top_builddir)/lib/fdpgen/libfdpgen.la \
-       $(top_builddir)/lib/twopigen/libtwopigen.la \
-       $(top_builddir)/lib/circogen/libcircogen.la \
-       $(top_builddir)/lib/neatogen/libneatogen.la \
-       $(top_builddir)/lib/dotgen/libdotgen.la \
-        $(top_builddir)/lib/pathplan/libpathplan.la \
-        $(top_builddir)/lib/graph/libgraph.la
+       $(top_builddir)/plugin/layout/libgvplugin_layout.la
 else
 dot_LDADD = \
        $(top_builddir)/lib/common/libcommon.la \
index 3d3783ece0e0da0b815d558de705b9aaa717581a..bbdb0f9f82cdb7bba87272ce83df71fd3715a88b 100644 (file)
 #ifndef DISABLE_GVRENDER
 extern gvplugin_t gvplugin_cairo_LTX_plugin,
     gvplugin_gd_LTX_plugin,
-    gvplugin_text_LTX_plugin,
-    gvplugin_layout_LTX_plugin;
+    gvplugin_text_LTX_plugin;
 #endif
+extern gvplugin_layout_LTX_plugin;
 
 gvplugin_t *builtins[] = {
 #ifndef DISABLE_GVRENDER
     &gvplugin_cairo_LTX_plugin,
     &gvplugin_gd_LTX_plugin,
     &gvplugin_text_LTX_plugin,
-    &gvplugin_layout_LTX_plugin,
 #endif
+    &gvplugin_layout_LTX_plugin,
     NULL
 };
 
index b7e4f14101dc28960a066689e62a808ed574a645..a1a0c85e02a5ee2ae6c1ccc0906a8d651d9a358b 100644 (file)
@@ -92,20 +92,15 @@ gvpack_SOURCES = gvpack.c plugins.c
 
 if DISABLE_GVRENDER
 gvpack_LDADD = \
-       $(top_builddir)/lib/ingraphs/libingraphs.la \
-       $(top_builddir)/lib/neatogen/libneatogen.la \
-       $(top_builddir)/lib/pack/libpack.la \
        $(top_builddir)/lib/common/libcommon.la \
        $(top_builddir)/lib/gvc/libgvc.la \
-       $(top_builddir)/lib/pathplan/libpathplan.la
+       $(top_builddir)/lib/ingraphs/libingraphs.la \
+       $(top_builddir)/plugin/layout/libgvplugin_layout.la
 else
 gvpack_LDADD = \
-       $(top_builddir)/lib/ingraphs/libingraphs.la \
-       $(top_builddir)/lib/neatogen/libneatogen.la \
-       $(top_builddir)/lib/pack/libpack.la \
        $(top_builddir)/lib/common/libcommon.la \
        $(top_builddir)/lib/gvc/libgvc.la \
-       $(top_builddir)/lib/pathplan/libpathplan.la \
+       $(top_builddir)/lib/ingraphs/libingraphs.la \
        $(top_builddir)/plugin/cairo/libgvplugin_cairo.la \
         $(top_builddir)/plugin/gd/libgvplugin_gd.la \
         $(top_builddir)/plugin/text/libgvplugin_text.la \
index 3d3783ece0e0da0b815d558de705b9aaa717581a..bbdb0f9f82cdb7bba87272ce83df71fd3715a88b 100644 (file)
 #ifndef DISABLE_GVRENDER
 extern gvplugin_t gvplugin_cairo_LTX_plugin,
     gvplugin_gd_LTX_plugin,
-    gvplugin_text_LTX_plugin,
-    gvplugin_layout_LTX_plugin;
+    gvplugin_text_LTX_plugin;
 #endif
+extern gvplugin_layout_LTX_plugin;
 
 gvplugin_t *builtins[] = {
 #ifndef DISABLE_GVRENDER
     &gvplugin_cairo_LTX_plugin,
     &gvplugin_gd_LTX_plugin,
     &gvplugin_text_LTX_plugin,
-    &gvplugin_layout_LTX_plugin,
 #endif
+    &gvplugin_layout_LTX_plugin,
     NULL
 };
 
index 8aeba644db20b560a511c10fdd00df2ecc719ceb..b818117fc9f552bcccc6cffdd89cd4e21357c44d 100644 (file)
@@ -28,7 +28,7 @@ libcommon_la_SOURCES = arrows.c colxlate.c fontmetrics.c gdtextsize.c \
        output.c emit.c $(CODEGENS)
 
 libcommon_la_LIBADD = \
-       @GD_LIBS@ @EXPAT_LIBS@ @CAIRO_LIBS@ @Z_LIBS@
+       @GD_LIBS@ @CAIRO_LIBS@ @EXPAT_LIBS@ @Z_LIBS@
 
 psgen.o psgen.lo : ps.h
 
index 0034dd6e954260b2734c924661bd645da045d9c0..cc8d3c360abcb57ac4829f248d84fa907e4936c8 100644 (file)
@@ -684,10 +684,13 @@ void emit_graph(GVC_t * gvc, graph_t * g, int flags)
     /* FIXME - some of setup_pagination should be in emit_init() */
     setup_pagination(gvc, g);
 
+#if 0
+/* FIXME - apparently zoom is not set yet */
     gvc->clip.UR.x = ROUND(gvc->focus.x + (gvc->width+1) / (gvc->zoom * 2.));
     gvc->clip.UR.y = ROUND(gvc->focus.y + (gvc->height+1) / (gvc->zoom * 2.));
     gvc->clip.LL.x = ROUND(gvc->focus.x - (gvc->width+1) / (gvc->zoom * 2.));
     gvc->clip.LL.y = ROUND(gvc->focus.y - (gvc->height+1) / (gvc->zoom * 2.));
+#endif
 
     gvrender_begin_graph(gvc, g, PB, PFC);
     if (flags & EMIT_COLORS) {
@@ -1425,29 +1428,6 @@ void config_codegen_builtins(GVC_t * gvc)
 #endif
 }
 
-int lang_select(GVC_t * gvc, char *str, int warn)
-{
-    int rv = gvrender_select(gvc, str);
-
-    if (rv == NO_SUPPORT && warn) {
-       agerr(AGERR, "Renderer type \"%s\" not recognized, use one of:",
-             str);
-       agerr(AGPREV, "%s\n", gvplugin_list(gvc, API_render, str));
-    }
-    return rv;
-}
-
-FILE *file_select(char *str)
-{
-    FILE *rv;
-    rv = fopen(str, "wb");
-    if (rv == NULL) {
-       perror(str);
-       exit(1);
-    }
-    return rv;
-}
-
 void use_library(char *name)
 {
     static int cnt = 0;
index 73d1e61272fb06eb87fff8f1c59171f193a5700a..7eac4946fb2ab5313ee6aaa12fab95701bafd550 100644 (file)
@@ -216,6 +216,17 @@ void dotneato_write_one(GVC_t * gvc, graph_t * g)
     emit_deinit(gvc);
 }
 
+static FILE *file_select(char *str)
+{
+    FILE *rv;
+    rv = fopen(str, "wb");
+    if (rv == NULL) {
+        perror(str);
+        exit(1);
+    }
+    return rv;
+}
+
 void dotneato_write(GVC_t * gvc, graph_t * g)
 {
     gvrender_job_t *job;
@@ -227,7 +238,8 @@ void dotneato_write(GVC_t * gvc, graph_t * g)
            } else {
                job->output_file = file_select(job->output_filename);
            }
-           job->output_lang = lang_select(gvc, job->output_langname, 1);
+           job->output_lang = gvrender_select(gvc, job->output_langname);
+           assert(job->output_lang != NO_SUPPORT); /* should have been verified already */
        }
 #ifndef DISABLE_CODEGENS
        Output_file = job->output_file;
index f6210618008c74ed0c62f2eb575f8079ccb56e13..5e3974de0075af38157ca1fe14262391907f3b2e 100644 (file)
@@ -91,7 +91,6 @@ extern "C" {
     extern void epsf_init(node_t * n);
     extern void epsf_free(node_t * n);
     extern void epsf_gencode(GVC_t * gvc, node_t * n);
-    extern FILE *file_select(char *);
     extern shape_desc *find_user_shape(char *);
     extern box flip_rec_box(box b, point p);
     extern point flip_pt(point p, int rankdir);
@@ -196,7 +195,6 @@ extern "C" {
 #   define extern __EXPORT__
 #endif
     extern point sub_points(point, point);
-    extern int lang_select(GVC_t * gvc, char *, int);
 
     extern void toggle(int);
     extern int test_toggle();
index 6af266cb95bbd6f019c24c3359c503db07d8c8c0..e6112b51c3ff072feddb2c1397e520f1dc52ca1c 100644 (file)
@@ -1114,7 +1114,7 @@ static int graphcmd(ClientData clientData, Tcl_Interp * interp,
 
        /* render graph TK canvas commands */
        gvc->job->output_lang =
-           lang_select(gvc, gvc->job->output_langname, 0);
+           gvrender_select(gvc, gvc->job->output_langname);
        gvc->job->output_file = (FILE *) & tkgendata;
 #if ENABLE_CODEGENS
        Output_lang = gvc->job->output_lang;