summaryrefslogtreecommitdiff
path: root/system/mandoc/less.patch
diff options
context:
space:
mode:
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) {