Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
cvtgxl.c File Reference

GXL converting program More...

#include "config.h"
#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
#include "convert.h"
#include "openFile.h"
#include <cgraph/ingraphs.h>
#include <util/exit.h>
#include <util/gv_ctype.h>
Include dependency graph for cvtgxl.c:

Go to the source code of this file.

Enumerations

enum  mode { Unset , ToGV , ToGXL }
 

Functions

static void usage (int v)
 
static char * cmdName (char *path)
 
static void checkInput (void)
 
static void setAction (void)
 
static void initargs (int argc, char **argv)
 
int main (int argc, char **argv)
 

Variables

static FILE * outFile
 
static char * CmdName
 
static char ** Files
 
static mode act = Unset
 
static const char * use
 

Enumeration Type Documentation

◆ mode

enum mode
Enumerator
Unset 
ToGV 
ToGXL 

Definition at line 33 of file cvtgxl.c.

Function Documentation

◆ checkInput()

static void checkInput ( void  )
static

Definition at line 95 of file cvtgxl.c.

References act, Files, ToGV, and ToGXL.

Referenced by setAction().

Here is the caller graph for this function:

◆ cmdName()

static char * cmdName ( char *  path)
static

Definition at line 78 of file cvtgxl.c.

References NULL.

Referenced by initargs().

Here is the caller graph for this function:

◆ initargs()

static void initargs ( int  argc,
char **  argv 
)
static

Definition at line 130 of file cvtgxl.c.

References act, CmdName, cmdName(), Files, graphviz_exit(), NULL, openFile(), outFile, setAction(), ToGV, ToGXL, Unset, and usage.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 178 of file cvtgxl.c.

References act, agclose(), agwrite(), Files, G, getFile(), graphviz_exit(), gv_to_gxl(), inFile, initargs(), newIngraph(), nextGraph(), outFile, prev, and ToGXL.

Here is the call graph for this function:

◆ setAction()

static void setAction ( void  )
static

Definition at line 111 of file cvtgxl.c.

References act, checkInput(), CmdName, Files, gv_tolower(), ToGV, ToGXL, Unset, and usage.

Referenced by initargs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ usage()

static void usage ( int  v)
static

Definition at line 72 of file cvtgxl.c.

References CmdName, graphviz_exit(), and use.

Here is the call graph for this function:

Variable Documentation

◆ act

mode act = Unset
static

Definition at line 38 of file cvtgxl.c.

Referenced by checkInput(), initargs(), main(), and setAction().

◆ CmdName

char* CmdName
static

Definition at line 36 of file cvtgxl.c.

Referenced by initargs(), setAction(), and usage().

◆ Files

char** Files
static

Definition at line 37 of file cvtgxl.c.

Referenced by checkInput(), initargs(), main(), and setAction().

◆ outFile

FILE* outFile
static

Definition at line 35 of file cvtgxl.c.

Referenced by initargs(), and main().

◆ use

const char* use
static
Initial value:
= "Usage: %s [-gd?] [-o<file>] [<graphs>]\n\
-g : convert to GXL\n\
-d : convert to GV\n\
-o<file> : output to <file> (stdout)\n\
-? : usage\n"

Definition at line 66 of file cvtgxl.c.

Referenced by usage().