SCCS-vsn: usr.bin/ftp/ftp.c 5.20
-static char sccsid[] = "@(#)ftp.c 5.19 (Berkeley) %G%";
+static char sccsid[] = "@(#)ftp.c 5.20 (Berkeley) %G%";
#endif /* not lint */
#include "ftp_var.h"
#endif /* not lint */
#include "ftp_var.h"
char *host;
{
char tmp[80];
char *host;
{
char tmp[80];
- char *user, *pass, *acct, *getlogin(), *mygetpass();
+ char *user, *pass, *acct, *getlogin(), *getpass();
int n, aflag = 0;
user = pass = acct = 0;
int n, aflag = 0;
user = pass = acct = 0;
n = command("USER %s", user);
if (n == CONTINUE) {
if (pass == NULL)
n = command("USER %s", user);
if (n == CONTINUE) {
if (pass == NULL)
- pass = mygetpass("Password:");
+ pass = getpass("Password:");
n = command("PASS %s", pass);
}
if (n == CONTINUE) {
aflag++;
n = command("PASS %s", pass);
}
if (n == CONTINUE) {
aflag++;
- acct = mygetpass("Account:");
+ acct = getpass("Account:");
n = command("ACCT %s", acct);
}
if (n != COMPLETE) {
n = command("ACCT %s", acct);
}
if (n != COMPLETE) {
sendrequest(cmd, local, remote)
char *cmd, *local, *remote;
{
sendrequest(cmd, local, remote)
char *cmd, *local, *remote;
{
- FILE *fin, *dout = 0, *mypopen();
- int (*closefunc)(), mypclose(), fclose(), (*oldintr)(), (*oldintp)();
+ FILE *fin, *dout = 0, *popen();
+ int (*closefunc)(), pclose(), fclose(), (*oldintr)(), (*oldintp)();
int abortsend();
char buf[BUFSIZ];
long bytes = 0, hashbytes = sizeof (buf);
int abortsend();
char buf[BUFSIZ];
long bytes = 0, hashbytes = sizeof (buf);
fin = stdin;
else if (*local == '|') {
oldintp = signal(SIGPIPE,SIG_IGN);
fin = stdin;
else if (*local == '|') {
oldintp = signal(SIGPIPE,SIG_IGN);
- fin = mypopen(local + 1, "r");
+ fin = popen(local + 1, "r");
if (fin == NULL) {
perror(local + 1);
(void) signal(SIGINT, oldintr);
if (fin == NULL) {
perror(local + 1);
(void) signal(SIGINT, oldintr);
} else {
fin = fopen(local, "r");
if (fin == NULL) {
} else {
fin = fopen(local, "r");
if (fin == NULL) {
recvrequest(cmd, local, remote, mode)
char *cmd, *local, *remote, *mode;
{
recvrequest(cmd, local, remote, mode)
char *cmd, *local, *remote, *mode;
{
- FILE *fout, *din = 0, *mypopen();
- int (*closefunc)(), mypclose(), fclose(), (*oldintr)(), (*oldintp)();
+ FILE *fout, *din = 0, *popen();
+ int (*closefunc)(), pclose(), fclose(), (*oldintr)(), (*oldintp)();
int abortrecv(), oldverbose, oldtype = 0, tcrflag, nfnd;
char buf[BUFSIZ], *gunique(), msg;
long bytes = 0, hashbytes = sizeof (buf);
int abortrecv(), oldverbose, oldtype = 0, tcrflag, nfnd;
char buf[BUFSIZ], *gunique(), msg;
long bytes = 0, hashbytes = sizeof (buf);
fout = stdout;
else if (*local == '|') {
oldintp = signal(SIGPIPE, SIG_IGN);
fout = stdout;
else if (*local == '|') {
oldintp = signal(SIGPIPE, SIG_IGN);
- fout = mypopen(local + 1, "w");
+ fout = popen(local + 1, "w");
if (fout == NULL) {
perror(local+1);
goto abort;
}
if (fout == NULL) {
perror(local+1);
goto abort;
}
}
else {
fout = fopen(local, mode);
}
else {
fout = fopen(local, mode);