64-bit clean fillbytes.c

This commit is contained in:
niklas 1998-04-02 07:07:28 +00:00
parent dd670927ac
commit b87c007a7a

View File

@ -0,0 +1,52 @@
--- lib/fillbytes.c.orig Sun Feb 4 18:40:33 1996
+++ lib/fillbytes.c Thu Apr 2 08:53:54 1998
@@ -24,7 +24,7 @@
#define DO8(a) a;a;a;a;a;a;a;a;
-#define cval ((char) lval)
+#define cval ((char) ival)
#ifdef PROTOTYPES
char *fillbytes(void *tov, int cnt, char val)
@@ -37,14 +37,14 @@
{
register char *to = (char *)tov;
register int n;
- register long lval;
+ register int ival;
if ((n = cnt) == 0)
return (to);
- lval = val & 0xFF;
+ ival = val & 0xFF;
- while (!laligned(to)) {
+ while (!ialigned(to)) {
*to++ = cval;
n--;
}
@@ -52,17 +52,17 @@
if (n >= 32) {
register int rem = n & 31;
- lval |= (lval<<8);
- lval |= (lval<<16);
+ ival |= (ival<<8);
+ ival |= (ival<<16);
n >>= 5;
{
- register long *tol = (long *)to;
+ register int *toi = (int *)to;
do {
- DO8 (*tol++ = lval);
+ DO8 (*toi++ = ival);
} while (--n > 0);
- to = (char *)tol;
+ to = (char *)toi;
}
n = rem;