1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-03 20:42:48 -05:00

Remove FLAG_STDERR_TTY.

It really had no need to be a global process flag at all: it's used to
signal to uxcons.c that stderr_tty_init() ought to check whether
stderr is a tty (in order to save its termios across interactive
prompts and so forth). But the only _caller_ of stderr_tty_init is
Unix Plink, which always sets that flag! So we already have a
perfectly good system for signalling to uxcons.c that you'd like
stderr_tty_init to do something: _whether you call it or not_.
This commit is contained in:
Simon Tatham
2020-01-30 06:40:21 +00:00
parent dc59fcf8e3
commit 6e85d3fe60
3 changed files with 3 additions and 15 deletions

View File

@ -101,18 +101,6 @@ unsigned long getticks(void);
#define WCHAR wchar_t
#define BYTE unsigned char
/*
* Unix-specific global flag
*
* FLAG_STDERR_TTY indicates that standard error might be a terminal and
* might get its configuration munged, so anything trying to output plain
* text (i.e. with newlines in it) will need to put it back into cooked
* mode first. Applications setting this flag should also call
* stderr_tty_init() before messing with any terminal modes, and can call
* premsg() before outputting text to stderr and postmsg() afterwards.
*/
#define FLAG_STDERR_TTY 0x1000
#define PLATFORM_CLIPBOARDS(X) \
X(CLIP_PRIMARY, "X11 primary selection") \
X(CLIP_CLIPBOARD, "XDG clipboard") \
@ -305,7 +293,7 @@ extern char *pty_osx_envrestore_prefix;
/* Things provided by uxcons.c */
struct termios;
void stderr_tty_init(void);
void stderr_tty_init(void); /* call at startup if stderr might be a tty */
void premsg(struct termios *);
void postmsg(struct termios *);