(void)strlcpy(reply_string, current_line, len + 1);
(void)strlcpy(reply_string, current_line, len);
getreply(expecteof)	int expecteof;{	char current_line[BUFSIZ];	/* last line of previous reply */	int c, n, line;	int dig;	int originalcode = 0, continuation = 0;	sig_t oldintr;	int pflag = 0;	char *cp, *pt = pasv;	memset(current_line, 0, sizeof(current_line));	oldintr = signal(SIGINT, cmdabort);	for (line = 0 ;; line++) {		dig = n = code = 0;		cp = current_line;		while ((c = fgetc(cin)) != '\n') {			if (c == IAC) {     /* handle telnet commands */				switch (c = fgetc(cin)) {				case WILL:				case WONT:					c = fgetc(cin);					fprintf(cout, "%c%c%c", IAC, DONT, c);					(void)fflush(cout);					break;				case DO:				case DONT:					c = fgetc(cin);					fprintf(cout, "%c%c%c", IAC, WONT, c);					(void)fflush(cout);					break;				default:					break;				}				continue;			}			dig++;			if (c == EOF) {				if (expecteof) {					(void)signal(SIGINT, oldintr);					code = 221;					return (0);				}				lostpeer();				if (verbose) {					fputs("421 Service not available, remote server has closed connection.\n", ttyout);					(void)fflush(ttyout);				}				code = 421;				return (4);			}			if (c != '\r' && (verbose > 0 ||			    ((verbose > -1 && n == '5' && dig > 4)) &&			    (((!n && c < '5') || (n && n < '5'))			     || !retry_connect))) {				if (proxflag &&				   (dig == 1 || (dig == 5 && verbose == 0)))					fprintf(ttyout, "%s:", hostname);				(void)putc(c, ttyout);			}			if (dig < 4 && isdigit(c))				code = code * 10 + (c - '0');			if (!pflag && (code == 227 || code == 228))				pflag = 1;			else if (!pflag && code == 229)				pflag = 100;			if (dig > 4 && pflag == 1 && isdigit(c))				pflag = 2;			if (pflag == 2) {				if (c != '\r' && c != ')') {					if (pt < &pasv[sizeof(pasv) - 1])						*pt++ = c;				} else {					*pt = '\0';					pflag = 3;				}			}			if (pflag == 100 && c == '(')				pflag = 2;			if (dig == 4 && c == '-') {				if (continuation)					code = 0;				continuation++;			}			if (n == 0)				n = c;			if (cp < &current_line[sizeof(current_line) - 1])				*cp++ = c;		}		if (verbose > 0 || ((verbose > -1 && n == '5') &&		    (n < '5' || !retry_connect))) {			(void)putc(c, ttyout);			(void)fflush (ttyout);		}		if (line == 0) {			size_t len = cp - current_line;			if (len > sizeof(reply_string))				len = sizeof(reply_string);			(void)strlcpy(reply_string, current_line, len + 1);		}		if (continuation && code != originalcode) {			if (originalcode == 0)				originalcode = code;			continue;		}		*cp = '\0';		if (n != '1')			cpend = 0;		(void)signal(SIGINT, oldintr);		if (code == 421 || originalcode == 421)			lostpeer();		if (abrtflag && oldintr != cmdabort && oldintr != SIG_IGN)			(*oldintr)(SIGINT);		return (n - '0');	}}