From: ceriel Date: Mon, 13 Jun 1988 17:57:39 +0000 (+0000) Subject: made nbits a long X-Git-Tag: release-5-5~3205 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=be8815e2b737747b51226613d5ca6167a2e4b6a3;p=ack.git made nbits a long --- diff --git a/mach/proto/as/comm1.h b/mach/proto/as/comm1.h index 795a58c67..f917bdeac 100644 --- a/mach/proto/as/comm1.h +++ b/mach/proto/as/comm1.h @@ -80,7 +80,7 @@ extern item_t *fb_ptr[4*FB_SIZE]; #ifdef THREE_PASS extern char bittab[BITMAX>>3]; /* one bit per small-large decision */ -extern short nbits; /* number of decisions so far */ +extern long nbits; /* number of decisions so far */ #endif #ifdef LISTING diff --git a/mach/proto/as/comm7.c b/mach/proto/as/comm7.c index 86e949fb5..cf26d6678 100644 --- a/mach/proto/as/comm7.c +++ b/mach/proto/as/comm7.c @@ -179,15 +179,14 @@ small(fitsmall, gain) nosect(); if (bflag) return(0); - if ((bit = nbits++) >= BITMAX) { - if (bit != BITMAX) - nbits--; /* prevent wraparound */ + if (nbits == BITMAX) { else if (pass == PASS_1) warning("bit table overflow"); return(0); } - p = &bittab[bit>>3]; - bit = 1 << (bit&7); + p = &bittab[(int) (nbits>>3)]; + bit = 1 << ((int)nbits&7); + nbits++; switch (pass) { case PASS_1: return(0);