} else usage();
} else { cmdline_error("unknown option \"%s\"", argv[i]); }
int main(int argc, char *argv[]){    int i;    default_protocol = PROT_TELNET;    flags = FLAG_STDERR;    cmdline_tooltype = TOOLTYPE_FILETRANSFER;    ssh_get_line = &console_get_line;    init_winsock();    sk_init();    for (i = 1; i < argc; i++) {	int ret;	if (argv[i][0] != '-')	    break;	ret = cmdline_process_param(argv[i], i+1<argc?argv[i+1]:NULL, 1);	if (ret == -2) {	    cmdline_error("option \"%s\" requires an argument", argv[i]);	} else if (ret == 2) {	    i++;	       /* skip next argument */	} else if (ret == 1) {	    /* We have our own verbosity in addition to `flags'. */	    if (flags & FLAG_VERBOSE)		verbose = 1;	} 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], "-gui") == 0 && i + 1 < argc) {	    gui_hwnd = argv[++i];	    gui_mode = 1;	    console_batch_mode = TRUE;        } else if (strcmp(argv[i], "-ls") == 0) {	    list = 1;	} else if (strcmp(argv[i], "-batch") == 0) {	    console_batch_mode = 1;	} else if (strcmp(argv[i], "-unsafe") == 0) {	    scp_unsafe_mode = 1;	} else if (strcmp(argv[i], "--") == 0) {	    i++;	    break;	} else	    usage();    }    argc -= i;    argv += i;    back = NULL;    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 (back != NULL && back->socket(backhandle) != NULL) {	char ch;	back->special(backhandle, TS_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);}