This macro stepped the target pointer forwards, but the only place in which it
was used subsequently stepped the pointer backwards. The manual unrolling of
short lengths in the macro is something modern compilers and/or CPUs are capable
of if the length is predictable statically or dynamically, respectively.
case 2 : *to++ = *fr++; \
case 1 : *to++ = *fr++; \
}
-#define MEMSET(s,c,n) \
- switch(n) \
- { default : memset((void*)s,(int)c,n); s += n; break; \
- case 7 : *s++ = c; \
- case 6 : *s++ = c; \
- case 5 : *s++ = c; \
- case 4 : *s++ = c; \
- case 3 : *s++ = c; \
- case 2 : *s++ = c; \
- case 1 : *s++ = c; \
- }
extern Sfextern_t _Sfextern;
extern Sftab_t _Sftable;
*************************************************************************/
#include "sfhdr.h"
+#include <string.h>
/* Write out a character n times
**
}
if ((size_t) p > n)
p = n;
- MEMSET(ps, c, p);
- ps -= p;
+ memset(ps, c, p);
w = n;
if (ps == f->next) { /* simple sfwrite */