summaryrefslogtreecommitdiff
path: root/ttymodes.c
diff options
context:
space:
mode:
Diffstat (limited to 'ttymodes.c')
-rw-r--r--ttymodes.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/ttymodes.c b/ttymodes.c
index 845139635..f9fdb92de 100644
--- a/ttymodes.c
+++ b/ttymodes.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ttymodes.c,v 1.32 2017/04/30 23:26:54 djm Exp $ */ 1/* $OpenBSD: ttymodes.c,v 1.33 2018/02/16 04:43:11 dtucker Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -56,6 +56,7 @@
56#include "log.h" 56#include "log.h"
57#include "compat.h" 57#include "compat.h"
58#include "buffer.h" 58#include "buffer.h"
59#include "compat.h"
59 60
60#define TTY_OP_END 0 61#define TTY_OP_END 0
61/* 62/*
@@ -308,9 +309,15 @@ tty_make_modes(int fd, struct termios *tiop)
308 buffer_put_char(&buf, OP); \ 309 buffer_put_char(&buf, OP); \
309 buffer_put_int(&buf, special_char_encode(tio.c_cc[NAME])); 310 buffer_put_int(&buf, special_char_encode(tio.c_cc[NAME]));
310 311
312#define SSH_TTYMODE_IUTF8 42 /* for SSH_BUG_UTF8TTYMODE */
313
311#define TTYMODE(NAME, FIELD, OP) \ 314#define TTYMODE(NAME, FIELD, OP) \
312 buffer_put_char(&buf, OP); \ 315 if (OP == SSH_TTYMODE_IUTF8 && (datafellows & SSH_BUG_UTF8TTYMODE)) { \
313 buffer_put_int(&buf, ((tio.FIELD & NAME) != 0)); 316 debug3("%s: SSH_BUG_UTF8TTYMODE", __func__); \
317 } else { \
318 buffer_put_char(&buf, OP); \
319 buffer_put_int(&buf, ((tio.FIELD & NAME) != 0)); \
320 }
314 321
315#include "ttymodes.h" 322#include "ttymodes.h"
316 323