a8808f88dd439721874137b15e25718373626bf2
[fw/sdcc] / support / cpp / support.c
1 /* Support functions for mingw32 and probably Borland C
2  */
3 #include <string.h>
4
5 #ifdef __MINGW32__
6 void bzero(void *s, size_t n)
7 {
8     memset(s, 0, n);
9 }
10
11 void bcopy(const void *src, void *dest, size_t n)
12 {
13     memcpy(dest, src, n);
14 }
15
16 int bcmp(const void *s1, const void *s2, size_t n)
17 {
18     return memcmp(s1, s2, n);
19 }
20
21 char *index(const char *s, int c)
22 {
23     return strchr(s, c);
24 }
25
26 char *rindex(const char *s, int c)
27 {
28     return strrchr(s, c);
29 }
30 #endif