22 |
|
#include "copyright.h" |
23 |
|
|
24 |
|
#include <errno.h> |
25 |
+ |
#include <string.h> |
26 |
|
|
26 |
– |
#ifndef BSD |
27 |
– |
#define bcopy(s,d,n) (void)memcpy(d,s,n) |
28 |
– |
#define bzero(d,n) (void)memset(d,0,n) |
29 |
– |
#endif |
27 |
|
|
28 |
|
#ifdef MSTATS |
29 |
|
#include <stdio.h> |
179 |
|
cptab.ptr = big->ptr; |
180 |
|
cptab.siz = big->siz; |
181 |
|
big->siz = 0; /* clear and copy */ |
182 |
< |
bcopy((char *)tab, (char *)(mtab(&cptab)+1), |
182 |
> |
memcpy((char *)(mtab(&cptab)+1), (char *)tab, |
183 |
|
tablen*sizeof(struct mblk)); |
184 |
< |
bzero((char *)(mtab(&cptab)+tablen+1), |
184 |
> |
memset((char *)(mtab(&cptab)+tablen+1), '\0', |
185 |
|
(mtablen(&cptab)-tablen-1)*sizeof(struct mblk)); |
186 |
|
} /* next round */ |
187 |
|
} |
381 |
|
if ((p = malloc(n)) == NULL) |
382 |
|
return(n<=on ? op : NULL); |
383 |
|
if (on) { |
384 |
< |
bcopy(op, p, n>on ? on : n); |
384 |
> |
memcpy(p, op, n>on ? on : n); |
385 |
|
free(op); |
386 |
|
} |
387 |
|
return(p); |