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

make directed graph acyclic More...

#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <cgraph/cgraph.h>
#include "openFile.h"
#include <util/exit.h>
#include <util/prisize_t.h>
#include <util/unreachable.h>
#include <getopt.h>
Include dependency graph for acyclic.c:

Go to the source code of this file.

Macros

#define graphName(g)   (agnameof(g))
 

Typedefs

typedef graphviz_acyclic_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 FILE * inFile
 
static char * cmd
 
static char * useString
 

Macro Definition Documentation

◆ graphName

#define graphName (   g)    (agnameof(g))

Definition at line 32 of file acyclic.c.

Typedef Documentation

◆ opts_t

Definition at line 38 of file acyclic.c.

Function Documentation

◆ init()

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

Definition at line 54 of file acyclic.c.

References cmd, inFile, NULL, openFile(), opts, UNREACHABLE, usage, and opts_t::Verbose.

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 97 of file acyclic.c.

References agisdirected(), agread(), graphName, graphviz_acyclic(), graphviz_exit(), inFile, init(), NULL, opts, PRISIZE_T, and opts_t::Verbose.

Here is the call graph for this function:

◆ usage()

static void usage ( int  v)
static

Definition at line 48 of file acyclic.c.

References cmd, graphviz_exit(), and useString.

Here is the call graph for this function:

Variable Documentation

◆ cmd

◆ inFile

FILE* inFile
static

Definition at line 36 of file acyclic.c.

Referenced by init(), main(), and main().

◆ useString

char* useString
static
Initial value:
= "Usage: %s [-nv?] [-o outfile] <file>\n\
-o <file> - put output in <file>\n\
-n - do not output graph\n\
-v - verbose\n\
-? - print usage\n"

Definition at line 42 of file acyclic.c.

Referenced by usage().