31 static FILE *savef =
NULL;
42 if ((rv = fopen(
Files[
cnt++],
"r")) != 0)
45 fprintf(stderr,
"Can't open %s\n",
Files[
cnt - 1]);
52static char *
useString =
"Usage: %s [-v?] [-g<name>] [-o<file>] <files>\n\
53 -g<name> : use <name> as template for graph names\n\
55 -o<file> : output to <file> (stdout)\n\
57If no files are specified, stdin is used\n";
67 sp = strrchr(
path,
'/');
80 while ((c = getopt(argc, argv,
":g:vo:")) != -1) {
94 fprintf(stderr,
"%s: option -%c missing argument\n",
CmdName, optopt);
101 fprintf(stderr,
"%s: option -%c unrecognized\n",
CmdName, optopt);
129int main(
int argc,
char **argv) {
static void agxbfree(agxbuf *xb)
free any malloced resources
static int agxbprint(agxbuf *xb, const char *fmt,...)
Printf-style output to an agxbuf.
static WUR char * agxbuse(agxbuf *xb)
Memory allocation wrappers that exit on failure.
static NORETURN void graphviz_exit(int status)
static FILE * getFile(void)
static void initargs(int argc, char **argv)
static char * cmdName(char *path)
static char * nameOf(agxbuf *buf, char *name, int cnt)
Agraph_t * gml_to_gv(char *, FILE *, int, int *)
static int cnt(Dict_t *d, Dtlink_t **set)
int agnedges(Agraph_t *g)
int agnnodes(Agraph_t *g)
int agclose(Agraph_t *g)
deletes a graph, freeing its associated storage
int agwrite(Agraph_t *g, void *chan)
Return 0 on success, EOF on failure.
char * agnameof(void *)
returns a string descriptor for the object.
static const char * usage
static FILE * openFile(const char *argv0, const char *name, const char *mode)