projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Block SIGPIPE in Unix plink. In a port-forwarding run we may have lots
[u/mdw/putty]
/
terminal.c
diff --git
a/terminal.c
b/terminal.c
index
9865355
..
abb06e2
100644
(file)
--- a/
terminal.c
+++ b/
terminal.c
@@
-1538,6
+1538,8
@@
Terminal *term_init(Conf *myconf, struct unicode_data *ucsdata,
term->selstate = NO_SELECTION;
term->curstype = 0;
term->selstate = NO_SELECTION;
term->curstype = 0;
+ term_copy_stuff_from_conf(term);
+
term->screen = term->alt_screen = term->scrollback = NULL;
term->tempsblines = 0;
term->alt_sblines = 0;
term->screen = term->alt_screen = term->scrollback = NULL;
term->tempsblines = 0;
term->alt_sblines = 0;
@@
-1576,8
+1578,6
@@
Terminal *term_init(Conf *myconf, struct unicode_data *ucsdata,
term->basic_erase_char.cc_next = 0;
term->erase_char = term->basic_erase_char;
term->basic_erase_char.cc_next = 0;
term->erase_char = term->basic_erase_char;
- term_copy_stuff_from_conf(term);
-
return term;
}
return term;
}
@@
-5016,7
+5016,9
@@
static void do_paint(Terminal *term, Context ctx, int may_optimise)
break_run = ((tattr ^ attr) & term->attr_mask) != 0;
/* Special hack for VT100 Linedraw glyphs */
break_run = ((tattr ^ attr) & term->attr_mask) != 0;
/* Special hack for VT100 Linedraw glyphs */
- if (tchar >= 0x23BA && tchar <= 0x23BD)
+ if ((tchar >= 0x23BA && tchar <= 0x23BD) ||
+ (j > 0 && (newline[j-1].chr >= 0x23BA &&
+ newline[j-1].chr <= 0x23BD)))
break_run = TRUE;
/*
break_run = TRUE;
/*
@@
-6602,7
+6604,7
@@
int term_get_userpass_input(Terminal *term, prompts_t *p,
{
int i;
for (i = 0; i < (int)p->n_prompts; i++)
{
int i;
for (i = 0; i < (int)p->n_prompts; i++)
-
memset(p->prompts[i]->result, 0, p->prompts[i]->result_len
);
+
prompt_set_result(p->prompts[i], ""
);
}
}
}
}
@@
-6629,8
+6631,8
@@
int term_get_userpass_input(Terminal *term, prompts_t *p,
case 10:
case 13:
term_data(term, 0, "\r\n", 2);
case 10:
case 13:
term_data(term, 0, "\r\n", 2);
+ prompt_ensure_result_size(pr, s->pos + 1);
pr->result[s->pos] = '\0';
pr->result[s->pos] = '\0';
- pr->result[pr->result_len - 1] = '\0';
/* go to next prompt, if any */
s->curr_prompt++;
s->done_prompt = 0;
/* go to next prompt, if any */
s->curr_prompt++;
s->done_prompt = 0;
@@
-6665,10
+6667,9
@@
int term_get_userpass_input(Terminal *term, prompts_t *p,
* when we're doing password input, because some people
* have control characters in their passwords.
*/
* when we're doing password input, because some people
* have control characters in their passwords.
*/
- if ((!pr->echo ||
- (c >= ' ' && c <= '~') ||
- ((unsigned char) c >= 160))
- && s->pos < pr->result_len - 1) {
+ if (!pr->echo || (c >= ' ' && c <= '~') ||
+ ((unsigned char) c >= 160)) {
+ prompt_ensure_result_size(pr, s->pos + 1);
pr->result[s->pos++] = c;
if (pr->echo)
term_data(term, 0, &c, 1);
pr->result[s->pos++] = c;
if (pr->echo)
term_data(term, 0, &c, 1);