* mdocml: If we aren't on a tty, clear the pager flag up front.
@ 2015-07-19 0:08 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2015-07-19 0:08 UTC (permalink / raw)
To: source
Log Message:
-----------
If we aren't on a tty, clear the pager flag up front.
Just to clean up code structure, no functional change.
Modified Files:
--------------
mdocml:
main.c
Revision Data
-------------
Index: main.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/main.c,v
retrieving revision 1.240
retrieving revision 1.241
diff -Lmain.c -Lmain.c -u -p -r1.240 -r1.241
--- main.c
+++ main.c
@@ -419,6 +419,9 @@ main(int argc, char *argv[])
if (search.argmode == ARG_FILE && ! moptions(&options, auxpaths))
return((int)MANDOCLEVEL_BADARG);
+ if (pager_pid == 1 && isatty(STDOUT_FILENO) == 0)
+ pager_pid = 0;
+
curp.mchars = mchars_alloc();
curp.mp = mparse_alloc(options, curp.wlevel, mmsg,
curp.mchars, defos);
@@ -430,7 +433,7 @@ main(int argc, char *argv[])
mparse_keep(curp.mp);
if (argc < 1) {
- if (pager_pid == 1 && isatty(STDOUT_FILENO))
+ if (pager_pid == 1)
pager_pid = spawn_pager();
parse(&curp, STDIN_FILENO, "<stdin>");
}
@@ -442,7 +445,7 @@ main(int argc, char *argv[])
rc = rctmp;
if (fd != -1) {
- if (pager_pid == 1 && isatty(STDOUT_FILENO))
+ if (pager_pid == 1)
pager_pid = spawn_pager();
if (resp == NULL)
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-07-19 0:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-19 0:08 mdocml: If we aren't on a tty, clear the pager flag up front schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).