From 2d2dc33f91a1ba3b4bc5d7798ca1386a5bad44a1 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 6 Feb 2022 18:22:11 -0600 Subject: system/mandoc: Update to 1.14.6, miss Max terribly --- system/mandoc/less.patch | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) (limited to 'system/mandoc/less.patch') diff --git a/system/mandoc/less.patch b/system/mandoc/less.patch index 19d567365..51f79c453 100644 --- a/system/mandoc/less.patch +++ b/system/mandoc/less.patch @@ -7,24 +7,13 @@ function - maybe add it at some point. --- mandoc-1.14.5/main.c 2019-03-10 04:56:43.000000000 -0500 +++ mandoc-1.14.5/main.c 2020-06-05 01:59:10.640524340 -0500 -@@ -1170,8 +1170,9 @@ spawn_pager(struct tag_files *tag_files) - pager = getenv("MANPAGER"); - if (pager == NULL || *pager == '\0') - pager = getenv("PAGER"); -- if (pager == NULL || *pager == '\0') -- pager = "more -s"; -+ if (pager == NULL || *pager == '\0') { -+ pager = "less"; -+ } - cp = mandoc_strdup(pager); - - /* -@@ -1195,10 +1196,24 @@ spawn_pager(struct tag_files *tag_files) +@@ -1316,11 +1316,25 @@ spawn_pager(struct tag_files *tag_files) /* For less(1), use the tag file. */ use_ofn = 1; -#if HAVE_LESS_T - if ((cmdlen = strlen(argv[0])) >= 4) { + if (*outst->tag_files->tfn != '\0' && + (cmdlen = strlen(argv[0])) >= 4) { cp = argv[0] + cmdlen - 4; if (strcmp(cp, "less") == 0) { + /* @@ -43,16 +32,14 @@ function - maybe add it at some point. + "$"; +#if HAVE_LESS_T argv[argc++] = mandoc_strdup("-T"); - argv[argc++] = tag_files->tfn; + argv[argc++] = outst->tag_files->tfn; if (tag_files->tagname != NULL) { -@@ -1206,9 +1221,9 @@ spawn_pager(struct tag_files *tag_files) - argv[argc++] = tag_files->tagname; +@@ -1327,7 +1342,7 @@ spawn_pager(struct tag_files *tag_files) + argv[argc++] = tag_target; use_ofn = 0; } +#endif } } -#endif - if (use_ofn) - argv[argc++] = tag_files->ofn; - argv[argc] = NULL; + if (use_ofn) { -- cgit v1.2.3-70-g09d2