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
+else
gvpack_LDADD = \
$(top_builddir)/lib/ingraphs/libingraphs.la \
$(top_builddir)/lib/neatogen/libneatogen.la \
$(top_builddir)/plugin/gd/libgvplugin_gd.la \
$(top_builddir)/plugin/text/libgvplugin_text.la \
$(top_builddir)/plugin/layout/libgvplugin_layout.la @CAIRO_LIBS@
+endif
dijkstra_SOURCES = dijkstra.c
{&MIF_CodeGen, "mif", MIF},
{&PIC_CodeGen, "pic", PIC_format},
-#ifdef GD_RENDER
{&GD_CodeGen, "gd", GD},
#ifdef HAVE_LIBZ
{&GD_CodeGen, "gd2", GD2},
{&GD_CodeGen, "xbm", XBM},
{&GD_CodeGen, "xpm", XBM},
#endif
-#endif /* GD_RENDER */
#ifdef QUARTZ_RENDER
{&QPDF_CodeGen, "pdf", QPDF},
external FILE *Output_file;
external int Obj;
- extern codegen_t FIG_CodeGen, HPGL_CodeGen,
- MAP_CodeGen, MIF_CodeGen,
- XDot_CodeGen, MP_CodeGen, PIC_CodeGen, PS_CodeGen,
- DIA_CodeGen, SVG_CodeGen, VRML_CodeGen, VTX_CodeGen;
-
-#ifdef GD_RENDER
- extern codegen_t GD_CodeGen, memGD_CodeGen;
-#endif
+ extern codegen_t FIG_CodeGen, HPGL_CodeGen, MAP_CodeGen,
+ MIF_CodeGen, XDot_CodeGen, MP_CodeGen, PIC_CodeGen,
+ PS_CodeGen, DIA_CodeGen, SVG_CodeGen, VRML_CodeGen,
+ VTX_CodeGen, GD_CodeGen, memGD_CodeGen;
#ifdef QUARTZ_RENDER
extern codegen_t QPDF_CodeGen, QEPDF_CodeGen, QBM_CodeGen;
#endif
/* establish Gvfilepath, if any */
Gvfilepath = getenv("GV_FILE_PATH");
+ /* configure codegens */
+ config_codegen_builtins(gvc);
+ gvplugin_builtins(gvc);
+ gvconfig(gvc, CONFIG);
+
aginit();
nfiles = 0;
for (i = 1; i < argc; i++)
if (!val) {
fprintf(stderr, "Missing argument for -T flag\n");
dotneato_usage(1);
+ exit(1);
+ }
+ v = gvrender_output_langname_job(gvc, val);
+ if (v == NO_SUPPORT) {
+ fprintf(stderr, "Renderer type: \"%s\" not recognized. Use one of:%s\n",
+ val, gvplugin_list(gvc, API_render, val));
+ exit(1);
}
- gvrender_output_langname_job(gvc, val);
break;
case 'V':
fprintf(stderr, "%s version %s (%s)\n",
/* if no -Txxx, then set default format */
if (!gvc->jobs || !gvc->jobs->output_langname) {
- gvrender_output_langname_job(gvc, "dot");
+ v = gvrender_output_langname_job(gvc, "dot");
+ assert(v != NO_SUPPORT);
}
- config_codegen_builtins(gvc);
- gvplugin_builtins(gvc);
- gvconfig(gvc, CONFIG);
-
#if !defined(DISABLE_CODEGENS) && !defined(HAVE_GD_FREETYPE)
Output_codegen = gvc->codegen;
#endif
}
}
-FILE *next_input_file(void)
+static FILE *next_input_file(void)
{
static int ctr = 0;
FILE *rv = NULL;
extern point neato_closest(splines * spl, point p);
extern bezier *new_spline(edge_t * e, int sz);
extern queue *new_queue(int);
- extern FILE *next_input_file(void);
extern Agraph_t *next_input_graph(void);
extern int node_in_CB(node_t *);
extern int node_in_layer(Agraph_t *, node_t *);
suffix = shapefile;
else
suffix++;
-#ifdef GD_RENDER
if (!strcasecmp(suffix, "wbmp")
#ifdef HAVE_GD_GIF
|| !strcasecmp(suffix, "gif")
) {
rv = gd_user_shape_size(n, shapefile);
} else
-#endif
#ifdef QUARTZ_RENDER
if (Output_lang == QPDF || Output_lang == QEPDF ||
(Output_lang >= QBM_FIRST && Output_lang <= QBM_LAST))
suffix = shapefile;
else
suffix++;
-#ifdef GD_RENDER
if (!strcasecmp(suffix, "wbmp")
#ifdef HAVE_GD_GIF
|| !strcasecmp(suffix, "gif")
) {
rv = gd_image_size(g, shapefile);
} else
-#endif
#ifdef QUARTZ_RENDER
if (Output_lang == QPDF || Output_lang == QEPDF ||
(Output_lang >= QBM_FIRST && Output_lang <= QBM_LAST))
}
/* -T switches */
-void gvrender_output_langname_job(GVC_t * gvc, char *name)
+int gvrender_output_langname_job(GVC_t * gvc, char *name)
{
if (!gvc->jobs) {
output_langname_job = gvc->job = gvc->jobs =
}
}
output_langname_job->output_langname = name;
+
+ /* select it now to check that it exists */
+ return (gvrender_select(gvc, name));
}
#if 0
/* job */
extern void gvrender_output_filename_job(GVC_t * gvc, char *name);
- extern void gvrender_output_langname_job(GVC_t * gvc, char *name);
+ extern int gvrender_output_langname_job(GVC_t * gvc, char *name);
extern gvrender_job_t *gvrender_first_job(GVC_t * gvc);
extern gvrender_job_t *gvrender_next_job(GVC_t * gvc);
extern void gvrender_delete_jobs(GVC_t * gvc);