summaryrefslogtreecommitdiff
path: root/japanese/FreeWnn-lib/files/patch-Wnn-etc-bcopy.c
blob: ae2390e172dd780cc889f398236da17dd9cb9bc6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Index: Wnn/etc/bcopy.c
===================================================================
RCS file: /home/cvs/private/hrs/freewnn/Wnn/etc/bcopy.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -p -r1.1.1.1 -r1.2
--- Wnn/etc/bcopy.c	20 Dec 2008 07:13:30 -0000	1.1.1.1
+++ Wnn/etc/bcopy.c	20 Dec 2008 15:22:40 -0000	1.2
@@ -38,47 +38,43 @@
 
 #ifndef HAVE_BCOPY
 void
-bcopy (b1, b2, length)
-     unsigned char *b1, *b2;
-     int length;
+bcopy(unsigned char *b1,
+      unsigned char *b2,
+      int length)
 {
-  if (length <= 0)
-    return;
-  if (b1 < b2 && b1 + length > b2)
-    {
-      b2 += length;
-      b1 += length;
-      while (length--)
-        {
-          *--b2 = *--b1;
-        }
-    }
-  else
-    {
-      memcpy (b2, b1, length);
-    }
+	if (length <= 0)
+		return;
+
+	if (b1 < b2 && b1 + length > b2) {
+		b2 += length;
+		b1 += length;
+
+		while (length--)
+			*--b2 = *--b1;
+	} else {
+		memcpy (b2, b1, length);
+	}
 }
 #endif /* !HAVE_BCOPY */
 
 #ifndef HAVE_BZERO
 void
-bzero (b, length)
-     unsigned char *b;
-     int length;
+bzero(unsigned char *b,
+      int length)
 {
-  memset (b, 0, length);
+	memset (b, 0, length);
 }
 #endif /* !HAVE_BZERO */
 
 #ifndef HAVE_BCMP
 int
-bcmp (b1, b2, length)
-     unsigned char *b1;
-     unsigned char *b2;
-     int length;
+bcmp(unsigned char *b1,
+     unsigned *b2,
+     int length)
 {
-  if (length == 0)
-    return 0;
-  return memcmp (b1, b2, length);
+	if (length == 0)
+		return 0;
+
+	return memcmp(b1, b2, length);
 }
 #endif /* !HAVE_BCMP */