ttyout
const char ttyout[] = "ttyout";
fprintf(ttyout,
fprintf(ttyout, "Gate ftp: %s, server %s, port %s.\n",
fprintf(ttyout, "%s: bad debugging value.\n",
fprintf(ttyout, "Debugging %s (debug=%d).\n", onoff(ftp_debug), ftp_debug);
ttyout);
fprintf(ttyout, "Local directory now: %s\n", localcwd);
fprintf(ttyout, "Unable to determine local directory\n");
fprintf(ttyout,
fputs(shellp, ttyout);
putc('\n', ttyout);
fputs("Login failed.\n", ttyout);
fprintf(ttyout, "Unable to determine remote directory\n");
fprintf(ttyout, "Remote directory: %s\n", remotecwd);
fprintf(ttyout, "Unable to determine local directory\n");
fprintf(ttyout, "Local directory: %s\n", localcwd);
ttyout);
ttyout);
fprintf(ttyout, "%s %s [anpqy?]? ", promptleft, promptright);
(void)fflush(ttyout);
fprintf(ttyout, "%s; %s aborted\n", errormsg, cmd);
fprintf(ttyout,
fputs("?Ambiguous command.\n", ttyout);
fputs("?Invalid command.\n", ttyout);
fputs("?Invalid proxy command.\n", ttyout);
fputs("Not connected.\n", ttyout);
fputs("Interactive mode: off.\n", ttyout);
fprintf(ttyout, "%s aborted.\n", cmd);
fputs("Ntrans off.\n", ttyout);
fprintf(ttyout,
fputs("Nmap off.\n", ttyout);
fputs("nmap: unbalanced brackets.\n", ttyout);
fprintf(ttyout, "Passive mode: %s; fallback to active mode: %s.\n",
fprintf(ttyout, "%s%s", sep, p->t_name);
fputs(" ]\n", ttyout);
fprintf(ttyout,
fprintf(ttyout,
ttyout);
fprintf(ttyout, "Using %s mode to transfer files.\n", typename);
fprintf(ttyout,
fprintf(ttyout, "restart: Invalid offset `%s'\n",
fputs("No restart point defined.\n", ttyout);
fprintf(ttyout,
ttyout);
ttyout);
fputs("macdef: end of file encountered.\n", ttyout);
ttyout);
fprintf(ttyout,
fprintf(ttyout, "%s\t%s", argv[1],
fprintf(ttyout, "%s: unknown mode.\n", ttype);
fprintf(ttyout,
fprintf(ttyout, "Socket buffer sizes: send %d, receive %d.\n",
fprintf(ttyout, "%-*s\t%s\n", OPTIONINDENT,
fprintf(ttyout, "No such option `%s'.\n", option);
fprintf(ttyout, "Setting `%s' to `%s'.\n",
fprintf(ttyout, "No such option `%s'.\n", argv[1]);
fprintf(ttyout, "Unsetting `%s'.\n", o->name);
fprintf(ttyout,
fprintf(ttyout,
fprintf(ttyout,
fprintf(ttyout, "We only support %s mode, sorry.\n", modename);
fprintf(ttyout, "We only support %s format, sorry.\n", formname);
fprintf(ttyout, "We only support %s structure, sorry.\n", structname);
fprintf(ttyout,
write(fileno(ttyout), "\n", 1);
fprintf(ttyout,
fprintf(ttyout, "Skipping non-relative filename `%s'\n",
fprintf(ttyout, "Can't open source file %s\n", argv[1]);
fprintf(ttyout, "Connected %sto %s.\n",
fputs("Not connected.\n", ttyout);
fprintf(ttyout, "Connected for proxy commands to %s.\n",
fputs("No proxy connection.\n", ttyout);
fprintf(ttyout, "Gate ftp: %s, server %s, port %s.\n", onoff(gatemode),
fprintf(ttyout, "Passive mode: %s; fallback to active mode: %s.\n",
fprintf(ttyout, "Mode: %s; Type: %s; Form: %s; Structure: %s.\n",
fprintf(ttyout, "Verbose: %s; Bell: %s; Prompting: %s; Globbing: %s.\n",
fprintf(ttyout, "Store unique: %s; Receive unique: %s.\n",
fprintf(ttyout, "Preserve modification times: %s.\n", onoff(preserve));
fprintf(ttyout, "Case: %s; CR stripping: %s.\n", onoff(mcase),
fprintf(ttyout, "Ntrans: (in) %s (out) %s\n", ntin, ntout);
fputs("Ntrans: off.\n", ttyout);
fprintf(ttyout, "Nmap: (in) %s (out) %s\n", mapin, mapout);
fputs("Nmap: off.\n", ttyout);
fprintf(ttyout,
fprintf(ttyout,
fprintf(ttyout,
fprintf(ttyout,
fprintf(ttyout, "Use of PORT cmds: %s.\n", onoff(sendport));
fprintf(ttyout, "Use of EPSV/EPRT cmds for IPv4: %s%s.\n", onoff(epsv4),
fprintf(ttyout, "Use of EPSV/EPRT cmds for IPv6: %s%s.\n", onoff(epsv6),
fprintf(ttyout, "Command line editing: %s.\n",
fputs("Macros:\n", ttyout);
fprintf(ttyout, "\t%s\n", macros[i].mac_name);
fprintf(ttyout, "Version: %s %s\n", FTP_PRODUCT, FTP_VERSION);
fprintf(ttyout, "%s %s.\n", mesg, onoff(*var));
ttyout);
fprintf(ttyout, "mark: bad bytecount value `%s'.\n",
fprintf(ttyout, "Hash mark printing %s", onoff(hash));
fprintf(ttyout, " (%d bytes/hash mark)", mark);
fputs(".\n", ttyout);
putc('\n', ttyout);
fprintf(ttyout, "\n%s\n", emesg);
ttyout);
fputs("?Ambiguous command.\n", ttyout);
fputs("?Invalid command.\n", ttyout);
fputs("Not connected.\n", ttyout);
fputs(line, ttyout);
putc('\n', ttyout);
(void)putc('\007', ttyout);
fprintf(ttyout, "'%s' macro not found.\n", argv[1]);
fprintf(ttyout, "parsed range as: ");
fprintf(ttyout, "*");
fprintf(ttyout, LLF "-" LLF, (LLT)pi->rangestart,
fprintf(ttyout, "/" LLF "\n", (LLT)pi->entitylen);
fprintf(ttyout, "%s\n", message);
fprintf(ttyout, "Authorization failed. Retry (y/n)? ");
fprintf(ttyout, "Redirected via %s\n",
fprintf(ttyout, "Redirected to %s\n",
fputs(")\n", ttyout);
fprintf(ttyout, "Copying %s", decodedpath);
fprintf(ttyout, " (restarting at " LLF ")",
fputs("\n", ttyout);
fprintf(ttyout, "Requesting %s\n", url);
fputs(")\n", ttyout);
fprintf(ttyout, "already done\n");
(void)putc('#', ttyout);
(void)fflush(ttyout);
(void)putc('#', ttyout);
(void)putc('\n', ttyout);
fprintf(ttyout,
write(fileno(ttyout), msgbuf, len);
write(fileno(ttyout), msgbuf, len);
"for the NetBSD project. Execute `man ftp' for more details.\n", ttyout);
"Please email feedback to <lukem@NetBSD.org>.\n", ttyout);
"For more information, see http://www.NetBSD.org/\n", ttyout);
fprintf(ttyout, "Version: %s %s%s\n",
fprintf(ttyout, "`%s' is an interesting topic.\n", url);
fputs("\n", ttyout);
fprintf(ttyout, "Username for `%s': ", realm);
fprintf(ttyout, "%s\n", uuser);
(void)fflush(ttyout);
fprintf(ttyout, "Trying [%s]:%s ...\n",
fprintf(ttyout, "Trying %s:%s ...\n",
fprintf(ttyout, "%svia %s:%u", leading,
fputs(leading, ttyout);
fprintf(ttyout, "restarting at " LLF, (LLT)restart_point);
fprintf(ttyout, "parsed time as: %s",
fprintf(ttyout, "%swith authorization", leading);
fprintf(ttyout, "%swith proxy authorization", leading);
(void)putc('#', ttyout);
(void)fflush(ttyout);
(void)putc('#', ttyout);
(void)putc('\n', ttyout);
fprintf(ttyout,
fputs("File may not have transferred correctly.\n", ttyout);
fprintf(ttyout,
fprintf(ttyout, "%s\n", reply_string);
ttyout);
fprintf(ttyout, "%s\n", reply_string);
ttyout);
fputs("Passive mode refused.\n", ttyout);
"Passive mode AF mismatch. Shouldn't happen!\n", ttyout);
ttyout);
"Passive mode address scan failure. Shouldn't happen!\n", ttyout);
ttyout);
ttyout);
"Passive mode address scan failure. Shouldn't happen!\n", ttyout);
"Passive mode AF mismatch. Shouldn't happen!\n", ttyout);
ttyout);
"Passive mode address scan failure. Shouldn't happen!\n", ttyout);
"Passive mode AF mismatch. Shouldn't happen!\n", ttyout);
ttyout);
fputs("Unknown passive mode AF.\n", ttyout);
ttyout);
fputs("parse error!\n", ttyout);
fputs("parse error!\n", ttyout);
fprintf(ttyout, "%s\n", reply_string);
write(fileno(ttyout), "\n", 1);
ttyout);
fputs("No primary connection.\n", ttyout);
fprintf(ttyout, "local: %s remote: %s\n", local, remote);
fprintf(ttyout, "Trying [%s]:%s ...\n", hname,
fprintf(ttyout, "Trying %s:%s ...\n", hname,
ttyout);
write(fileno(ttyout), msgbuf, len);
fputs("Usage error\n", ttyout);
fprintf(ttyout, "Connected to %s.\n", hostname);
write(fileno(ttyout), "\n", 1);
write(fileno(ttyout), "\n", 1);
fputs("---> ", ttyout);
fputs("PASS XXXX", ttyout);
fputs("ACCT XXXX", ttyout);
vfprintf(ttyout, fmt, ap);
putc('\n', ttyout);
(void)fprintf(ttyout,
(void)fflush(ttyout);
fprintf(ttyout, "%s:", hostname);
(void)putc(c, ttyout);
(void)putc(c, ttyout);
(void)fflush(ttyout);
write(fileno(ttyout), msgbuf, len);
(void)putc('#', ttyout);
(void)fflush(ttyout);
(void)putc('#', ttyout);
(void)putc('\n', ttyout);
(void)fflush(ttyout);
fprintf(ttyout, "local: %s ", local);
fprintf(ttyout, "remote: %s\n", remote);
fprintf(ttyout, "%s: not a plain file.\n", local);
(void)putc('#', ttyout);
(void)fflush(ttyout);
(void)putc('#', ttyout);
(void)putc('\n', ttyout);
fprintf(ttyout, "local: %s ", local);
fprintf(ttyout, "remote: %s\n", remote);
#define DPRINTF(...) DWFTP(if (ftp_debug) (void)fprintf(ttyout, __VA_ARGS__))
#define UPRINTF(...) (void)fprintf(ttyout, __VA_ARGS__)
fprintf(ttyout,
fprintf(ttyout, "?Ambiguous %s command `%s'\n",
fprintf(ttyout, "?Invalid %s command `%s'\n",
fprintf(ttyout, "%-*s\t%s\n", HELPINDENT,
ttyout = stdout;
if (isatty(fileno(ttyout))) {
ttyout = stderr;
setvbuf(ttyout, NULL, _IOLBF, 0);
fprintf(ttyout,
fputs(prompt(), ttyout);
fprintf(ttyout, "%s ", p);
(void)fflush(ttyout);
putc('\n', ttyout);
ttyout);
putc('\n', ttyout);
ttyout);
fputs("?Ambiguous command.\n", ttyout);
fputs("?Invalid command.\n", ttyout);
fputs("Not connected.\n", ttyout);
(void)putc('\007', ttyout);
(void)write(fileno(ttyout), buf, len);
(void)write(fileno(ttyout), buf, len);
(void)write(siginfo ? STDERR_FILENO : fileno(ttyout), buf, len);
write(fileno(ttyout), "\n", 1);
return (tcgetpgrp(fileno(ttyout)) == pgrp);
GLOBAL FILE *ttyout; /* stdout, or stderr if retrieving to stdout */
ttyout);
ttyout);
ttyout);
ttyout);
ttyout);
ttyout);
ERR_print_errors_fp(ttyout);
fprintf(ttyout, "\r\n%s: transfer aborted"
ERR_print_errors_fp(ttyout);
ERR_print_errors_fp(ttyout);
extern FILE *ttyout;
fprintf(ttyout, "Timeout establishing SSL connection to `%s'\n",
fprintf(ttyout, "SSL connection established using %s\n",
fprintf(ttyout, "Certificate subject: %s\n", str);
fprintf(ttyout, "Certificate issuer: %s\n", str);
el = el_init(getprogname(), stdin, ttyout, stderr);
fprintf(ttyout, "Already connected to %s, use close first.\n",
fprintf(ttyout,
fprintf(ttyout, "Remote system type is %.*s.\n",
fprintf(ttyout,
ttyout);
#define DEBUG_FEAT(x) fprintf(ttyout, "features[" #x "] = %d\n", features[(x)])
write(fileno(ttyout), "\n", 1);
fprintf(ttyout, "Name (%s:%s): ", host, localname);
fprintf(ttyout, "Name (%s): ", host);
fprintf(ttyout, "%s; %s aborted.\n", errormsg, "login");
fputs("Sorry, arguments too long.\n", ttyout);
fprintf(ttyout, "(%s) ", aprompt);
fprintf(ttyout, "%s; %s aborted.\n", errormsg, "operation");
fprintf(ttyout,
fputs(reply_string, ttyout);
putc('\n', ttyout);
fprintf(ttyout,
fprintf(ttyout,
fprintf(ttyout, "Converted to `%s'\n", timestr);
fprintf(ttyout, "Can't parse time `%s'.\n", timestr);
fputs(reply_string, ttyout);
putc('\n', ttyout);
fputs(p, ttyout);
putc('\n', ttyout);
(void)putc('\t', ttyout);
if (ioctl(fileno(ttyout), TIOCGWINSZ, &winsize) != -1 &&
(void)fputs(p, ttyout);
(void)putc('\n', ttyout);
(void)putc('\t', ttyout);
(void)fputs("--more--", ttyout);
(void)putc(BELL, ttyout);
(void)fputs("\r \r", ttyout);
(void)putc('\n', ttyout);
static int ttyout; /* output is a tty */
if (ttyout) {
ttyout = 1;
if (ttyout && pgpause && !isatty(fileno(stdin))) {
ttyout = eflag ? stderr : stdout;
if (ioctl(fileno(ttyout), TIOCGSIZE, &ts) == -1)
process_rings(int netin, int netout, int netex, int ttyin, int ttyout,
set[1].events = ttyout ? POLLOUT : 0;
int netin, netout, netex, ttyin, ttyout;
ttyout = ring_full_count(&ttyoring);
returnValue = process_rings(netin, netout, netex, ttyin, ttyout, !block);
ttyout = to;