cfg->colours[i][1], cfg->colours[i][2]);
write_setting_s (sesskey, buf, buf2);
}
+ write_setting_i (sesskey, "RawCNP", cfg->rawcnp);
write_setting_i (sesskey, "MouseIsXterm", cfg->mouse_is_xterm);
for (i=0; i<256; i+=32) {
char buf[20], buf2[256];
cfg->colours[i][2] = c2;
}
}
+ gppi (sesskey, "RawCNP", 0, &cfg->rawcnp);
gppi (sesskey, "MouseIsXterm", 0, &cfg->mouse_is_xterm);
for (i=0; i<256; i+=32) {
static char *defaults[] = {
}
while (top < nlpos && top < bottom)
{
-#if 0
- /* VT Specials -> ISO8859-1 */
- static const char poorman2[] =
+ int ch = (*top & CHAR_MASK);
+ int set = (*top & CSET_MASK);
+
+ /* VT Specials -> ISO8859-1 for Cut&Paste */
+ static const unsigned char poorman2[] =
"* # HTFFCRLF\xB0 \xB1 NLVT+ + + + + - - - - - + + + + | <=>=PI!=\xA3 \xB7 ";
-#endif
- int ch = (*top & CHAR_MASK);
+ if (set && !cfg.rawcnp) {
+ if (set == ATTR_LINEDRW && ch >= 0x60 && ch < 0x7F) {
+ int x;
+ if ((x = poorman2[2*(ch-0x60)+1]) == ' ')
+ x = 0;
+ ch = (x<<8) + poorman2[2*(ch-0x60)];
+ }
+ }
-#if 0
- if ((*top & ATTR_LINEDRW) && ch >= 0x60 && ch < 0x7F) {
- int x;
- *wbptr++ = poorman2[2*(ch-0x60)];
- if ( (x = poorman2[2*(ch-0x60)+1]) != ' ')
- *wbptr++ = x;
- } else
-#endif
-#if 0
- if ((*top & ATTR_GBCHR) && ch == '#')
- *wbptr++ = (unsigned char) 0xA3;
- else
-#endif
- if ( wblen == buflen )
- {
- workbuf = srealloc(workbuf, buflen += 100);
- wbptr = workbuf + wblen;
+ while(ch != 0) {
+ if (cfg.rawcnp || !!(ch&0xE0)) {
+ if ( wblen == buflen )
+ {
+ workbuf = srealloc(workbuf, buflen += 100);
+ wbptr = workbuf + wblen;
+ }
+ wblen++;
+ *wbptr++ = (unsigned char) ch;
+ }
+ ch>>=8;
}
- wblen++;
- *wbptr++ = (unsigned char) ch;
top++;
}
if (nl) {
IDC_TITLE_SELECTION,
IDC_BOX_SELECTION1,
IDC_BOX_SELECTION2,
+ IDC_BOX_SELECTION3,
IDC_MBSTATIC,
IDC_MBWINDOWS,
IDC_MBXTERM,
IDC_CCSET,
IDC_CCSTATIC2,
IDC_CCEDIT,
+ IDC_RAWCNP,
selectionpanelend,
colourspanelstart,
CheckRadioButton (hwnd, IDC_MBWINDOWS, IDC_MBXTERM,
cfg.mouse_is_xterm ? IDC_MBXTERM : IDC_MBWINDOWS);
+ CheckDlgButton (hwnd, IDC_RAWCNP, cfg.rawcnp);
{
static int tabs[4] = {25, 61, 96, 128};
SendDlgItemMessage (hwnd, IDC_CCLIST, LB_SETTABSTOPS, 4,
}
if (panel == selectionpanelstart) {
- /* The Selection panel. Accelerators used: [acgo] wx hst */
+ /* The Selection panel. Accelerators used: [acgo] d wx hst */
struct ctlpos cp;
ctlposinit(&cp, hwnd, 80, 3, 13);
bartitle(&cp, "Options controlling copy and paste",
IDC_TITLE_SELECTION);
- beginbox(&cp, "Control which mouse button does which thing",
+ beginbox(&cp, "Translation of pasted characters",
IDC_BOX_SELECTION1);
+ checkbox(&cp, "&Don't translate line drawing chars into +, - and |",
+ IDC_RAWCNP);
+ endbox(&cp);
+ beginbox(&cp, "Control which mouse button does which thing",
+ IDC_BOX_SELECTION2);
radiobig(&cp, "Action of mouse buttons:", IDC_MBSTATIC,
"&Windows (Right pastes, Middle extends)", IDC_MBWINDOWS,
"&xterm (Right extends, Middle pastes)", IDC_MBXTERM,
NULL);
endbox(&cp);
beginbox(&cp, "Control the select-one-word-at-a-time mode",
- IDC_BOX_SELECTION2);
+ IDC_BOX_SELECTION3);
charclass(&cp, "C&haracter classes:", IDC_CCSTATIC, IDC_CCLIST,
"&Set", IDC_CCSET, IDC_CCEDIT,
"&to class", IDC_CCSTATIC2);
SetDlgItemText (hwnd, IDC_PKEDIT, cfg.keyfile);
}
break;
+ case IDC_RAWCNP:
+ cfg.rawcnp = IsDlgButtonChecked (hwnd, IDC_RAWCNP);
case IDC_MBWINDOWS:
case IDC_MBXTERM:
cfg.mouse_is_xterm = IsDlgButtonChecked (hwnd, IDC_MBXTERM);