diff options
Diffstat (limited to 'usr.bin/ftp/domacro.c')
-rw-r--r-- | usr.bin/ftp/domacro.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/usr.bin/ftp/domacro.c b/usr.bin/ftp/domacro.c index dd16c312bc6..b00d82c4489 100644 --- a/usr.bin/ftp/domacro.c +++ b/usr.bin/ftp/domacro.c @@ -1,4 +1,4 @@ -/* $OpenBSD: domacro.c,v 1.5 1997/03/14 04:32:13 millert Exp $ */ +/* $OpenBSD: domacro.c,v 1.6 1997/04/23 20:33:02 deraadt Exp $ */ /* $NetBSD: domacro.c,v 1.9 1997/03/13 06:23:14 lukem Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)domacro.c 8.3 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: domacro.c,v 1.5 1997/03/14 04:32:13 millert Exp $"; +static char rcsid[] = "$OpenBSD: domacro.c,v 1.6 1997/04/23 20:33:02 deraadt Exp $"; #endif #endif /* not lint */ @@ -59,7 +59,7 @@ domacro(argc, argv) struct cmd *c; if (argc < 2 && !another(&argc, &argv, "macro name")) { - printf("usage: %s macro_name\n", argv[0]); + fprintf(ttyout, "usage: %s macro_name\n", argv[0]); code = -1; return; } @@ -69,7 +69,7 @@ domacro(argc, argv) } } if (i == macnum) { - printf("'%s' macro not found.\n", argv[1]); + fprintf(ttyout, "'%s' macro not found.\n", argv[1]); code = -1; return; } @@ -121,23 +121,25 @@ TOP: makeargv(); c = getcmd(margv[0]); if (c == (struct cmd *)-1) { - puts("?Ambiguous command."); + fputs("?Ambiguous command.\n", ttyout); code = -1; } else if (c == 0) { - puts("?Invalid command."); + fputs("?Invalid command.\n", ttyout); code = -1; } else if (c->c_conn && !connected) { - puts("Not connected."); + fputs("Not connected.\n", ttyout); code = -1; } else { - if (verbose) - puts(line); + if (verbose) { + fputs(line, ttyout); + fputs("\n", ttyout); + } (*c->c_handler)(margc, margv); if (bell && c->c_bell) { - (void)putchar('\007'); + (void)putc('\007', ttyout); } (void)strcpy(line, line2); makeargv(); |