flags = 0;
flags = FLAG_STDERR;
int main(int argc, char *argv[]){    int i;    int list = 0;    default_protocol = PROT_TELNET;    flags = 0;    ssh_get_password = &get_password;    init_winsock();    for (i = 1; i < argc; i++) {	if (argv[i][0] != '-')	    break;	if (strcmp(argv[i], "-v") == 0)	    verbose = 1, flags |= FLAG_VERBOSE;	else if (strcmp(argv[i], "-r") == 0)	    recursive = 1;	else if (strcmp(argv[i], "-p") == 0)	    preserve = 1;	else if (strcmp(argv[i], "-q") == 0)	    statistics = 0;	else if (strcmp(argv[i], "-h") == 0 ||		 strcmp(argv[i], "-?") == 0)	    usage();	else if (strcmp(argv[i], "-P") == 0 && i+1 < argc)	    portnumber = atoi(argv[++i]);	else if (strcmp(argv[i], "-pw") == 0 && i+1 < argc)	    password = argv[++i];	else if (strcmp(argv[i], "-gui") == 0 && i+1 < argc) {	    gui_hwnd = argv[++i];	    gui_mode = 1;	} else if (strcmp(argv[i], "-ls") == 0)		list = 1;	else if (strcmp(argv[i], "--") == 0)	{ i++; break; }	else	    usage();    }    argc -= i;    argv += i;    if (list) {	if (argc != 1)	    usage();	get_dir_list(argc, argv);    } else {	if (argc < 2)	    usage();	if (argc > 2)	    targetshouldbedirectory = 1;	if (colon(argv[argc-1]) != NULL)	    toremote(argc, argv);	else	    tolocal(argc, argv);    }    if (connection_open) {	char ch;	ssh_scp_send_eof();	ssh_scp_recv(&ch, 1);    }    WSACleanup();    random_save_seed();    /* GUI Adaptation - August 2000 */    if (gui_mode) {	unsigned int msg_id = WM_RET_ERR_CNT;	if (list) msg_id = WM_LS_RET_ERR_CNT;	while (!PostMessage( (HWND)atoi(gui_hwnd), msg_id, (WPARAM)errs, 0/*lParam*/ ) )	    SleepEx(1000,TRUE);    }    return (errs == 0 ? 0 : 1);}