* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of California at 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'' without express or implied warranty.
+ * 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.
*/
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)main.c 1.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)main.c 1.10 (Berkeley) %G%";
#endif /* not lint */
#include <sys/types.h>
init_telnet();
init_sys();
+
+ init_3270();
}
*/
-void
+int
main(argc, argv)
int argc;
char *argv[];
if (!strcmp(argv[1], "-t")) {
if ((argc > 1) && (argv[2][0] != '-')) { /* get file name */
transcom = tline;
- (void) strcpy(transcom, argv[1]);
+ (void) strcpy(transcom, argv[2]);
argv++;
argc--;
}
} else if (!strcmp(argv[1], "-noasynch")) {
- noasynch = 1;
+ noasynchtty = 1;
+ noasynchnet = 1;
+ } else if (!strcmp(argv[1], "-noasynchtty")) {
+ noasynchtty = 1;
+ } else if (!strcmp(argv[1], "-noasynchnet")) {
+ noasynchnet = 1;
} else
#endif /* defined(TN3270) && defined(unix) */
if (argv[1][1] != '\0') {
if (argc != 1) {
if (setjmp(toplevel) != 0)
Exit(0);
- tn(argc, argv);
+ if (tn(argc, argv) == 1) {
+ return 0;
+ } else {
+ return 1;
+ }
}
- setjmp(toplevel);
+ (void) setjmp(toplevel);
for (;;) {
#if !defined(TN3270)
command(1);