Crossings Minimization
1.0
|
Module for reading files in .dot format. More...
#include <stdio.h>
#include <stdbool.h>
Go to the source code of this file.
Functions | |
void | initDot (FILE *in) |
void | getNameFromDotFile (char *buffer) |
bool | nextEdge (FILE *in, char *source_buffer, char *destination_buffer) |
void | dotPreamble (FILE *out, const char *graph_name, const char *initial_comment) |
void | endDot (FILE *out) |
void | outputEdge (FILE *out, const char *src, const char *dst) |
Module for reading files in .dot format.
Definition in file dot.h.
void dotPreamble | ( | FILE * | out, |
const char * | graph_name, | ||
const char * | initial_comment | ||
) |
Writes the first part of a dot file to the output stream: comments about how the graph was created and seed information
Definition at line 210 of file dot.c.
Referenced by outputEdge(), and writeDot().
void endDot | ( | FILE * | out | ) |
Writes the final '}'
Definition at line 217 of file dot.c.
Referenced by outputEdge(), and writeDot().
void getNameFromDotFile | ( | char * | buffer | ) |
Stores the name of the graph in the given buffer. Assumes the buffer is large enough.
Definition at line 167 of file dot.c.
References graph_name.
Referenced by allocateAdjacencyLists().
void initDot | ( | FILE * | in | ) |
Stores information about the dot file and advances the input to the point where edges can be read. NOTE: information in an initial comment is lost
Definition at line 144 of file dot.c.
References error(), error_message, graph_name, MAX_NAME_LENGTH, and skip_blanks_and_comments().
Referenced by allocateAdjacencyLists(), createEdges(), and outputEdge().
bool nextEdge | ( | FILE * | in, |
char * | source_buffer, | ||
char * | destination_buffer | ||
) |
Reads the next edge from the input, storing the names of the vertices in buffers. Assumes the buffers are large enough.
Definition at line 172 of file dot.c.
References error(), error_message, read_identifier(), and skip_blanks_and_comments().
Referenced by allocateAdjacencyLists(), createEdges(), and outputEdge().
void outputEdge | ( | FILE * | out, |
const char * | src, | ||
const char * | dst | ||
) |
Writes the edge (src, dst) to the output
Definition at line 222 of file dot.c.
References dotPreamble(), endDot(), initDot(), main(), nextEdge(), and outputEdge().
Referenced by outputEdge(), and writeDot().