char *dir = NULL;
char cmd[2048];
struct sftp_conn *conn;
int err, interactive;
int err, interactive, prt=1;
EditLine *el = NULL;
#ifdef USE_LIBEDIT
History *hl = NULL;
signal(SIGINT, SIG_IGN);
if (el == NULL) {
if (interactive)
if (interactive && prt)
printf("sftp> ");
if (fgets(cmd, sizeof(cmd), infile) == NULL) {
if (errno == EAGAIN) {
prt = 0;
usleep(10*1000);
continue;
}
printf("\n");
break;
prt = 1;
if (!interactive) { /* Echo command */
printf("sftp> %s", cmd);
if (strlen(cmd) > 0 &&