aboutsummaryrefslogtreecommitdiff
path: root/test/main.c
blob: 4204893f044c3b1f0d8546fd4dc46385e44682fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "../properties.h"

int
main(int argc, char **argv)
{
	FILE *file;

	for (int i = 1; i < argc; i++) {
		if (strcmp(argv[i], "-f") == 0 && (i + 1) < argc) {
			file = fopen(argv[i + 1], "r");
			break;
		}
	}

	properties_load(file);

	return EXIT_SUCCESS;
}