Diff

Differences From Artifact [bca40c570c]:

To Artifact [b680e37422]:


503
504
505
506
507
508
509
510
511


512
513
514
515
516
517
518
519
520


521
522
523
524
525
526
527
503
504
505
506
507
508
509


510
511
512
513
514
515
516
517
518


519
520
521
522
523
524
525
526
527







-
-
+
+







-
-
+
+








#define f(i,c,w,u) \
    fonts[i] = CreateFont (cfg.fontheight, 0, 0, 0, w, FALSE, u, FALSE, \
			   c, OUT_DEFAULT_PRECIS, \
		           CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, \
			   FIXED_PITCH | FF_DONTCARE, cfg.font)
    if (cfg.vtmode != VT_OEMONLY) {
	f(FONT_NORMAL, ANSI_CHARSET, fw_dontcare, FALSE);
	f(FONT_UNDERLINE, ANSI_CHARSET, fw_dontcare, TRUE);
	f(FONT_NORMAL, cfg.fontcharset, fw_dontcare, FALSE);
	f(FONT_UNDERLINE, cfg.fontcharset, fw_dontcare, TRUE);
    }
    if (cfg.vtmode == VT_OEMANSI || cfg.vtmode == VT_OEMONLY) {
	f(FONT_OEM, OEM_CHARSET, fw_dontcare, FALSE);
	f(FONT_OEMUND, OEM_CHARSET, fw_dontcare, TRUE);
    }
    if (bold_mode == BOLD_FONT) {
	if (cfg.vtmode != VT_OEMONLY) {
	    f(FONT_BOLD, ANSI_CHARSET, fw_bold, FALSE);
	    f(FONT_BOLDUND, ANSI_CHARSET, fw_bold, TRUE);
	    f(FONT_BOLD, cfg.fontcharset, fw_bold, FALSE);
	    f(FONT_BOLDUND, cfg.fontcharset, fw_bold, TRUE);
	}
	if (cfg.vtmode == VT_OEMANSI || cfg.vtmode == VT_OEMONLY) {
	    f(FONT_OEMBOLD, OEM_CHARSET, fw_bold, FALSE);
	    f(FONT_OEMBOLDUND, OEM_CHARSET, fw_bold, TRUE);
	}
    } else {
	fonts[FONT_BOLD] = fonts[FONT_BOLDUND] = NULL;
1049
1050
1051
1052
1053
1054
1055
1056

1057
1058
1059
1060
1061
1062
1063
1049
1050
1051
1052
1053
1054
1055

1056
1057
1058
1059
1060
1061
1062
1063







-
+







	/*
	 * Nevertheless, we are prepared to deal with WM_CHAR
	 * messages, should they crop up. So if someone wants to
	 * post the things to us as part of a macro manoeuvre,
	 * we're ready to cope.
	 */
	{
	    char c = wParam;
	    char c = xlat_kbd2tty((unsigned char)wParam);
	    back->send (&c, 1);
	}
	return 0;
    }

    return DefWindowProc (hwnd, message, wParam, lParam);
}
1337
1338
1339
1340
1341
1342
1343







1344
1345





1346
1347

1348
1349
1350
1351
1352
1353
1354
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350


1351
1352
1353
1354
1355
1356

1357
1358
1359
1360
1361
1362
1363
1364







+
+
+
+
+
+
+
-
-
+
+
+
+
+

-
+







    }

    /*
     * Attempt the Windows char-map translation.
     */
    if (ret) {
	WORD chr;
	int r;
	BOOL capsOn=keystate[VK_CAPITAL] !=0;

	/* helg: clear CAPS LOCK state if caps lock switches to cyrillic */
	if(cfg.xlat_capslockcyr)
	    keystate[VK_CAPITAL] = 0;

	int r = ToAscii (wParam, (lParam >> 16) & 0xFF,
			 keystate, &chr, 0);
	r = ToAscii (wParam, (lParam >> 16) & 0xFF,
		     keystate, &chr, 0);

	if(capsOn)
	    chr = xlat_latkbd2win((unsigned char)(chr & 0xFF));
	if (r == 1) {
	    *p++ = chr & 0xFF;
	    *p++ = xlat_kbd2tty((unsigned char)(chr & 0xFF));
	    return p - output;
	}
    }

    /*
     * OK, we haven't had a key code from the keymap translation.
     * We'll try our various special cases and function keys, and