diff options
context:
space:
mode:
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Restyle the sources and fix the audit's findings
Diffstat (limited to 'source/parsing.h')
-rw-r--r--source/parsing.h20
1 file changed, 20 insertions, 0 deletions
diff --git a/source/parsing.h b/source/parsing.h
new file mode 100644
index 0000000..2230eaa
--- /dev/null
+++ b/source/parsing.h
@@ -0,0 +1,20 @@
+/*
+ * Readers that turn raw git object bodies and the incoming request URL into
+ * the records cgit renders from. Commit and tag objects arrive as flat text,
+ * so the work here is splitting off the headers and re-encoding the remaining
+ * free text into the page encoding.
+ */
+
+#ifndef CGIT_PARSING_H
+#define CGIT_PARSING_H
+
+#include "cgit.h"
+
+// Split PATH_INFO into the repository and the page it names, storing both in
+// ctx.qry.
+extern void cgit_parse_url(const char *url);
+
+extern struct commitinfo *cgit_parse_commit(struct commit *commit);
+extern struct taginfo *cgit_parse_tag(struct tag *tag);
+
+#endif // CGIT_PARSING_H