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 6730 by doda, Wed May 17 13:02:09 2017 UTC revision 6738 by maya, Sat May 20 06:38:01 2017 UTC
# Line 4  Line 4 
4  /* IPv6 modification is Copyright(C) 2000 Jun-ya kato <kato@win6.jp> */  /* IPv6 modification is Copyright(C) 2000 Jun-ya kato <kato@win6.jp> */
5    
6  /* TTSET.DLL, setup file routines*/  /* TTSET.DLL, setup file routines*/
 #ifndef NO_INET6  
7  #include <winsock2.h>  #include <winsock2.h>
8  #include <ws2tcpip.h>  #include <ws2tcpip.h>
 #endif                                                  /* NO_INET6 */  
9  #include "teraterm.h"  #include "teraterm.h"
10  #include "tttypes.h"  #include "tttypes.h"
11  #include <stdio.h>  #include <stdio.h>
# Line 3615  BOOL NextParam(PCHAR Param, int *i, PCHA Line 3613  BOOL NextParam(PCHAR Param, int *i, PCHA
3613          return (strlen(Temp) > 0);          return (strlen(Temp) > 0);
3614  }  }
3615  #endif  #endif
 #ifndef NO_INET6  
3616  static void ParseHostName(char *HostStr, WORD * port)  static void ParseHostName(char *HostStr, WORD * port)
3617  {  {
3618          /*          /*
# Line 3700  static void ParseHostName(char *HostStr, Line 3697  static void ParseHostName(char *HostStr,
3697                  *port = 23;                  *port = 23;
3698          }          }
3699  }  }
 #endif                                                  /* NO_INET6 */  
3700    
3701    
3702  void FAR PASCAL ParseParam(PCHAR Param, PTTSet ts, PCHAR DDETopic)  void FAR PASCAL ParseParam(PCHAR Param, PTTSet ts, PCHAR DDETopic)
3703  {  {
3704          int i, pos, c;          int i, pos, c;
3705          //int param_top;          //int param_top;
 #ifdef NO_INET6  
         BYTE b;  
 #endif                                                  /* NO_INET6 */  
3706          char Temp[MaxStrLen]; // ttpmacroから呼ばれることを想定しMaxStrLenサイズとする          char Temp[MaxStrLen]; // ttpmacroから呼ばれることを想定しMaxStrLenサイズとする
3707          char Temp2[MaxStrLen];          char Temp2[MaxStrLen];
3708          char TempDir[MAXPATHLEN];          char TempDir[MAXPATHLEN];
# Line 3729  void FAR PASCAL ParseParam(PCHAR Param, Line 3722  void FAR PASCAL ParseParam(PCHAR Param,
3722          /* Set AutoConnect true as default (2008.2.16 by steven)*/          /* Set AutoConnect true as default (2008.2.16 by steven)*/
3723          ts->ComAutoConnect = TRUE;          ts->ComAutoConnect = TRUE;
3724    
 #ifndef NO_INET6  
         /* user specifies the protocol connecting to the host */  
         /* ts->ProtocolFamily = AF_UNSPEC; */  
 #endif                                                  /* NO_INET6 */  
   
3725          /* Get command line parameters */          /* Get command line parameters */
3726          if (DDETopic != NULL)          if (DDETopic != NULL)
3727                  DDETopic[0] = 0;                  DDETopic[0] = 0;
# Line 3947  void FAR PASCAL ParseParam(PCHAR Param, Line 3935  void FAR PASCAL ParseParam(PCHAR Param,
3935                                          ts->VTPos.x = 0;                                          ts->VTPos.x = 0;
3936                          }                          }
3937                  }                  }
 #ifndef NO_INET6  
3938                  else if (_stricmp(Temp, "/4") == 0)     /* Protocol Tera Term speaking */                  else if (_stricmp(Temp, "/4") == 0)     /* Protocol Tera Term speaking */
3939                          ts->ProtocolFamily = AF_INET;                          ts->ProtocolFamily = AF_INET;
3940                  else if (_stricmp(Temp, "/6") == 0)                  else if (_stricmp(Temp, "/6") == 0)
3941                          ts->ProtocolFamily = AF_INET6;                          ts->ProtocolFamily = AF_INET6;
 #endif  
3942                  else if (_stricmp(Temp, "/DUPLICATE") == 0) {   // duplicate session (2004.12.7. yutaka)                  else if (_stricmp(Temp, "/DUPLICATE") == 0) {   // duplicate session (2004.12.7. yutaka)
3943                          ts->DuplicateSession = 1;                          ts->DuplicateSession = 1;
3944    
# Line 3995  void FAR PASCAL ParseParam(PCHAR Param, Line 3981  void FAR PASCAL ParseParam(PCHAR Param,
3981                  ts->MacroFN[0] = 0;                  ts->MacroFN[0] = 0;
3982    
3983          if ((ts->HostName[0] != 0) && (ParamPort == IdTCPIP)) {          if ((ts->HostName[0] != 0) && (ParamPort == IdTCPIP)) {
 #ifndef NO_INET6  
3984                  ParseHostName(ts->HostName, &ParamTCP);                  ParseHostName(ts->HostName, &ParamTCP);
 #else                                                   /* NO_INET6 */  
                 if ((_strnicmp(ts->HostName, "telnet://", 9) == 0) ||  
                     (_strnicmp(ts->HostName, "tn3270://", 9) == 0)) {  
                         memmove(ts->HostName, &(ts->HostName[9]),  
                                 strlen(ts->HostName) - 8);  
                         i = strlen(ts->HostName);  
                         if ((i > 0) && (ts->HostName[i - 1] == '/'))  
                                 ts->HostName[i - 1] = 0;  
                 }  
                 i = 0;  
                 do {  
                         b = ts->HostName[i];  
                         i++;  
                 } while ((b != 0) && (b != ':'));  
                 if (b == ':') {  
                         ts->HostName[i - 1] = 0;  
                         if (sscanf(&(ts->HostName[i]), "%d", &ParamTCP) != 1)  
                                 ParamTCP = 0;  
                 }  
 #endif                                                  /* NO_INET6 */  
3985          }          }
3986    
3987          switch (ParamPort) {          switch (ParamPort) {

Legend:
Removed from v.6730  
changed lines
  Added in v.6738

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