~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Half-decent keyboard handling for pterm. Not very well done - it
[sgt/putty]
/
ldisc.c
diff --git
a/ldisc.c
b/ldisc.c
index
e464c13
..
e6a110b
100644
(file)
--- a/
ldisc.c
+++ b/
ldisc.c
@@
-5,7
+5,6
@@
* depending on what's currently configured.
*/
* depending on what's currently configured.
*/
-#include <windows.h>
#include <stdio.h>
#include <ctype.h>
#include <stdio.h>
#include <ctype.h>
@@
-200,7
+199,7
@@
void ldisc_send(char *buf, int len, int interactive)
back->send(term_buf, term_buflen);
if (cfg.protocol == PROT_RAW)
back->send("\r\n", 2);
back->send(term_buf, term_buflen);
if (cfg.protocol == PROT_RAW)
back->send("\r\n", 2);
- else if (cfg.protocol == PROT_TELNET)
+ else if (cfg.protocol == PROT_TELNET
&& cfg.telnet_newline
)
back->special(TS_EOL);
else
back->send("\r", 1);
back->special(TS_EOL);
else
back->send("\r", 1);
@@
-237,7
+236,10
@@
void ldisc_send(char *buf, int len, int interactive)
if (keyflag && cfg.protocol == PROT_TELNET && len == 1) {
switch (buf[0]) {
case CTRL('M'):
if (keyflag && cfg.protocol == PROT_TELNET && len == 1) {
switch (buf[0]) {
case CTRL('M'):
- back->special(TS_EOL);
+ if (cfg.protocol == PROT_TELNET && cfg.telnet_newline)
+ back->special(TS_EOL);
+ else
+ back->send("\r", 1);
break;
case CTRL('?'):
case CTRL('H'):
break;
case CTRL('?'):
case CTRL('H'):