From 8cb7d7d6acb6091faf57c166abdd009b5bef9812 Mon Sep 17 00:00:00 2001 From: ellson Date: Tue, 14 Jul 2009 13:18:07 +0000 Subject: [PATCH] clean out more CODEGEN bits - mostly comments --- cmd/tools/.cvsignore | 5 +++++ config.h.old | 3 --- config.iffe | 3 --- configure.ac | 16 ---------------- doc/winbuild.html | 2 +- graphs/directed/Makefile.am | 7 ++----- graphs/undirected/Makefile.am | 5 +---- lib/common/Makefile.old | 5 +---- lib/common/htmltable.c | 9 ++------- lib/common/htmltable.h | 4 ++-- lib/common/input.c | 6 +++--- lib/common/sources.cmake | 12 ------------ lib/common/types.h | 2 +- lib/common/utils.c | 2 +- lib/gvc/gvc.c | 4 ++-- lib/gvc/gvcint.h | 11 +++++------ lib/gvc/gvplugin.h | 3 +-- lib/gvpr/.cvsignore | 2 ++ tclpkg/tcldot/Makefile.am | 4 ++-- tclpkg/tcldot/tcldot.c | 2 +- windows/bin/runconf.sh | 4 ++-- 21 files changed, 34 insertions(+), 77 deletions(-) diff --git a/cmd/tools/.cvsignore b/cmd/tools/.cvsignore index 301a7d492..4a04a0049 100644 --- a/cmd/tools/.cvsignore +++ b/cmd/tools/.cvsignore @@ -20,5 +20,10 @@ nop sccmap tred unflatten +gml2gv +gmlparse.[ch] +gmlscan.c +y.output +y.tab.[ch] *.pdf CMakeFiles CMakeTmp CMakeFiles CMakeCache.txt cmake_install.cmake diff --git a/config.h.old b/config.h.old index 03f668f09..4471e9648 100644 --- a/config.h.old +++ b/config.h.old @@ -122,9 +122,6 @@ /*******************************************************************/ /* The following usually aren't changed. */ /*******************************************************************/ -/* Define if you want the old codegens */ -#define WITH_CODEGENS 1 - /* Define if you don't want on-demand plugin loading */ #define DISABLE_LTDL 1 diff --git a/config.iffe b/config.iffe index fd14d8e6e..81fcd8575 100644 --- a/config.iffe +++ b/config.iffe @@ -234,9 +234,6 @@ cat{ /*******************************************************************/ /* The following usually aren't changed. */ /*******************************************************************/ -/* Define if you want the old codegens */ -#define WITH_CODEGENS 1 - /* Define if you don't want on-demand plugin loading */ #define DISABLE_LTDL 1 diff --git a/configure.ac b/configure.ac index 067607892..744c8154b 100644 --- a/configure.ac +++ b/configure.ac @@ -518,21 +518,6 @@ AM_PROG_LIBTOOL #AC_CHECK_LIB([xml2], [main]) #AC_CHECK_LIB([z], [main]) -dnl ----------------------------------- -dnl old codegens - -AC_ARG_WITH(codegens, - [AS_HELP_STRING([--with-codegens=no],[use old codegens])], - [],[with_codegens=no]) - -if test "x$with_codegens" = "xyes"; then - use_codegens="Yes" - AC_DEFINE(WITH_CODEGENS,1,[Define if you want the old codegens]) -else - use_codegens="No (disabled by default - deprecated)" -fi -AM_CONDITIONAL(WITH_CODEGENS, [test "x$use_codegens" = "xYes"]) - dnl ----------------------------------- dnl ElectricFence support for debugging @@ -3162,7 +3147,6 @@ echo "graphviz-$VERSION will be compiled with the following:" echo "" echo "options:" echo " cgraph: $use_cgraph" -echo " codegens: $use_codegens" echo " digcola: $use_digcola" echo " expat: $use_expat" echo " fontconfig: $use_fontconfig" diff --git a/doc/winbuild.html b/doc/winbuild.html index 1f4df5c93..cd263bc8f 100644 --- a/doc/winbuild.html +++ b/doc/winbuild.html @@ -72,7 +72,7 @@ export PANGOFLAGS="--with-fontconfig --with-fontconfiglibdir$FONTCONFIGLIBDIR --
  • Change directory to $ROOT and run configure:
    -./configure -C --prefix=$INSTALLROOT --without-gdk-pixbuf --with-mylibgd --disable-swig --without-x  --disable-tcl --without-ipsepcola --with-codegens --enable-shared --disable-static --with-freetype=$GTKDIR/lib --enable-ltdl $PANGOFLAGS --without-gtk --without-gtkgl
    +./configure -C --prefix=$INSTALLROOT --without-gdk-pixbuf --with-mylibgd --disable-swig --without-x  --disable-tcl --without-ipsepcola --enable-shared --disable-static --with-freetype=$GTKDIR/lib --enable-ltdl $PANGOFLAGS --without-gtk --without-gtkgl
     
     
    diff --git a/graphs/directed/Makefile.am b/graphs/directed/Makefile.am index 5232db437..507dd604b 100644 --- a/graphs/directed/Makefile.am +++ b/graphs/directed/Makefile.am @@ -19,9 +19,6 @@ EXTRA_DIST = $(GRAPHS) CLEANFILES = core *.gv.* *.png .xvpics/* -# CODEGEN_FORMATS = -Tdia -Thpgl -Tmif -Tmp -Tpic -Tpcl -Tvtx -CODEGEN_FORMATS = - test: $(top_builddir)/cmd/dot/dot \ -Tcanon -Tgv -Tplain -Tplain-ext -Txdot \ @@ -30,7 +27,7 @@ test: -Tpng:cairo -Tpng:gd -Tpng:cairo:gd -Tpng:cairo:cairo -Tpng:gd:gd \ -Tps -Tps2 -Tps:lasi -Tps:cairo -Tpdf \ -Tsvg -Tsvg:cairo -Tsvgz -Tvrml \ - $(CODEGEN_FORMATS) -O $(GRAPHS) + -O $(GRAPHS) ins_test: dot \ -Tcanon -Tgv -Tplain -Tplain-ext -Txdot \ @@ -39,7 +36,7 @@ ins_test: -Tpng:cairo -Tpng:gd -Tpng:cairo:gd -Tpng:cairo:cairo -Tpng:gd:gd \ -Tps -Tps2 -Tps:lasi -Tps:cairo -Tpdf \ -Tsvg -Tsvg:cairo -Tsvgz -Tvrml \ - $(CODEGEN_FORMATS) -O $(GRAPHS) + -O $(GRAPHS) # for i in $(GRAPHS); do \ # echo "dot $$i"; \ diff --git a/graphs/undirected/Makefile.am b/graphs/undirected/Makefile.am index fe90e3544..e1845c498 100644 --- a/graphs/undirected/Makefile.am +++ b/graphs/undirected/Makefile.am @@ -11,9 +11,6 @@ EXTRA_DIST = $(GRAPHS) CLEANFILES = core *.gv.* *.png .xvpics/* -# CODEGEN_FORMATS = -Tdia -Thpgl -Tmif -Tmp -Tpic -Tpcl -Tvtx -CODEGEN_FORMATS = - test: $(top_builddir)/cmd/dot/dot -Kneato \ -Tcanon -Tgv -Tplain -Tplain-ext -Txdot \ @@ -21,7 +18,7 @@ test: -Tjpg -Tpdf -Tfig -Tgif -Tpng \ -Tps -Tps2 -Tps:lasi -Tps:cairo -Tpdf \ -Tsvg -Tsvg:cairo -Tsvgz -Tvrml \ - $(CODEGEN_FORMATS) -O $(GRAPHS) + -O $(GRAPHS) # for i in $(GRAPHS); do \ # echo "neato $$i"; \ diff --git a/lib/common/Makefile.old b/lib/common/Makefile.old index bae88716a..d69630f64 100644 --- a/lib/common/Makefile.old +++ b/lib/common/Makefile.old @@ -23,14 +23,11 @@ NOINST_HDRS = render.h utils.h memory.h \ geomprocs.h colorprocs.h const.h macros.h pointset.h NOINST_GENERATED_HDRS = colortbl.h htmltable.h htmlparse.h htmllex.h -GD_CODEGENS = -CODEGENS = $(GD_CODEGENS) diagen.o hpglgen.o mifgen.o mpgen.o picgen.o vtxgen.o - OBJS = arrows.o colxlate.o fontmetrics.o \ args.o memory.o globals.o htmllex.o htmlparse.o htmltable.o input.o \ pointset.o postproc.o routespl.o splines.o psusershape.o \ timing.o labels.o ns.o shapes.o utils.o geom.o \ - output.o emit.o $(CODEGENS) + output.o emit.o libcommon.a : $(OBJS) $(RM) libcommon.a diff --git a/lib/common/htmltable.c b/lib/common/htmltable.c index 7685c7e65..03fff1f91 100644 --- a/lib/common/htmltable.c +++ b/lib/common/htmltable.c @@ -17,7 +17,7 @@ /* Implementation of HTML-like tables. * - * The CodeGen graphics model, especially with integral coodinates, is + * The (now purged) CodeGen graphics model, especially with integral coodinates, is * not adequate to handle this as we would like. In particular, it is * difficult to handle notions of adjacency and correct rounding to pixels. * For example, if 2 adjacent boxes bb1.UR.x == bb2.LL.x, the rectangles @@ -173,14 +173,9 @@ emit_htextparas(GVJ_t* job, int nparas, htextpara_t* paras, pointf p, tl.layout = ti->layout; tl.width = ti->size; tl.height = paras[i].lfsize; - tl.just = 'l'; + p_.x = p.x; -#if 0 -/* or */ - tl.just = 'c'; - p_.x = p.x + (ti->size/2.0); -#endif gvrender_textpara(job, p_, &tl); p.x += ti->size; ti++; diff --git a/lib/common/htmltable.h b/lib/common/htmltable.h index 4a35db18e..b62eee0df 100644 --- a/lib/common/htmltable.h +++ b/lib/common/htmltable.h @@ -60,7 +60,7 @@ extern "C" { * This translation is done when libexpat scans the input. */ - /* atomic unit of text emitted using a single htmlfont_t */ + /* atomic unit of text emitted using a single htmlfont_t */ typedef struct { char *str; PostscriptAlias *postscript_alias; @@ -70,7 +70,7 @@ extern "C" { double size, yoffset_layout, yoffset_centerline; } textitem_t; - /* line of textitems_t */ + /* line of textitems_t */ typedef struct { textitem_t *items; short nitems; diff --git a/lib/common/input.c b/lib/common/input.c index d2f3ebacc..da11276b1 100644 --- a/lib/common/input.c +++ b/lib/common/input.c @@ -246,9 +246,9 @@ void dotneato_args_initialize(GVC_t * gvc, int argc, char **argv) gvc->common.info[1], gvc->common.info[2]); } - /* configure for available plugins and codegens */ - /* needs to know if "dot -c" is set (gvc->common.config) */ - /* must happen before trying to select any plugins */ + /* configure for available plugins */ + /* needs to know if "dot -c" is set (gvc->common.config) */ + /* must happen before trying to select any plugins */ gvconfig(gvc, gvc->common.config); if (gvc->common.config) exit (0); diff --git a/lib/common/sources.cmake b/lib/common/sources.cmake index 3648f5516..9981ae659 100644 --- a/lib/common/sources.cmake +++ b/lib/common/sources.cmake @@ -66,17 +66,6 @@ SET(common_base_SRCS ${common_SRCDIR}/emit.c ) -SET(common_codegen_SRCS - ${common_SRCDIR}/diagen.c - ${common_SRCDIR}/figgen.c - ${common_SRCDIR}/hpglgen.c - ${common_SRCDIR}/mifgen.c - ${common_SRCDIR}/mpgen.c - ${common_SRCDIR}/picgen.c - ${common_SRCDIR}/vtxgen.c - ${common_SRCDIR}/xdgen.c -) - set(common_generated_SRCS ${common_SRCDIR}/colortbl.h ${common_SRCDIR}/htmlparse.h @@ -86,6 +75,5 @@ set(common_generated_SRCS set(common_SRCS ${common_base_SRCS} - ${common_codegen_SRCS} ${common_generated_SRCS} ) diff --git a/lib/common/types.h b/lib/common/types.h index d65823d53..a5a0d5189 100644 --- a/lib/common/types.h +++ b/lib/common/types.h @@ -193,7 +193,7 @@ extern "C" { boolean usershape; } shape_desc; -#include "usershape.h" /* usershapes needed by gvc even w/o CODEGENS */ +#include "usershape.h" /* usershapes needed by gvc */ typedef struct nodequeue { node_t **store, **limit, **head, **tail; diff --git a/lib/common/utils.c b/lib/common/utils.c index b3f32dd66..195ca9b8e 100644 --- a/lib/common/utils.c +++ b/lib/common/utils.c @@ -585,7 +585,7 @@ int test_toggle() void common_init_node_opt(node_t * n, int shape_init_flag) { char *str; - ND_width(n) = + ND_width(n) = late_double(n, N_width, DEFAULT_NODEWIDTH, MIN_NODEWIDTH); ND_height(n) = late_double(n, N_height, DEFAULT_NODEHEIGHT, MIN_NODEHEIGHT); diff --git a/lib/gvc/gvc.c b/lib/gvc/gvc.c index b10834f65..a1dcd96a1 100644 --- a/lib/gvc/gvc.c +++ b/lib/gvc/gvc.c @@ -38,7 +38,7 @@ GVC_t *gvContext(void) #endif /* default to no builtins, demand loading enabled */ gvc = gvNEWcontext(NULL, TRUE); - gvconfig(gvc, FALSE); /* configure for available plugins and codegens */ + gvconfig(gvc, FALSE); /* configure for available plugins */ return gvc; } @@ -53,7 +53,7 @@ GVC_t *gvContextPlugins(const lt_symlist_t *builtins, int demand_loading) agattr(NULL, AGNODE, "label", NODENAME_ESC); #endif gvc = gvNEWcontext(builtins, demand_loading); - gvconfig(gvc, FALSE); /* configure for available plugins and codegens */ + gvconfig(gvc, FALSE); /* configure for available plugins */ return gvc; } diff --git a/lib/gvc/gvcint.h b/lib/gvc/gvcint.h index 201149c69..8c2b88b24 100644 --- a/lib/gvc/gvcint.h +++ b/lib/gvc/gvcint.h @@ -49,12 +49,11 @@ extern "C" { }; struct gvplugin_available_s { - gvplugin_available_t *next; /* next plugin in linked list, or NULL */ - const char *typestr; /* type string, e.g. "png" or "ps" */ - int quality; /* programmer assigned quality - ranking within type (+ve or -ve int) - - codegens have quality = 0 */ - gvplugin_package_t *package; /* details of library containing plugin */ + gvplugin_available_t *next; /* next plugin in linked list, or NULL */ + const char *typestr; /* type string, e.g. "png" or "ps" */ + int quality; /* Programmer assigned quality ranking within type (+ve or -ve int). + First implementation of type should be given "0" quality */ + gvplugin_package_t *package; /* details of library containing plugin */ gvplugin_installed_t *typeptr; /* pointer to jumptable for plugin, or NULL if not yet loaded */ }; diff --git a/lib/gvc/gvplugin.h b/lib/gvc/gvplugin.h index df8a4459f..126497e35 100644 --- a/lib/gvc/gvplugin.h +++ b/lib/gvc/gvplugin.h @@ -28,7 +28,7 @@ extern "C" { /* * Terminology: * - * package - e.g. libgvplugin_cairo.so, or table of codegen builtins. + * package - e.g. libgvplugin_cairo.so * api - e.g. render * type - e.g. "png", "ps" */ @@ -36,7 +36,6 @@ extern "C" { typedef struct { int id; /* an id that is only unique within a package of plugins of the same api. - A codegen id is unique in in the set of codegens. A renderer-type such as "png" in the cairo package has an id that is different from the "ps" type in the same package */ diff --git a/lib/gvpr/.cvsignore b/lib/gvpr/.cvsignore index 37e3beedb..3ceaa1813 100644 --- a/lib/gvpr/.cvsignore +++ b/lib/gvpr/.cvsignore @@ -2,6 +2,8 @@ *.lo .deps .libs +gdefs.h +mkdefs Makefile Makefile.in *.pdf diff --git a/tclpkg/tcldot/Makefile.am b/tclpkg/tcldot/Makefile.am index 6cac0b08a..466c88fa0 100644 --- a/tclpkg/tcldot/Makefile.am +++ b/tclpkg/tcldot/Makefile.am @@ -43,7 +43,7 @@ if WITH_LIBGD GDTCLFT = $(top_srcdir)/tclpkg/gdtclft/gdtclft.c endif -libtcldot_la_SOURCES = tcldot.c no_builtins.c $(CODEGENS) $(GDTCLFT) +libtcldot_la_SOURCES = tcldot.c no_builtins.c $(GDTCLFT) libtcldot_la_CPPFLAGS = $(AM_CPPFLAGS) -DDEMAND_LOADING=1 libtcldot_la_LDFLAGS = -no-undefined @@ -65,7 +65,7 @@ endif libtcldot_la_LIBADD += $(LIBGEN_LIBS) $(ICONV_LIBS) $(MATH_LIBS) -libtcldot_builtin_la_SOURCES = tcldot.c tcldot_builtins.c $(CODEGENS) $(GDTCLFT) +libtcldot_builtin_la_SOURCES = tcldot.c tcldot_builtins.c $(GDTCLFT) libtcldot_builtin_la_CPPFLAGS = $(AM_CPPFLAGS) -DDEMAND_LOADING=1 libtcldot_builtin_la_LDFLAGS = diff --git a/tclpkg/tcldot/tcldot.c b/tclpkg/tcldot/tcldot.c index 3d2a3335d..64a851f46 100644 --- a/tclpkg/tcldot/tcldot.c +++ b/tclpkg/tcldot/tcldot.c @@ -1729,7 +1729,7 @@ int Tcldot_Init(Tcl_Interp * interp) /* create a GraphViz Context and pass a pointer to it in clientdata */ gvc = gvNEWcontext(lt_preloaded_symbols, DEMAND_LOADING); - /* configure for available plugins and codegens */ + /* configure for available plugins */ gvconfig(gvc, FALSE); #ifndef TCLOBJ diff --git a/windows/bin/runconf.sh b/windows/bin/runconf.sh index c68f35722..fd778d2af 100644 --- a/windows/bin/runconf.sh +++ b/windows/bin/runconf.sh @@ -46,5 +46,5 @@ do esac done -echo ./configure -C --prefix=$INSTALLROOT $GDKPIXBUF --with-mylibgd --disable-swig --without-x --without-tclsh --without-ipsepcola --with-codegens $SHAREFLAGS --with-freetype=$GTKDIR/lib $LTDLFLAGS $PANGOFLAGS -./configure -C --prefix=$INSTALLROOT $GDKPIXBUF --with-mylibgd --disable-swig --without-x --without-tclsh --without-ipsepcola --with-codegens $SHAREFLAGS --with-freetype=$GTKDIR/lib $LTDLFLAGS $PANGOFLAGS +echo ./configure -C --prefix=$INSTALLROOT $GDKPIXBUF --with-mylibgd --disable-swig --without-x --without-tclsh --without-ipsepcola $SHAREFLAGS --with-freetype=$GTKDIR/lib $LTDLFLAGS $PANGOFLAGS +./configure -C --prefix=$INSTALLROOT $GDKPIXBUF --with-mylibgd --disable-swig --without-x --without-tclsh --without-ipsepcola $SHAREFLAGS --with-freetype=$GTKDIR/lib $LTDLFLAGS $PANGOFLAGS -- 2.40.0