summaryrefslogtreecommitdiff
path: root/system/mandoc/less.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2022-02-06 18:22:11 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2022-05-01 17:05:51 -0500
commit2d2dc33f91a1ba3b4bc5d7798ca1386a5bad44a1 (patch)
tree6a1e970f1d7918384f70138bc9019b717b356114 /system/mandoc/less.patch
parentc9e728b2cc46dab566d44308a3c241956a3c11ce (diff)
downloadpackages-2d2dc33f91a1ba3b4bc5d7798ca1386a5bad44a1.tar.gz
packages-2d2dc33f91a1ba3b4bc5d7798ca1386a5bad44a1.tar.bz2
packages-2d2dc33f91a1ba3b4bc5d7798ca1386a5bad44a1.tar.xz
packages-2d2dc33f91a1ba3b4bc5d7798ca1386a5bad44a1.zip
system/mandoc: Update to 1.14.6, miss Max terribly
Diffstat (limited to 'system/mandoc/less.patch')
-rw-r--r--system/mandoc/less.patch27
1 files changed, 7 insertions, 20 deletions
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) {