void cmd_status(int argc, char **argv) { OPT_HELP_NEW(_("Show status."), "status [options]", NULL); maxargs(optind - 1); if(ftp_connected()) printf(_("connected to '%s'\n"), host_getoname(ftp->host)); else puts(_("not connected")); if(ftp_loggedin()) printf(_("logged in as '%s'\n"), ftp->url->username); #ifdef HAVE_KERBEROS if(ftp_connected()) sec_status(); #endif if(list_numitem(gvFtpList) > 1 || ftp_connected()) printf(_("There are totally %u connections open\n"), list_numitem(gvFtpList)); }
void cmd_status(int argc, char **argv) { OPT_HELP("Show status. Usage:\n" " status [options]\n" "Options:\n" " -h, --help show this help\n"); maxargs(optind - 1); if(ftp_connected()) printf(_("connected to '%s'\n"), ftp->host->ohostname); else puts(_("not connected")); if(ftp_loggedin()) printf(_("logged in as '%s'\n"), ftp->url->username); #ifdef HAVE_KERBEROS if(ftp_connected()) sec_status(); #endif if(list_numitem(gvFtpList) > 1 || ftp_connected()) printf(_("There are totally %u connections open\n"), list_numitem(gvFtpList)); }