Graphviz 12.0.1~dev.20240715.2254
Loading...
Searching...
No Matches
tred.c File Reference

transitive reduction filter for directed graphs More...

#include <cgraph/cgraph.h>
#include <cgraph/exit.h>
#include <cgraph/ingraphs.h>
#include <cgraph/unreachable.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
Include dependency graph for tred.c:

Go to the source code of this file.

Typedefs

typedef graphviz_tred_options_t opts_t
 

Functions

static void usage (int v)
 
static void init (opts_t *opts, int argc, char *argv[])
 
int main (int argc, char **argv)
 

Variables

static char ** Files
 
static char * CmdName
 
static char * useString
 

Typedef Documentation

◆ opts_t

Definition at line 39 of file tred.c.

Function Documentation

◆ init()

static void init ( opts_t opts,
int  argc,
char *  argv[] 
)
static

Definition at line 54 of file tred.c.

References CmdName, Files, NULL, opts, UNREACHABLE, usage, and opts_t::Verbose.

Referenced by main().

Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 96 of file tred.c.

References agclose(), agisdirected(), Files, graphviz_exit(), graphviz_tred(), init(), newIngraph(), nextGraph(), and opts.

Here is the call graph for this function:

◆ usage()

static void usage ( int  v)
static

Definition at line 48 of file tred.c.

References CmdName, graphviz_exit(), and useString.

Here is the call graph for this function:

Variable Documentation

◆ CmdName

char* CmdName
static

Definition at line 37 of file tred.c.

Referenced by init(), and usage().

◆ Files

char** Files
static

Definition at line 36 of file tred.c.

Referenced by init(), and main().

◆ useString

char* useString
static
Initial value:
= "Usage: %s [-vr?] <files>\n\
-o FILE - redirect output (default to stdout)\n\
-v - verbose (to stderr)\n\
-r - print removed edges to stderr\n\
-? - print usage\n\
If no files are specified, stdin is used\n"

Definition at line 41 of file tred.c.

Referenced by usage().