summaryrefslogtreecommitdiff
path: root/nebula2.c
blob: 480dfa23edb81d675c830c38b3b4c1bd27113d40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "config.h"

void
usage(void) {
	fputs("nebula2 needs the name of a config file as 1st argument.\n", stderr);
}

int
main(int argc, char** argv) {
	int       rv   = 1;
	config_t* conf = NULL;

	if(argc < 2) {
		usage();
		goto tidyup;
	}

	if(!conf_load(argv[1], &conf)) {
		goto tidyup;
	}

	conf_print(conf);

	/*nebula2(conf);*/

	rv = 0; /* All OK, we return with no error. */
tidyup:
	if(conf) {
		conf_destroy(conf);
	}

	return rv;
}