diff options
Diffstat (limited to 'usr.bin/tn3270')
23 files changed, 108 insertions, 71 deletions
diff --git a/usr.bin/tn3270/Makefile b/usr.bin/tn3270/Makefile index 009e31f..2997c41 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) -SUBDIR+=tools +.if !make(install) && !make(distribute) +# 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/api/asc_ebc.c b/usr.bin/tn3270/api/asc_ebc.c index 14061f0..1e999dc 100644 --- a/usr.bin/tn3270/api/asc_ebc.c +++ b/usr.bin/tn3270/api/asc_ebc.c @@ -77,7 +77,7 @@ unsigned char ebc_asc[NEBC] = { /* 38 */ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', /* 40 */ ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', -/* 48 */ ' ', ' ', +/* 48 */ ' ', ' ', #if !defined(MSDOS) /* 4A */ '\\', #else /* !defined(MSDOS) */ diff --git a/usr.bin/tn3270/ascii/map3270.c b/usr.bin/tn3270/ascii/map3270.c index 0295509..9ae1b2a 100644 --- a/usr.bin/tn3270/ascii/map3270.c +++ b/usr.bin/tn3270/ascii/map3270.c @@ -441,7 +441,7 @@ EatToNL() lex = Get(); - while (!((lex.type != LEX_ESCAPED) && (lex.type != LEX_CARETED) && + while (!((lex.type != LEX_ESCAPED) && (lex.type != LEX_CARETED) && (lex.value == '\n')) && (!(lex.type == LEX_END_OF_FILE))) { lex = Get(); } diff --git a/usr.bin/tn3270/ascii/mset.c b/usr.bin/tn3270/ascii/mset.c index 508fe66..b87a1ec 100644 --- a/usr.bin/tn3270/ascii/mset.c +++ b/usr.bin/tn3270/ascii/mset.c @@ -286,7 +286,7 @@ char *begin, *tc_name; case '\\': case '\'': if (toshell) { - numbchars += 2; + numbchars += 2; printf("%c%c", '\\', pchar); } else { @@ -397,7 +397,7 @@ char *argv[]; recurse(0, head); /* now print them out */ for (rptr = regstates[0].forward; rptr->result != 0; - rptr = rptr->forward) { + rptr = rptr->forward) { printString(rptr->match_end, rptr->match_start, rptr->result); } if (toshell) { diff --git a/usr.bin/tn3270/ctlr/api.c b/usr.bin/tn3270/ctlr/api.c index 1113295..801e0ee 100644 --- a/usr.bin/tn3270/ctlr/api.c +++ b/usr.bin/tn3270/ctlr/api.c @@ -305,7 +305,7 @@ struct SREGS *sregs; parms.rc = 0; if (parms.options == OPTION_SINGLE_KEYSTROKE) { KeystrokeEntry *entry = &parms.keystroke_specifier.keystroke_entry; - + if (AcceptKeystroke(entry->scancode, entry->shift_state) == 0) { parms.rc = 0x10; /* XXX needs 0x12 too! */ } @@ -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/ctlr/api.h b/usr.bin/tn3270/ctlr/api.h index 8004f34..ba0df8d 100644 --- a/usr.bin/tn3270/ctlr/api.h +++ b/usr.bin/tn3270/ctlr/api.h @@ -264,7 +264,7 @@ typedef struct { short begin; /* Offset within buffer */ } BufferDescriptor; - + typedef struct { char rc, @@ -345,7 +345,7 @@ typedef struct { #if defined(vax) || defined(ns32000) || defined(i386) || (defined(mips)&&defined(MIPSEL)) #define BYTE_ORDER LITTLE_ENDIAN -#endif /* defined(vax) || defined(ns32000) */ +#endif /* defined(vax) || defined(ns32000) */ #if defined(sun) || defined(tahoe) || defined(ibm032) || defined(pyr) || defined(gould) || (defined(mips)&&defined(MIPSEB)) #define BYTE_ORDER BIG_ENDIAN diff --git a/usr.bin/tn3270/ctlr/inbound.c b/usr.bin/tn3270/ctlr/inbound.c index fe8d142..6f530c3 100644 --- a/usr.bin/tn3270/ctlr/inbound.c +++ b/usr.bin/tn3270/ctlr/inbound.c @@ -210,7 +210,7 @@ EraseEndOfField() AddHost(i, 0); i = ScreenInc(i); } while (i != HighestScreen()); - } + } } } diff --git a/usr.bin/tn3270/distribution/makefile_4.2 b/usr.bin/tn3270/distribution/makefile_4.2 index b8e5eb8e..9f35a6c 100644 --- a/usr.bin/tn3270/distribution/makefile_4.2 +++ b/usr.bin/tn3270/distribution/makefile_4.2 @@ -106,7 +106,7 @@ BINDIR = $(DESTDIR)/usr/ucb # Names for the terminal libraries... LIBCURSES = -lcurses -LIBTERM = -ltermlib +LIBTERMCAP = -ltermcap #PC_LIBCURSES = #PC_LIBTERM = @@ -156,7 +156,7 @@ FRC: tn3270$X: telnet/telprog.o ${SUBLIB} api/apilib.a ${CC} ${CFLAGS} -o tn3270 telnet/telprog.o \ - $L ${SUBLIB} api/apilib.a $(LIBCURSES) $(LIBTERM) + $L ${SUBLIB} api/apilib.a ${LIBCURSES} ${LIBTERMCAP} #PC_tn3270$X: #PC_ link <@< diff --git a/usr.bin/tn3270/distribution/sys_dos/system.c b/usr.bin/tn3270/distribution/sys_dos/system.c index 864926b..06c2194 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/distribution/utilities/srccmd/tar/tarread.c b/usr.bin/tn3270/distribution/utilities/srccmd/tar/tarread.c index fedeb69..6b71090 100644 --- a/usr.bin/tn3270/distribution/utilities/srccmd/tar/tarread.c +++ b/usr.bin/tn3270/distribution/utilities/srccmd/tar/tarread.c @@ -118,7 +118,7 @@ FILE *fp; if(extract(name, size, mode, mtime, fp)) skip = 0; - + if (verbose) printf("\n"); break; @@ -171,7 +171,7 @@ FILE *ifp; return (0); } } - + for(copied = 0; copied < size; copied += TBLOCK) { if(fread(fbuf, TBLOCK, 1, ifp) != 1) { perror("fread"); diff --git a/usr.bin/tn3270/general/general.h b/usr.bin/tn3270/general/general.h index 8fee245..b098041 100644 --- a/usr.bin/tn3270/general/general.h +++ b/usr.bin/tn3270/general/general.h @@ -54,7 +54,7 @@ #define memset(s,c,n) if (c == 0) { \ bzero(s,n); \ } else { \ - register char *src = s; \ + register char *src = (char *)s; \ register int count = n; \ \ while (count--) { \ diff --git a/usr.bin/tn3270/mset/Makefile b/usr.bin/tn3270/mset/Makefile index 0094fc8..db31b2e 100644 --- a/usr.bin/tn3270/mset/Makefile +++ b/usr.bin/tn3270/mset/Makefile @@ -3,8 +3,8 @@ PROG= mset CFLAGS+=-I${.CURDIR} -I. SRCS+= astosc.c map3270.c mset.c -MAN1= mset.0 -MAN5= map3270.0 +MAN1= mset.1 +MAN5= map3270.5 .PATH: ${.CURDIR}/../api ${.CURDIR}/../ascii CLEANFILES+= astosc.OUT astosc.out @@ -14,16 +14,22 @@ CLEANFILES+= astosc.OUT astosc.out DEPSRCS+= astosc.OUT map3270.c mset.c +.if exists(${.OBJDIR}/../tools/mkastosc) +MKOBJ=${.OBJDIR}/../tools/mkastosc +.else +MKOBJ=${.CURDIR}/../tools/mkastosc +.endif + astosc.o: 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 \ - ${.CURDIR}/../ctlr/hostctlr.h ${.CURDIR}/../ctlr/function.h \ - < ${.CURDIR}/../ctlr/${KBD} > ${.TARGET} +astosc.OUT: ${.CURDIR}/../ctlr/${KBD} ${MKOBJ}/mkastosc + ${MKOBJ}/mkastosc ${.CURDIR}/../ctlr/hostctlr.h \ + ${.CURDIR}/../ctlr/function.h \ + < ${.CURDIR}/../ctlr/${KBD} > ${.TARGET} rm -f astosc.out; ln -s astosc.OUT astosc.out # astosc.out -${.CURDIR}/../tools/mkastosc/obj/mkastosc: +${MKOBJ}/mkastosc: cd ${.CURDIR}/../tools/mkastosc; make depend: .depend diff --git a/usr.bin/tn3270/sys_curses/system.c b/usr.bin/tn3270/sys_curses/system.c index 14a99bd..67b31af 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) gets(inputbuffer); + while ((ch = getchar()) != '\n' && ch != EOF) + ; setconnmode(); ConnectScreen(); /* Turn screen on (if need be) */ (void) close(serversock); diff --git a/usr.bin/tn3270/sys_curses/termout.c b/usr.bin/tn3270/sys_curses/termout.c index 5dbe311..128d7e5 100644 --- a/usr.bin/tn3270/sys_curses/termout.c +++ b/usr.bin/tn3270/sys_curses/termout.c @@ -37,18 +37,10 @@ static char sccsid[] = "@(#)termout.c 8.1 (Berkeley) 6/6/93"; #if defined(unix) #include <signal.h> -#include <sgtty.h> +#include <termios.h> #endif #include <stdio.h> #include <curses.h> -#if defined(ultrix) -/* Some version of this OS has a bad definition for nonl() */ -#undef nl -#undef nonl - -#define nl() (_tty.sg_flags |= CRMOD,_pfast = _rawmode,stty(_tty_ch, &_tty)) -#define nonl() (_tty.sg_flags &= ~CRMOD, _pfast = TRUE, stty(_tty_ch, &_tty)) -#endif /* defined(ultrix) */ #include "../general/general.h" @@ -204,7 +196,7 @@ SlowScreen() register int fieldattr, termattr; register int columnsleft; -#define NORMAL 0 +#define NORMAL 0 #define HIGHLIGHT 1 /* Mask bits */ #define NONDISPLAY 4 /* Mask bits */ #define UNDETERMINED 8 /* Mask bits */ @@ -628,12 +620,11 @@ void InitTerminal() { #if defined(unix) - struct sgttyb ourttyb; - static int speeds[] = { 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, - 2400, 4800, 9600 }; + struct termios termios_info; + speed_t speed; #endif extern void InitMapping(); - + InitMapping(); /* Go do mapping file (MAP3270) first */ if (!screenInitd) { /* not initialized */ #if defined(unix) @@ -657,14 +648,14 @@ InitTerminal() TryToSend = FastScreen; #if defined(unix) - ioctl(1, TIOCGETP, (char *) &ourttyb); - if ((ourttyb.sg_ospeed < 0) || (ourttyb.sg_ospeed > B9600)) { + (void) tcgetattr(1, &termios_info); + speed = cfgetospeed(&termios_info); + if (speed > 19200) { max_changes_before_poll = 1920; } else { - max_changes_before_poll = speeds[ourttyb.sg_ospeed]/10; - if (max_changes_before_poll < 40) { + max_changes_before_poll = speed/10; + if (max_changes_before_poll < 40) max_changes_before_poll = 40; - } TryToSend = SlowScreen; HaveInput = 1; /* get signals going */ } diff --git a/usr.bin/tn3270/tn3270/Makefile b/usr.bin/tn3270/tn3270/Makefile index a9f1641..df18677 100644 --- a/usr.bin/tn3270/tn3270/Makefile +++ b/usr.bin/tn3270/tn3270/Makefile @@ -2,13 +2,13 @@ PROG= tn3270 CFLAGS+=-I${.CURDIR} -I. -LDADD+= -lcurses -ltermcap -ltelnet -DPADD+= ${LIBCURSES} /usr/lib/libtermcap.a /usr/lib/libtelnet.a +DPADD= ${LIBCURSES} ${LIBTERMCAP} ${LIBTELNET} ${LIBCRYPT} +LDADD= -lcurses -ltermcap -ltelnet -lcrypt CLEANFILES+= asc_disp.OUT asc_disp.out disp_asc.OUT disp_asc.out TMPfunc.out .PATH: ${.CURDIR}/../api ${.CURDIR}/../ascii ${.CURDIR}/../ctlr .PATH: ${.CURDIR}/../general ${.CURDIR}/../sys_curses ${.CURDIR}/../../telnet -MAN1= tn3270.0 +MAN1= tn3270.1 SRCS+= apilib.c api_bsd.c api_exch.c asc_ebc.c astosc.c dctype.c SRCS+= disp_asc.c ebc_disp.c @@ -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(${.OBJDIR}/../tools/mkastosc) +MKASTOSCDIR= ${.OBJDIR}/../tools/mkastosc +.else +MKASTOSCDIR= ${.CURDIR}/../tools/mkastosc +.endif + +.if exists(${.OBJDIR}/../tools/mkastods) +MKASTODSDIR= ${.OBJDIR}/../tools/mkastods +.else +MKASTODSDIR= ${.CURDIR}/../tools/mkastods +.endif + +.if exists(${.OBJDIR}/../tools/mkdstoas) +MKDSTOASDIR= ${.OBJDIR}/../tools/mkdstoas +.else +MKDSTOASDIR= ${.CURDIR}/../tools/mkdstoas +.endif + +.if exists(${.OBJDIR}/../tools/mkhits) +MKHITSDIR= ${.OBJDIR}/../tools/mkhits +.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/tn3270/tn3270.1 b/usr.bin/tn3270/tn3270/tn3270.1 index 778302e..a2aba2f 100644 --- a/usr.bin/tn3270/tn3270/tn3270.1 +++ b/usr.bin/tn3270/tn3270/tn3270.1 @@ -316,8 +316,8 @@ and .Xr telnet 1 , .Xr curses 3 , .Xr termcap 3 , -.Xr termcap 5 , .Xr map3270 5 , +.Xr termcap 5 .Rs .%T "Yale ASCII Terminal Communication" .%B "System II Program Description/Operator's Manual" diff --git a/usr.bin/tn3270/tools/mkastods/Makefile b/usr.bin/tn3270/tools/mkastods/Makefile index a2d36a1..f7c6608 100644 --- a/usr.bin/tn3270/tools/mkastods/Makefile +++ b/usr.bin/tn3270/tools/mkastods/Makefile @@ -2,7 +2,7 @@ PROG= mkastods SRCS= mkastods.c asc_ebc.c ebc_disp.c -CFLAGS+=-I${.CURDIR}/.. -I. +CFLAGS+=-I${.CURDIR}/.. NOMAN= noman .PATH: ${.CURDIR}/../../api diff --git a/usr.bin/tn3270/tools/mkastosc/Makefile b/usr.bin/tn3270/tools/mkastosc/Makefile index a6268f5..c06d075 100644 --- a/usr.bin/tn3270/tools/mkastosc/Makefile +++ b/usr.bin/tn3270/tools/mkastosc/Makefile @@ -2,7 +2,7 @@ PROG= mkastosc SRCS= mkastosc.c dohits.c asc_ebc.c ebc_disp.c -CFLAGS+=-I${.CURDIR}/../mkhits -I${.CURDIR}/.. -I. +CFLAGS+=-I${.CURDIR}/../mkhits -I${.CURDIR}/.. NOMAN= noman .PATH: ${.CURDIR}/../mkhits ${.CURDIR}/../../api diff --git a/usr.bin/tn3270/tools/mkastosc/mkastosc.c b/usr.bin/tn3270/tools/mkastosc/mkastosc.c index 697122d..932a388 100644 --- a/usr.bin/tn3270/tools/mkastosc/mkastosc.c +++ b/usr.bin/tn3270/tools/mkastosc/mkastosc.c @@ -133,7 +133,7 @@ char *argv[]; } printf(" */\n"); } - + for (attable = &table[0]; attable <= &table[highestof(table)]; attable++) { for (this = *attable; this; this = this->next) { diff --git a/usr.bin/tn3270/tools/mkdctype/Makefile b/usr.bin/tn3270/tools/mkdctype/Makefile index 818bb52..363eb01 100644 --- a/usr.bin/tn3270/tools/mkdctype/Makefile +++ b/usr.bin/tn3270/tools/mkdctype/Makefile @@ -2,7 +2,7 @@ PROG= mkdctype SRCS= mkdctype.c ebc_disp.c ectype.c -CFLAGS+=-I${.CURDIR}/.. -I. +CFLAGS+=-I${.CURDIR}/.. NOMAN= noman .PATH: ${.CURDIR}/../../api diff --git a/usr.bin/tn3270/tools/mkdstoas/Makefile b/usr.bin/tn3270/tools/mkdstoas/Makefile index b2abeb3..53ecd70 100644 --- a/usr.bin/tn3270/tools/mkdstoas/Makefile +++ b/usr.bin/tn3270/tools/mkdstoas/Makefile @@ -2,7 +2,7 @@ PROG= mkdstoas SRCS= mkdstoas.c asc_ebc.c ebc_disp.c -CFLAGS+=-I${.CURDIR}/.. -I. +CFLAGS+=-I${.CURDIR}/.. NOMAN= noman .PATH: ${.CURDIR}/../../api diff --git a/usr.bin/tn3270/tools/mkhits/Makefile b/usr.bin/tn3270/tools/mkhits/Makefile index c7c8802..169e6c4 100644 --- a/usr.bin/tn3270/tools/mkhits/Makefile +++ b/usr.bin/tn3270/tools/mkhits/Makefile @@ -2,7 +2,7 @@ PROG= mkhits SRCS= mkhits.c dohits.c asc_ebc.c ebc_disp.c -CFLAGS+=-I${.CURDIR}/.. -I. +CFLAGS+=-I${.CURDIR}/.. NOMAN= noman .PATH: ${.CURDIR}/../../api diff --git a/usr.bin/tn3270/tools/mkhits/dohits.c b/usr.bin/tn3270/tools/mkhits/dohits.c index d2d576e..7f75569 100644 --- a/usr.bin/tn3270/tools/mkhits/dohits.c +++ b/usr.bin/tn3270/tools/mkhits/dohits.c @@ -101,6 +101,7 @@ int value; item = &firstentry(second); this = (struct thing *) malloc(sizeof *this); + memset(this, 0, sizeof *this); this->next = *item; *item = this; this->value = value; @@ -257,7 +258,7 @@ char *aidfile, *fcnfile; } scanwhite(fcnfile, "FCN_"); - while (gets(line) != NULL) { + while (fgets(line, sizeof line, stdin) != NULL) { if (!isdigit(line[0])) { continue; } |