=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/m4/eval.c,v retrieving revision 1.27 retrieving revision 1.28 diff -c -r1.27 -r1.28 *** src/usr.bin/m4/eval.c 2000/07/24 23:08:24 1.27 --- src/usr.bin/m4/eval.c 2000/07/27 17:44:32 1.28 *************** *** 1,4 **** ! /* $OpenBSD: eval.c,v 1.27 2000/07/24 23:08:24 espie Exp $ */ /* $NetBSD: eval.c,v 1.7 1996/11/10 21:21:29 pk Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: eval.c,v 1.28 2000/07/27 17:44:32 espie Exp $ */ /* $NetBSD: eval.c,v 1.7 1996/11/10 21:21:29 pk Exp $ */ /* *************** *** 41,47 **** #if 0 static char sccsid[] = "@(#)eval.c 8.2 (Berkeley) 4/27/95"; #else ! static char rcsid[] = "$OpenBSD: eval.c,v 1.27 2000/07/24 23:08:24 espie Exp $"; #endif #endif /* not lint */ --- 41,47 ---- #if 0 static char sccsid[] = "@(#)eval.c 8.2 (Berkeley) 4/27/95"; #else ! static char rcsid[] = "$OpenBSD: eval.c,v 1.28 2000/07/27 17:44:32 espie Exp $"; #endif #endif /* not lint */ *************** *** 743,749 **** int fd; oindex = n; ! if (n < 0 || n >= MAXOUT) n = 0; /* bitbucket */ if (outfile[n] == NULL) { char fname[] = _PATH_DIVNAME; --- 743,756 ---- int fd; oindex = n; ! if (n >= maxout) { ! if (mimic_gnu) ! resizedivs(n + 10); ! else ! n = 0; /* bitbucket */ ! } ! ! if (n < 0) n = 0; /* bitbucket */ if (outfile[n] == NULL) { char fname[] = _PATH_DIVNAME; *************** *** 772,784 **** if (argc > 2) { for (ind = 2; ind < argc; ind++) { n = atoi(argv[ind]); ! if (n > 0 && n < MAXOUT && outfile[n] != NULL) getdiv(n); } } else ! for (n = 1; n < MAXOUT; n++) if (outfile[n] != NULL) getdiv(n); } --- 779,791 ---- if (argc > 2) { for (ind = 2; ind < argc; ind++) { n = atoi(argv[ind]); ! if (n > 0 && n < maxout && outfile[n] != NULL) getdiv(n); } } else ! for (n = 1; n < maxout; n++) if (outfile[n] != NULL) getdiv(n); }