|
119 | 119 | #include <sys/stat.h>
|
120 | 120 |
|
121 | 121 | #define isatty(a) WSHELPisatty(a)
|
| 122 | + |
| 123 | +// Windows Console screen size change related |
| 124 | +extern int ScreenX; |
| 125 | +extern int ScrollBottom; |
| 126 | +int win_received_window_change_signal = 1; |
| 127 | + |
122 | 128 | #endif
|
123 | 129 |
|
124 | 130 | /* import options */
|
@@ -162,7 +168,10 @@ static int escape_pending1; /* Last character was an escape (proto1 only) */
|
162 | 168 | static int last_was_cr; /* Last character was a newline. */
|
163 | 169 | static int exit_status; /* Used to store the command exit status. */
|
164 | 170 | static int stdin_eof; /* EOF has been encountered on stderr. */
|
165 |
| -static Buffer stdin_buffer; /* Buffer for stdin data. */ |
| 171 | +#ifndef WIN32_FIXME |
| 172 | +static |
| 173 | +#endif |
| 174 | +Buffer stdin_buffer; /* Buffer for stdin data. */ |
166 | 175 | static Buffer stdout_buffer; /* Buffer for stdout data. */
|
167 | 176 | static Buffer stderr_buffer; /* Buffer for stderr data. */
|
168 | 177 | static u_int buffer_high; /* Soft max buffer size. */
|
@@ -563,6 +572,25 @@ client_check_window_change(void)
|
563 | 572 | packet_put_int((u_int)ws.ws_ypixel);
|
564 | 573 | packet_send();
|
565 | 574 | }
|
| 575 | +#else |
| 576 | + |
| 577 | + if (! win_received_window_change_signal) |
| 578 | + return; |
| 579 | + /** XXX race */ |
| 580 | + win_received_window_change_signal = 0; |
| 581 | + |
| 582 | + debug2("client_check_window_change: changed"); |
| 583 | + |
| 584 | + if (compat20) { |
| 585 | + channel_send_window_changes(ScreenX, ScrollBottom, 640, 480); |
| 586 | + } else { |
| 587 | + packet_start(SSH_CMSG_WINDOW_SIZE); |
| 588 | + packet_put_int((u_int)ScreenX); |
| 589 | + packet_put_int((u_int)ScrollBottom); |
| 590 | + packet_put_int((u_int)640); |
| 591 | + packet_put_int((u_int)480); |
| 592 | + packet_send(); |
| 593 | + } |
566 | 594 | #endif /* !WIN32_FIXME */
|
567 | 595 | }
|
568 | 596 |
|
@@ -1320,14 +1348,14 @@ process_escapes(Channel *c, Buffer *bin, Buffer *bout, Buffer *berr,
|
1320 | 1348 | * and append it to the buffer.
|
1321 | 1349 | */
|
1322 | 1350 | last_was_cr = (ch == '\r' || ch == '\n');
|
1323 |
| - #ifdef WIN32_FIXME |
1324 |
| - extern int lftocrlf ; // defined in channels.c file's channel_input_data() function for now |
1325 |
| - if ( (lftocrlf == 1) && ( ch == '\n') ) { |
| 1351 | + //#ifdef WIN32_FIXME |
| 1352 | + //extern int lftocrlf ; // defined in channels.c file's channel_input_data() function for now |
| 1353 | + //if ( (lftocrlf == 1) && ( ch == '\n') ) { |
1326 | 1354 | // add a \r before \n if sshd server sent us ESC[20h during initial tty mode setting
|
1327 |
| - buffer_put_char(bin, '\r'); |
1328 |
| - bytes++; |
1329 |
| - } |
1330 |
| - #endif |
| 1355 | + //buffer_put_char(bin, '\r'); |
| 1356 | + //bytes++; |
| 1357 | + //} |
| 1358 | + //#endif |
1331 | 1359 | buffer_put_char(bin, ch);
|
1332 | 1360 | bytes++;
|
1333 | 1361 | }
|
@@ -2571,11 +2599,11 @@ client_session2_setup(int id, int want_tty, int want_subsystem,
|
2571 | 2599 | tty_make_modes(-1, tiop);
|
2572 | 2600 |
|
2573 | 2601 | #else
|
2574 |
| - packet_put_cstring(term != NULL ? term : ""); |
2575 |
| - packet_put_int((u_int) 80 /*ws.ws_col*/); |
2576 |
| - packet_put_int((u_int) 25 /*ws.ws_row*/); |
2577 |
| - packet_put_int((u_int) 640 /*ws.ws_xpixel*/); |
2578 |
| - packet_put_int((u_int) 480 /*ws.ws_ypixel*/); |
| 2602 | + packet_put_cstring(term != NULL ? term : "vt220"); |
| 2603 | + packet_put_int((u_int) ScreenX); |
| 2604 | + packet_put_int((u_int) ScrollBottom); |
| 2605 | + packet_put_int((u_int) 640); |
| 2606 | + packet_put_int((u_int) 480); |
2579 | 2607 | tty_make_modes(-1, NULL);
|
2580 | 2608 | #endif /* else !WIN32_FIXME */
|
2581 | 2609 | packet_send();
|
|
0 commit comments