From 80767bc9732bf6716697198e53ff2cb8d4ae96be Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Wed, 12 Aug 2026 18:23:17 -1000 Subject: Restyle the sources and fix the audit's findings --- source/parsing.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 source/parsing.h (limited to 'source/parsing.h') 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 -- cgit v2.8.0