]> git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/C/Common/BinderFuncs.c
Sync EDKII BaseTools to BaseTools project r1971
[mirror_edk2.git] / BaseTools / Source / C / Common / BinderFuncs.c
1 /** @file
2
3 Copyright (c) 1999 - 2008, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 BinderFuncs.c
15
16 Abstract:
17
18 Binder function implementations for ANSI C libraries.
19
20 **/
21
22 #include "BinderFuncs.h"
23 #include "CommonLib.h"
24 #include <stdlib.h>
25 #include <string.h>
26
27 //
28 // Binder Function Implementations
29 //
30
31 VOID *
32 CommonLibBinderAllocate (
33 IN UINTN Size
34 )
35 {
36 return (VOID *) malloc (Size);
37 }
38
39 VOID
40 CommonLibBinderFree (
41 IN VOID *Pointer
42 )
43 {
44 free (Pointer);
45 }
46
47 VOID
48 CommonLibBinderCopyMem (
49 IN VOID *Destination,
50 IN VOID *Source,
51 IN UINTN Length
52 )
53 {
54 memmove (Destination, Source, Length);
55 }
56
57 VOID
58 CommonLibBinderSetMem (
59 IN VOID *Destination,
60 IN UINTN Length,
61 IN UINT8 Value
62 )
63 {
64 memset (Destination, Value, Length);
65 }
66
67 INTN
68 CommonLibBinderCompareMem (
69 IN VOID *MemOne,
70 IN VOID *MemTwo,
71 IN UINTN Length
72 )
73 {
74 return memcmp (MemOne, MemTwo, Length);
75 }
76
77 BOOLEAN
78 CommonLibBinderCompareGuid (
79 IN EFI_GUID *Guid1,
80 IN EFI_GUID *Guid2
81 )
82 {
83 return CompareGuid (Guid1, Guid2) ? FALSE : TRUE;
84 }
85
86
87