Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 49 of file cmds.c.
Referenced by main().
{ char *host; if (connected) { printf("Already connected to %s, use close first.\n", hostname); (void) fflush(stdout); code = -1; return; } if (argc < 2) { (void) strcat(line, " "); printf("(to) "); (void) fflush(stdout); (void) gets(&line[strlen(line)]); makeargv(); argc = margc; argv = margv; } if (argc > 3) { printf("usage: %s host-name [port]\n", argv[0]); (void) fflush(stdout); code = -1; return; } if (argc > 2) { portnum = atoi(argv[2]); if (portnum <= 0) { printf("%s: bad port number-- %s\n", argv[1], argv[2]); printf ("usage: %s host-name [port]\n", argv[0]); (void) fflush(stdout); code = -1; return; } portnum = htons(portnum); } host = hookup(argv[1], portnum); if (host) { #if defined(unix) && NBBY == 8 int overbose; #endif connected = 1; if (autologin) (void) login(argv[1]); #if defined(unix) && NBBY == 8 /* * this ifdef is to keep someone form "porting" this to an incompatible * system and not checking this out. This way they have to think about it. */ overbose = verbose; if (debug == 0) verbose = -1; allbinary = 0; if (command("SYST") == COMPLETE && overbose) { register char *cp, c; cp = index(reply_string+4, ' '); if (cp == NULL) cp = index(reply_string+4, '\r'); if (cp) { if (cp[-1] == '.') cp--; c = *cp; *cp = '\0'; } printf("Remote system type is %s.\n", reply_string+4); if (cp) *cp = c; } if (!strncmp(reply_string, "215 UNIX Type: L8", 17)) { setbinary(); /* allbinary = 1; this violates the RFC */ if (overbose) printf("Using %s mode to transfer files.\n", typename); } else if (overbose && !strncmp(reply_string, "215 TOPS20", 10)) { printf( "Remember to set tenex mode when transfering binary files from this machine.\n"); } verbose = overbose; #endif /* unix */ } (void) fflush(stdout); }