diff options
| author | David Greenman <dg@FreeBSD.org> | 1995-10-06 02:23:32 +0000 |
|---|---|---|
| committer | David Greenman <dg@FreeBSD.org> | 1995-10-06 02:23:32 +0000 |
| commit | df3ce8204f115fb6d5540d892cffba0c7ee53271 (patch) | |
| tree | b39d673055526d821037b3278d38ecf9dfd0e41f /usr.bin | |
| parent | 9b44fb9697acc323b8ba9c7a48f6fb51be2e2a53 (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/tn3270/Makefile | 14 | ||||
| -rw-r--r-- | usr.bin/tn3270/ctlr/api.c | 7 | ||||
| -rw-r--r-- | usr.bin/tn3270/distribution/sys_dos/system.c | 5 | ||||
| -rw-r--r-- | usr.bin/tn3270/sys_curses/system.c | 5 | ||||
| -rw-r--r-- | usr.bin/tn3270/tn3270/Makefile | 48 | ||||
| -rw-r--r-- | usr.bin/tn3270/tools/mkhits/dohits.c | 2 |
6 files changed, 60 insertions, 21 deletions
diff --git a/usr.bin/tn3270/Makefile b/usr.bin/tn3270/Makefile index f417747001a93..2997c41e3770b 100644 --- a/usr.bin/tn3270/Makefile +++ b/usr.bin/tn3270/Makefile @@ -1,9 +1,17 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 -SUBDIR= tn3270 mset - .if !make(install) && !make(distribute) -SUBDIR+=tools +# Build tools first so that things don't get built using stale tools and +# then built again after the tools are freshened. +# +# XXX this doesn't fix the problem if the tools are built by running make +# in the tn3270 subdir, because the Makefile doesn't give the full +# dependencies of the tools. +# +# XXX this doesn't fix the problem for `make depend' either. +SUBDIR= tools .endif +SUBDIR+=tn3270 mset + .include <bsd.subdir.mk> diff --git a/usr.bin/tn3270/ctlr/api.c b/usr.bin/tn3270/ctlr/api.c index 8a9ea3e835487..801e0ee83c9df 100644 --- a/usr.bin/tn3270/ctlr/api.c +++ b/usr.bin/tn3270/ctlr/api.c @@ -749,7 +749,12 @@ struct SREGS *sregs; Dump('>', (char *)regs, sizeof *regs); Dump('>', (char *)sregs, sizeof *sregs); #ifdef MSDOS - { char buf[10]; gets(buf); } + { + int ch; + + while ((ch = getchar()) != '\n' && ch != EOF) + ; + } #endif /* MSDOS */ } } diff --git a/usr.bin/tn3270/distribution/sys_dos/system.c b/usr.bin/tn3270/distribution/sys_dos/system.c index 864926b3ba269..06c2194186fa2 100644 --- a/usr.bin/tn3270/distribution/sys_dos/system.c +++ b/usr.bin/tn3270/distribution/sys_dos/system.c @@ -74,7 +74,7 @@ shell_continue() handle_api(&spinted.regs, &spinted.sregs); spint_continue(&spinted); } else { - char inputbuffer[100]; + int ch; if (spinted.rc != 0) { fprintf(stderr, "Process generated a return code of 0x%x.\n", @@ -82,7 +82,8 @@ shell_continue() } printf("[Hit return to continue]"); fflush(stdout); - (void) gets(inputbuffer); + while ((ch = getchar()) != '\n' && ch != EOF) + ; shell_active = 0; setconnmode(); ConnectScreen(); diff --git a/usr.bin/tn3270/sys_curses/system.c b/usr.bin/tn3270/sys_curses/system.c index 9e1be3389d866..67b31af3321a9 100644 --- a/usr.bin/tn3270/sys_curses/system.c +++ b/usr.bin/tn3270/sys_curses/system.c @@ -593,7 +593,7 @@ child_died(code) while ((pid = wait3((int *)&status, WNOHANG, (struct rusage *)0)) > 0) { if (pid == shell_pid) { - char inputbuffer[100]; + int ch; extern void setconnmode(); extern void ConnectScreen(); @@ -604,7 +604,8 @@ child_died(code) } printf("[Hit return to continue]"); fflush(stdout); - (void) fgets(inputbuffer, sizeof(inputbuffer), stdin); + while ((ch = getchar()) != '\n' && ch != EOF) + ; setconnmode(); ConnectScreen(); /* Turn screen on (if need be) */ (void) close(serversock); diff --git a/usr.bin/tn3270/tn3270/Makefile b/usr.bin/tn3270/tn3270/Makefile index 14ef94541597d..75f029df2dcce 100644 --- a/usr.bin/tn3270/tn3270/Makefile +++ b/usr.bin/tn3270/tn3270/Makefile @@ -30,31 +30,55 @@ DEPSRCS+= genbsubs.c globals.c system.c termout.c DEPSRCS+= commands.c main.c network.c ring.c sys_bsd.c telnet.c terminal.c DEPSRCS+= tn3270.c utilities.c +.if exists(${.CURDIR}/../tools/mkastosc/obj) +MKASTOSCDIR= ${.CURDIR}/../tools/mkastosc/obj +.else +MKASTOSCDIR= ${.CURDIR}/../tools/mkastosc +.endif + +.if exists(${.CURDIR}/../tools/mkastods/obj) +MKASTODSDIR= ${.CURDIR}/../tools/mkastods/obj +.else +MKASTODSDIR= ${.CURDIR}/../tools/mkastods +.endif + +.if exists(${.CURDIR}/../tools/mkdstoas/obj) +MKDSTOASDIR= ${.CURDIR}/../tools/mkdstoas/obj +.else +MKDSTOASDIR= ${.CURDIR}/../tools/mkdstoas +.endif + +.if exists(${.CURDIR}/../tools/mkhits/obj) +MKHITSDIR= ${.CURDIR}/../tools/mkhits/obj +.else +MKHITSDIR= ${.CURDIR}/../tools/mkhits +.endif + astosc.o: astosc.OUT CLEANFILES+= astosc.OUT astosc.out astosc.OUT: ${.CURDIR}/../ctlr/hostctlr.h ${.CURDIR}/../ctlr/function.h -astosc.OUT: ${.CURDIR}/../ctlr/${KBD} ${.CURDIR}/../tools/mkastosc/obj/mkastosc - ${.CURDIR}/../tools/mkastosc/obj/mkastosc \ +astosc.OUT: ${.CURDIR}/../ctlr/${KBD} ${MKASTOSCDIR}/mkastosc + ${MKASTOSCDIR}/mkastosc \ ${.CURDIR}/../ctlr/hostctlr.h \ ${.CURDIR}/../ctlr/function.h < ${.CURDIR}/../ctlr/${KBD} \ > ${.TARGET} rm -f astosc.out; ln -s astosc.OUT astosc.out disp_asc.o: asc_disp.OUT disp_asc.OUT -asc_disp.OUT: ${.CURDIR}/../tools/mkastods/obj/mkastods - ${.CURDIR}/../tools/mkastods/obj/mkastods > ${.TARGET} +asc_disp.OUT: ${MKASTODSDIR}/mkastods + ${MKASTODSDIR}/mkastods > ${.TARGET} rm -f asc_disp.out; ln -s asc_disp.OUT asc_disp.out -disp_asc.OUT: ${.CURDIR}/../tools/mkdstoas/obj/mkdstoas - ${.CURDIR}/../tools/mkdstoas/obj/mkdstoas > ${.TARGET} +disp_asc.OUT: ${MKDSTOASDIR}/mkdstoas + ${MKDSTOASDIR}/mkdstoas > ${.TARGET} rm -f disp_asc.out; ln -s disp_asc.OUT disp_asc.out inbound.o: kbd.OUT CLEANFILES += kbd.OUT kbd.out kbd.OUT: ${.CURDIR}/../ctlr/hostctlr.h ${.CURDIR}/../ctlr/${KBD} -kbd.OUT: ${.CURDIR}/../tools/mkhits/obj/mkhits +kbd.OUT: ${MKHITSDIR}/mkhits ${CC} ${CFLAGS} -E ${.CURDIR}/../ctlr/function.c > TMPfunc.out - ${.CURDIR}/../tools/mkhits/obj/mkhits ${.CURDIR}/../ctlr/hostctlr.h \ + ${MKHITSDIR}/mkhits ${.CURDIR}/../ctlr/hostctlr.h \ TMPfunc.out < ${.CURDIR}/../ctlr/${KBD} > ${.TARGET} rm -f kbd.out; ln -s kbd.OUT kbd.out @@ -63,13 +87,13 @@ kbd.OUT: ${.CURDIR}/../tools/mkhits/obj/mkhits # default.map # kbd.out -${.CURDIR}/../tools/mkastosc/obj/mkastosc: +${MKASTOSCDIR}/mkastosc: cd ${.CURDIR}/../tools/mkastosc; make -${.CURDIR}/../tools/mkastods/obj/mkastods: +${MKASTODSDIR}/mkastods: cd ${.CURDIR}/../tools/mkastods; make -${.CURDIR}/../tools/mkdstoas/obj/mkdstoas: +${MKDSTOASDIR}/mkdstoas: cd ${.CURDIR}/../tools/mkdstoas; make -${.CURDIR}/../tools/mkhits/obj/mkhits: +${MKHITSDIR}/mkhits: cd ${.CURDIR}/../tools/mkhits; make depend: .depend diff --git a/usr.bin/tn3270/tools/mkhits/dohits.c b/usr.bin/tn3270/tools/mkhits/dohits.c index d2d576e577f1f..afa36afb9c78e 100644 --- a/usr.bin/tn3270/tools/mkhits/dohits.c +++ b/usr.bin/tn3270/tools/mkhits/dohits.c @@ -257,7 +257,7 @@ char *aidfile, *fcnfile; } scanwhite(fcnfile, "FCN_"); - while (gets(line) != NULL) { + while (fgets(line, sizeof line, stdin) != NULL) { if (!isdigit(line[0])) { continue; } |
