From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin-patches@cygwin.com
Cc: Takashi Yano <takashi.yano@nifty.ne.jp>
Subject: [PATCH 1/4] Cygwin: pty: Define mask_switch_to_pcon_in() in fhandler_tty.cc.
Date: Sun, 09 Feb 2020 14:46:00 -0000 [thread overview]
Message-ID: <20200209144603.389-2-takashi.yano@nifty.ne.jp> (raw)
In-Reply-To: <20200209144603.389-1-takashi.yano@nifty.ne.jp>
- This patch moves the definition of mask_switch_to_pcon() from
fhandler.h to fhandler_tty.cc.
---
winsup/cygwin/fhandler.h | 9 +--------
winsup/cygwin/fhandler_tty.cc | 10 ++++++++++
2 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index 82527eca3..53b6c2c45 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
@@ -2207,14 +2207,7 @@ class fhandler_pty_slave: public fhandler_pty_common
void set_switch_to_pcon (int fd);
void reset_switch_to_pcon (void);
void push_to_pcon_screenbuffer (const char *ptr, size_t len);
- void mask_switch_to_pcon_in (bool mask)
- {
- if (!mask && get_ttyp ()->pcon_pid &&
- get_ttyp ()->pcon_pid != myself->pid &&
- !!pinfo (get_ttyp ()->pcon_pid))
- return;
- get_ttyp ()->mask_switch_to_pcon_in = mask;
- }
+ void mask_switch_to_pcon_in (bool mask);
void fixup_after_attach (bool native_maybe, int fd);
bool is_line_input (void)
{
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc
index 181bed5a9..a92bcfc40 100644
--- a/winsup/cygwin/fhandler_tty.cc
+++ b/winsup/cygwin/fhandler_tty.cc
@@ -1395,6 +1395,16 @@ fhandler_pty_slave::write (const void *ptr, size_t len)
return towrite;
}
+void
+fhandler_pty_slave::mask_switch_to_pcon_in (bool mask)
+{
+ if (!mask && get_ttyp ()->pcon_pid &&
+ get_ttyp ()->pcon_pid != myself->pid &&
+ !!pinfo (get_ttyp ()->pcon_pid))
+ return;
+ get_ttyp ()->mask_switch_to_pcon_in = mask;
+}
+
bool
fhandler_pty_common::to_be_read_from_pcon (void)
{
--
2.21.0
next prev parent reply other threads:[~2020-02-09 14:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-09 15:00 [PATCH 0/4] Remove debug codes and organize with some fixes Takashi Yano
2020-02-09 14:46 ` [PATCH 2/4] Cygwin: pty: Avoid screen distortion on slave read Takashi Yano
2020-02-09 14:46 ` [PATCH 4/4] Cygwin: pty: Add missing member initialization for struct pipe_reply Takashi Yano
2020-02-09 14:46 ` [PATCH 3/4] Cygwin: pty: Remove debug codes and organize related codes Takashi Yano
2020-02-09 14:46 ` Takashi Yano [this message]
2020-02-10 10:04 ` [PATCH 0/4] Remove debug codes and organize with some fixes Corinna Vinschen
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=20200209144603.389-2-takashi.yano@nifty.ne.jp \
--to=takashi.yano@nifty.ne.jp \
--cc=cygwin-patches@cygwin.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).