NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Option -p in apropos(1)



On Mon, 16 May 2022 at 20:33:40 +0000 (UTC), RVP wrote:
>On Mon, 16 May 2022, Rocky Hotas wrote:
>>Pager formatting is enabled by default (so, it doesn't need neither
>>option -p, nor option -P), but the pager is not activated. Results
>>are presented as if the option was not specified.
>
>apropos should call pclose(). Please try this patch below:
>
>---START---
>diff -urN usr.sbin/makemandb.orig/apropos.c
usr.sbin/makemandb/apropos.c
>--- usr.sbin/makemandb.orig/apropos.c	2017-11-25 14:29:38.000000000
+0000
>+++ usr.sbin/makemandb/apropos.c	2022-05-16 20:26:55.134310194
+0000
>@@ -249,6 +249,7 @@
> 	if (aflags.format == APROPOS_HTML)
> 		fprintf(cbdata.out, "</table>\n</body>\n</html>\n");
>
>+	pclose(cbdata.out);
> 	free(query);
>
> 	if (aflags.sections) {
>---END---

Thanks for this, I've applied a similar patch to HEAD. Assuming
everyone's satisfied, I could request a pullup to netbsd-9.

Regards,

Dave



Home | Main Index | Thread Index | Old Index