Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/teraterm/ttpset/ttset.c

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

revision 6219 by doda, Tue Dec 22 12:28:20 2015 UTC revision 6286 by yutakapon, Mon Feb 1 15:14:14 2016 UTC
# Line 488  void FAR PASCAL ReadIniFile(PCHAR FName, Line 488  void FAR PASCAL ReadIniFile(PCHAR FName,
488          int i;          int i;
489          HDC TmpDC;          HDC TmpDC;
490          char Temp[MAX_PATH], Temp2[MAX_PATH];          char Temp[MAX_PATH], Temp2[MAX_PATH];
         OSVERSIONINFO osvi;  
491    
492          ts->Minimize = 0;          ts->Minimize = 0;
493          ts->HideWindow = 0;          ts->HideWindow = 0;
# Line 505  void FAR PASCAL ReadIniFile(PCHAR FName, Line 504  void FAR PASCAL ReadIniFile(PCHAR FName,
504    
505          ts->DisableTCPEchoCR = FALSE;          ts->DisableTCPEchoCR = FALSE;
506    
         osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);  
         GetVersionEx(&osvi);  
   
507          /* Version number */          /* Version number */
508  /*  GetPrivateProfileString(Section,"Version","",  /*  GetPrivateProfileString(Section,"Version","",
509                            Temp,sizeof(Temp),FName); */                            Temp,sizeof(Temp),FName); */
# Line 933  void FAR PASCAL ReadIniFile(PCHAR FName, Line 929  void FAR PASCAL ReadIniFile(PCHAR FName,
929            ts->MetaKey = IdMetaOff;            ts->MetaKey = IdMetaOff;
930    
931          // Windows95 系は左右の Alt の判別に非対応          // Windows95 系は左右の Alt の判別に非対応
932          if ((osvi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) && ts->MetaKey != IdMetaOff) {          if (!IsWindowsNTKernel() && ts->MetaKey != IdMetaOff) {
933            ts->MetaKey = IdMetaOn;            ts->MetaKey = IdMetaOn;
934          }          }
935    
# Line 3092  void GetInt(PKeyMap KeyMap, int KeyId, P Line 3088  void GetInt(PKeyMap KeyMap, int KeyId, P
3088                  Num = 0xFFFF;                  Num = 0xFFFF;
3089          else if (_stricmp(Temp, "off") == 0)          else if (_stricmp(Temp, "off") == 0)
3090                  Num = 0xFFFF;                  Num = 0xFFFF;
3091          else if (sscanf(Temp, "%d", &Num) != 1)          else if (sscanf(Temp, "%hd", &Num) != 1)
3092                  Num = 0xFFFF;                  Num = 0xFFFF;
3093    
3094          KeyMap->Map[KeyId - 1] = Num;          KeyMap->Map[KeyId - 1] = Num;
# Line 3567  static void ParseHostName(char *HostStr, Line 3563  static void ParseHostName(char *HostStr,
3563          } while (b != '\0' && b != ':');          } while (b != '\0' && b != ':');
3564          if (b == ':') {          if (b == ':') {
3565                  s[i - 1] = '\0';                  s[i - 1] = '\0';
3566                  if (sscanf(&(s[i]), "%d", port) != 1)                  if (sscanf(&(s[i]), "%hd", port) != 1)
3567                          *port = 65535;                          *port = 65535;
3568                  is_port = 1;                  is_port = 1;
3569          }          }
# Line 3774  void FAR PASCAL ParseParam(PCHAR Param, Line 3770  void FAR PASCAL ParseParam(PCHAR Param,
3770                  }                  }
3771                  else if (_strnicmp(Temp, "/P=", 3) == 0) {      /* TCP port num */                  else if (_strnicmp(Temp, "/P=", 3) == 0) {      /* TCP port num */
3772                          ParamPort = IdTCPIP;                          ParamPort = IdTCPIP;
3773                          if (sscanf(&Temp[3], "%d", &ParamTCP) != 1)                          if (sscanf(&Temp[3], "%hd", &ParamTCP) != 1)
3774                                  ParamTCP = 65535;                                  ParamTCP = 65535;
3775                  }                  }
3776                  else if (_strnicmp(Temp, "/R=", 3) == 0) {      /* Replay filename */                  else if (_strnicmp(Temp, "/R=", 3) == 0) {      /* Replay filename */

Legend:
Removed from v.6219  
changed lines
  Added in v.6286

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