|
$ dot
Error: /usr/local/lib/graphviz/config is zero sized, or other read error.
assertion "v" failed: file "input.c", line 317
5 [sig] dot 1420 C:\cygwin\usr\local\bin\dot.exe: *** fatal error - called with threadlist_ix -1
Hangup
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//the content of input.c
void dotneato_args_initialize(GVC_t * gvc, int argc, char **argv)
{
char *rest, c, *val;
int i, v, nfiles;
/* establish if we are running in a CGI environment */
HTTPServerEnVar = getenv("SERVER_NAME");
/* establish Gvfilepath, if any */
Gvfilepath = getenv("GV_FILE_PATH");
/* configure for available plugins and codegens */
gvconfig(gvc, gvc->common.config);
if (gvc->common.config)
exit (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++)
if (argv && argv[0] != '-')
nfiles++;
gvc->input_filenames = N_NEW(nfiles + 1, char *);
nfiles = 0;
for (i = 1; i < argc; i++) {
if (argv && argv[0] == '-') {
rest = &(argv[2]);
switch (c = argv[1]) {
case 'G':
if (*rest)
global_def(rest, agraphattr);
else {
fprintf(stderr, "Missing argument for -G flag\n");
dotneato_usage(1);
}
break;
case 'N':
if (*rest)
global_def(rest, agnodeattr);
else {
fprintf(stderr, "Missing argument for -N flag\n");
dotneato_usage(1);
}
break;
case 'E':
if (*rest)
global_def(rest, agedgeattr);
else {
fprintf(stderr, "Missing argument for -E flag\n");
dotneato_usage(1);
}
break;
case 'T':
val = getFlagOpt(argc, argv, &i);
if (!val) {
fprintf(stderr, "Missing argument for -T flag\n");
dotneato_usage(1);
exit(1);
}
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));
exit(1);
}
break;
case 'K':
val = getFlagOpt(argc, argv, &i);
if (!val) {
fprintf(stderr, "Missing argument for -K flag\n");
dotneato_usage(1);
exit(1);
}
v = gvlayout_select(gvc, val);
if (v == NO_SUPPORT) {
fprintf(stderr, "Layout type: \"%s\" not recognized. Use one of:%s\n",
val, gvplugin_list(gvc, API_layout, val));
exit(1);
}
break;
case 'V':
fprintf(stderr, "%s - %s version %s (%s)\n",
gvc->common.cmdname, gvc->common.info[0],
gvc->common.info[1], gvc->common.info[2]);
exit(0);
break;
case 'l':
val = getFlagOpt(argc, argv, &i);
if (!val) {
fprintf(stderr, "Missing argument for -l flag\n");
dotneato_usage(1);
}
use_library(gvc, val);
break;
case 'o':
val = getFlagOpt(argc, argv, &i);
if (! gvc->common.auto_outfile_names)
gvjobs_output_filename(gvc, val);
break;
case 'q':
if (*rest) {
v = atoi(rest);
if (v <= 0) {
fprintf(stderr,
"Invalid parameter \"%s\" for -q flag - ignored\n",
rest);
} else if (v == 1)
agseterr(AGERR);
else
agseterr(AGMAX);
} else
agseterr(AGERR);
break;
case 's':
if (*rest) {
PSinputscale = atof(rest);
if (PSinputscale <= 0) {
fprintf(stderr,
"Invalid parameter \"%s\" for -s flag\n",
rest);
dotneato_usage(1);
}
} else
PSinputscale = POINTS_PER_INCH;
break;
case 'x':
Reduce = TRUE;
break;
case 'y':
Y_invert = TRUE;
break;
case '?':
dotneato_usage(0);
break;
default:
fprintf(stderr, "%s: option -%c unrecognized\n\n", gvc->common.cmdname,
c);
dotneato_usage(1);
}
} else if (argv)
gvc->input_filenames[nfiles++] = argv;
}
/* if no -Txxx, then set default format */
if (!gvc->jobs || !gvc->jobs->output_langname) {
v = gvjobs_output_langname(gvc, "dot");
assert(v); /* "dot" should always be available as an output format */ 这里是第317行
}
#if defined(WITH_CODEGENS) && !defined(HAVE_GD_FREETYPE)
Output_codegen = gvc->jobs->codegen;
#endif
/* set persistent attributes here (if not already set from command line options) */
if (!(agfindattr(agprotograph()->proto->n, "label")))
agnodeattr(NULL, "label", NODENAME_ESC);
} |
|