| 468 |
RGB((BYTE) r, (BYTE) g, (BYTE) b); |
RGB((BYTE) r, (BYTE) g, (BYTE) b); |
| 469 |
} |
} |
| 470 |
} |
} |
| 471 |
#endif /* NO_ANSI_COLOR_EXTENSION */ |
#endif /* NO_ANSI_COLOR_EXTENSION */ |
| 472 |
|
|
| 473 |
TmpDC = GetDC(0); /* Get screen device context */ |
TmpDC = GetDC(0); /* Get screen device context */ |
| 474 |
for (i = 0; i <= 1; i++) |
for (i = 0; i <= 1; i++) |
| 486 |
#ifndef NO_ANSI_COLOR_EXTENSION |
#ifndef NO_ANSI_COLOR_EXTENSION |
| 487 |
for (i = 0; i < 16; i++) |
for (i = 0; i < 16; i++) |
| 488 |
ts->ANSIColor[i] = GetNearestColor(TmpDC, ts->ANSIColor[i]); |
ts->ANSIColor[i] = GetNearestColor(TmpDC, ts->ANSIColor[i]); |
| 489 |
#endif /* NO_ANSI_COLOR_EXTENSION */ |
#endif /* NO_ANSI_COLOR_EXTENSION */ |
| 490 |
ReleaseDC(0, TmpDC); |
ReleaseDC(0, TmpDC); |
| 491 |
|
|
| 492 |
/* TEK color emulation */ |
/* TEK color emulation */ |
| 530 |
ts->MetaKey = GetOnOff(Section, "MetaKey", FName, FALSE); |
ts->MetaKey = GetOnOff(Section, "MetaKey", FName, FALSE); |
| 531 |
|
|
| 532 |
/* Application Keypad */ |
/* Application Keypad */ |
| 533 |
ts->DisableAppKeypad = GetOnOff(Section, "DisableAppKeypad", FName, FALSE); |
ts->DisableAppKeypad = |
| 534 |
|
GetOnOff(Section, "DisableAppKeypad", FName, FALSE); |
| 535 |
|
|
| 536 |
/* Application Cursor */ |
/* Application Cursor */ |
| 537 |
ts->DisableAppCursor = GetOnOff(Section, "DisableAppCursor", FName, FALSE); |
ts->DisableAppCursor = |
| 538 |
|
GetOnOff(Section, "DisableAppCursor", FName, FALSE); |
| 539 |
|
|
| 540 |
/* Russian keyboard type */ |
/* Russian keyboard type */ |
| 541 |
GetPrivateProfileString(Section, "RussKeyb", "", |
GetPrivateProfileString(Section, "RussKeyb", "", |
| 599 |
|
|
| 600 |
/* Telnet terminal type */ |
/* Telnet terminal type */ |
| 601 |
GetPrivateProfileString(Section, "TermType", "xterm", ts->TermType, |
GetPrivateProfileString(Section, "TermType", "xterm", ts->TermType, |
| 602 |
sizeof(ts->TermType), FName); |
sizeof(ts->TermType), FName); |
| 603 |
|
|
| 604 |
/* TCP port num */ |
/* TCP port num */ |
| 605 |
ts->TCPPort = |
ts->TCPPort = |
| 655 |
|
|
| 656 |
/* XMODEM 受信コマンド (2007.12.21 yutaka) */ |
/* XMODEM 受信コマンド (2007.12.21 yutaka) */ |
| 657 |
GetPrivateProfileString(Section, "XModemRcvCommand", "", |
GetPrivateProfileString(Section, "XModemRcvCommand", "", |
| 658 |
ts->XModemRcvCommand, sizeof(ts->XModemRcvCommand), FName); |
ts->XModemRcvCommand, |
| 659 |
|
sizeof(ts->XModemRcvCommand), FName); |
| 660 |
|
|
| 661 |
/* Default directory for file transfer */ |
/* Default directory for file transfer */ |
| 662 |
GetPrivateProfileString(Section, "FileDir", "", |
GetPrivateProfileString(Section, "FileDir", "", |
| 711 |
/* Beep on connection & disconnection -- special option */ |
/* Beep on connection & disconnection -- special option */ |
| 712 |
ts->PortFlag |= |
ts->PortFlag |= |
| 713 |
PF_BEEPONCONNECT * GetOnOff(Section, "BeepOnConnect", FName, |
PF_BEEPONCONNECT * GetOnOff(Section, "BeepOnConnect", FName, |
| 714 |
FALSE); |
FALSE); |
| 715 |
|
|
| 716 |
/* Auto B-Plus activation -- special option */ |
/* Auto B-Plus activation -- special option */ |
| 717 |
ts->FTFlag |= FT_BPAUTO * GetOnOff(Section, "BPAuto", FName, FALSE); |
ts->FTFlag |= FT_BPAUTO * GetOnOff(Section, "BPAuto", FName, FALSE); |
| 729 |
ts->LogFlag |= LOG_BP * GetOnOff(Section, "BPLog", FName, FALSE); |
ts->LogFlag |= LOG_BP * GetOnOff(Section, "BPLog", FName, FALSE); |
| 730 |
|
|
| 731 |
/* Clear serial port buffer when port opening -- special option */ |
/* Clear serial port buffer when port opening -- special option */ |
| 732 |
ts->ClearComBuffOnOpen = GetOnOff(Section, "ClearComBuffOnOpen", FName, TRUE); |
ts->ClearComBuffOnOpen = |
| 733 |
|
GetOnOff(Section, "ClearComBuffOnOpen", FName, TRUE); |
| 734 |
|
|
| 735 |
/* Confirm disconnection -- special option */ |
/* Confirm disconnection -- special option */ |
| 736 |
ts->PortFlag |= |
ts->PortFlag |= |
| 737 |
PF_CONFIRMDISCONN * GetOnOff(Section, "ConfirmDisconnect", FName, |
PF_CONFIRMDISCONN * GetOnOff(Section, "ConfirmDisconnect", |
| 738 |
TRUE); |
FName, TRUE); |
| 739 |
|
|
| 740 |
/* Ctrl code in Kanji -- special option */ |
/* Ctrl code in Kanji -- special option */ |
| 741 |
ts->TermFlag |= |
ts->TermFlag |= |
| 815 |
/* Printer port for pass-thru printing */ |
/* Printer port for pass-thru printing */ |
| 816 |
/* -- special option */ |
/* -- special option */ |
| 817 |
GetPrivateProfileString(Section, "PassThruPort", "", |
GetPrivateProfileString(Section, "PassThruPort", "", |
| 818 |
ts->PrnDev, sizeof(ts->PrnDev), FName); |
ts->PrnDev, sizeof(ts->PrnDev), FName); |
| 819 |
|
|
| 820 |
/* Printer Font --- special option */ |
/* Printer Font --- special option */ |
| 821 |
GetPrivateProfileString(Section, "PrnFont", "", |
GetPrivateProfileString(Section, "PrnFont", "", |
| 1028 |
GetPrivateProfileString(Section, "CygwinDirectory ", "c:\\cygwin", |
GetPrivateProfileString(Section, "CygwinDirectory ", "c:\\cygwin", |
| 1029 |
Temp, sizeof(Temp), FName); |
Temp, sizeof(Temp), FName); |
| 1030 |
strncpy_s(ts->CygwinDirectory, sizeof(ts->CygwinDirectory), Temp, |
strncpy_s(ts->CygwinDirectory, sizeof(ts->CygwinDirectory), Temp, |
| 1031 |
_TRUNCATE); |
_TRUNCATE); |
| 1032 |
|
|
| 1033 |
// Viewlog Editor path |
// Viewlog Editor path |
| 1034 |
GetPrivateProfileString(Section, "ViewlogEditor ", "notepad.exe", |
GetPrivateProfileString(Section, "ViewlogEditor ", "notepad.exe", |
| 1035 |
Temp, sizeof(Temp), FName); |
Temp, sizeof(Temp), FName); |
| 1036 |
strncpy_s(ts->ViewlogEditor, sizeof(ts->ViewlogEditor), Temp, |
strncpy_s(ts->ViewlogEditor, sizeof(ts->ViewlogEditor), Temp, |
| 1037 |
_TRUNCATE); |
_TRUNCATE); |
| 1038 |
|
|
| 1039 |
// Locale for UTF-8 |
// Locale for UTF-8 |
| 1040 |
GetPrivateProfileString(Section, "Locale ", DEFAULT_LOCALE, |
GetPrivateProfileString(Section, "Locale ", DEFAULT_LOCALE, |
| 1089 |
ts->MaximizedBugTweak = |
ts->MaximizedBugTweak = |
| 1090 |
GetOnOff(Section, "MaximizedBugTweak", FName, TRUE); |
GetOnOff(Section, "MaximizedBugTweak", FName, TRUE); |
| 1091 |
|
|
| 1092 |
|
// Convert UTF-8 BoxDrawing to DEC Special characters |
| 1093 |
|
ts->UTF8BoxDrawing = |
| 1094 |
|
GetOnOff(Section, "UTF8BoxDrawing", FName, TRUE); |
| 1095 |
|
|
| 1096 |
#ifdef USE_NORMAL_BGCOLOR |
#ifdef USE_NORMAL_BGCOLOR |
| 1097 |
// UseNormalBGColor |
// UseNormalBGColor |
| 1098 |
ts->UseNormalBGColor = |
ts->UseNormalBGColor = |
| 1264 |
|
|
| 1265 |
// added ConfirmChangePaste |
// added ConfirmChangePaste |
| 1266 |
WriteOnOff(Section, "ConfirmChangePaste", FName, |
WriteOnOff(Section, "ConfirmChangePaste", FName, |
| 1267 |
ts->ConfirmChangePaste); |
ts->ConfirmChangePaste); |
| 1268 |
|
|
| 1269 |
// added SelectOnlyByLButton (2007.11.20 maya) |
// added SelectOnlyByLButton (2007.11.20 maya) |
| 1270 |
WriteOnOff(Section, "SelectOnlyByLButton", FName, |
WriteOnOff(Section, "SelectOnlyByLButton", FName, |
| 1369 |
ts->TmpColor[0][i * 3 + 2] = GetBValue(ts->VTColor[i]); |
ts->TmpColor[0][i * 3 + 2] = GetBValue(ts->VTColor[i]); |
| 1370 |
} |
} |
| 1371 |
WriteInt6(Section, "VTColor", FName, |
WriteInt6(Section, "VTColor", FName, |
| 1372 |
ts->TmpColor[0][0], ts->TmpColor[0][1], ts->TmpColor[0][2], |
ts->TmpColor[0][0], ts->TmpColor[0][1], ts->TmpColor[0][2], |
| 1373 |
ts->TmpColor[0][3], ts->TmpColor[0][4], ts->TmpColor[0][5]); |
ts->TmpColor[0][3], ts->TmpColor[0][4], ts->TmpColor[0][5]); |
| 1374 |
|
|
| 1375 |
/* VT bold color */ |
/* VT bold color */ |
| 1376 |
for (i = 0; i <= 1; i++) { |
for (i = 0; i <= 1; i++) { |
| 1379 |
ts->TmpColor[0][i * 3 + 2] = GetBValue(ts->VTBoldColor[i]); |
ts->TmpColor[0][i * 3 + 2] = GetBValue(ts->VTBoldColor[i]); |
| 1380 |
} |
} |
| 1381 |
WriteInt6(Section, "VTBoldColor", FName, |
WriteInt6(Section, "VTBoldColor", FName, |
| 1382 |
ts->TmpColor[0][0], ts->TmpColor[0][1], ts->TmpColor[0][2], |
ts->TmpColor[0][0], ts->TmpColor[0][1], ts->TmpColor[0][2], |
| 1383 |
ts->TmpColor[0][3], ts->TmpColor[0][4], ts->TmpColor[0][5]); |
ts->TmpColor[0][3], ts->TmpColor[0][4], ts->TmpColor[0][5]); |
| 1384 |
|
|
| 1385 |
/* VT blink color */ |
/* VT blink color */ |
| 1386 |
for (i = 0; i <= 1; i++) { |
for (i = 0; i <= 1; i++) { |
| 1389 |
ts->TmpColor[0][i * 3 + 2] = GetBValue(ts->VTBlinkColor[i]); |
ts->TmpColor[0][i * 3 + 2] = GetBValue(ts->VTBlinkColor[i]); |
| 1390 |
} |
} |
| 1391 |
WriteInt6(Section, "VTBlinkColor", FName, |
WriteInt6(Section, "VTBlinkColor", FName, |
| 1392 |
ts->TmpColor[0][0], ts->TmpColor[0][1], ts->TmpColor[0][2], |
ts->TmpColor[0][0], ts->TmpColor[0][1], ts->TmpColor[0][2], |
| 1393 |
ts->TmpColor[0][3], ts->TmpColor[0][4], ts->TmpColor[0][5]); |
ts->TmpColor[0][3], ts->TmpColor[0][4], ts->TmpColor[0][5]); |
| 1394 |
|
|
| 1395 |
/* start - ishizaki */ |
/* start - ishizaki */ |
| 1396 |
WriteOnOff(Section, "EnableClickableUrl", FName, |
WriteOnOff(Section, "EnableClickableUrl", FName, |
| 1397 |
ts->EnableClickableUrl); |
ts->EnableClickableUrl); |
| 1398 |
|
|
| 1399 |
/* URL color */ |
/* URL color */ |
| 1400 |
for (i = 0; i <= 1; i++) { |
for (i = 0; i <= 1; i++) { |
| 1403 |
ts->TmpColor[0][i * 3 + 2] = GetBValue(ts->URLColor[i]); |
ts->TmpColor[0][i * 3 + 2] = GetBValue(ts->URLColor[i]); |
| 1404 |
} |
} |
| 1405 |
WriteInt6(Section, "URLColor", FName, |
WriteInt6(Section, "URLColor", FName, |
| 1406 |
ts->TmpColor[0][0], ts->TmpColor[0][1], ts->TmpColor[0][2], |
ts->TmpColor[0][0], ts->TmpColor[0][1], ts->TmpColor[0][2], |
| 1407 |
ts->TmpColor[0][3], ts->TmpColor[0][4], ts->TmpColor[0][5]); |
ts->TmpColor[0][3], ts->TmpColor[0][4], ts->TmpColor[0][5]); |
| 1408 |
/* end - ishizaki */ |
/* end - ishizaki */ |
| 1409 |
|
|
| 1410 |
/* TEK Color */ |
/* TEK Color */ |
| 1415 |
} |
} |
| 1416 |
WriteInt6(Section, "TEKColor", FName, |
WriteInt6(Section, "TEKColor", FName, |
| 1417 |
ts->TmpColor[0][0], ts->TmpColor[0][1], ts->TmpColor[0][2], |
ts->TmpColor[0][0], ts->TmpColor[0][1], ts->TmpColor[0][2], |
| 1418 |
ts->TmpColor[0][3], ts->TmpColor[0][4], ts->TmpColor[0][5]); |
ts->TmpColor[0][3], ts->TmpColor[0][4], ts->TmpColor[0][5]); |
| 1419 |
|
|
| 1420 |
/* TEK color emulation */ |
/* TEK color emulation */ |
| 1421 |
WriteOnOff(Section, "TEKColorEmulation", FName, ts->TEKColorEmu); |
WriteOnOff(Section, "TEKColorEmulation", FName, ts->TEKColorEmu); |
| 1548 |
|
|
| 1549 |
/* Default Log file name (2006.8.28 maya) */ |
/* Default Log file name (2006.8.28 maya) */ |
| 1550 |
WritePrivateProfileString(Section, "LogDefaultName", |
WritePrivateProfileString(Section, "LogDefaultName", |
| 1551 |
ts->LogDefaultName, FName); |
ts->LogDefaultName, FName); |
| 1552 |
|
|
| 1553 |
/* Default Log file path (2007.5.30 maya) */ |
/* Default Log file path (2007.5.30 maya) */ |
| 1554 |
WritePrivateProfileString(Section, "LogDefaultPath", |
WritePrivateProfileString(Section, "LogDefaultPath", |
| 1555 |
ts->LogDefaultPath, FName); |
ts->LogDefaultPath, FName); |
| 1556 |
|
|
| 1557 |
/* Auto start logging (2007.5.31 maya) */ |
/* Auto start logging (2007.5.31 maya) */ |
| 1558 |
WriteOnOff(Section, "LogAutoStart", FName, ts->LogAutoStart); |
WriteOnOff(Section, "LogAutoStart", FName, ts->LogAutoStart); |
| 1574 |
WriteOnOff(Section, "XmodemBin", FName, ts->XmodemBin); |
WriteOnOff(Section, "XmodemBin", FName, ts->XmodemBin); |
| 1575 |
|
|
| 1576 |
/* XMODEM 受信コマンド (2007.12.21 yutaka) */ |
/* XMODEM 受信コマンド (2007.12.21 yutaka) */ |
| 1577 |
WritePrivateProfileString(Section, "XmodemRcvCommand", ts->XModemRcvCommand, FName); |
WritePrivateProfileString(Section, "XmodemRcvCommand", |
| 1578 |
|
ts->XModemRcvCommand, FName); |
| 1579 |
|
|
| 1580 |
/* Default directory for file transfer */ |
/* Default directory for file transfer */ |
| 1581 |
WritePrivateProfileString(Section, "FileDir", ts->FileDir, FName); |
WritePrivateProfileString(Section, "FileDir", ts->FileDir, FName); |
| 1582 |
|
|
| 1583 |
/* filter on file send (2007.6.5 maya) */ |
/* filter on file send (2007.6.5 maya) */ |
| 1584 |
WritePrivateProfileString(Section, "FileSendFilter", |
WritePrivateProfileString(Section, "FileSendFilter", |
| 1585 |
ts->FileSendFilter, FName); |
ts->FileSendFilter, FName); |
| 1586 |
|
|
| 1587 |
/*------------------------------------------------------------------*/ |
/*------------------------------------------------------------------*/ |
| 1588 |
/* 8 bit control code flag -- special option */ |
/* 8 bit control code flag -- special option */ |
| 1589 |
WriteOnOff(Section, "Accept8BitCtrl", FName, |
WriteOnOff(Section, "Accept8BitCtrl", FName, |
| 1590 |
(WORD) (ts->TermFlag & TF_ACCEPT8BITCTRL)); |
(WORD) (ts->TermFlag & TF_ACCEPT8BITCTRL)); |
| 1591 |
|
|
| 1592 |
/* Wrong sequence flag -- special option */ |
/* Wrong sequence flag -- special option */ |
| 1593 |
WriteOnOff(Section, "AllowWrongSequence", FName, |
WriteOnOff(Section, "AllowWrongSequence", FName, |
| 1594 |
(WORD) (ts->TermFlag & TF_ALLOWWRONGSEQUENCE)); |
(WORD) (ts->TermFlag & TF_ALLOWWRONGSEQUENCE)); |
| 1595 |
|
|
| 1596 |
/* Auto file renaming --- special option */ |
/* Auto file renaming --- special option */ |
| 1597 |
WriteOnOff(Section, "AutoFileRename", FName, |
WriteOnOff(Section, "AutoFileRename", FName, |
| 1598 |
(WORD) (ts->FTFlag & FT_RENAME)); |
(WORD) (ts->FTFlag & FT_RENAME)); |
| 1599 |
|
|
| 1600 |
/* Auto text copy --- special option */ |
/* Auto text copy --- special option */ |
| 1601 |
WriteOnOff(Section, "AutoTextCopy", FName, ts->AutoTextCopy); |
WriteOnOff(Section, "AutoTextCopy", FName, ts->AutoTextCopy); |
| 1867 |
ts->MouseEventTracking); |
ts->MouseEventTracking); |
| 1868 |
|
|
| 1869 |
// Maximized bug tweak |
// Maximized bug tweak |
| 1870 |
WriteOnOff(Section, "MaximizedBugTweak", FName, |
WriteOnOff(Section, "MaximizedBugTweak", FName, ts->MaximizedBugTweak); |
| 1871 |
ts->MaximizedBugTweak); |
|
| 1872 |
|
// Convert UTF-8 BoxDrawing to DEC Special characters |
| 1873 |
|
WriteOnOff(Section, "UTF8BoxDrawing", FName, ts->UTF8BoxDrawing); |
| 1874 |
} |
} |
| 1875 |
|
|
| 1876 |
#define VTEditor "VT editor keypad" |
#define VTEditor "VT editor keypad" |