Rev 2071 | Rev 2479 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2071 | Rev 2072 | ||
---|---|---|---|
Line 100... | Line 100... | ||
100 | ((unsigned long *) dst)[i] = ((unsigned long *) src)[i]; |
100 | ((unsigned long *) dst)[i] = ((unsigned long *) src)[i]; |
101 | 101 | ||
102 | return (char *) src; |
102 | return (char *) src; |
103 | } |
103 | } |
104 | 104 | ||
- | 105 | /** Compare two memory areas. |
|
- | 106 | * |
|
- | 107 | * @param s1 Pointer to the first area to compare. |
|
- | 108 | * @param s2 Pointer to the second area to compare. |
|
- | 109 | * @param len Size of the first area in bytes. Both areas must have the same |
|
- | 110 | * length. |
|
- | 111 | * @return If len is 0, return zero. If the areas match, return zero. |
|
- | 112 | * Otherwise return non-zero. |
|
- | 113 | */ |
|
- | 114 | int bcmp(const char *s1, const char *s2, size_t len) |
|
- | 115 | { |
|
- | 116 | for (; len && *s1++ == *s2++; len--) |
|
- | 117 | ; |
|
- | 118 | return len; |
|
- | 119 | } |
|
105 | 120 | ||
106 | /** Count the number of characters in the string, not including terminating 0. |
121 | /** Count the number of characters in the string, not including terminating 0. |
107 | * @param str string |
122 | * @param str string |
108 | * @return number of characters in string. |
123 | * @return number of characters in string. |
109 | */ |
124 | */ |