SCCS-vsn: usr.bin/diff/diff/diffreg.c 4.11
-static char sccsid[] = "@(#)diffreg.c 4.10 %G%";
+static char sccsid[] = "@(#)diffreg.c 4.11 %G%";
register int i, j;
int jackpot;
long ctold, ctnew;
register int i, j;
int jackpot;
long ctold, ctnew;
if ((input[0] = fopen(file1,"r")) == NULL) {
perror(file1);
if ((input[0] = fopen(file1,"r")) == NULL) {
perror(file1);
for(i=1;(c=getc(input[f]))!='\n';i++)
if (c < 0)
for(i=1;(c=getc(input[f]))!='\n';i++)
if (c < 0)
int lowa,upb,lowc,upd;
struct stat stbuf;
int lowa,upb,lowc,upd;
struct stat stbuf;
+#define POW2 /* define only if HALFLONG is 2**n */
#define HALFLONG 16
#define low(x) (x&((1L<<HALFLONG)-1))
#define high(x) (x>>HALFLONG)
#define HALFLONG 16
#define low(x) (x&((1L<<HALFLONG)-1))
#define high(x) (x>>HALFLONG)
for(shift=0;(t=getc(f))!='\n';shift+=7) {
if(t==-1)
return(0);
for(shift=0;(t=getc(f))!='\n';shift+=7) {
if(t==-1)
return(0);
- sum += (long)chrtran[t] << (shift%=HALFLONG);
+ sum += (long)chrtran[t] << (shift
+#ifdef POW2
+ &= HALFLONG - 1);
+#else
+ %= HALFLONG);
+#endif
}
else
for(shift=0;(t=getc(f))!='\n';shift+=7) {
if(t==-1)
return(0);
}
else
for(shift=0;(t=getc(f))!='\n';shift+=7) {
if(t==-1)
return(0);
- sum += (long)t << (shift%=HALFLONG);
+ sum += (long)t << (shift
+#ifdef POW2
+ &= HALFLONG - 1);
+#else
+ %= HALFLONG);
+#endif
}
} else {
for(shift=0;;) {
}
} else {
for(shift=0;;) {
- sum += (long)chrtran[t] << (shift%=HALFLONG);
+ sum += (long)chrtran[t] << (shift
+#ifdef POW2
+ &= HALFLONG - 1);
+#else
+ %= HALFLONG);
+#endif
shift += 7;
continue;
case '\n':
shift += 7;
continue;
case '\n':