projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove the NO_SECURITY define I accidentally copied from Pageant
[u/mdw/putty]
/
terminal.c
diff --git
a/terminal.c
b/terminal.c
index
a14fb9d
..
12ad1e9
100644
(file)
--- a/
terminal.c
+++ b/
terminal.c
@@
-1,11
+1,4
@@
#include <windows.h>
#include <windows.h>
-#ifndef AUTO_WINSOCK
-#ifdef WINSOCK_TWO
-#include <winsock2.h>
-#else
-#include <winsock.h>
-#endif
-#endif
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
@@
-212,9
+205,10
@@
void term_update(void) {
ctx = get_ctx();
if (ctx) {
if ( (seen_key_event && (cfg.scroll_on_key)) ||
ctx = get_ctx();
if (ctx) {
if ( (seen_key_event && (cfg.scroll_on_key)) ||
- (seen_disp_event && (
!cfg.scroll_on_key
)) ) {
+ (seen_disp_event && (
cfg.scroll_on_disp
)) ) {
disptop = scrtop;
seen_disp_event = seen_key_event = 0;
disptop = scrtop;
seen_disp_event = seen_key_event = 0;
+ update_sbar();
}
do_paint (ctx, TRUE);
sys_cursor(curs_x, curs_y + (scrtop - disptop) / (cols+1));
}
do_paint (ctx, TRUE);
sys_cursor(curs_x, curs_y + (scrtop - disptop) / (cols+1));
@@
-2055,24
+2049,27
@@
void term_mouse (Mouse_Button b, Mouse_Action a, int x, int y) {
}
while (q < nlpos && q < selend)
{
}
while (q < nlpos && q < selend)
{
+#if 0
/* VT Specials -> ISO8859-1 */
static const char poorman2[] =
"* # HTFFCRLF\xB0 \xB1 NLVT+ + + + + - - - - - + + + + | <=>=PI!=\xA3 \xB7 ";
/* VT Specials -> ISO8859-1 */
static const char poorman2[] =
"* # HTFFCRLF\xB0 \xB1 NLVT+ + + + + - - - - - + + + + | <=>=PI!=\xA3 \xB7 ";
+#endif
int ch = (*q & CHAR_MASK);
int ch = (*q & CHAR_MASK);
- if ((*q & ATTR_LINEDRW) && ch >= 0x60 && ch < 0x7F )
- {
+#if 0
+
if ((*q & ATTR_LINEDRW) && ch >= 0x60 && ch < 0x7F)
{
int x;
*p++ = poorman2[2*(ch-0x60)];
if ( (x = poorman2[2*(ch-0x60)+1]) != ' ')
*p++ = x;
int x;
*p++ = poorman2[2*(ch-0x60)];
if ( (x = poorman2[2*(ch-0x60)+1]) != ' ')
*p++ = x;
- }
+ } else
+#endif
#if 0
#if 0
-
else
if ((*q & ATTR_GBCHR) && ch == '#')
+ if ((*q & ATTR_GBCHR) && ch == '#')
*p++ = (unsigned char) 0xA3;
*p++ = (unsigned char) 0xA3;
-#endif
else
else
+#endif
*p++ = (unsigned char) ch;
q++;
}
*p++ = (unsigned char) ch;
q++;
}
@@
-2146,7
+2143,7
@@
void term_nopaste() {
}
void term_paste() {
}
void term_paste() {
-static long last_paste = 0;
+
static long last_paste = 0;
long now, paste_diff;
if(paste_len == 0) return;
long now, paste_diff;
if(paste_len == 0) return;
@@
-2162,10
+2159,15
@@
static long last_paste = 0;
while(paste_pos<paste_len)
{
while(paste_pos<paste_len)
{
- char c = paste_buffer[paste_pos++];
- ldisc->send (&c, 1);
+ int n = 0;
+ while (n + paste_pos < paste_len) {
+ if (paste_buffer[paste_pos + n++] == '\r')
+ break;
+ }
+ ldisc->send (paste_buffer+paste_pos, n);
+ paste_pos += n;
- if (
c =='\r'
) {
+ if (
paste_pos < paste_len
) {
paste_hold = 1;
return;
}
paste_hold = 1;
return;
}
@@
-2184,3
+2186,14
@@
void term_deselect (void) {
deselect();
term_update();
}
deselect();
term_update();
}
+
+/*
+ * from_backend(), to get data from the backend for the terminal.
+ */
+void from_backend(int is_stderr, char *data, int len) {
+ while (len--) {
+ if (inbuf_head >= INBUF_SIZE)
+ term_out();
+ inbuf[inbuf_head++] = *data++;
+ }
+}