summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/tnftp/files/src/cmds.c6
-rw-r--r--net/tnftp/files/src/extern.h4
-rw-r--r--net/tnftp/files/src/fetch.c10
-rw-r--r--net/tnftp/files/src/main.c4
-rw-r--r--net/tnftp/files/src/util.c8
5 files changed, 16 insertions, 16 deletions
diff --git a/net/tnftp/files/src/cmds.c b/net/tnftp/files/src/cmds.c
index 3f5fe210285..6635945b365 100644
--- a/net/tnftp/files/src/cmds.c
+++ b/net/tnftp/files/src/cmds.c
@@ -1,4 +1,4 @@
-/* $NetBSD: cmds.c,v 1.8 2008/04/29 05:46:09 martin Exp $ */
+/* $NetBSD: cmds.c,v 1.9 2009/09/22 20:39:18 tnn Exp $ */
/* from NetBSD: cmds.c,v 1.123 2007/05/24 05:05:18 lukem Exp */
/*-
@@ -179,7 +179,7 @@ confirm(const char *cmd, const char *file)
while (1) {
fprintf(ttyout, "%s %s [anpqy?]? ", promptleft, promptright);
(void)fflush(ttyout);
- if (getline(stdin, line, sizeof(line), &errormsg) < 0) {
+ if (get_line(stdin, line, sizeof(line), &errormsg) < 0) {
mflag = 0;
fprintf(ttyout, "%s; %s aborted\n", errormsg, cmd);
return (0);
@@ -774,7 +774,7 @@ fget(int argc, char *argv[])
argv[0] = "get";
mode = 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;
diff --git a/net/tnftp/files/src/extern.h b/net/tnftp/files/src/extern.h
index 508b3a00891..187b93248a8 100644
--- a/net/tnftp/files/src/extern.h
+++ b/net/tnftp/files/src/extern.h
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.6 2008/04/29 05:46:09 martin Exp $ */
+/* $NetBSD: extern.h,v 1.7 2009/09/22 20:39:18 tnn Exp $ */
/* from NetBSD: extern.h,v 1.72 2007/05/24 05:05:18 lukem Exp */
/*-
@@ -135,7 +135,7 @@ int ftp_login(const char *, const char *, const char *);
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);
diff --git a/net/tnftp/files/src/fetch.c b/net/tnftp/files/src/fetch.c
index 6054e2aa7f0..ef238e53825 100644
--- a/net/tnftp/files/src/fetch.c
+++ b/net/tnftp/files/src/fetch.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fetch.c,v 1.7 2008/04/29 05:46:09 martin Exp $ */
+/* $NetBSD: fetch.c,v 1.8 2009/09/22 20:39:18 tnn Exp $ */
/* from NetBSD: fetch.c,v 1.180 2007/06/05 00:31:20 lukem Exp */
/*-
@@ -192,7 +192,7 @@ auth_url(const char *challenge, char **response, const char *guser,
fprintf(ttyout, "%s\n", user);
} else {
(void)fflush(ttyout);
- if (getline(stdin, user, sizeof(user), &errormsg) < 0) {
+ if (get_line(stdin, user, sizeof(user), &errormsg) < 0) {
warnx("%s; can't authenticate", errormsg);
goto cleanup_auth_url;
}
@@ -832,7 +832,7 @@ fetch_url(const char *url, const char *proxyenv, char *proxyauth, char *wwwauth)
}
/* 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++;
@@ -856,7 +856,7 @@ fetch_url(const char *url, const char *proxyenv, char *proxyauth, char *wwwauth)
/* 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++;
@@ -1060,7 +1060,7 @@ fetch_url(const char *url, const char *proxyenv, char *proxyauth, char *wwwauth)
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;
}
diff --git a/net/tnftp/files/src/main.c b/net/tnftp/files/src/main.c
index 55dd3c50bc3..c28625424aa 100644
--- a/net/tnftp/files/src/main.c
+++ b/net/tnftp/files/src/main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.8 2008/04/29 05:46:09 martin Exp $ */
+/* $NetBSD: main.c,v 1.9 2009/09/22 20:39:18 tnn Exp $ */
/* from NetBSD: main.c,v 1.105 2007/05/22 05:16:48 lukem Exp */
/*-
@@ -668,7 +668,7 @@ cmdscanner(void)
fprintf(ttyout, "%s ", p);
}
(void)fflush(ttyout);
- num = getline(stdin, line, sizeof(line), NULL);
+ num = get_line(stdin, line, sizeof(line), NULL);
switch (num) {
case -1: /* EOF */
case -2: /* error */
diff --git a/net/tnftp/files/src/util.c b/net/tnftp/files/src/util.c
index 33d4ea823e1..4c71faa7859 100644
--- a/net/tnftp/files/src/util.c
+++ b/net/tnftp/files/src/util.c
@@ -1,4 +1,4 @@
-/* $NetBSD: util.c,v 1.8 2008/04/29 05:46:09 martin Exp $ */
+/* $NetBSD: util.c,v 1.9 2009/09/22 20:39:18 tnn Exp $ */
/* from NetBSD: util.c,v 1.143 2007/05/24 05:05:19 lukem Exp */
/*-
@@ -415,7 +415,7 @@ ftp_login(const char *host, const char *luser, const char *lpass)
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 @@ another(int *pargc, char ***pargv, const char *prompt)
fprintf(ttyout, "(%s) ", prompt);
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);
@@ -1288,7 +1288,7 @@ isipv6addr(const char *addr)
* -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;