Module Name: othersrc
Committed By: lukem
Date: Sun Nov 15 10:12:38 UTC 2009
Modified Files:
othersrc/usr.bin/tnftp/src: cmds.c extern.h fetch.c ftp.1 main.c util.c
version.h
Log Message:
merge NetBSD-20090915
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 othersrc/usr.bin/tnftp/src/cmds.c
cvs rdiff -u -r1.11 -r1.12 othersrc/usr.bin/tnftp/src/extern.h
cvs rdiff -u -r1.17 -r1.18 othersrc/usr.bin/tnftp/src/fetch.c
cvs rdiff -u -r1.12 -r1.13 othersrc/usr.bin/tnftp/src/ftp.1
cvs rdiff -u -r1.16 -r1.17 othersrc/usr.bin/tnftp/src/main.c
cvs rdiff -u -r1.20 -r1.21 othersrc/usr.bin/tnftp/src/util.c
cvs rdiff -u -r1.3 -r1.4 othersrc/usr.bin/tnftp/src/version.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: othersrc/usr.bin/tnftp/src/cmds.c
diff -u othersrc/usr.bin/tnftp/src/cmds.c:1.15 othersrc/usr.bin/tnftp/src/cmds.c:1.16
--- othersrc/usr.bin/tnftp/src/cmds.c:1.15 Wed May 20 12:53:47 2009
+++ othersrc/usr.bin/tnftp/src/cmds.c Sun Nov 15 10:12:37 2009
@@ -1,5 +1,5 @@
-/* $NetBSD: cmds.c,v 1.15 2009/05/20 12:53:47 lukem Exp $ */
-/* from NetBSD: cmds.c,v 1.129 2009/04/12 10:18:52 lukem Exp */
+/* $NetBSD: cmds.c,v 1.16 2009/11/15 10:12:37 lukem Exp $ */
+/* from NetBSD: cmds.c,v 1.130 2009/07/13 19:05:41 roy Exp */
/*-
* Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
#if 0
static char sccsid[] = "@(#)cmds.c 8.6 (Berkeley) 10/9/94";
#else
-__RCSID(" NetBSD: cmds.c,v 1.129 2009/04/12 10:18:52 lukem Exp ");
+__RCSID(" NetBSD: cmds.c,v 1.130 2009/07/13 19:05:41 roy Exp ");
#endif
#endif /* not lint */
@@ -181,7 +181,7 @@
while (1) {
fprintf(ttyout, "%s %s [anpqy?]? ", promptleft, promptright);
(void)fflush(ttyout);
- if (getline(stdin, cline, sizeof(cline), &errormsg) < 0) {
+ if (get_line(stdin, cline, sizeof(cline), &errormsg) < 0) {
mflag = 0;
fprintf(ttyout, "%s; %s aborted\n", errormsg, cmd);
return (0);
@@ -776,7 +776,7 @@
argv[0] = cmdbuf;
gmode = restart_point ? "r+" : "w";
- while (getline(fp, buf, sizeof(buf), NULL) >= 0) {
+ while (get_line(fp, buf, sizeof(buf), NULL) >= 0) {
if (buf[0] == '\0')
continue;
argv[1] = buf;
Index: othersrc/usr.bin/tnftp/src/extern.h
diff -u othersrc/usr.bin/tnftp/src/extern.h:1.11 othersrc/usr.bin/tnftp/src/extern.h:1.12
--- othersrc/usr.bin/tnftp/src/extern.h:1.11 Wed May 20 12:53:47 2009
+++ othersrc/usr.bin/tnftp/src/extern.h Sun Nov 15 10:12:37 2009
@@ -1,5 +1,5 @@
-/* $NetBSD: extern.h,v 1.11 2009/05/20 12:53:47 lukem Exp $ */
-/* from NetBSD: extern.h,v 1.76 2009/04/12 10:18:52 lukem Exp */
+/* $NetBSD: extern.h,v 1.12 2009/11/15 10:12:37 lukem Exp $ */
+/* from NetBSD: extern.h,v 1.77 2009/07/13 19:05:41 roy Exp */
/*-
* Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
@@ -135,7 +135,7 @@
void get(int, char **);
struct cmd *getcmd(const char *);
int getit(int, char **, int, const char *);
-int getline(FILE *, char *, size_t, const char **);
+int get_line(FILE *, char *, size_t, const char **);
struct option *getoption(const char *);
char *getoptionvalue(const char *);
void getremoteinfo(void);
Index: othersrc/usr.bin/tnftp/src/fetch.c
diff -u othersrc/usr.bin/tnftp/src/fetch.c:1.17 othersrc/usr.bin/tnftp/src/fetch.c:1.18
--- othersrc/usr.bin/tnftp/src/fetch.c:1.17 Wed May 20 12:53:47 2009
+++ othersrc/usr.bin/tnftp/src/fetch.c Sun Nov 15 10:12:37 2009
@@ -1,5 +1,5 @@
-/* $NetBSD: fetch.c,v 1.17 2009/05/20 12:53:47 lukem Exp $ */
-/* from NetBSD: fetch.c,v 1.187 2009/04/12 10:18:52 lukem Exp */
+/* $NetBSD: fetch.c,v 1.18 2009/11/15 10:12:37 lukem Exp $ */
+/* from NetBSD: fetch.c,v 1.191 2009/08/17 09:08:16 christos Exp */
/*-
* Copyright (c) 1997-2009 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID(" NetBSD: fetch.c,v 1.187 2009/04/12 10:18:52 lukem Exp ");
+__RCSID(" NetBSD: fetch.c,v 1.191 2009/08/17 09:08:16 christos Exp ");
#endif /* not lint */
/*
@@ -193,7 +193,7 @@
fprintf(ttyout, "%s\n", uuser);
} else {
(void)fflush(ttyout);
- if (getline(stdin, uuser, sizeof(uuser), &errormsg) < 0) {
+ if (get_line(stdin, uuser, sizeof(uuser), &errormsg) < 0) {
warnx("%s; can't authenticate", errormsg);
goto cleanup_auth_url;
}
@@ -841,7 +841,7 @@
}
/* Read the response */
- len = getline(fin, buf, sizeof(buf), &errormsg);
+ len = get_line(fin, buf, sizeof(buf), &errormsg);
if (len < 0) {
if (*errormsg == '\n')
errormsg++;
@@ -865,7 +865,7 @@
/* Read the rest of the header. */
while (1) {
- len = getline(fin, buf, sizeof(buf), &errormsg);
+ len = get_line(fin, buf, sizeof(buf), &errormsg);
if (len < 0) {
if (*errormsg == '\n')
errormsg++;
@@ -1070,7 +1070,7 @@
fprintf(ttyout,
"Authorization failed. Retry (y/n)? ");
- if (getline(stdin, reply, sizeof(reply), NULL)
+ if (get_line(stdin, reply, sizeof(reply), NULL)
< 0) {
goto cleanup_fetch_url;
}
@@ -1505,7 +1505,8 @@
autologin = oautologin;
if ((connected == 0) ||
(connected == 1 && !ftp_login(host, uuser, pass))) {
- warnx("Can't connect or login to host `%s:%s'", host, port);
+ warnx("Can't connect or login to host `%s:%s'",
+ host, port ? port : "?");
goto cleanup_fetch_ftp;
}
Index: othersrc/usr.bin/tnftp/src/ftp.1
diff -u othersrc/usr.bin/tnftp/src/ftp.1:1.12 othersrc/usr.bin/tnftp/src/ftp.1:1.13
--- othersrc/usr.bin/tnftp/src/ftp.1:1.12 Wed May 20 12:53:47 2009
+++ othersrc/usr.bin/tnftp/src/ftp.1 Sun Nov 15 10:12:37 2009
@@ -1,5 +1,5 @@
-.\" $NetBSD: ftp.1,v 1.12 2009/05/20 12:53:47 lukem Exp $
-.\" from NetBSD: ftp.1,v 1.129 2009/05/04 19:47:09 wiz Exp
+.\" $NetBSD: ftp.1,v 1.13 2009/11/15 10:12:37 lukem Exp $
+.\" from NetBSD: ftp.1,v 1.130 2009/07/11 18:35:48 joerg Exp
.\"
.\" Copyright (c) 1996-2008 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -63,8 +63,7 @@
.Os
.Sh NAME
.Nm ftp
-.Nd
-Internet file transfer program
+.Nd Internet file transfer program
.Sh SYNOPSIS
.Nm
.Op Fl 46AadefginpRtVv
Index: othersrc/usr.bin/tnftp/src/main.c
diff -u othersrc/usr.bin/tnftp/src/main.c:1.16 othersrc/usr.bin/tnftp/src/main.c:1.17
--- othersrc/usr.bin/tnftp/src/main.c:1.16 Wed May 20 12:53:47 2009
+++ othersrc/usr.bin/tnftp/src/main.c Sun Nov 15 10:12:37 2009
@@ -1,5 +1,5 @@
-/* $NetBSD: main.c,v 1.16 2009/05/20 12:53:47 lukem Exp $ */
-/* from NetBSD: main.c,v 1.116 2009/04/24 08:57:26 lukem Exp */
+/* $NetBSD: main.c,v 1.17 2009/11/15 10:12:37 lukem Exp $ */
+/* from NetBSD: main.c,v 1.117 2009/07/13 19:05:41 roy Exp */
/*-
* Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
@@ -103,7 +103,7 @@
#if 0
static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 10/9/94";
#else
-__RCSID(" NetBSD: main.c,v 1.116 2009/04/24 08:57:26 lukem Exp ");
+__RCSID(" NetBSD: main.c,v 1.117 2009/07/13 19:05:41 roy Exp ");
#endif
#endif /* not lint */
@@ -682,7 +682,7 @@
fprintf(ttyout, "%s ", p);
}
(void)fflush(ttyout);
- len = getline(stdin, line, sizeof(line), NULL);
+ len = get_line(stdin, line, sizeof(line), NULL);
switch (len) {
case -1: /* EOF */
case -2: /* error */
Index: othersrc/usr.bin/tnftp/src/util.c
diff -u othersrc/usr.bin/tnftp/src/util.c:1.20 othersrc/usr.bin/tnftp/src/util.c:1.21
--- othersrc/usr.bin/tnftp/src/util.c:1.20 Wed May 20 12:53:47 2009
+++ othersrc/usr.bin/tnftp/src/util.c Sun Nov 15 10:12:37 2009
@@ -1,5 +1,5 @@
-/* $NetBSD: util.c,v 1.20 2009/05/20 12:53:47 lukem Exp $ */
-/* from NetBSD: util.c,v 1.151 2009/04/15 04:19:39 jld Exp */
+/* $NetBSD: util.c,v 1.21 2009/11/15 10:12:37 lukem Exp $ */
+/* from NetBSD: util.c,v 1.152 2009/07/13 19:05:41 roy Exp */
/*-
* Copyright (c) 1997-2009 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID(" NetBSD: util.c,v 1.151 2009/04/15 04:19:39 jld Exp ");
+__RCSID(" NetBSD: util.c,v 1.152 2009/07/13 19:05:41 roy Exp ");
#endif /* not lint */
/*
@@ -415,7 +415,7 @@
else
fprintf(ttyout, "Name (%s): ", host);
errormsg = NULL;
- nlen = getline(stdin, tmp, sizeof(tmp), &errormsg);
+ nlen = get_line(stdin, tmp, sizeof(tmp), &errormsg);
if (nlen < 0) {
fprintf(ttyout, "%s; %s aborted.\n", errormsg, "login");
code = -1;
@@ -523,7 +523,7 @@
fprintf(ttyout, "(%s) ", aprompt);
line[len++] = ' ';
errormsg = NULL;
- nlen = getline(stdin, line + len, sizeof(line)-len, &errormsg);
+ nlen = get_line(stdin, line + len, sizeof(line)-len, &errormsg);
if (nlen < 0) {
fprintf(ttyout, "%s; %s aborted.\n", errormsg, "operation");
intr(0);
@@ -1255,7 +1255,7 @@
* -3 line was too long
*/
int
-getline(FILE *stream, char *buf, size_t buflen, const char **errormsg)
+get_line(FILE *stream, char *buf, size_t buflen, const char **errormsg)
{
int rv, ch;
size_t len;
Index: othersrc/usr.bin/tnftp/src/version.h
diff -u othersrc/usr.bin/tnftp/src/version.h:1.3 othersrc/usr.bin/tnftp/src/version.h:1.4
--- othersrc/usr.bin/tnftp/src/version.h:1.3 Wed May 20 12:53:47 2009
+++ othersrc/usr.bin/tnftp/src/version.h Sun Nov 15 10:12:37 2009
@@ -1,5 +1,5 @@
-/* $NetBSD: version.h,v 1.3 2009/05/20 12:53:47 lukem Exp $ */
-/* from NetBSD: version.h,v 1.79 2009/04/24 08:57:26 lukem Exp */
+/* $NetBSD: version.h,v 1.4 2009/11/15 10:12:37 lukem Exp $ */
+/* from NetBSD: version.h,v 1.80 2009/11/15 10:03:16 lukem Exp */
/*-
* Copyright (c) 1999-2009 The NetBSD Foundation, Inc.
@@ -35,5 +35,5 @@
#endif
#ifndef FTP_VERSION
-#define FTP_VERSION "20090424"
+#define FTP_VERSION "20090915"
#endif