summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/compiler/aslfiles.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2012-04-23 23:05:14 +0000
committerjkim <jkim@FreeBSD.org>2012-04-23 23:05:14 +0000
commit6ad6e5ad458430028d7210712b32b42a6a5bd27f (patch)
tree56922987e2cfefbddd9a8298beb2dce0ea965339 /sys/contrib/dev/acpica/compiler/aslfiles.c
parent22fae261d4ee03ee88b67242e0842711fe24b0f3 (diff)
parenteb364ef2c90291c41e896d265d93fe21e48d02a7 (diff)
downloadFreeBSD-src-6ad6e5ad458430028d7210712b32b42a6a5bd27f.zip
FreeBSD-src-6ad6e5ad458430028d7210712b32b42a6a5bd27f.tar.gz
Merge ACPICA 20120420.
Diffstat (limited to 'sys/contrib/dev/acpica/compiler/aslfiles.c')
-rw-r--r--sys/contrib/dev/acpica/compiler/aslfiles.c60
1 files changed, 45 insertions, 15 deletions
diff --git a/sys/contrib/dev/acpica/compiler/aslfiles.c b/sys/contrib/dev/acpica/compiler/aslfiles.c
index 0bc4d19..e3d8a1a 100644
--- a/sys/contrib/dev/acpica/compiler/aslfiles.c
+++ b/sys/contrib/dev/acpica/compiler/aslfiles.c
@@ -81,12 +81,12 @@ AslAbort (
void)
{
- AePrintErrorLog (ASL_FILE_STDOUT);
+ AePrintErrorLog (ASL_FILE_STDERR);
if (Gbl_DebugFlag)
{
- /* Print error summary to the debug file */
+ /* Print error summary to stdout also */
- AePrintErrorLog (ASL_FILE_STDERR);
+ AePrintErrorLog (ASL_FILE_STDOUT);
}
exit (1);
@@ -388,11 +388,38 @@ FlCloseFile (
void
FlSetLineNumber (
- ACPI_PARSE_OBJECT *Op)
+ UINT32 LineNumber)
+{
+
+ DbgPrint (ASL_PARSE_OUTPUT, "\n#line: New line number %u (old %u)\n",
+ LineNumber, Gbl_LogicalLineNumber);
+
+ Gbl_CurrentLineNumber = LineNumber;
+ Gbl_LogicalLineNumber = LineNumber;
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: FlSetFilename
+ *
+ * PARAMETERS: Op - Parse node for the LINE asl statement
+ *
+ * RETURN: None.
+ *
+ * DESCRIPTION: Set the current filename
+ *
+ ******************************************************************************/
+
+void
+FlSetFilename (
+ char *Filename)
{
- Gbl_CurrentLineNumber = (UINT32) Op->Asl.Value.Integer;
- Gbl_LogicalLineNumber = (UINT32) Op->Asl.Value.Integer;
+ DbgPrint (ASL_PARSE_OUTPUT, "\n#line: New filename %s (old %s)\n",
+ Filename, Gbl_Files[ASL_FILE_INPUT].Filename);
+
+ Gbl_Files[ASL_FILE_INPUT].Filename = Filename;
}
@@ -548,7 +575,7 @@ FlOpenIncludeFile (
* Flush out the "include ()" statement on this line, start
* the actual include file on the next line
*/
- ResetCurrentLineBuffer ();
+ AslResetCurrentLineBuffer ();
FlPrintFile (ASL_FILE_SOURCE_OUTPUT, "\n");
Gbl_CurrentLineOffset++;
@@ -770,17 +797,20 @@ FlOpenMiscOutputFiles (
AslCompilerFileHeader (ASL_FILE_LISTING_OUTPUT);
}
- /* Create the preprocessor output file */
+ /* Create the preprocessor output file if preprocessor enabled */
- Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_PREPROCESSOR);
- if (!Filename)
+ if (Gbl_PreprocessFlag)
{
- AslCommonError (ASL_ERROR, ASL_MSG_PREPROCESSOR_FILENAME,
- 0, 0, 0, 0, NULL, NULL);
- return (AE_ERROR);
- }
+ Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_PREPROCESSOR);
+ if (!Filename)
+ {
+ AslCommonError (ASL_ERROR, ASL_MSG_PREPROCESSOR_FILENAME,
+ 0, 0, 0, 0, NULL, NULL);
+ return (AE_ERROR);
+ }
- FlOpenFile (ASL_FILE_PREPROCESSOR, Filename, "w+b");
+ FlOpenFile (ASL_FILE_PREPROCESSOR, Filename, "w+b");
+ }
/* All done for data table compiler */
OpenPOWER on IntegriCloud