source@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: schwarze@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: If we aren't on a tty, clear the pager flag up front.
Date: Sat, 18 Jul 2015 19:08:12 -0500 (EST)	[thread overview]
Message-ID: <13551330259139816164.enqueue@fantadrom.bsd.lv> (raw)

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

                 reply	other threads:[~2015-07-19  0:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=13551330259139816164.enqueue@fantadrom.bsd.lv \
    --to=schwarze@mdocml.bsd.lv \
    --cc=source@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).