aboutsummaryrefslogtreecommitdiff
path: root/source/compiler/dtio.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/compiler/dtio.c')
-rw-r--r--source/compiler/dtio.c104
1 files changed, 52 insertions, 52 deletions
diff --git a/source/compiler/dtio.c b/source/compiler/dtio.c
index 0ba15b421a2b..b15d3b97f407 100644
--- a/source/compiler/dtio.c
+++ b/source/compiler/dtio.c
@@ -209,7 +209,7 @@ DtDumpSubtableTree (
#define DT_MERGE_LINES 6
#define DT_ESCAPE_SEQUENCE 7
-static UINT32 Gbl_NextLineOffset;
+static UINT32 AslGbl_NextLineOffset;
/******************************************************************************
@@ -317,7 +317,7 @@ DtLinkField (
DT_FIELD *Next;
- Prev = Next = Gbl_FieldList;
+ Prev = Next = AslGbl_FieldList;
while (Next)
{
@@ -331,7 +331,7 @@ DtLinkField (
}
else
{
- Gbl_FieldList = Field;
+ AslGbl_FieldList = Field;
}
}
@@ -507,8 +507,8 @@ DtParseLine (
* Handles both slash-asterisk and slash-slash comments.
* Also, quoted strings, but no escapes within.
*
- * Line is returned in Gbl_CurrentLineBuffer.
- * Line number in original file is returned in Gbl_CurrentLineNumber.
+ * Line is returned in AslGbl_CurrentLineBuffer.
+ * Line number in original file is returned in AslGbl_CurrentLineNumber.
*
*****************************************************************************/
@@ -524,14 +524,14 @@ DtGetNextLine (
int c;
- memset (Gbl_CurrentLineBuffer, 0, Gbl_LineBufferSize);
+ memset (AslGbl_CurrentLineBuffer, 0, AslGbl_LineBufferSize);
for (i = 0; ;)
{
/*
* If line is too long, expand the line buffers. Also increases
- * Gbl_LineBufferSize.
+ * AslGbl_LineBufferSize.
*/
- if (i >= Gbl_LineBufferSize)
+ if (i >= AslGbl_LineBufferSize)
{
UtExpandLineBuffers ();
}
@@ -576,7 +576,7 @@ DtGetNextLine (
/* Normal text, insert char into line buffer */
- Gbl_CurrentLineBuffer[i] = (char) c;
+ AslGbl_CurrentLineBuffer[i] = (char) c;
switch (c)
{
case '/':
@@ -601,9 +601,9 @@ DtGetNextLine (
case '\n':
- CurrentLineOffset = Gbl_NextLineOffset;
- Gbl_NextLineOffset = (UINT32) ftell (Handle);
- Gbl_CurrentLineNumber++;
+ CurrentLineOffset = AslGbl_NextLineOffset;
+ AslGbl_NextLineOffset = (UINT32) ftell (Handle);
+ AslGbl_CurrentLineNumber++;
/*
* Exit if line is complete. Ignore empty lines (only \n)
@@ -611,12 +611,12 @@ DtGetNextLine (
*/
if ((i != 0) && LineNotAllBlanks)
{
- if ((i + 1) >= Gbl_LineBufferSize)
+ if ((i + 1) >= AslGbl_LineBufferSize)
{
UtExpandLineBuffers ();
}
- Gbl_CurrentLineBuffer[i+1] = 0; /* Terminate string */
+ AslGbl_CurrentLineBuffer[i+1] = 0; /* Terminate string */
return (CurrentLineOffset);
}
@@ -642,7 +642,7 @@ DtGetNextLine (
/* Insert raw chars until end of quoted string */
- Gbl_CurrentLineBuffer[i] = (char) c;
+ AslGbl_CurrentLineBuffer[i] = (char) c;
i++;
switch (c)
@@ -663,7 +663,7 @@ DtGetNextLine (
{
AcpiOsPrintf (
"ERROR at line %u: Unterminated quoted string\n",
- Gbl_CurrentLineNumber++);
+ AslGbl_CurrentLineNumber++);
State = DT_NORMAL_TEXT;
}
break;
@@ -678,7 +678,7 @@ DtGetNextLine (
/* Just copy the escaped character. TBD: sufficient for table compiler? */
- Gbl_CurrentLineBuffer[i] = (char) c;
+ AslGbl_CurrentLineBuffer[i] = (char) c;
i++;
State = DT_START_QUOTED_STRING;
break;
@@ -702,12 +702,12 @@ DtGetNextLine (
default: /* Not a comment */
i++; /* Save the preceding slash */
- if (i >= Gbl_LineBufferSize)
+ if (i >= AslGbl_LineBufferSize)
{
UtExpandLineBuffers ();
}
- Gbl_CurrentLineBuffer[i] = (char) c;
+ AslGbl_CurrentLineBuffer[i] = (char) c;
i++;
State = DT_NORMAL_TEXT;
break;
@@ -722,8 +722,8 @@ DtGetNextLine (
{
case '\n':
- Gbl_NextLineOffset = (UINT32) ftell (Handle);
- Gbl_CurrentLineNumber++;
+ AslGbl_NextLineOffset = (UINT32) ftell (Handle);
+ AslGbl_CurrentLineNumber++;
break;
case '*':
@@ -763,9 +763,9 @@ DtGetNextLine (
case '\n':
- CurrentLineOffset = Gbl_NextLineOffset;
- Gbl_NextLineOffset = (UINT32) ftell (Handle);
- Gbl_CurrentLineNumber++;
+ CurrentLineOffset = AslGbl_NextLineOffset;
+ AslGbl_NextLineOffset = (UINT32) ftell (Handle);
+ AslGbl_CurrentLineNumber++;
break;
case '*':
@@ -800,14 +800,14 @@ DtGetNextLine (
* immediately by a newline. Insert a space between the
* lines (overwrite the backslash)
*/
- Gbl_CurrentLineBuffer[i] = ' ';
+ AslGbl_CurrentLineBuffer[i] = ' ';
i++;
/* Ignore newline, this will merge the lines */
- CurrentLineOffset = Gbl_NextLineOffset;
- Gbl_NextLineOffset = (UINT32) ftell (Handle);
- Gbl_CurrentLineNumber++;
+ CurrentLineOffset = AslGbl_NextLineOffset;
+ AslGbl_NextLineOffset = (UINT32) ftell (Handle);
+ AslGbl_CurrentLineNumber++;
State = DT_NORMAL_TEXT;
}
break;
@@ -830,7 +830,7 @@ DtGetNextLine (
* RETURN: Pointer to start of the constructed parse tree.
*
* DESCRIPTION: Scan source file, link all field names and values
- * to the global parse tree: Gbl_FieldList
+ * to the global parse tree: AslGbl_FieldList
*
*****************************************************************************/
@@ -847,25 +847,25 @@ DtScanFile (
/* Get the file size */
- Gbl_InputByteCount = CmGetFileSize (Handle);
- if (Gbl_InputByteCount == ACPI_UINT32_MAX)
+ AslGbl_InputByteCount = CmGetFileSize (Handle);
+ if (AslGbl_InputByteCount == ACPI_UINT32_MAX)
{
AslAbort ();
}
- Gbl_CurrentLineNumber = 0;
- Gbl_CurrentLineOffset = 0;
- Gbl_NextLineOffset = 0;
+ AslGbl_CurrentLineNumber = 0;
+ AslGbl_CurrentLineOffset = 0;
+ AslGbl_NextLineOffset = 0;
/* Scan line-by-line */
while ((Offset = DtGetNextLine (Handle, 0)) != ASL_EOF)
{
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Line %2.2u/%4.4X - %s",
- Gbl_CurrentLineNumber, Offset, Gbl_CurrentLineBuffer));
+ AslGbl_CurrentLineNumber, Offset, AslGbl_CurrentLineBuffer));
- Status = DtParseLine (Gbl_CurrentLineBuffer,
- Gbl_CurrentLineNumber, Offset);
+ Status = DtParseLine (AslGbl_CurrentLineBuffer,
+ AslGbl_CurrentLineNumber, Offset);
if (Status == AE_NOT_FOUND)
{
break;
@@ -874,8 +874,8 @@ DtScanFile (
/* Dump the parse tree if debug enabled */
- DtDumpFieldList (Gbl_FieldList);
- return (Gbl_FieldList);
+ DtDumpFieldList (AslGbl_FieldList);
+ return (AslGbl_FieldList);
}
@@ -932,8 +932,8 @@ DtOutputBinary (
DtWalkTableTree (RootTable, DtWriteBinary, NULL, NULL);
- Gbl_TableLength = CmGetFileSize (Gbl_Files[ASL_FILE_AML_OUTPUT].Handle);
- if (Gbl_TableLength == ACPI_UINT32_MAX)
+ AslGbl_TableLength = CmGetFileSize (AslGbl_Files[ASL_FILE_AML_OUTPUT].Handle);
+ if (AslGbl_TableLength == ACPI_UINT32_MAX)
{
AslAbort ();
}
@@ -1048,7 +1048,7 @@ DtDumpFieldList (
DT_FIELD *Field)
{
- if (!Gbl_DebugFlag || !Field)
+ if (!AslGbl_DebugFlag || !Field)
{
return;
}
@@ -1132,7 +1132,7 @@ DtDumpSubtableList (
void)
{
- if (!Gbl_DebugFlag || !Gbl_RootTable)
+ if (!AslGbl_DebugFlag || !AslGbl_RootTable)
{
return;
}
@@ -1141,11 +1141,11 @@ DtDumpSubtableList (
"Subtable Info:\n"
"Depth Name Length TotalLen LenSize Flags "
"This Parent Child Peer\n\n");
- DtWalkTableTree (Gbl_RootTable, DtDumpSubtableInfo, NULL, NULL);
+ DtWalkTableTree (AslGbl_RootTable, DtDumpSubtableInfo, NULL, NULL);
DbgPrint (ASL_DEBUG_OUTPUT,
"\nSubtable Tree: (Depth, Name, Subtable, Length, TotalLength)\n\n");
- DtWalkTableTree (Gbl_RootTable, DtDumpSubtableTree, NULL, NULL);
+ DtWalkTableTree (AslGbl_RootTable, DtDumpSubtableTree, NULL, NULL);
DbgPrint (ASL_DEBUG_OUTPUT, "\n");
}
@@ -1174,7 +1174,7 @@ DtWriteFieldToListing (
UINT8 FileByte;
- if (!Gbl_ListingFlag || !Field)
+ if (!AslGbl_ListingFlag || !Field)
{
return;
}
@@ -1232,24 +1232,24 @@ DtWriteTableToListing (
UINT8 *Buffer;
- if (!Gbl_ListingFlag)
+ if (!AslGbl_ListingFlag)
{
return;
}
/* Read the entire table from the output file */
- Buffer = UtLocalCalloc (Gbl_TableLength);
+ Buffer = UtLocalCalloc (AslGbl_TableLength);
FlSeekFile (ASL_FILE_AML_OUTPUT, 0);
- FlReadFile (ASL_FILE_AML_OUTPUT, Buffer, Gbl_TableLength);
+ FlReadFile (ASL_FILE_AML_OUTPUT, Buffer, AslGbl_TableLength);
/* Dump the raw table data */
- AcpiOsRedirectOutput (Gbl_Files[ASL_FILE_LISTING_OUTPUT].Handle);
+ AcpiOsRedirectOutput (AslGbl_Files[ASL_FILE_LISTING_OUTPUT].Handle);
AcpiOsPrintf ("\n%s: Length %d (0x%X)\n\n",
- ACPI_RAW_TABLE_DATA_HEADER, Gbl_TableLength, Gbl_TableLength);
- AcpiUtDumpBuffer (Buffer, Gbl_TableLength, DB_BYTE_DISPLAY, 0);
+ ACPI_RAW_TABLE_DATA_HEADER, AslGbl_TableLength, AslGbl_TableLength);
+ AcpiUtDumpBuffer (Buffer, AslGbl_TableLength, DB_BYTE_DISPLAY, 0);
AcpiOsRedirectOutput (stdout);
ACPI_FREE (Buffer);