*
* An xterm returns "xterm" (5 characters)
*/
- compatibility(OTHER);
- ldisc_send ("PuTTY", 5);
+ compatibility(ANSIMIN);
+ {
+ char abuf[256], *s, *d;
+ int state=0;
+ for(s=cfg.answerback, d=abuf; *s; s++) {
+ if (state)
+ {
+ if (*s >= 'a' && *s <= 'z')
+ *d++ = (*s - ('a'-1));
+ else if ((*s >='@' && *s<='_') ||
+ *s == '?' || (*s&0x80))
+ *d++ = ('@'^*s);
+ else if (*s == '~')
+ *d++ = '^';
+ state = 0;
+ }
+ else if (*s == '^') {
+ state = 1;
+ }
+ else
+ *d++ = xlat_kbd2tty((unsigned char)*s);
+ }
+ ldisc_send (abuf, d-abuf);
+ }
break;
case '\007':
beep_count++;
*/
void term_blink(int flg) {
-static long last_blink = 0;
-static long last_tblink = 0;
+ static long last_blink = 0;
+ static long last_tblink = 0;
long now, blink_diff;
now = GetTickCount();
blink_diff = now-last_blink;
- /* Make sure the cursor blinks no more than 2Hz */
- if (blink_diff>=0 && blink_diff<450)
+ /* Make sure the cursor blinks no faster than GetCaretBlinkTime() */
+ if (blink_diff>=0 && blink_diff<(long)GetCaretBlinkTime())
return;
last_blink = now;