Borland makefile needs to define _WINDOWS; apparently this makefile
[sgt/putty] / psftp.c
diff --git a/psftp.c b/psftp.c
index a278260..93fa33f 100644 (file)
--- a/psftp.c
+++ b/psftp.c
@@ -32,6 +32,8 @@ static int do_sftp_init(void);
  */
 
 char *pwd, *homedir;
+static Backend *back;
+static void *backhandle;
 
 /* ----------------------------------------------------------------------
  * Higher-level helper functions used in commands.
@@ -1470,7 +1472,7 @@ void modalfatalbox(char *fmt, ...)
 
     cleanup_exit(1);
 }
-void connection_fatal(char *fmt, ...)
+void connection_fatal(void *frontend, char *fmt, ...)
 {
     char str[0x100];                  /* Make the size big enough */
     va_list ap;
@@ -1484,7 +1486,7 @@ void connection_fatal(char *fmt, ...)
     cleanup_exit(1);
 }
 
-void ldisc_send(char *buf, int len, int interactive)
+void ldisc_send(void *handle, char *buf, int len, int interactive)
 {
     /*
      * This is only here because of the calls to ldisc_send(NULL,
@@ -1767,6 +1769,7 @@ static int psftp_connect(char *userhost, char *user, int portnumber)
     }
     if (!cfg.username[0]) {
        printf("login as: ");
+       fflush(stdout);
        if (!fgets(cfg.username, sizeof(cfg.username), stdin)) {
            fprintf(stderr, "psftp: aborting\n");
            cleanup_exit(1);
@@ -1827,6 +1830,8 @@ static int psftp_connect(char *userhost, char *user, int portnumber)
        fprintf(stderr, "ssh_init: %s\n", err);
        return 1;
     }
+    logctx = log_init(NULL);
+    back->provide_logctx(backhandle, logctx);
     ssh_sftp_init();
     if (verbose && realhost != NULL)
        printf("Connected to %s\n", realhost);