Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/teraterm/ttpcmn/ttcmn.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6713 by doda, Fri May 12 12:41:42 2017 UTC revision 6801 by doda, Tue Jun 13 10:30:12 2017 UTC
# Line 56  void PASCAL CopyTTSetToShmem(PTTSet ts) Line 56  void PASCAL CopyTTSetToShmem(PTTSet ts)
56  }  }
57    
58    
59  BOOL PASCAL FAR StartTeraTerm(PTTSet ts)  BOOL PASCAL StartTeraTerm(PTTSet ts)
60  {  {
61          char Temp[MAX_PATH];          char Temp[MAX_PATH];
62    
# Line 99  BOOL PASCAL FAR StartTeraTerm(PTTSet ts) Line 99  BOOL PASCAL FAR StartTeraTerm(PTTSet ts)
99    
100  // 設定ファイルをディスクに保存し、Tera Term本体を再起動する。  // 設定ファイルをディスクに保存し、Tera Term本体を再起動する。
101  // (2012.4.30 yutaka)  // (2012.4.30 yutaka)
102  void PASCAL FAR RestartTeraTerm(HWND hwnd, PTTSet ts)  void PASCAL RestartTeraTerm(HWND hwnd, PTTSet ts)
103  {  {
104          char path[1024];          char path[1024];
105          STARTUPINFO si;          STARTUPINFO si;
# Line 132  void PASCAL FAR RestartTeraTerm(HWND hwn Line 132  void PASCAL FAR RestartTeraTerm(HWND hwn
132          }          }
133  }  }
134    
135  void PASCAL FAR ChangeDefaultSet(PTTSet ts, PKeyMap km)  void PASCAL ChangeDefaultSet(PTTSet ts, PKeyMap km)
136  {  {
137          if ((ts!=NULL) &&          if ((ts!=NULL) &&
138                  (_stricmp(ts->SetupFName, pm->ts.SetupFName) == 0)) {                  (_stricmp(ts->SetupFName, pm->ts.SetupFName) == 0)) {
# Line 143  void PASCAL FAR ChangeDefaultSet(PTTSet Line 143  void PASCAL FAR ChangeDefaultSet(PTTSet
143          }          }
144  }  }
145    
146  void PASCAL FAR GetDefaultSet(PTTSet ts)  void PASCAL GetDefaultSet(PTTSet ts)
147  {  {
148          memcpy(ts,&(pm->ts),sizeof(TTTSet));          memcpy(ts,&(pm->ts),sizeof(TTTSet));
149  }  }
150    
151    
152  /* Key scan code -> Tera Term key code */  /* Key scan code -> Tera Term key code */
153  WORD PASCAL FAR GetKeyCode(PKeyMap KeyMap, WORD Scan)  WORD PASCAL GetKeyCode(PKeyMap KeyMap, WORD Scan)
154  {  {
155          WORD Key;          WORD Key;
156    
# Line 164  WORD PASCAL FAR GetKeyCode(PKeyMap KeyMa Line 164  WORD PASCAL FAR GetKeyCode(PKeyMap KeyMa
164          return Key;          return Key;
165  }  }
166    
167  void PASCAL FAR GetKeyStr(HWND HWin, PKeyMap KeyMap, WORD KeyCode,  void PASCAL GetKeyStr(HWND HWin, PKeyMap KeyMap, WORD KeyCode,
168                            BOOL AppliKeyMode, BOOL AppliCursorMode,                            BOOL AppliKeyMode, BOOL AppliCursorMode,
169                            BOOL Send8BitMode, PCHAR KeyStr, int destlen,                            BOOL Send8BitMode, PCHAR KeyStr, int destlen,
170                            LPINT Len, LPWORD Type)                            LPINT Len, LPWORD Type)
# Line 818  void PASCAL FAR GetKeyStr(HWND HWin, PKe Line 818  void PASCAL FAR GetKeyStr(HWND HWin, PKe
818          PeekMessage(&Msg,HWin, WM_CHAR, WM_CHAR,PM_REMOVE);          PeekMessage(&Msg,HWin, WM_CHAR, WM_CHAR,PM_REMOVE);
819  }  }
820    
821  void FAR PASCAL SetCOMFlag(int Com)  void PASCAL SetCOMFlag(int Com)
822  {  {
823          pm->ComFlag[(Com-1)/CHAR_BIT] |= 1 << ((Com-1)%CHAR_BIT);          pm->ComFlag[(Com-1)/CHAR_BIT] |= 1 << ((Com-1)%CHAR_BIT);
824  }  }
825    
826  void FAR PASCAL ClearCOMFlag(int Com)  void PASCAL ClearCOMFlag(int Com)
827  {  {
828          pm->ComFlag[(Com-1)/CHAR_BIT] &= ~(1 << ((Com-1)%CHAR_BIT));          pm->ComFlag[(Com-1)/CHAR_BIT] &= ~(1 << ((Com-1)%CHAR_BIT));
829  }  }
830    
831  int FAR PASCAL CheckCOMFlag(int Com)  int PASCAL CheckCOMFlag(int Com)
832  {  {
833          return ((pm->ComFlag[(Com-1)/CHAR_BIT] & 1 << (Com-1)%CHAR_BIT) > 0);          return ((pm->ComFlag[(Com-1)/CHAR_BIT] & 1 << (Com-1)%CHAR_BIT) > 0);
834  }  }
835    
836  int FAR PASCAL RegWin(HWND HWinVT, HWND HWinTEK)  int PASCAL RegWin(HWND HWinVT, HWND HWinTEK)
837  {  {
838          int i, j;          int i, j;
839    
# Line 864  int FAR PASCAL RegWin(HWND HWinVT, HWND Line 864  int FAR PASCAL RegWin(HWND HWinVT, HWND
864          }          }
865  }  }
866    
867  void FAR PASCAL UnregWin(HWND HWin)  void PASCAL UnregWin(HWND HWin)
868  {  {
869          int i, j;          int i, j;
870    
# Line 902  char GetWindowTypeChar(HWND Hw, HWND HWi Line 902  char GetWindowTypeChar(HWND Hw, HWND HWi
902                  return '+';                  return '+';
903  }  }
904    
905  void FAR PASCAL SetWinMenu(HMENU menu, PCHAR buf, int buflen, PCHAR langFile, int VTFlag)  void PASCAL SetWinMenu(HMENU menu, PCHAR buf, int buflen, PCHAR langFile, int VTFlag)
906  {  {
907          int i;          int i;
908          char Temp[MAXPATHLEN];          char Temp[MAXPATHLEN];
# Line 974  void FAR PASCAL SetWinMenu(HMENU menu, P Line 974  void FAR PASCAL SetWinMenu(HMENU menu, P
974          }          }
975  }  }
976    
977  void FAR PASCAL SetWinList(HWND HWin, HWND HDlg, int IList)  void PASCAL SetWinList(HWND HWin, HWND HDlg, int IList)
978  {  {
979          int i;          int i;
980          char Temp[MAXPATHLEN];          char Temp[MAXPATHLEN];
# Line 1000  void FAR PASCAL SetWinList(HWND HWin, HW Line 1000  void FAR PASCAL SetWinList(HWND HWin, HW
1000          }          }
1001  }  }
1002    
1003  void FAR PASCAL SelectWin(int WinId)  void PASCAL SelectWin(int WinId)
1004  {  {
1005          if ((WinId>=0) && (WinId<pm->NWin)) {          if ((WinId>=0) && (WinId<pm->NWin)) {
1006                  /* ウィンドウが最大化および最小化されていた場合、その状態を維持できるように、                  /* ウィンドウが最大化および最小化されていた場合、その状態を維持できるように、
# Line 1019  void FAR PASCAL SelectWin(int WinId) Line 1019  void FAR PASCAL SelectWin(int WinId)
1019          }          }
1020  }  }
1021    
1022  void FAR PASCAL SelectNextWin(HWND HWin, int Next, BOOL SkipIconic)  void PASCAL SelectNextWin(HWND HWin, int Next, BOOL SkipIconic)
1023  {  {
1024          int i;          int i;
1025    
# Line 1048  void FAR PASCAL SelectNextWin(HWND HWin, Line 1048  void FAR PASCAL SelectNextWin(HWND HWin,
1048          SelectWin(i);          SelectWin(i);
1049  }  }
1050    
1051  void FAR PASCAL ShowAllWin(int stat) {  void PASCAL ShowAllWin(int stat) {
1052          int i;          int i;
1053    
1054          for (i=0; i < pm->NWin; i++) {          for (i=0; i < pm->NWin; i++) {
# Line 1056  void FAR PASCAL ShowAllWin(int stat) { Line 1056  void FAR PASCAL ShowAllWin(int stat) {
1056          }          }
1057  }  }
1058    
1059  void FAR PASCAL UndoAllWin(void) {  void PASCAL UndoAllWin(void) {
1060          int i;          int i;
1061          WINDOWPLACEMENT rc0;          WINDOWPLACEMENT rc0;
1062          RECT rc;          RECT rc;
# Line 1123  void FAR PASCAL UndoAllWin(void) { Line 1123  void FAR PASCAL UndoAllWin(void) {
1123          }          }
1124  }  }
1125    
1126  void FAR PASCAL OpenHelp(UINT Command, DWORD Data, char *UILanguageFile)  void PASCAL OpenHelp(UINT Command, DWORD Data, char *UILanguageFile)
1127  {  {
1128          char HomeDir[MAX_PATH];          char HomeDir[MAX_PATH];
1129          char Temp[MAX_PATH];          char Temp[MAX_PATH];
# Line 1152  void FAR PASCAL OpenHelp(UINT Command, D Line 1152  void FAR PASCAL OpenHelp(UINT Command, D
1152          }          }
1153  }  }
1154    
1155  HWND FAR PASCAL GetNthWin(int n)  HWND PASCAL GetNthWin(int n)
1156  {  {
1157          if (n<pm->NWin) {          if (n<pm->NWin) {
1158                  return pm->WinList[n];                  return pm->WinList[n];
# Line 1202  static void get_valid_window_and_memoriz Line 1202  static void get_valid_window_and_memoriz
1202  }  }
1203    
1204  // ウィンドウを左右に並べて表示する(Show Windows Side by Side)  // ウィンドウを左右に並べて表示する(Show Windows Side by Side)
1205  void FAR PASCAL ShowAllWinSidebySide(HWND myhwnd)  void PASCAL ShowAllWinSidebySide(HWND myhwnd)
1206  {  {
1207          int n;          int n;
1208          HWND hwnd[MAXNWIN];          HWND hwnd[MAXNWIN];
# Line 1212  void FAR PASCAL ShowAllWinSidebySide(HWN Line 1212  void FAR PASCAL ShowAllWinSidebySide(HWN
1212  }  }
1213    
1214  // ウィンドウを上下に並べて表示する(Show Windows Stacked)  // ウィンドウを上下に並べて表示する(Show Windows Stacked)
1215  void FAR PASCAL ShowAllWinStacked(HWND myhwnd)  void PASCAL ShowAllWinStacked(HWND myhwnd)
1216  {  {
1217          int n;          int n;
1218          HWND hwnd[MAXNWIN];          HWND hwnd[MAXNWIN];
# Line 1222  void FAR PASCAL ShowAllWinStacked(HWND m Line 1222  void FAR PASCAL ShowAllWinStacked(HWND m
1222  }  }
1223    
1224  // ウィンドウを重ねて表示する(Cascade)  // ウィンドウを重ねて表示する(Cascade)
1225  void FAR PASCAL ShowAllWinCascade(HWND myhwnd)  void PASCAL ShowAllWinCascade(HWND myhwnd)
1226  {  {
1227          int n;          int n;
1228          HWND hwnd[MAXNWIN];          HWND hwnd[MAXNWIN];
# Line 1232  void FAR PASCAL ShowAllWinCascade(HWND m Line 1232  void FAR PASCAL ShowAllWinCascade(HWND m
1232  }  }
1233    
1234  // 全Tera Termに終了指示を出す。  // 全Tera Termに終了指示を出す。
1235  void FAR PASCAL BroadcastClosingMessage(HWND myhwnd)  void PASCAL BroadcastClosingMessage(HWND myhwnd)
1236  {  {
1237          int i, max;          int i, max;
1238          HWND hwnd[MAXNWIN];          HWND hwnd[MAXNWIN];
# Line 1255  void FAR PASCAL BroadcastClosingMessage( Line 1255  void FAR PASCAL BroadcastClosingMessage(
1255  }  }
1256    
1257    
1258  int FAR PASCAL CommReadRawByte(PComVar cv, LPBYTE b)  int PASCAL CommReadRawByte(PComVar cv, LPBYTE b)
1259  {  {
1260          if ( ! cv->Ready ) {          if ( ! cv->Ready ) {
1261                  return 0;                  return 0;
# Line 1276  int FAR PASCAL CommReadRawByte(PComVar c Line 1276  int FAR PASCAL CommReadRawByte(PComVar c
1276          }          }
1277  }  }
1278    
1279  void PASCAL FAR CommInsert1Byte(PComVar cv, BYTE b)  void PASCAL CommInsert1Byte(PComVar cv, BYTE b)
1280  {  {
1281          if ( ! cv->Ready ) {          if ( ! cv->Ready ) {
1282                  return;                  return;
# Line 1319  void Log1Bin(PComVar cv, BYTE b) Line 1319  void Log1Bin(PComVar cv, BYTE b)
1319          }          }
1320  }  }
1321    
1322  int FAR PASCAL CommRead1Byte(PComVar cv, LPBYTE b)  int PASCAL CommRead1Byte(PComVar cv, LPBYTE b)
1323  {  {
1324          int c;          int c;
1325    
# Line 1389  int FAR PASCAL CommRead1Byte(PComVar cv, Line 1389  int FAR PASCAL CommRead1Byte(PComVar cv,
1389          return c;          return c;
1390  }  }
1391    
1392  int FAR PASCAL CommRawOut(PComVar cv, PCHAR B, int C)  int PASCAL CommRawOut(PComVar cv, PCHAR B, int C)
1393  {  {
1394          int a;          int a;
1395    
# Line 1412  int FAR PASCAL CommRawOut(PComVar cv, PC Line 1412  int FAR PASCAL CommRawOut(PComVar cv, PC
1412          return a;          return a;
1413  }  }
1414    
1415  int FAR PASCAL CommBinaryOut(PComVar cv, PCHAR B, int C)  int PASCAL CommBinaryOut(PComVar cv, PCHAR B, int C)
1416  {  {
1417          int a, i, Len;          int a, i, Len;
1418          char d[3];          char d[3];
# Line 1449  int FAR PASCAL CommBinaryOut(PComVar cv, Line 1449  int FAR PASCAL CommBinaryOut(PComVar cv,
1449          return i;          return i;
1450  }  }
1451    
1452  int FAR PASCAL CommBinaryBuffOut(PComVar cv, PCHAR B, int C)  int PASCAL CommBinaryBuffOut(PComVar cv, PCHAR B, int C)
1453  {  {
1454          int a, i, Len, OutLen;          int a, i, Len, OutLen;
1455          char d[3];          char d[3];
# Line 1751  int TextOutMBCS(PComVar cv, PCHAR B, int Line 1751  int TextOutMBCS(PComVar cv, PCHAR B, int
1751          return i;          return i;
1752  }  }
1753    
1754  int FAR PASCAL CommTextOut(PComVar cv, PCHAR B, int C)  int PASCAL CommTextOut(PComVar cv, PCHAR B, int C)
1755  {  {
1756          int i, TempLen, OutLen;          int i, TempLen, OutLen;
1757          char TempStr[12];          char TempStr[12];
# Line 1854  int FAR PASCAL CommTextOut(PComVar cv, P Line 1854  int FAR PASCAL CommTextOut(PComVar cv, P
1854          return i;          return i;
1855  }  }
1856    
1857  int FAR PASCAL CommBinaryEcho(PComVar cv, PCHAR B, int C)  int PASCAL CommBinaryEcho(PComVar cv, PCHAR B, int C)
1858  {  {
1859          int a, i, Len;          int a, i, Len;
1860          char d[3];          char d[3];
# Line 1898  int FAR PASCAL CommBinaryEcho(PComVar cv Line 1898  int FAR PASCAL CommBinaryEcho(PComVar cv
1898          return i;          return i;
1899  }  }
1900    
1901  int FAR PASCAL TextEchoMBCS(PComVar cv, PCHAR B, int C)  int PASCAL TextEchoMBCS(PComVar cv, PCHAR B, int C)
1902  {  {
1903          int i, TempLen;          int i, TempLen;
1904          WORD K;          WORD K;
# Line 2073  int FAR PASCAL TextEchoMBCS(PComVar cv, Line 2073  int FAR PASCAL TextEchoMBCS(PComVar cv,
2073          return i;          return i;
2074  }  }
2075    
2076  int FAR PASCAL CommTextEcho(PComVar cv, PCHAR B, int C)  int PASCAL CommTextEcho(PComVar cv, PCHAR B, int C)
2077  {  {
2078          int i, TempLen;          int i, TempLen;
2079          char TempStr[11];          char TempStr[11];
# Line 2386  static NOTIFYICONDATA notify_icon = {0}; Line 2386  static NOTIFYICONDATA notify_icon = {0};
2386  static int NotifyIconShowCount = 0;  static int NotifyIconShowCount = 0;
2387  static HICON CustomIcon = NULL;  static HICON CustomIcon = NULL;
2388    
2389  void FAR PASCAL SetCustomNotifyIcon(HICON icon)  void PASCAL SetCustomNotifyIcon(HICON icon)
2390  {  {
2391          CustomIcon = icon;          CustomIcon = icon;
2392  }  }
2393    
2394  HICON FAR PASCAL GetCustomNotifyIcon()  HICON PASCAL GetCustomNotifyIcon()
2395  {  {
2396          return CustomIcon;          return CustomIcon;
2397  }  }
2398    
2399  void FAR PASCAL CreateNotifyIcon(PComVar cv)  void PASCAL CreateNotifyIcon(PComVar cv)
2400  {  {
2401          if (cv->NotifyIcon == NULL) {          if (cv->NotifyIcon == NULL) {
2402                  notify_icon.cbSize = sizeof(notify_icon);                  notify_icon.cbSize = sizeof(notify_icon);
# Line 2428  void FAR PASCAL CreateNotifyIcon(PComVar Line 2428  void FAR PASCAL CreateNotifyIcon(PComVar
2428          return;          return;
2429  }  }
2430    
2431  void FAR PASCAL DeleteNotifyIcon(PComVar cv)  void PASCAL DeleteNotifyIcon(PComVar cv)
2432  {  {
2433          if (cv->NotifyIcon) {          if (cv->NotifyIcon) {
2434                  Shell_NotifyIcon(NIM_DELETE, cv->NotifyIcon);                  Shell_NotifyIcon(NIM_DELETE, cv->NotifyIcon);
# Line 2439  void FAR PASCAL DeleteNotifyIcon(PComVar Line 2439  void FAR PASCAL DeleteNotifyIcon(PComVar
2439          return;          return;
2440  }  }
2441    
2442  void FAR PASCAL ShowNotifyIcon(PComVar cv)  void PASCAL ShowNotifyIcon(PComVar cv)
2443  {  {
2444          if (cv->NotifyIcon == NULL) {          if (cv->NotifyIcon == NULL) {
2445                  CreateNotifyIcon(cv);                  CreateNotifyIcon(cv);
# Line 2454  void FAR PASCAL ShowNotifyIcon(PComVar c Line 2454  void FAR PASCAL ShowNotifyIcon(PComVar c
2454          return;          return;
2455  }  }
2456    
2457  void FAR PASCAL HideNotifyIcon(PComVar cv)  void PASCAL HideNotifyIcon(PComVar cv)
2458  {  {
2459          if (NotifyIconShowCount > 1) {          if (NotifyIconShowCount > 1) {
2460                  NotifyIconShowCount -= 1;                  NotifyIconShowCount -= 1;
# Line 2472  void FAR PASCAL HideNotifyIcon(PComVar c Line 2472  void FAR PASCAL HideNotifyIcon(PComVar c
2472          return;          return;
2473  }  }
2474    
2475  void FAR PASCAL SetVerNotifyIcon(PComVar cv, unsigned int ver)  void PASCAL SetVerNotifyIcon(PComVar cv, unsigned int ver)
2476  {  {
2477          if (cv->NotifyIcon) {          if (cv->NotifyIcon) {
2478                  cv->NotifyIcon->uVersion = ver;                  cv->NotifyIcon->uVersion = ver;
# Line 2481  void FAR PASCAL SetVerNotifyIcon(PComVar Line 2481  void FAR PASCAL SetVerNotifyIcon(PComVar
2481          return;          return;
2482  }  }
2483    
2484  void FAR PASCAL NotifyMessage(PComVar cv, char *msg, char *title, DWORD flag)  void PASCAL NotifyMessage(PComVar cv, char *msg, char *title, DWORD flag)
2485  {  {
2486          if (msg == NULL) {          if (msg == NULL) {
2487                  return;                  return;

Legend:
Removed from v.6713  
changed lines
  Added in v.6801

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26