aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
blob: 1ab1ebcf50c71a8b7c44f74ded65cd1e9135153c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "cycleDetection.h"

#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv) {
	if(argc < 2) {
		printf("Missing argument: input file\n");
		printf("Usage:\n");
		printf("%s <filename>\n", argv[0]);
		return 1;
	}
	
	Graph *g = Graph_read(argv[1]);
	if(!g) return 2;
	cycleDetection(g);
	Graph_delete(g);
	return 0;
}