]> granicus.if.org Git - graphviz/commitdiff
Merge formatter and device plugin apis.
authorellson <devnull@localhost>
Wed, 29 Aug 2007 19:39:49 +0000 (19:39 +0000)
committerellson <devnull@localhost>
Wed, 29 Aug 2007 19:39:49 +0000 (19:39 +0000)
Selecting device by format, e.g. -Tsvgz, or -Tpng:cairo:gd
Automatically load correct renderer, e.g. cairo, gd, core_dot
Improve plugin listings.
Accurately reflecte available formats.

lib/common/input.c
lib/gvc/Makefile.am
lib/gvc/gvc.c
lib/gvc/gvcjob.h
lib/gvc/gvconfig.c
lib/gvc/gvplugin_formatter.h [deleted file]

index 940e5e6711cf894069cda721d38a152abc5fa922..1fb1562bba0c60f06ec7a406d9704aef1e397338 100644 (file)
@@ -236,8 +236,8 @@ void dotneato_args_initialize(GVC_t * gvc, int argc, char **argv)
                }
                v = gvjobs_output_langname(gvc, val);
                if (!v) {
-                   fprintf(stderr, "Renderer type: \"%s\" not recognized. Use one of:%s\n",
-                       val, gvplugin_list(gvc, API_render, val));
+                   fprintf(stderr, "Format: \"%s\" not recognized. Use one of:%s\n",
+                       val, gvplugin_list(gvc, API_device, val));
                    exit(1);
                }
                break;
index c2a43907e17d80940518887d58d225a591c8df92..2b3c9cc9a68eb13f176dd101f6feb20a5ac14945 100644 (file)
@@ -16,7 +16,7 @@ AM_CPPFLAGS = \
 LIBS = $(LIBLTDL) $(SOCKET_LIBS)
 
 pkginclude_HEADERS = gvc.h gvcext.h gvplugin.h gvcjob.h \
-       gvcommon.h gvplugin_render.h gvplugin_layout.h gvplugin_formatter.h \
+       gvcommon.h gvplugin_render.h gvplugin_layout.h \
        gvplugin_textlayout.h gvplugin_device.h gvplugin_loadimage.h \
        dot_builtins.c demand_loading.c no_demand_loading.c
 noinst_HEADERS = gvcint.h gvcproc.h
index 21b2d954cd255766b66c6589eac922a7c2297869..4f5d734e6d985f33579d9526a69df340e92d8f00 100644 (file)
@@ -96,8 +96,8 @@ int gvRender(GVC_t *gvc, graph_t *g, char *format, FILE *out)
     rc = gvjobs_output_langname(gvc, format);
     job = gvc->job;
     if (rc == NO_SUPPORT) {
-        agerr (AGERR, "Renderer type: \"%s\" not recognized. Use one of:%s\n",
-                format, gvplugin_list(gvc, API_render, format));
+        agerr (AGERR, "Format: \"%s\" not recognized. Use one of:%s\n",
+                format, gvplugin_list(gvc, API_device, format));
         return -1;
     }
 
@@ -133,7 +133,7 @@ int gvRenderFilename(GVC_t *gvc, graph_t *g, char *format, char *filename)
     rc = gvjobs_output_langname(gvc, format);
     job = gvc->job;
     if (rc == NO_SUPPORT) {
-       agerr(AGERR, "Renderer type: \"%s\" not recognized. Use one of:%s\n",                format, gvplugin_list(gvc, API_render, format));
+       agerr(AGERR, "Format: \"%s\" not recognized. Use one of:%s\n",                format, gvplugin_list(gvc, API_device, format));
        return -1;
     }
 
index b5fc1bfaa98c647d56c9dce8cacd07878bf29f3e..ad3be968131862332a847dc35a07fa6e93aa5ce2 100644 (file)
@@ -77,7 +77,7 @@ extern "C" {
        char **knowncolors;
        int sz_knowncolors;
        color_type_t color_type;
-       char *device, *imageloader, *formatter;
+       char *imageloader;
     } gvrender_features_t;
 
     typedef struct {
index 654d502da431555156dd2fec182c4eec4479aee4..59da502959588c3ea75b3c2d8d0af0785eb8b074 100644 (file)
@@ -532,7 +532,7 @@ void gvconfig(GVC_t * gvc, boolean rescan)
     codegen_info_t *p;
 
     for (p = cg; p->name; ++p)
-        gvplugin_install(gvc, API_render, p->name, 0,
+        gvplugin_install(gvc, API_device, p->name, 0,
                         "cg", NULL, (gvplugin_installed_t *) p);
 #endif
 
diff --git a/lib/gvc/gvplugin_formatter.h b/lib/gvc/gvplugin_formatter.h
deleted file mode 100644 (file)
index 5b36a87..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/* $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             *
-**********************************************************/
-
-#ifndef GVFORMATTER_PLUGIN_H
-#define GVFORMATTER_PLUGIN_H
-
-#include "types.h"
-#include "gvplugin.h"
-#include "gvcjob.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-    struct gvformatter_engine_s {
-       void (*format) (GVJ_t * job, unsigned int width, unsigned int height, unsigned char *data);
-    };
-
-#ifdef __cplusplus
-}
-#endif
-#endif                         /* GVFORMATTER_PLUGIN_H */