]> granicus.if.org Git - graphviz/commitdiff
- no more username in output.
authorellson <devnull@localhost>
Thu, 12 Feb 2009 17:47:24 +0000 (17:47 +0000)
committerellson <devnull@localhost>
Thu, 12 Feb 2009 17:47:24 +0000 (17:47 +0000)
- creator always "graphviz"
- pass in lt_preload_symbols from code using libgvc - avoiding problems with --enable-static
- clean out various bits of dead code

23 files changed:
lib/gvc/Makefile.am
lib/gvc/gvc.c
lib/gvc/gvc.h
lib/gvc/gvcommon.h
lib/gvc/gvconfig.c
lib/gvc/gvcontext.c
lib/gvc/gvrender.c
lib/gvc/libgvc_builtins.pc.in [deleted file]
plugin/core/gvrender_core_fig.c
plugin/core/gvrender_core_hpgl.c
plugin/core/gvrender_core_mif.c
plugin/core/gvrender_core_mp.c
plugin/core/gvrender_core_pic.c
plugin/core/gvrender_core_ps.c
plugin/core/gvrender_core_svg.c
plugin/core/gvrender_core_tk.c
plugin/core/gvrender_core_vml.c
plugin/core/gvrender_core_vtx.c
plugin/lasi/gvrender_lasi.cpp
plugin/quartz/gvrender_quartz.c
tclpkg/gv/Makefile.am
tclpkg/gv/no_builtins.c [moved from lib/gvc/no_builtins.c with 92% similarity]
tclpkg/tcldot/Makefile.am

index 338971baf4e5d0ab086df7b9702fd59aa2309e20..90629acab4dcd5148f7c91e6d4a83e16cf347978 100644 (file)
@@ -29,11 +29,11 @@ LIBS = $(LIBLTDL) $(SOCKET_LIBS) $(Z_LIBS) $(MATH_LIBS)
 pkginclude_HEADERS = gvc.h gvcext.h gvplugin.h gvcjob.h \
        gvcommon.h gvplugin_render.h gvplugin_layout.h gvconfig.h \
        gvplugin_textlayout.h gvplugin_device.h gvplugin_loadimage.h \
-       dot_builtins.c demand_loading.c no_demand_loading.c
+       demand_loading.c no_demand_loading.c
 noinst_HEADERS = gvcint.h gvcproc.h gvio.h
 noinst_LTLIBRARIES = libgvc_C.la
-lib_LTLIBRARIES = libgvc.la libgvc_builtins.la
-pkgconfig_DATA = libgvc.pc libgvc_builtins.pc
+lib_LTLIBRARIES = libgvc.la
+pkgconfig_DATA = libgvc.pc
 man_MANS = gvc.3
 pdf_DATA = gvc.3.pdf
 
@@ -50,10 +50,9 @@ if WITH_ORTHO
 libgvc_C_la_LIBADD += $(top_builddir)/lib/ortho/libortho_C.la
 libgvc_C_la_DEPENDENCIES +=  $(top_builddir)/lib/ortho/libortho_C.la
 endif
-#For use with plugins.
-#   so it is linked with an empty table of builtins.
+
 libgvc_la_LDFLAGS = -version-info $(VERSION_INFO) -no-undefined
-libgvc_la_SOURCES = $(libgvc_C_la_SOURCES) no_builtins.c demand_loading.c
+libgvc_la_SOURCES = $(libgvc_C_la_SOURCES) demand_loading.c
 libgvc_la_LIBADD = $(libgvc_C_la_LIBADD) \
        $(top_builddir)/lib/cdt/libcdt.la \
        $(top_builddir)/lib/$(GRAPH)/lib$(GRAPH).la \
@@ -61,16 +60,6 @@ libgvc_la_LIBADD = $(libgvc_C_la_LIBADD) \
        $(EXPAT_LIBS) $(Z_LIBS) $(MATH_LIBS)
 libgvc_la_DEPENDENCIES = $(libgvc_C_la_DEPENDENCIES)
 
-#For use without plugins.
-#  so it needs to be linked with a preset table of builtins, e.g. dot_builtins.c,
-#              with either demand_loading.c or no_demand_loading.c,
-#              and with the plugins themselves, e.g.
-#  -lgvplugin_dot_layout -lgvplugin_neato_layout -lgvplugin_gd -lgvplugin_pangocairo
-libgvc_builtins_la_LDFLAGS = -version-info $(VERSION_INFO)
-libgvc_builtins_la_SOURCES = $(libgvc_C_la_SOURCES)
-libgvc_builtins_la_LIBADD = $(libgvc_la_LIBADD)
-libgvc_builtins_la_DEPENDENCIES = $(libgvc_la_DEPENDENCIES)
-
 gvc.3.pdf: $(srcdir)/gvc.3
        - @GROFF@ -Tps -man $(srcdir)/gvc.3 | @PS2PDF@ - - > gvc.3.pdf
 
index be7d43fff253003b409faac55f971fc7801e2290..23bbbcea28c0db646125c893d5bf160bd0463bc8 100644 (file)
 #endif
 
 #include "gvc.h"
-#include "builddate.h"
 #include "const.h"
 #include "gvcjob.h"
 #include "gvcint.h"
 #include "gvcproc.h"
 #include "gvconfig.h"
 
-static char *LibInfo[] = {
-    "libgvc",          /* Program */
-    VERSION,           /* Version */
-    BUILDDATE          /* Build Date */
-};
-
 GVC_t *gvContext(const lt_symlist_t *builtins)
 {
     GVC_t *gvc;
@@ -42,7 +35,7 @@ GVC_t *gvContext(const lt_symlist_t *builtins)
 #else
     agattr(NULL, AGNODE, "label", NODENAME_ESC);
 #endif
-    gvc = gvNEWcontext(LibInfo, gvUsername(), builtins);
+    gvc = gvNEWcontext(builtins);
     gvconfig(gvc, FALSE); /* configure for available plugins and codegens */
     return gvc;
 }
@@ -197,6 +190,5 @@ void gvAddLibrary(GVC_t *gvc, gvplugin_library_t *lib)
 }
 
 char **gvcInfo(GVC_t* gvc) { return gvc->common.info; }
-char *gvcUsername(GVC_t* gvc) { return gvc->common.user; }
 char *gvcVersion(GVC_t* gvc) { return gvc->common.info[1]; }
 char *gvcBuildDate(GVC_t* gvc) { return gvc->common.info[2]; }
index 90b07bb31f79aa2248dc6f2c91d80208f7ad8984..8ad4bdfbe067994494333a4352770cee3bc6fb17 100644 (file)
@@ -43,8 +43,7 @@ extern "C" {
 extern void gvToggle(int);
 
 /* set up a graphviz context */
-extern GVC_t *gvNEWcontext(char **info, char *user, const lt_symlist_t *builtins);
-extern char *gvUsername(void);
+extern GVC_t *gvNEWcontext(const lt_symlist_t *builtins);
 
 /*  set up a graphviz context - alternative */
 /*     (wraps the above two functions using info built into libgvc) */
@@ -54,7 +53,6 @@ extern GVC_t *gvContext(const lt_symlist_t *builtins);
 extern char **gvcInfo(GVC_t*);
 extern char *gvcVersion(GVC_t*);
 extern char *gvcBuildDate(GVC_t*);
-extern char *gvcUsername(GVC_t*);
 
 /* parse command line args - minimally argv[0] sets layout engine */
 extern int gvParseArgs(GVC_t *gvc, int argc, char **argv);
index 76e5f063d4d58e093174983e67d218ecc791d4d7..d32919b3cdc3cc0564e9e3bbde3ba10eeb8d1c1c 100644 (file)
@@ -22,7 +22,6 @@ extern "C" {
 #endif
 
     typedef struct GVCOMMON_s {
-       char *user;
        char **info;
        char *cmdname;
        int verbose;
index 3dd9b1ad562525c32c2c2e5a75828e523c4e1181..3391b1dcfd5e029fd2731029613a83394302bcf9 100644 (file)
@@ -254,6 +254,8 @@ static void gvconfig_plugin_install_builtins(GVC_t * gvc)
     const lt_symlist_t *s;
     const char *name;
 
+    if (gvc->common.builtins == NULL) return;
+
     for (s = gvc->common.builtins; (name = s->name); s++)
        if (name[0] == 'g' && strstr(name, "_LTX_library")) 
            gvconfig_plugin_install_from_library(gvc, NULL,
index 9191b6cc3b4ba146cbd7e2d017cf1da32d2b8fc4..db89efe1ba8ab874d0c6ad87b6b3c7550ccf31b1 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <stdlib.h>
 
+#include "builddate.h"
 #include "types.h"
 #include "gvplugin.h"
 #include "gvcjob.h"
@@ -44,13 +45,18 @@ extern void emit_once_reset(void);
 /* from common/globals.c */
 extern int graphviz_errors;
 
-GVC_t *gvNEWcontext(char **info, char *user, const lt_symlist_t *builtins)
+static char *LibInfo[] = {
+    "graphviz",         /* Program */
+    VERSION,            /* Version */
+    BUILDDATE           /* Build Date */
+};
+
+GVC_t *gvNEWcontext(const lt_symlist_t *builtins)
 {
     GVC_t *gvc = zmalloc(sizeof(GVC_t));
 
     if (gvc) {
-       gvc->common.info = info;
-       gvc->common.user = user;
+       gvc->common.info = LibInfo;
        gvc->common.errorfn = agerrorf;
        gvc->common.builtins = builtins;
     }
index c9a127df1f03081c8345c7ae35befc68d1afbb1e..01ccafeed6ed34ba14239068f40010e19b22f35f 100644 (file)
@@ -154,7 +154,6 @@ void gvrender_begin_job(GVJ_t * job)
        if (cg && cg->begin_job)
            cg->begin_job(job->output_file, gvc->g,
                    gvc->common.lib,
-                   gvc->common.user,
                    gvc->common.info,
                    job->pagesArraySize);
     }
diff --git a/lib/gvc/libgvc_builtins.pc.in b/lib/gvc/libgvc_builtins.pc.in
deleted file mode 100644 (file)
index ad58983..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@/@PACKAGE@
-plugins=@GVPLUGIN_VERSION@
-
-Name: libgvc_builtins
-Description: The GraphVizContext library 
-Version: @VERSION@
-Libs: -L${libdir} -lgvc_builtins
-Cflags: -I${includedir}
index 4fc33198fba4802872d90e2ebd948cb2273681c7..69244a541feb64b3276d1e012f0f53c704fbfe14 100644 (file)
@@ -202,7 +202,6 @@ static void fig_begin_graph(GVJ_t * job)
     gvputs(job, "#FIG 3.2\n");
     gvprintf(job, "# Generated by %s version %s (%s)\n",
        job->common->info[0], job->common->info[1], job->common->info[2]);
-    gvprintf(job, "# For: %s\n", job->common->user);
     gvprintf(job, "# Title: %s\n", agnameof(obj->u.g));
     gvprintf(job, "# Pages: %d\n", job->pagesArraySize.x * job->pagesArraySize.y);
     gvputs(job, "Portrait\n"); /* orientation */
index fe652613ec3221f31326b2f2d5aecc5447a34046..a8fa65e7d453d77688a6c77c1d36fc6756a1e5e7 100644 (file)
@@ -204,7 +204,6 @@ static void hpgl_begin_graph(GVJ_t * job)
     gvputs(job, "#FIG 3.2\n");
     gvprintf(job, "# Generated by %s version %s (%s)\n",
        job->common->info[0], job->common->info[1], job->common->info[2]);
-    gvprintf(job, "# For: %s\n", job->common->user);
     gvprintf(job, "# Title: %s\n", obj->u.g->name);
     gvprintf(job, "# Pages: %d\n", job->pagesArraySize.x * job->pagesArraySize.y);
     gvputs(job, "Portrait\n"); /* orientation */
index 4c87fda908c566cafa456f574f121a754f5856ea..f87dfa62e783c691c9bdb5d9b1e859869074c18d 100644 (file)
@@ -188,7 +188,6 @@ static void mif_begin_graph(GVJ_t * job)
 {
     int i;
 
-    gvprintf(job, "# For: %s\n", job->common->user);
     gvprintf(job, "# Title: %s\n", job->obj->u.g->name);
     gvprintf(job, "# Pages: %d\n",
        job->pagesArraySize.x * job->pagesArraySize.y);
index 004efb1bf12777b4e163db9dc11245b2f3be0838..4b067dd17c7191113f4a8cfa5865aab2209c3edf 100644 (file)
@@ -204,7 +204,6 @@ static void mp_begin_graph(GVJ_t * job)
     gvputs(job, "#FIG 3.2\n");
     gvprintf(job, "# Generated by %s version %s (%s)\n",
        job->common->info[0], job->common->info[1], job->common->info[2]);
-    gvprintf(job, "# For: %s\n", job->common->user);
     gvprintf(job, "# Title: %s\n", obj->u.g->name);
     gvprintf(job, "# Pages: %d\n", job->pagesArraySize.x * job->pagesArraySize.y);
     gvputs(job, "Portrait\n"); /* orientation */
index fae043b8f89d25d2a39eb8d5dc4aa5cf8e99cf53..776f1646aa51247cbdeeafd589082823eba838a9 100644 (file)
@@ -301,7 +301,6 @@ static void pic_begin_graph(GVJ_t * job)
 
     gvprintf(job, "%s Creator: %s version %s (%s)\n",
        EscComment, job->common->info[0], job->common->info[1], job->common->info[2]);
-    gvprintf(job, "%s For: %s\n", EscComment, job->common->user);
     gvprintf(job, "%s Title: %s\n", EscComment, obj->u.g->name);
     gvprintf(job,
             "%s save point size and font\n.nr .S \\n(.s\n.nr DF \\n(.f\n",
index cce25e4ec9ec1328eafeb1c8163042659e932cd3..585d7dd562a7443c86a19a1e59acf3456cd47deb 100644 (file)
@@ -52,7 +52,6 @@ static void psgen_begin_job(GVJ_t * job)
        gvputs(job, "\n");
     gvprintf(job, "%%%%Creator: %s version %s (%s)\n",
            job->common->info[0], job->common->info[1], job->common->info[2]);
-    gvprintf(job, "%%%%For: %s\n", job->common->user);
 }
 
 static void psgen_end_job(GVJ_t * job)
index 03701199bc2bf3966df4799cd6b48e18d6bc0fee..73adc93e7c08ab9dbf330121a7151eeeb48ae35f 100644 (file)
@@ -151,17 +151,7 @@ static void svg_begin_job(GVJ_t * job)
     gvputs(job, xml_string(job->common->info[1]));
     gvputs(job, " (");
     gvputs(job, xml_string(job->common->info[2]));
-    /* We have absolutely no idea what character set the username
-     * may be in. To be conservative, we only output the username
-     * if it is all ascii. Since SVG output is UTF-8, we could check
-     * if the string appears to be in this format and allow it.
-     */
-    if (isAscii (job->common->user)) {
-       gvputs(job, ")\n     For user: ");
-       gvputs(job, xml_string(job->common->user));
-    }
-    else
-       gvputs(job, ")\n");
+    gvputs(job, ")\n");
     gvputs(job, " -->\n");
 }
 
index 7b906665a08b663d3a539697bd4ace10aa68ba0d..2ef0e69b4be8ddf48e2b5c4a66feb0b7800fb751 100644 (file)
@@ -168,9 +168,7 @@ static void tkgen_begin_job(GVJ_t * job)
     gvputs(job, tkgen_string(job->common->info[1]));
     gvputs(job, " (");
     gvputs(job, tkgen_string(job->common->info[2]));
-    gvputs(job, ")\n#     For user: ");
-    gvputs(job, tkgen_string(job->common->user));
-    gvputs(job, "\n");
+    gvputs(job, ")\n");
 }
 
 static void tkgen_begin_graph(GVJ_t * job)
index 24f2c9fbf21b7d4b444d4f0cbc6d46e0c1db3a0a..7da117dfa9336e074f1cca75f199d22561954bcc 100644 (file)
@@ -153,8 +153,7 @@ static void vml_begin_job(GVJ_t * job)
     gvputs(job, xml_string(job->common->info[1]));
     gvputs(job, " (");
     gvputs(job, xml_string(job->common->info[2]));
-    gvputs(job, ")\n     For user: ");
-    gvputs(job, xml_string(job->common->user));
+    gvputs(job, ")\n");
     gvputs(job, " -->\n");
 }
 
index b9c1d9e302bb10695c35bc27e47a58f0d8c75a56..5e1a6142c7db5a07700e9a6cec4ef2d8d491f89d 100644 (file)
@@ -204,7 +204,6 @@ static void vtx_begin_graph(GVJ_t * job)
     gvputs(job, "#FIG 3.2\n");
     gvprintf(job, "# Generated by %s version %s (%s)\n",
        job->common->info[0], job->common->info[1], job->common->info[2]);
-    gvprintf(job, "# For: %s\n", job->common->user);
     gvprintf(job, "# Title: %s\n", obj->u.g->name);
     gvprintf(job, "# Pages: %d\n", job->pagesArraySize.x * job->pagesArraySize.y);
     gvputs(job, "Portrait\n"); /* orientation */
index 72be4c848bf67f49fa29b43b30109361d9368357..aca983c73169f11e0977675dc0c5740ad35553a9 100644 (file)
@@ -79,7 +79,6 @@ static void lasi_begin_job(GVJ_t * job)
 //    gvputs(job, "%!PS-Adobe-3.0 EPSF-3.0\n");
     gvprintf(job, "%%%%Creator: %s version %s (%s)\n",
            job->common->info[0], job->common->info[1], job->common->info[2]);
-    gvprintf(job, "%%%%For: %s\n", job->common->user);
 }
 
 static void lasi_end_job(GVJ_t * job)
index 7c8da02cab95312729d5e380dc6a24d893b8aaa7..b5b4f4f6fabb1d873dc156805a04e82308f0e413 100644 (file)
@@ -85,12 +85,10 @@ static void quartzgen_begin_page(GVJ_t *job)
                                /* create the auxiliary info for PDF content, author and title */
                                CFStringRef auxiliaryKeys[] = {
                                        kCGPDFContextCreator,
-                                       kCGPDFContextAuthor,
                                        kCGPDFContextTitle
                                };
                                CFStringRef auxiliaryValues[] = {
                                        CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("%s %s"), job->common->info[0], job->common->info[1]),
-                                       CFStringCreateWithBytesNoCopy(kCFAllocatorDefault, (const UInt8 *)job->common->user, strlen(job->common->user), kCFStringEncodingUTF8, false, kCFAllocatorNull),
                                        job->obj->type == ROOTGRAPH_OBJTYPE ?
                                                CFStringCreateWithBytesNoCopy(kCFAllocatorDefault, (const UInt8 *)job->obj->u.g->name, strlen(job->obj->u.g->name), kCFStringEncodingUTF8, false, kCFAllocatorNull)
                                                : CFSTR("")
index a32878a1322ce6c9742e643a8c2b9cb0e60c8f6f..3519bab0bb090d9ad0e073566e3a46c7e1bdd4c2 100644 (file)
@@ -22,7 +22,7 @@ AM_CPPFLAGS = \
 
 LIBS = -lc
 
-BASESOURCES = gv.cpp gv.i
+BASESOURCES = gv.cpp gv.i no_builtins.c
 BASELIBS = $(top_builddir)/lib/gvc/libgvc.la \
        $(top_builddir)/lib/$(GRAPH)/lib$(GRAPH).la \
        $(top_builddir)/lib/cdt/libcdt.la
similarity index 92%
rename from lib/gvc/no_builtins.c
rename to tclpkg/gv/no_builtins.c
index 41dcc398ffa2f73c9413443a51f579651e80fd5a..dc62ea9cdcb9b26aab34a65d929be7c942f5bd38 100644 (file)
 *              AT&T Research, Florham Park NJ             *
 **********************************************************/
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include "gvplugin.h"
 
-#include "gvcext.h"
 lt_symlist_t lt_preloaded_symbols[] = { { 0, 0 } };
 
index 12682b557f63b0639a67efd51caa36bc520b11f6..e5828ee53810c48cbe0a5dad73aca06da831b13f 100644 (file)
@@ -43,7 +43,7 @@ if WITH_LIBGD
 GDTCLFT = $(top_srcdir)/tclpkg/gdtclft/gdtclft.c
 endif
 
-libtcldot_la_SOURCES = tcldot.c $(CODEGENS) $(GDTCLFT)
+libtcldot_la_SOURCES = tcldot.c no_builtins.c $(CODEGENS) $(GDTCLFT)
 libtcldot_la_LDFLAGS = -no-undefined 
 
 libtcldot_la_LIBADD = $(top_builddir)/tclpkg/tclhandle/libtclhandle_C.la \
@@ -63,8 +63,7 @@ endif
 libtcldot_la_LIBADD += $(LIBGEN_LIBS) $(ICONV_LIBS) $(MATH_LIBS)
 
 libtcldot_builtin_la_SOURCES = \
-       tcldot.c $(CODEGENS) $(GDTCLFT) \
-       $(top_srcdir)/lib/gvc/dot_builtins.c \
+       tcldot.c tcldot_builtins.c $(CODEGENS) $(GDTCLFT) \
        $(top_srcdir)/lib/gvc/no_demand_loading.c 
 libtcldot_builtin_la_LDFLAGS =