1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-12 16:48:06 -05:00

Security fascists might claim that logging every keypress to stderr is a bad

idea, so stop doing that (only in the Mac port, so not actually much of a
problem).

[originally from svn r2737]
This commit is contained in:
Ben Harris 2003-01-28 00:17:17 +00:00
parent d5e459f9dd
commit 28edf621aa

View File

@ -4045,12 +4045,14 @@ void term_key(Terminal *term, Key_Sym keysym, wchar_t *text, size_t tlen,
char output[10]; char output[10];
char *p = output; char *p = output;
int prependesc = FALSE; int prependesc = FALSE;
#if 0
int i; int i;
fprintf(stderr, "keysym = %d, %d chars:", keysym, tlen); fprintf(stderr, "keysym = %d, %d chars:", keysym, tlen);
for (i = 0; i < tlen; i++) for (i = 0; i < tlen; i++)
fprintf(stderr, " %04x", text[i]); fprintf(stderr, " %04x", text[i]);
fprintf(stderr, "\n"); fprintf(stderr, "\n");
#endif
/* XXX Num Lock */ /* XXX Num Lock */
if ((flags & PKF_REPEAT) && term->repeat_off) if ((flags & PKF_REPEAT) && term->repeat_off)
@ -4440,23 +4442,27 @@ void term_key(Terminal *term, Key_Sym keysym, wchar_t *text, size_t tlen,
term_seen_key_event(term); term_seen_key_event(term);
if (prependesc) { if (prependesc) {
#if 0
fprintf(stderr, "sending ESC\n"); fprintf(stderr, "sending ESC\n");
#endif
ldisc_send(term->ldisc, "\x1b", 1, 1); ldisc_send(term->ldisc, "\x1b", 1, 1);
} }
if (p > output) { if (p > output) {
#if 0
fprintf(stderr, "sending %d bytes:", p - output); fprintf(stderr, "sending %d bytes:", p - output);
for (i = 0; i < p - output; i++) for (i = 0; i < p - output; i++)
fprintf(stderr, " %02x", output[i]); fprintf(stderr, " %02x", output[i]);
fprintf(stderr, "\n"); fprintf(stderr, "\n");
#endif
ldisc_send(term->ldisc, output, p - output, 1); ldisc_send(term->ldisc, output, p - output, 1);
} else if (tlen > 0) { } else if (tlen > 0) {
#if 0
fprintf(stderr, "sending %d unichars:", tlen); fprintf(stderr, "sending %d unichars:", tlen);
for (i = 0; i < tlen; i++) for (i = 0; i < tlen; i++)
fprintf(stderr, " %04x", text[i]); fprintf(stderr, " %04x", text[i]);
fprintf(stderr, "\n"); fprintf(stderr, "\n");
#endif
luni_send(term->ldisc, text, tlen, 1); luni_send(term->ldisc, text, tlen, 1);
} }
} }