]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Sample/Tools/Source/ProcessDsc/DscFile.h
clean up the un-suitable ';' location when declaring the functions. The regular is...
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / Tools / Source / ProcessDsc / DscFile.h
CommitLineData
3eb9473e 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 DscFile.h\r
15 \r
16Abstract:\r
17\r
18 Defines and function prototypes for the ProcessDsc utility.\r
19 \r
20--*/\r
21\r
22#ifndef _DSC_FILE_H_\r
23#define _DSC_FILE_H_\r
24\r
25typedef struct _SECTION_LINE {\r
26 struct _SECTION_LINE *Next;\r
27 char *Line;\r
28 char *FileName;\r
29 UINT32 LineNum;\r
30} SECTION_LINE;\r
31\r
32//\r
33// Use this structure to keep track of parsed file names. Then\r
34// if we get a parse error we can figure out the file/line of\r
35// the error and print a useful message.\r
36//\r
37typedef struct _DSC_FILE_NAME {\r
38 struct _DSC_FILE_NAME *Next;\r
39 char *FileName;\r
40} DSC_FILE_NAME;\r
41\r
42//\r
43// We create a list of section names when we pre-parse a description file.\r
44// Use this structure.\r
45//\r
46typedef struct _SECTION {\r
47 struct _SECTION *Next;\r
48 char *Name;\r
49 SECTION_LINE *FirstLine;\r
50} SECTION;\r
51\r
52#define MAX_SAVES 4\r
53\r
54typedef struct {\r
55 SECTION_LINE *SavedPosition[MAX_SAVES];\r
56 int SavedPositionIndex;\r
57 SECTION *Sections;\r
58 SECTION_LINE *Lines;\r
59 SECTION *LastSection;\r
60 SECTION_LINE *LastLine;\r
61 SECTION_LINE *CurrentLine;\r
62 DSC_FILE_NAME *FileName;\r
63 DSC_FILE_NAME *LastFileName;\r
64} DSC_FILE;\r
65\r
66//\r
67// Function prototypes\r
68//\r
69int\r
70DSCFileSetFile (\r
71 DSC_FILE *DSC,\r
72 char *FileName\r
e00e1d46 73 );\r
3eb9473e 74SECTION *\r
75DSCFileFindSection (\r
76 DSC_FILE *DSC,\r
77 char *Name\r
e00e1d46 78 );\r
3eb9473e 79int\r
80DSCFileSavePosition (\r
81 DSC_FILE *DSC\r
e00e1d46 82 );\r
3eb9473e 83int\r
84DSCFileRestorePosition (\r
85 DSC_FILE *DSC\r
e00e1d46 86 );\r
3eb9473e 87char *\r
88DSCFileGetLine (\r
89 DSC_FILE *DSC,\r
90 char *Line,\r
91 int LineLen\r
e00e1d46 92 );\r
3eb9473e 93int\r
94DSCFileInit (\r
95 DSC_FILE *DSC\r
e00e1d46 96 );\r
3eb9473e 97int\r
98DSCFileDestroy (\r
99 DSC_FILE *DSC\r
e00e1d46 100 );\r
3eb9473e 101\r
102#endif // ifndef _DSC_FILE_H_\r