summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorverdant <i@glowisle.me>2026-05-24 13:55:39 +0800
committerverdant <i@glowisle.me>2026-05-24 13:55:39 +0800
commitb6fe9fc6a4f31d4fa0ddad7fdfd3324cd1c88d3e (patch)
treebe10b7b732e8358a0fa1bb0b407903fae1fa91c6 /main.c
downloadvmp-b6fe9fc6a4f31d4fa0ddad7fdfd3324cd1c88d3e.tar.gz
vmp-b6fe9fc6a4f31d4fa0ddad7fdfd3324cd1c88d3e.zip
Initial commit
Diffstat (limited to 'main.c')
-rw-r--r--main.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/main.c b/main.c
new file mode 100644
index 0000000..5a87c71
--- /dev/null
+++ b/main.c
@@ -0,0 +1,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;
+}