* Copyright (c) 1988 Regents of the University of California.
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the University of California, Berkeley. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
"@(#) Copyright (c) 1988 Regents of the University of California.\n\
static char sccsid
[] = "@(#)main.c 1.9 (Berkeley) 9/26/88";
* main. Parse arguments, invoke the protocol or command parser.
tninit(); /* Clear out things */
while ((argc
> 1) && (argv
[1][0] == '-')) {
if (!strcmp(argv
[1], "-d")) {
} else if (!strcmp(argv
[1], "-n")) {
if ((argc
> 1) && (argv
[2][0] != '-')) { /* get file name */
NetTrace
= fopen(argv
[2], "w");
#if defined(TN3270) && defined(unix)
if (!strcmp(argv
[1], "-t")) {
if ((argc
> 1) && (argv
[2][0] != '-')) { /* get file name */
(void) strcpy(transcom
, argv
[2]);
} else if (!strcmp(argv
[1], "-noasynch")) {
#endif /* defined(TN3270) && defined(unix) */
if (argv
[1][1] != '\0') {
fprintf(stderr
, "Unknown option *%s*.\n", argv
[1]);
if (setjmp(toplevel
) != 0)
if (tn(argc
, argv
) == 1) {
#else /* !defined(TN3270) */
#endif /* defined(TN3270) */
#endif /* !defined(TN3270) */