]> andersk Git - openssh.git/blobdiff - scp.c
- (bal) Cygwin lacks setgroups() API. Patch by Corinna Vinschen
[openssh.git] / scp.c
diff --git a/scp.c b/scp.c
index ef8ed9f28949e0b839355da2026bdd6982ccaa5a..1735693d682bf8923e51e6264e6d20738af79c24 100644 (file)
--- a/scp.c
+++ b/scp.c
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: scp.c,v 1.66 2001/04/14 17:04:42 stevesk Exp $");
+RCSID("$OpenBSD: scp.c,v 1.68 2001/04/22 12:34:05 markus Exp $");
 
 #include "xmalloc.h"
 #include "atomicio.h"
 #include "pathnames.h"
 #include "log.h"
 #include "misc.h"
+#include "scp-common.h"
 
 #ifdef HAVE___PROGNAME
 extern char *__progname;
@@ -114,7 +115,7 @@ void addargs(char *fmt, ...) __attribute__((format(printf, 1, 2)));
 static struct timeval start;
 
 /* Number of bytes of current file transferred so far. */
-volatile u_long statbytes;
+volatile off_t statbytes;
 
 /* Total size of current file. */
 off_t totalbytes = 0;
@@ -203,7 +204,6 @@ typedef struct {
 } BUF;
 
 BUF *allocbuf(BUF *, int, int);
-char *colon(char *);
 void lostconn(int);
 void nospace(void);
 int okname(char *);
@@ -223,7 +223,6 @@ void rsource(char *, struct stat *);
 void sink(int, char *[]);
 void source(int, char *[]);
 void tolocal(int, char *[]);
-char *cleanhostname(char *);
 void toremote(char *, int, char *[]);
 void usage(void);
 
@@ -345,17 +344,6 @@ main(argc, argv)
        exit(errs != 0);
 }
 
-char *
-cleanhostname(host)
-       char *host;
-{
-       if (*host == '[' && host[strlen(host) - 1] == ']') {
-               host[strlen(host) - 1] = '\0';
-               return (host + 1);
-       } else
-               return host;
-}
-
 void
 toremote(targ, argc, argv)
        char *targ, *argv[];
@@ -500,8 +488,8 @@ source(argc, argv)
        struct stat stb;
        static BUF buffer;
        BUF *bp;
-       off_t i;
-       int amt, fd, haderr, indx, result;
+       off_t i, amt, result;
+       int fd, haderr, indx;
        char *last, *name, buf[2048];
        int len;
 
@@ -1000,30 +988,6 @@ run_err(const char *fmt,...)
        }
 }
 
-char *
-colon(cp)
-       char *cp;
-{
-       int flag = 0;
-
-       if (*cp == ':')         /* Leading colon is part of file name. */
-               return (0);
-       if (*cp == '[')
-               flag = 1;
-
-       for (; *cp; ++cp) {
-               if (*cp == '@' && *(cp+1) == '[')
-                       flag = 1;
-               if (*cp == ']' && *(cp+1) == ':' && flag)
-                       return (cp+1);
-               if (*cp == ':' && !flag)
-                       return (cp);
-               if (*cp == '/')
-                       return (0);
-       }
-       return (0);
-}
-
 void
 verifydir(cp)
        char *cp;
This page took 0.035267 seconds and 4 git commands to generate.