* Needs to be fixed before layout engines can be plugins.
*/
+#include <ctype.h>
#include "render.h"
#include "tlayout.h"
arg = argv[i];
if (arg && *arg == '-') {
switch (arg[1]) {
- case 'x' : Reduce = TRUE; break;
+ case 'x' : Reduce = true; break;
case 'n':
if (arg[2]) {
Nop = atoi(arg+2);
arg = argv[i];
if (arg && *arg == '-') {
switch (arg[1]) {
- case 'm' : MemTest = TRUE; break;
+ case 'm' : MemTest = true; break;
default :
cnt++;
if (*p != arg) *p = arg;
arg = argv[i];
if (arg && *arg == '-') {
switch (arg[1]) {
- case 'c' : Config = TRUE; break;
+ case 'v':
+ gvc->common.verbose = 1;
+ if (isdigit(arg[2]))
+ gvc->common.verbose = atoi(&arg[2]);
+ break;
+ case 'c' :
+ gvc->common.config = true; break;
default :
cnt++;
if (*p != arg) *p = arg;
#endif
EXTERN unsigned char Verbose;
- EXTERN bool Reduce, MemTest, Config;
+ EXTERN bool Reduce, MemTest;
EXTERN char *HTTPServerEnVar;
EXTERN char *Output_file_name;
EXTERN int graphviz_errors;
static char *memtestItems = "\n\
-m - Memory test (Observe no growth with top. Kill when done.)\n";
-static char *configFlags = "(additional options for config) [-c]\n";
+static char *configFlags = "(additional options for config) [-cv]\n";
static char *configItems = "\n\
-c - Configure plugins (Writes $prefix/lib/graphviz/config \n\
- with available plugin information. Needs write priviledge.)\n";
+ with available plugin information. Needs write priviledge.)\n\
+ -v - Enable verbose mode \n";
void dotneato_usage(int exval)
{
Gvfilepath = getenv("GV_FILE_PATH");
/* configure for available plugins and codegens */
- gvconfig(gvc, Config);
- if (Config)
+ gvconfig(gvc, gvc->common.config);
+ if (gvc->common.config)
exit (0);
- CmdName = gvc->common.cmdname = dotneato_basename(argv[0]);
+ gvc->common.cmdname = dotneato_basename(argv[0]);
i = gvlayout_select(gvc, gvc->common.cmdname);
if (i == NO_SUPPORT)
gvlayout_select(gvc, "dot");
+ /* feed the globals */
+ Verbose = gvc->common.verbose;
+ CmdName = gvc->common.cmdname;
+
aginit();
nfiles = 0;
for (i = 1; i < argc; i++)
PSinputscale = POINTS_PER_INCH;
break;
case 'v':
- gvc->common.verbose = 1;
+/* already processed in args.c:config_extra_args() */
+#if 0
+ Verbose = 1;
if (isdigit(*(unsigned char *) rest))
- gvc->common.verbose = atoi(rest);
- Verbose = gvc->common.verbose;
+ Verbose = atoi(rest);
+#endif
break;
case 'x':
Reduce = TRUE;
{ "gvplugin_dot_layout_LTX_library", (void*)(&gvplugin_dot_layout_LTX_library) },
{ "gvplugin_neato_layout_LTX_library", (void*)(&gvplugin_neato_layout_LTX_library) },
{ "gvplugin_pango_LTX_library", (void*)(&gvplugin_gd_LTX_library) },
- { "gvplugin_gd_LTX_library", (void*)(&gvplugin_gd_LTX_library) },
{ "gvplugin_core_LTX_library", (void*)(&gvplugin_core_LTX_library) },
{ 0, 0 }
};
char **info;
char *cmdname;
int verbose;
+ bool config;
void (*errorfn) (char *fmt, ...);
char **show_boxes; /* emit code for correct box coordinates */
char **lib;
for (i = 0; i < globbuf.gl_pathc; i++) {
re_status = regexec(&re, globbuf.gl_pathv[i], (size_t) 0, NULL, 0);
if (re_status == 0) {
- library = gvplugin_library_load(globbuf.gl_pathv[i]);
+ library = gvplugin_library_load(gvc, globbuf.gl_pathv[i]);
if (library) {
gvconfig_plugin_install_from_library(gvc, globbuf.gl_pathv[i], library);
path = strrchr(globbuf.gl_pathv[i],'/');
char *typestr, int quality, char *packagename, char *path,
gvplugin_installed_t * typeptr);
extern gvplugin_available_t *gvplugin_load(GVC_t * gvc, api_t api, char *type);
- extern gvplugin_library_t *gvplugin_library_load(char *path);
+ extern gvplugin_library_t *gvplugin_library_load(GVC_t *gvc, char *path);
extern const char *gvplugin_list(GVC_t * gvc, api_t api, char *str);
extern api_t gvplugin_api(char *str);
extern char * gvplugin_api_name(api_t api);
return TRUE;
}
-gvplugin_library_t *gvplugin_library_load(char *path)
+gvplugin_library_t *gvplugin_library_load(GVC_t *gvc, char *path)
{
#ifdef ENABLE_LTDL
lt_dlhandle hndl;
agerr(AGWARN, (char*)lt_dlerror());
return NULL;
}
+ if (gvc->common.verbose >= 2)
+ fprintf(stderr, "Loading %s\n", p);
s = strrchr(p, '/');
len = strlen(s);
rv = *pnext;
if ((*pnext) && (*pnext)->typeptr == NULL) {
rv = NULL;
- library = gvplugin_library_load((*pnext)->path);
+ library = gvplugin_library_load(gvc, (*pnext)->path);
if (library) {
/*