]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - drivers/staging/wilc1000/wilc_strutils.c
staging: wilc1000: remove unused string functions
[karo-tx-linux.git] / drivers / staging / wilc1000 / wilc_strutils.c
1
2 #define _CRT_SECURE_NO_DEPRECATE
3
4 #include "wilc_oswrapper.h"
5
6
7 /*!
8  *  @author     syounan
9  *  @date       18 Aug 2010
10  *  @version    1.0
11  */
12 WILC_Sint32 WILC_memcmp(const void *pvArg1, const void *pvArg2, WILC_Uint32 u32Count)
13 {
14         return memcmp(pvArg1, pvArg2, u32Count);
15 }
16
17
18 /*!
19  *  @author     syounan
20  *  @date       18 Aug 2010
21  *  @version    1.0
22  */
23 void WILC_memcpy_INTERNAL(void *pvTarget, const void *pvSource, WILC_Uint32 u32Count)
24 {
25         memcpy(pvTarget, pvSource, u32Count);
26 }
27
28 /*!
29  *  @author     syounan
30  *  @date       18 Aug 2010
31  *  @version    1.0
32  */
33 void *WILC_memset(void *pvTarget, WILC_Uint8 u8SetValue, WILC_Uint32 u32Count)
34 {
35         return memset(pvTarget, u8SetValue, u32Count);
36 }
37
38 /*!
39  *  @author     syounan
40  *  @date       18 Aug 2010
41  *  @version    1.0
42  */
43 WILC_Char *WILC_strncpy(WILC_Char *pcTarget, const WILC_Char *pcSource,
44                         WILC_Uint32 u32Count)
45 {
46         return strncpy(pcTarget, pcSource, u32Count);
47 }
48
49 WILC_Sint32 WILC_strncmp(const WILC_Char *pcStr1, const WILC_Char *pcStr2,
50                          WILC_Uint32 u32Count)
51 {
52         WILC_Sint32 s32Result;
53
54         if (pcStr1 == WILC_NULL && pcStr2 == WILC_NULL) {
55                 s32Result = 0;
56         } else if (pcStr1 == WILC_NULL)    {
57                 s32Result = -1;
58         } else if (pcStr2 == WILC_NULL)    {
59                 s32Result = 1;
60         } else {
61                 s32Result = strncmp(pcStr1, pcStr2, u32Count);
62                 if (s32Result < 0) {
63                         s32Result = -1;
64                 } else if (s32Result > 0)    {
65                         s32Result = 1;
66                 }
67         }
68
69         return s32Result;
70 }
71
72 /*!
73  *  @author     syounan
74  *  @date       18 Aug 2010
75  *  @version    1.0
76  */
77 WILC_Uint32 WILC_strlen(const WILC_Char *pcStr)
78 {
79         return (WILC_Uint32)strlen(pcStr);
80 }