summaryrefslogtreecommitdiff
path: root/xpr.c
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2011-11-11 11:32:05 -0800
committerJeremy Huddleston <jeremyhu@apple.com>2011-11-11 11:32:05 -0800
commitc9b09f54d783689261855bd87a2bc68bfb3d9731 (patch)
tree3ee19694b048c3beea7ed27bf3a87d3e70409844 /xpr.c
parent28eaec94f936534573907425cf0fb5198979aab3 (diff)
Use memmove rather than bcopy
bcopy was removed in POSIX 2008. I didn't check to see if we could safely use memcpy. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'xpr.c')
-rw-r--r--xpr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xpr.c b/xpr.c
index 892a73a..b9cd707 100644
--- a/xpr.c
+++ b/xpr.c
@@ -77,6 +77,7 @@ from the X Consortium.
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <stdio.h>
+#include <string.h>
#ifndef WIN32
#include <pwd.h>
#endif
@@ -1183,7 +1184,7 @@ void ln03_setup(
xm = (((scale * iw) - (i * 30)) / 2) + lm;
sprintf(bp, LN_HPA, xm); bp += strlen(bp);
sprintf(bp, LN_SGR, 3); bp += strlen(bp);
- bcopy(header, bp, i);
+ memmove(bp, header, i);
bp += i;
}
if (trailer != NULL) {
@@ -1192,7 +1193,7 @@ void ln03_setup(
xm = (((scale * iw) - (i * 30)) / 2) + lm;
sprintf(bp, LN_HPA, xm); bp += strlen(bp);
sprintf(bp, LN_SGR, 3); bp += strlen(bp);
- bcopy(trailer, bp, i);
+ memmove(bp, trailer, i);
bp += i;
}
@@ -1740,7 +1741,7 @@ void ps_output_bits(
ibuf = (unsigned char *)malloc((unsigned)(iwb + 3));
for (i=0;i<ih;i++) {
- bcopy((char *)buffer, (char *)ibuf, iwb);
+ memmove((char *)ibuf, (char *)buffer, iwb);
buffer += iwb;
if (!(*(char *) &swaptest))
_swaplong((char *)ibuf,(long)iwb);