]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - Tools/CodeTools/Source/Common/CommonLib.h
More renames for Tool Packages
[mirror_edk2.git] / Tools / CodeTools / Source / Common / CommonLib.h
... / ...
CommitLineData
1/*++\r
2\r
3Copyright (c) 2004, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 CommonLib.h\r
15\r
16Abstract:\r
17\r
18 Common library assistance routines.\r
19\r
20--*/\r
21\r
22#ifndef _EFI_COMMON_LIB_H\r
23#define _EFI_COMMON_LIB_H\r
24\r
25#include <Common/UefiBaseTypes.h>\r
26\r
27#ifndef _MAX_PATH\r
28#define _MAX_PATH 500\r
29#endif\r
30\r
31#define PRINTED_GUID_BUFFER_SIZE 37 // including null-termination\r
32//\r
33// Function declarations\r
34//\r
35VOID\r
36PeiZeroMem (\r
37 IN VOID *Buffer,\r
38 IN UINTN Size\r
39 )\r
40;\r
41\r
42VOID\r
43PeiCopyMem (\r
44 IN VOID *Destination,\r
45 IN VOID *Source,\r
46 IN UINTN Length\r
47 )\r
48;\r
49\r
50VOID\r
51ZeroMem (\r
52 IN VOID *Buffer,\r
53 IN UINTN Size\r
54 )\r
55;\r
56\r
57VOID\r
58CopyMem (\r
59 IN VOID *Destination,\r
60 IN VOID *Source,\r
61 IN UINTN Length\r
62 )\r
63;\r
64\r
65INTN\r
66CompareGuid (\r
67 IN EFI_GUID *Guid1,\r
68 IN EFI_GUID *Guid2\r
69 )\r
70;\r
71\r
72EFI_STATUS\r
73GetFileImage (\r
74 IN CHAR8 *InputFileName,\r
75 OUT CHAR8 **InputFileImage,\r
76 OUT UINT32 *BytesRead\r
77 )\r
78;\r
79\r
80UINT8\r
81CalculateChecksum8 (\r
82 IN UINT8 *Buffer,\r
83 IN UINTN Size\r
84 )\r
85;\r
86\r
87UINT8\r
88CalculateSum8 (\r
89 IN UINT8 *Buffer,\r
90 IN UINTN Size\r
91 )\r
92;\r
93\r
94UINT16\r
95CalculateChecksum16 (\r
96 IN UINT16 *Buffer,\r
97 IN UINTN Size\r
98 )\r
99;\r
100\r
101UINT16\r
102CalculateSum16 (\r
103 IN UINT16 *Buffer,\r
104 IN UINTN Size\r
105 )\r
106;\r
107\r
108EFI_STATUS\r
109PrintGuid (\r
110 IN EFI_GUID *Guid\r
111 )\r
112;\r
113\r
114#define PRINTED_GUID_BUFFER_SIZE 37 // including null-termination\r
115EFI_STATUS\r
116PrintGuidToBuffer (\r
117 IN EFI_GUID *Guid,\r
118 IN OUT UINT8 *Buffer,\r
119 IN UINT32 BufferLen,\r
120 IN BOOLEAN Uppercase\r
121 )\r
122;\r
123\r
124#define ASSERT(x) assert(x)\r
125\r
126#ifdef __GNUC__\r
127#define stricmp strcasecmp\r
128#define strnicmp strncasecmp\r
129#define strcmpi strcasecmp\r
130#ifndef __CYGWIN__\r
131char *strlwr(char *s);\r
132#endif\r
133#endif\r
134\r
135#endif\r