~exprez135/mountaen

ref: 8057a410ee57c26aa960a1a6a92cb8184907623f mountaen/src/projects/arvelie/main.c -rw-r--r-- 459 bytes
8057a410Nate Ijams Remove Fosstodon reference. 6 months ago
                                                                                
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
#include <stdio.h>
#include <time.h>

#include "../../helpers.h"
#include "arvelie.h"

int
error(char* msg, char* val)
{
	printf("Error: %s(%s)\n", msg, val);
	return 1;
}

int
main(int argc, char* argv[])
{
	if(argc > 1) {
		if(slen(argv[1]) == 10)
			print_arvelie_from_ymdstr(argv[1]);
		else if(slen(argv[1]) == 5)
			print_ymdstr_from_arvelie(argv[1]);
		else {
			return error("Misformatted Input", "");
		}
	} else {
		print_arvelie();
	}
	return 0;
}