Merge argument parsing changes into this copy of telnet.

Submitted by:	markm
Approved by:	bmah


git-svn-id: http://svn0.us-east.freebsd.org/base/head/contrib/telnet@107299 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
This commit is contained in:
eric 2002-11-27 06:34:24 +00:00
parent a2b2e46019
commit 9e0282c9ca
1 changed files with 6 additions and 2 deletions

View File

@ -2284,8 +2284,12 @@ tn(int argc, char *argv[])
#endif
(hostname = strrchr(hostp, ':')) == NULL)
hostname = strrchr(hostp, '@');
hostname++;
srcroute = 1;
if (hostname == NULL) {
hostname = hostp;
} else {
hostname++;
srcroute = 1;
}
} else
hostname = hostp;
if (!portp) {