aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2016-07-10 14:05:13 +0000
committerIngo Schwarze <schwarze@openbsd.org>2016-07-10 14:05:13 +0000
commit5527a73ef7a800410492cccac7677654f316291f (patch)
tree7fd9c3fb65b0c829617f183db5c2674b77f44284
parent87de119a8d5be59dbd31d3e35769ad0fb01c86e7 (diff)
downloadmandoc-5527a73ef7a800410492cccac7677654f316291f.tar.gz
mandoc-5527a73ef7a800410492cccac7677654f316291f.tar.zst
mandoc-5527a73ef7a800410492cccac7677654f316291f.zip
On OpenBSD, more(1) is actually less(1) with a small number of
compatibility features - so we can safely use more -T on OpenBSD. But don't do that in the portable version: more -T is unlikely to work elsewhere. Issue reported by Svyatoslav Mishyn <juef at openmailbox dot org>.
-rw-r--r--main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.c b/main.c
index 86909344..a03ab0fe 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.267 2016/07/08 22:29:05 schwarze Exp $ */
+/* $Id: main.c,v 1.268 2016/07/10 14:05:13 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2012, 2014-2016 Ingo Schwarze <schwarze@openbsd.org>
@@ -1055,11 +1055,11 @@ spawn_pager(struct tag_files *tag_files)
break;
}
- /* For more(1) and less(1), use the tag file. */
+ /* For less(1), use the tag file. */
if ((cmdlen = strlen(argv[0])) >= 4) {
cp = argv[0] + cmdlen - 4;
- if (strcmp(cp, "less") == 0 || strcmp(cp, "more") == 0) {
+ if (strcmp(cp, "less") == 0) {
argv[argc++] = mandoc_strdup("-T");
argv[argc++] = tag_files->tfn;
}