summaryrefslogtreecommitdiffstats
path: root/main.c
blob: 5a87c718ba36529d6477c9d9a64b527cdc35fbe3 (plain) (blame)
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
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "parser.h"

#define MAX_LINE_LEN 1024


int main(int argc, char** argv) {
	
	char line[MAX_LINE_LEN];
	struct md_token* mt = malloc(sizeof(struct md_token));
	if (!mt) {
		return -1;
	}

	mt->idx = 0;

	while(fgets(line, sizeof(line), stdin) != NULL) {
		mt->line_len = strlen(line);
		mt->line = line;
		if (line[0] == '#') {
			int a  = parse_title(mt);
		} else {
			parse_content(mt);
		}



		mt->idx = 0;
	}
	return 0;
}