From 75450307c0c5a0fdf9826e5b06bdf252cfe22df0 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sun, 6 Sep 2026 20:14:48 -1000 Subject: Trim the comments and dead code across the tree --- source/ui-atom.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'source/ui-atom.c') diff --git a/source/ui-atom.c b/source/ui-atom.c index 09d3501..3eb4332 100644 --- a/source/ui-atom.c +++ b/source/ui-atom.c @@ -28,9 +28,9 @@ static const char *feed_date(timestamp_t when) #define XML_REPLACEMENT "?" /* - * How many bytes the UTF-8 sequence at p holds, or 0 when the bytes there are - * not a valid sequence. The lead-byte ranges fold in the overlong, surrogate - * and out-of-range cases, so a 0 is the only error signal a caller needs. + * How many bytes the UTF-8 sequence at p holds, or 0 when invalid. The + * lead-byte ranges fold in the overlong, surrogate and out-of-range cases, + * so 0 is the only error signal a caller needs. */ static size_t utf8_seq_len(const unsigned char *p, size_t left) { @@ -61,10 +61,9 @@ static size_t utf8_seq_len(const unsigned char *p, size_t left) } /* - * The XML counterpart of html_txt. Commit metadata is arbitrary bytes, and - * where a browser shrugs at a stray control byte or a broken UTF-8 sequence, - * an XML reader must reject the whole feed, so both are replaced instead of - * passed through. + * The XML counterpart of html_txt. A browser shrugs at a stray control byte + * or broken UTF-8, but an XML reader must reject the whole feed, so both + * are replaced instead of passed through. */ static void xml_txt(const char *txt) { @@ -219,8 +218,7 @@ void cgit_print_atom(char *tip, const char *path, int max_count) prepare_revision_walk(&rev); // CGI guarantees a server name, so only a bare test run reaches the - // fallback, and a placeholder there keeps the mandatory feed id and - // the links present rather than dropping them. + // fallback, which keeps the mandatory feed id and links present. host = cgit_hosturl(); if (!host) host = xstrdup("localhost"); @@ -276,9 +274,8 @@ void cgit_print_atom(char *tip, const char *path, int max_count) commit->parents = NULL; } if (need_updated) { - // Atom makes a feed level updated mandatory, and an empty feed - // has no commit to take one from, so the epoch stands in and - // keeps the feed byte for byte stable. + // Atom makes a feed level updated mandatory, and an empty + // feed has no commit to take one from, so the epoch stands in. html(""); xml_txt(feed_date(0)); html("\n"); -- cgit v2.8.0