summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/scp.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/ssh/scp.c')
-rw-r--r--usr.bin/ssh/scp.c40
1 files changed, 2 insertions, 38 deletions
diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c
index b65f588f29c..274884bb69d 100644
--- a/usr.bin/ssh/scp.c
+++ b/usr.bin/ssh/scp.c
@@ -75,12 +75,13 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: scp.c,v 1.66 2001/04/14 17:04:42 stevesk Exp $");
+RCSID("$OpenBSD: scp.c,v 1.67 2001/04/16 02:31:43 mouring Exp $");
#include "xmalloc.h"
#include "atomicio.h"
#include "pathnames.h"
#include "log.h"
+#include "scp-common.h"
/* For progressmeter() -- number of seconds before xfer considered "stalled" */
#define STALLTIME 5
@@ -188,7 +189,6 @@ typedef struct {
} BUF;
BUF *allocbuf(BUF *, int, int);
-char *colon(char *);
void lostconn(int);
void nospace(void);
int okname(char *);
@@ -208,7 +208,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);
@@ -325,17 +324,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[];
@@ -962,30 +950,6 @@ run_err(const char *fmt,...)
va_end(ap);
}
-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;