From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 29938 invoked from network); 7 Nov 2022 17:50:06 -0000 Received: from bsd.lv (HELO mandoc.bsd.lv) (66.111.2.12) by inbox.vuxu.org with ESMTPUTF8; 7 Nov 2022 17:50:06 -0000 Received: from fantadrom.bsd.lv (localhost [127.0.0.1]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id ed68de26 for ; Mon, 7 Nov 2022 12:50:02 -0500 (EST) Received: from sender11-op-o11.zoho.eu (sender11-op-o11.zoho.eu [31.186.226.225]) by mandoc.bsd.lv (OpenSMTPD) with ESMTP id 4a32a9ab for ; Mon, 7 Nov 2022 12:50:01 -0500 (EST) ARC-Seal: i=1; a=rsa-sha256; t=1667843400; cv=none; d=zohomail.eu; s=zohoarc; b=eV7r6P8FHGBCQtEOxmLsGFRCaW3IHDt8s9TULEXTUJpL3kdUw17zSMVh/Y9NyEUG7mq1cA+/PYcxm1EhPxeY/OR3MwuPxEqoE9DN239NksFtGis9+pzaoIXKOfZ/rG0/SKtc1os7tgRlvjUq8E9Av5VU/NBB6/EJoWkq5z4BDoc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1667843400; h=Content-Type:Content-Transfer-Encoding:Date:From:MIME-Version:Message-ID:Subject:To; bh=A8e/awInSnsLxkuH+cg4uS0eGm5PCkPcRQFgN0w+Odk=; b=lEmKvnB7iBD7mlxbopEzN7Euhcpxp5z242YFN7WSfeDcj94vSn65Yscq10G0TTXgXN2EWkERQ9SEYzJBTTv1T/7/EiipBTBtw2msroELfGyCBK3woCkRCA34iwVfQjyTl5IKZv8HbnNCbUZx3/sch9rBUJVi4FkVBc07gmlWyvo= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=placeviolette.net; spf=pass smtp.mailfrom=dev@placeviolette.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1667843400; s=zmail; d=placeviolette.net; i=dev@placeviolette.net; h=Message-ID:Subject:Subject:From:From:To:To:Date:Date:Content-Type:Content-Transfer-Encoding:MIME-Version:Message-Id:Reply-To:Cc; bh=A8e/awInSnsLxkuH+cg4uS0eGm5PCkPcRQFgN0w+Odk=; b=Z/MXw2xz2NFbmJVXAbxCGFGHf7vY06xkWQZD64fulll/6x6VA84r6Eg6e6iD0nY2 bvonf+g5yqWPcZRvP7nH6dNREb1v1YPfTVSyDcjxdFeUdiJV72uIfbXBkCJ3Eg9H2hw tiDAGb6BhtMU4qyTpArXDEzBPTmoTThAVqQBq+bY= Received: from prometheus.local (modemcable035.84-162-184.mc.videotron.ca [184.162.84.35]) by mx.zoho.eu with SMTPS id 1667843397697160.7352370644553; Mon, 7 Nov 2022 18:49:57 +0100 (CET) Message-ID: <4d6a587e4edb6a4bd7fc6c5a790e3cf9e16ed7a6.camel@placeviolette.net> Subject: [PATCH] man.cgi: support inserting HTML code into From: Abigail G To: tech@mandoc.bsd.lv Date: Mon, 07 Nov 2022 12:49:55 -0500 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 X-Mailinglist: mandoc-tech Reply-To: tech@mandoc.bsd.lv MIME-Version: 1.0 X-ZohoMailClient: External Similar to the header.html and footer.html files, this allows downstream users to include their own set of meta and other tags. Index: cgi.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/mandoc/cgi.c,v retrieving revision 1.180 diff -u -r1.180 cgi.c --- cgi.c 6 Jul 2022 17:21:04 -0000 1.180 +++ cgi.c 7 Nov 2022 17:32:35 -0000 @@ -413,11 +413,14 @@ printf("(%.*s)", secsz, sec); fputs(" - ", stdout); } - printf("%s\n" - "\n" - "\n", + printf("%s\n", CUSTOMIZE_TITLE); =20 + resp_copy(NULL, MAN_DIR "/head.html"); + + printf("\n" + "\n"); + return resp_copy("header", MAN_DIR "/header.html"); } =20 Index: man.cgi.3 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/mandoc/man.cgi.3,v retrieving revision 1.4 diff -u -r1.4 man.cgi.3 --- man.cgi.3 15 Mar 2017 13:18:53 -0000 1.4 +++ man.cgi.3 7 Nov 2022 17:32:35 -0000 @@ -240,8 +240,10 @@ .It Ft void Fn resp_begin_html "int code" "const char *msg" "const char *f= ile" This generator calls .Fn resp_begin_http -to print the HTTP headers, then prints the HTML header up to the -opening tag of the element, then copies the file +to print the HTTP headers, then prints the HTML header, then copies the fi= le +.Pa head.html +to the output, if it exists and is readable, then prints up to the opening= tag +of the element, then copies the file .Pa header.html to the output, if it exists and is readable. If Index: man.cgi.8 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/mandoc/man.cgi.8,v retrieving revision 1.24 diff -u -r1.24 man.cgi.8 --- man.cgi.8 6 Jul 2022 15:47:28 -0000 1.24 +++ man.cgi.8 7 Nov 2022 17:32:35 -0000 @@ -199,6 +199,7 @@ for this purpose. The files .Pa manpath.conf , +.Pa head.html , .Pa header.html , and .Pa footer.html @@ -380,6 +381,10 @@ .Sx Restricted character set , .Nm reports an internal server error and exits without doing anything. +.It Pa /man/head.html +An optional file containing static HTML code to be inserted right before +closing the element. +For example, it can contain additional tags or s to other res= ources. .It Pa /man/header.html An optional file containing static HTML code to be wrapped in a
element and inserted right after opening the element. -- To unsubscribe send an email to tech+unsubscribe@mandoc.bsd.lv