]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Sample/Tools/Source/ProcessDsc/Common.h
clean non-ASCII char
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / Tools / Source / ProcessDsc / Common.h
CommitLineData
3eb9473e 1/*++\r
2\r
4b1e1121
HT
3Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 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 Common.h\r
15\r
16Abstract:\r
17\r
18 Common include file for the ProcessDsc utility.\r
19\r
20--*/\r
21\r
22#ifndef _COMMON_H_\r
23#define _COMMON_H_\r
24\r
25typedef char INT8;\r
26typedef unsigned int UINT32;\r
27\r
28#include "EfiUtilityMsgs.h"\r
29\r
30#define MAX_LINE_LEN 1024\r
31\r
32#ifdef MAX_PATH\r
33#undef MAX_PATH\r
34#define MAX_PATH 1024\r
35#endif\r
36\r
37//\r
38// Defines for how to expand symbols\r
39//\r
40#define EXPANDMODE_NO_UNDEFS 0x01\r
41#define EXPANDMODE_NO_DESTDIR 0x02\r
42#define EXPANDMODE_NO_SOURCEDIR 0x04\r
43#define EXPANDMODE_RECURSIVE 0x08\r
44\r
45//\r
46// Defines for adding symbols\r
47//\r
48#define SYM_OVERWRITE 0x01 // overwrite existing assignments\r
49#define SYM_GLOBAL 0x02 // global symbol (persistent)\r
50#define SYM_LOCAL 0x04 // symbols at component level\r
51#define SYM_FILE 0x08 // symbols at file level\r
52#define SYM_FILEPATH 0x10 // symbol is a file path\r
53#define SYM_FILENAME 0x20 // symbol is a file name\r
54#define FV_DIR "FV_DIR" // symbol for base dir where FV files are\r
55#define DSC_FILENAME "DSC_FILENAME"\r
56\r
57//\r
58// Smart file for better incremental build support.\r
59// Only re-create .pkg .inf or .apr files when it's content is changed.\r
60// \r
61//\r
62typedef struct _SMART_FILE {\r
63 char *FileName;\r
64 char *FileContent; // Previous file content\r
65 int FileLength; // Previous file string length\r
66 int FilePosition; // The offset from FileContent for next comparison\r
67 FILE *FilePtr; // New file pointer if the file need to be re-created\r
68} SMART_FILE;\r
69\r
70SMART_FILE *\r
71SmartOpen (\r
72 char *FileName\r
73 );\r
74\r
75int\r
76SmartWrite (\r
77 SMART_FILE *SmartFile,\r
78 char *String\r
79 );\r
80\r
81void\r
82SmartClose (\r
83 SMART_FILE *SmartFile\r
84 );\r
85 \r
86INT8 *\r
87GetSymbolValue (\r
88 INT8 *SymbolName\r
89 );\r
90\r
91int\r
92AddSymbol (\r
93 INT8 *Name,\r
94 INT8 *Value,\r
95 int Mode\r
96 );\r
97\r
98int\r
99ExpandSymbols (\r
100 INT8 *SourceLine,\r
101 INT8 *DestLine,\r
102 int LineLen,\r
103 int ExpandMode\r
104 );\r
105\r
106void\r
107Message (\r
108 UINT32 PrintMask,\r
109 INT8 *Fmt,\r
110 ...\r
111 );\r
112\r
113int\r
114MakeFilePath (\r
115 INT8 *FileName\r
116 );\r
117\r
118int\r
119IsAbsolutePath (\r
120 INT8 *FileName\r
121 );\r
122\r
123#endif // ifndef _COMMON_H_\r