diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ftp/ftp.c | 20 | ||||
-rw-r--r-- | usr.bin/ftp/ruserpass.c | 22 |
2 files changed, 21 insertions, 21 deletions
diff --git a/usr.bin/ftp/ftp.c b/usr.bin/ftp/ftp.c index 35e46d98cfa..5f50e776f25 100644 --- a/usr.bin/ftp/ftp.c +++ b/usr.bin/ftp/ftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftp.c,v 1.22 1997/09/04 04:37:16 millert Exp $ */ +/* $OpenBSD: ftp.c,v 1.23 1997/09/05 00:02:29 millert Exp $ */ /* $NetBSD: ftp.c,v 1.27 1997/08/18 10:20:23 lukem Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)ftp.c 8.6 (Berkeley) 10/27/94"; #else -static char rcsid[] = "$OpenBSD: ftp.c,v 1.22 1997/09/04 04:37:16 millert Exp $"; +static char rcsid[] = "$OpenBSD: ftp.c,v 1.23 1997/09/05 00:02:29 millert Exp $"; #endif #endif /* not lint */ @@ -283,18 +283,18 @@ getreply(expecteof) for (line = 0 ;; line++) { dig = n = code = 0; cp = current_line; - while ((c = getc(cin)) != '\n') { + while ((c = fgetc(cin)) != '\n') { if (c == IAC) { /* handle telnet commands */ - switch (c = getc(cin)) { + switch (c = fgetc(cin)) { case WILL: case WONT: - c = getc(cin); + c = fgetc(cin); fprintf(cout, "%c%c%c", IAC, DONT, c); (void)fflush(cout); break; case DO: case DONT: - c = getc(cin); + c = fgetc(cin); fprintf(cout, "%c%c%c", IAC, WONT, c); (void)fflush(cout); break; @@ -623,7 +623,7 @@ sendrequest(cmd, local, remote, printnames) break; case TYPE_A: - while ((c = getc(fin)) != EOF) { + while ((c = fgetc(fin)) != EOF) { if (c == '\n') { while (hash && (!progress || filesize < 0) && (bytes >= hashbytes)) { @@ -958,7 +958,7 @@ recvrequest(cmd, local, remote, lmode, printnames, ignorespecial) goto done; n = restart_point; for (i = 0; i++ < n;) { - if ((ch = getc(fout)) == EOF) + if ((ch = fgetc(fout)) == EOF) goto done; if (ch == '\n') i++; @@ -973,7 +973,7 @@ done: return; } } - while ((c = getc(din)) != EOF) { + while ((c = fgetc(din)) != EOF) { if (c == '\n') bare_lfs++; while (c == '\r') { @@ -984,7 +984,7 @@ done: hashbytes += mark; } bytes++; - if ((c = getc(din)) != '\n' || tcrflag) { + if ((c = fgetc(din)) != '\n' || tcrflag) { if (ferror(fout)) goto break2; (void)putc('\r', fout); diff --git a/usr.bin/ftp/ruserpass.c b/usr.bin/ftp/ruserpass.c index eb9f08e5fc8..e7a8130304e 100644 --- a/usr.bin/ftp/ruserpass.c +++ b/usr.bin/ftp/ruserpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ruserpass.c,v 1.9 1997/07/25 21:56:22 millert Exp $ */ +/* $OpenBSD: ruserpass.c,v 1.10 1997/09/05 00:02:30 millert Exp $ */ /* $NetBSD: ruserpass.c,v 1.14 1997/07/20 09:46:01 lukem Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)ruserpass.c 8.4 (Berkeley) 4/27/95"; #else -static char rcsid[] = "$OpenBSD: ruserpass.c,v 1.9 1997/07/25 21:56:22 millert Exp $"; +static char rcsid[] = "$OpenBSD: ruserpass.c,v 1.10 1997/09/05 00:02:30 millert Exp $"; #endif #endif /* not lint */ @@ -189,7 +189,7 @@ next: (void)fclose(cfile); return (0); } - while ((c=getc(cfile)) != EOF) + while ((c = fgetc(cfile)) != EOF) if (c != ' ' && c != '\t') break; if (c == EOF || c == '\n') { @@ -203,7 +203,7 @@ next: } tmp = macros[macnum].mac_name; *tmp++ = c; - for (i=0; i < 8 && (c=getc(cfile)) != EOF && + for (i=0; i < 8 && (c = fgetc(cfile)) != EOF && !isspace(c); ++i) { *tmp++ = c; } @@ -214,7 +214,7 @@ next: } *tmp = '\0'; if (c != '\n') { - while ((c=getc(cfile)) != EOF && c != '\n'); + while ((c = fgetc(cfile)) != EOF && c != '\n'); } if (c == EOF) { fputs( @@ -230,7 +230,7 @@ next: } tmp = macros[macnum].mac_start; while (tmp != macbuf + 4096) { - if ((c=getc(cfile)) == EOF) { + if ((c = fgetc(cfile)) == EOF) { fputs( "Macro definition missing null line terminator.\n", ttyout); goto bad; @@ -273,24 +273,24 @@ token() if (feof(cfile) || ferror(cfile)) return (0); - while ((c = getc(cfile)) != EOF && + while ((c = fgetc(cfile)) != EOF && (c == '\n' || c == '\t' || c == ' ' || c == ',')) continue; if (c == EOF) return (0); cp = tokval; if (c == '"') { - while ((c = getc(cfile)) != EOF && c != '"') { + while ((c = fgetc(cfile)) != EOF && c != '"') { if (c == '\\') - c = getc(cfile); + c = fgetc(cfile); *cp++ = c; } } else { *cp++ = c; - while ((c = getc(cfile)) != EOF + while ((c = fgetc(cfile)) != EOF && c != '\n' && c != '\t' && c != ' ' && c != ',') { if (c == '\\') - c = getc(cfile); + c = fgetc(cfile); *cp++ = c; } } |