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 2588 by maya, Sat Sep 20 03:02:36 2008 UTC revision 2595 by maya, Sun Oct 12 05:57:04 2008 UTC
# Line 2470  static void ParseHostName(char *HostStr, Line 2470  static void ParseHostName(char *HostStr,
2470           * tn3270:// .... /           * tn3270:// .... /
2471           */           */
2472    
2473          int i, is_handler = 0, is_port = 0;          int i, is_telnet_handler = 0, is_port = 0;
2474          char *s;          char *s;
2475          char b;          char b;
2476    
# Line 2482  static void ParseHostName(char *HostStr, Line 2482  static void ParseHostName(char *HostStr,
2482                  i = strlen(HostStr);                  i = strlen(HostStr);
2483                  if (i > 0 && (HostStr[i - 1] == '/'))                  if (i > 0 && (HostStr[i - 1] == '/'))
2484                          HostStr[i - 1] = '\0';                          HostStr[i - 1] = '\0';
2485                  is_handler = 1;                  is_telnet_handler = 1;
2486            }
2487            /* strlen("ssh://") == 6 */
2488            else if ((_strnicmp(HostStr, "ssh://", 6) == 0)) {
2489                    /* trim "ssh://" and tail "/" */
2490                    memmove(HostStr, &(HostStr[6]), strlen(HostStr) - 5);
2491                    i = strlen(HostStr);
2492                    if (i > 0 && (HostStr[i - 1] == '/'))
2493                            HostStr[i - 1] = '\0';
2494          }          }
2495    
2496          /* parsing string enclosed by [ ] */          /* parsing string enclosed by [ ] */
# Line 2536  static void ParseHostName(char *HostStr, Line 2544  static void ParseHostName(char *HostStr,
2544                          *port = 65535;                          *port = 65535;
2545                  is_port = 1;                  is_port = 1;
2546          }          }
2547          if (is_handler == 1 && is_port == 0) {          if (is_telnet_handler == 1 && is_port == 0) {
2548                  *port = 23;                  *port = 23;
2549          }          }
2550  }  }

Legend:
Removed from v.2588  
changed lines
  Added in v.2595

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