commit e19b8b2fd60830f505ea176fae6b53fcc4204723
parent 752a1f696eaa75a0a55d91ed3bfb97f2fa67ce9b
Author: ukai <ukai>
Date: Tue, 25 Dec 2001 16:11:07 +0000
[w3m-dev 02725] bcopy, bzero
From: Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
Diffstat:
3 files changed, 34 insertions(+), 26 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,11 @@
+2001-12-26 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+
+ * [w3m-dev 02725] bcopy, bzero
+ * etc.c (bcopy): deleted
+ * etc.c (bzero): deleted
+ * indep.c (bcopy): added
+ * indep.c (bzero): added
+
2001-12-25 Kazuhiko <kazuhiko@archi.kyoto-u.ac.jp>
* [w3m-dev 02727]
diff --git a/etc.c b/etc.c
@@ -548,32 +548,6 @@ lastFileName(char *path)
return allocStr(q, -1);
}
-#ifndef HAVE_BCOPY
-void
-bcopy(void *src, void *dest, int len)
-{
- int i;
- if (src == dest)
- return;
- if (src < dest) {
- for (i = len - 1; i >= 0; i--)
- dest[i] = src[i];
- }
- else { /* src > dest */
- for (i = 0; i < len; i++)
- dest[i] = src[i];
- }
-}
-
-void
-bzero(void *ptr, int len)
-{
- int i;
- for (i = 0; i < len; i++)
- *(ptr++) = 0;
-}
-#endif /* not HAVE_BCOPY */
-
#ifdef USE_INCLUDED_SRAND48
static unsigned long R1 = 0x1234abcd;
static unsigned long R2 = 0x330e;
diff --git a/indep.c b/indep.c
@@ -11,6 +11,32 @@
#include "myctype.h"
#include "entity.h"
+#ifndef HAVE_BCOPY
+void
+bcopy(void *src, void *dest, int len)
+{
+ int i;
+ if (src == dest)
+ return;
+ if (src < dest) {
+ for (i = len - 1; i >= 0; i--)
+ dest[i] = src[i];
+ }
+ else { /* src > dest */
+ for (i = 0; i < len; i++)
+ dest[i] = src[i];
+ }
+}
+
+void
+bzero(void *ptr, int len)
+{
+ int i;
+ for (i = 0; i < len; i++)
+ *(ptr++) = 0;
+}
+#endif /* not HAVE_BCOPY */
+
char *
allocStr(const char *s, int len)
{