old-graph: Add the old graph implementation
[tig.git] / src / graph.c
blob0d6ebc97dcd30964f9b471b9c9e397416899d156
1 /* Copyright (c) 2006-2014 Jonas Fonseca <jonas.fonseca@gmail.com>
3 * This program is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU General Public License as
5 * published by the Free Software Foundation; either version 2 of
6 * the License, or (at your option) any later version.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
14 #include "tig/tig.h"
15 #include "tig/graph.h"
17 struct graph *init_graph_v1(void);
18 struct graph *init_graph_v2(void);
20 struct graph *
21 init_graph(enum graph_display display)
23 if (display == GRAPH_DISPLAY_V1)
24 return init_graph_v1();
25 if (display == GRAPH_DISPLAY_V2 || display == GRAPH_DISPLAY_NO_TOPO)
26 return init_graph_v2();
27 return NULL;
30 /* vim: set ts=8 sw=8 noexpandtab: */