Merge argument parsing changes into this copy of telnet.

Submitted by:	markm
Approved by:	bmah
This commit is contained in:
Eric Melville 2002-11-27 06:34:24 +00:00
parent 53662117cc
commit 0d16d02150
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=107299
2 changed files with 12 additions and 4 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) {

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) {