From 6c62bdc268ce8a8d98ab999846fcabd972507ad6 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Mon, 10 Aug 2026 19:29:44 -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 2.12.1