Add a new back-end function to return the exit code of the remote
[u/mdw/putty] / psftp.c
diff --git a/psftp.c b/psftp.c
index ba740ce..52f6dc9 100644 (file)
--- a/psftp.c
+++ b/psftp.c
@@ -1104,14 +1104,6 @@ static struct sftp_cmd_lookup {
            sftp_cmd_mv
     },
     {
-       "put", TRUE, "upload a file from your local machine to the server",
-           " <filename> [ <remote-filename> ]\n"
-           "  Uploads a file to the server and stores it there under\n"
-           "  the same name, or under a different one if you supply the\n"
-           "  argument <remote-filename>.\n",
-           sftp_cmd_put
-    },
-    {
        "open", TRUE, "connect to a host",
            " [<user>@]<hostname>\n"
            "  Establishes an SFTP connection to a given host. Only usable\n"
@@ -1120,6 +1112,14 @@ static struct sftp_cmd_lookup {
            sftp_cmd_open
     },
     {
+       "put", TRUE, "upload a file from your local machine to the server",
+           " <filename> [ <remote-filename> ]\n"
+           "  Uploads a file to the server and stores it there under\n"
+           "  the same name, or under a different one if you supply the\n"
+           "  argument <remote-filename>.\n",
+           sftp_cmd_put
+    },
+    {
        "pwd", TRUE, "print your remote working directory",
            "\n"
            "  Print the current remote working directory for your SFTP session.\n",
@@ -1623,7 +1623,7 @@ void fatalbox(char *fmt, ...)
     vsprintf(str + strlen(str), fmt, ap);
     va_end(ap);
     strcat(str, "\n");
-    fputs(stderr, str);
+    fputs(str, stderr);
 
     exit(1);
 }
@@ -1636,7 +1636,7 @@ void connection_fatal(char *fmt, ...)
     vsprintf(str + strlen(str), fmt, ap);
     va_end(ap);
     strcat(str, "\n");
-    fputs(stderr, str);
+    fputs(str, stderr);
 
     exit(1);
 }