=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/telnet/main.c,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** src/usr.bin/telnet/main.c 1996/03/27 19:33:03 1.2 --- src/usr.bin/telnet/main.c 1996/07/03 14:01:56 1.3 *************** *** 1,4 **** ! /* $OpenBSD: main.c,v 1.2 1996/03/27 19:33:03 niklas Exp $ */ /* $NetBSD: main.c,v 1.5 1996/02/28 21:04:05 thorpej Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: main.c,v 1.3 1996/07/03 14:01:56 niklas Exp $ */ /* $NetBSD: main.c,v 1.5 1996/02/28 21:04:05 thorpej Exp $ */ /* *************** *** 45,51 **** static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 5/30/95"; static char rcsid[] = "$NetBSD: main.c,v 1.5 1996/02/28 21:04:05 thorpej Exp $"; #else ! static char rcsid[] = "$OpenBSD: main.c,v 1.2 1996/03/27 19:33:03 niklas Exp $"; #endif #endif /* not lint */ --- 45,51 ---- static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 5/30/95"; static char rcsid[] = "$NetBSD: main.c,v 1.5 1996/02/28 21:04:05 thorpej Exp $"; #else ! static char rcsid[] = "$OpenBSD: main.c,v 1.3 1996/07/03 14:01:56 niklas Exp $"; #endif #endif /* not lint */ *************** *** 90,99 **** prompt, #ifdef AUTHENTICATION "[-8] [-E] [-K] [-L] [-S tos] [-X atype] [-a] [-c] [-d] [-e char]", ! "\n\t[-k realm] [-l user] [-f/-F] [-n tracefile] ", #else "[-8] [-E] [-L] [-S tos] [-a] [-c] [-d] [-e char] [-l user]", ! "\n\t[-n tracefile]", #endif #if defined(TN3270) && defined(unix) # ifdef AUTHENTICATION --- 90,99 ---- prompt, #ifdef AUTHENTICATION "[-8] [-E] [-K] [-L] [-S tos] [-X atype] [-a] [-c] [-d] [-e char]", ! "\n\t[-k realm] [-l user] [-f/-F] [-n tracefile] [-b hostalias ]", #else "[-8] [-E] [-L] [-S tos] [-a] [-c] [-d] [-e char] [-l user]", ! "\n\t[-n tracefile] [-b hostalias ]", #endif #if defined(TN3270) && defined(unix) # ifdef AUTHENTICATION *************** *** 121,127 **** extern char *optarg; extern int optind; int ch; ! char *user, *strrchr(); #ifdef FORWARD extern int forward_flags; #endif /* FORWARD */ --- 121,127 ---- extern char *optarg; extern int optind; int ch; ! char *user, *alias, *strrchr(); #ifdef FORWARD extern int forward_flags; #endif /* FORWARD */ *************** *** 138,149 **** else prompt = argv[0]; ! user = NULL; rlogin = (strncmp(prompt, "rlog", 4) == 0) ? '~' : _POSIX_VDISABLE; autologin = -1; ! while ((ch = getopt(argc, argv, "8EKLS:X:acde:fFk:l:n:rt:x")) != EOF) { switch(ch) { case '8': eight = 3; /* binary output and input */ --- 138,149 ---- else prompt = argv[0]; ! user = alias = NULL; rlogin = (strncmp(prompt, "rlog", 4) == 0) ? '~' : _POSIX_VDISABLE; autologin = -1; ! while ((ch = getopt(argc, argv, "8EKLS:X:ab:cde:fFk:l:n:rt:x")) != EOF) { switch(ch) { case '8': eight = 3; /* binary output and input */ *************** *** 241,246 **** --- 241,249 ---- autologin = 1; user = optarg; break; + case 'b': + alias = optarg; + break; case 'n': #if defined(TN3270) && defined(unix) /* distinguish between "-n oasynch" and "-noasynch" */ *************** *** 296,301 **** --- 299,308 ---- if (user) { *argp++ = "-l"; *argp++ = user; + } + if (alias) { + *argp++ = "-b"; + *argp++ = alias; } *argp++ = argv[0]; /* host */ if (argc > 1)