44 static FILE *savef =
NULL;
55 if ((rv = fopen(
Files[
cnt++],
"r")) != 0)
58 fprintf(stderr,
"Can't open %s\n",
Files[
cnt - 1]);
66static const char *
use =
"Usage: %s [-gd?] [-o<file>] [<graphs>]\n\
67 -g : convert to GXL\n\
69 -o<file> : output to <file> (stdout)\n\
82 sp = strrchr(
path,
'/');
88 char *sp2 = strrchr(sp,
'\\');
99 ep = strrchr(*
Files,
'.');
103 if (strcmp(ep,
"gv") == 0)
105 else if (strcmp(ep,
"dot") == 0)
107 else if (strcmp(ep,
"gxl") == 0)
125 fprintf(stderr,
"Cannot determine conversion type\n");
136 while ((c = getopt(argc, argv,
":gdo:")) != -1) {
150 fprintf(stderr,
"%s: option -%c missing argument\n",
CmdName, optopt);
156 fprintf(stderr,
"%s: option -%c unrecognized\n",
CmdName,
162 fprintf(stderr,
"cvtgxl: unexpected error\n");
199 while ((
G = gxl_to_gv(
inFile))) {
208 fputs(
"cvtgxl: not configured for conversion from GXL to GV\n",
DOT-GXL converter API for gxl2gv.c and gv2gxl.c.
void gv_to_gxl(Agraph_t *, FILE *)
static void checkInput(void)
static void initargs(int argc, char **argv)
static char * cmdName(char *path)
static void setAction(void)
static NORETURN void graphviz_exit(int status)
static FILE * getFile(void)
static int cnt(Dict_t *d, Dtlink_t **set)
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.
replacements for ctype.h functions
static char gv_tolower(int c)
static const char * usage
Agraph_t * nextGraph(ingraph_state *sp)
ingraph_state * newIngraph(ingraph_state *sp, char **files)
supports user-supplied data
static FILE * openFile(const char *argv0, const char *name, const char *mode)