void LsWriteSourceLines ( UINT32 ToLineNumber, UINT32 ToLogicalLineNumber, UINT32 FileId) { /* Nothing to do for these file types */ if ((FileId == ASL_FILE_ASM_INCLUDE_OUTPUT) || (FileId == ASL_FILE_C_INCLUDE_OUTPUT)) { return; } Gbl_CurrentLine = ToLogicalLineNumber; /* Flush any hex bytes remaining from the last opcode */ LsFlushListingBuffer (FileId); /* Read lines and write them as long as we are not caught up */ if (Gbl_SourceLine < Gbl_CurrentLine) { /* * If we just completed writing some AML hex bytes, output a linefeed * to add some whitespace for readability. */ if (Gbl_HexBytesWereWritten) { FlPrintFile (FileId, "\n"); Gbl_HexBytesWereWritten = FALSE; } if (FileId == ASL_FILE_C_SOURCE_OUTPUT) { FlPrintFile (FileId, " /*\n"); } /* Write one line at a time until we have reached the target line # */ while ((Gbl_SourceLine < Gbl_CurrentLine) && LsWriteOneSourceLine (FileId)) { ; } if (FileId == ASL_FILE_C_SOURCE_OUTPUT) { FlPrintFile (FileId, " */"); } FlPrintFile (FileId, "\n"); } }
static void LsFinishSourceListing ( UINT32 FileId) { if ((FileId == ASL_FILE_ASM_INCLUDE_OUTPUT) || (FileId == ASL_FILE_C_INCLUDE_OUTPUT)) { return; } LsFlushListingBuffer (FileId); Gbl_CurrentAmlOffset = 0; /* Flush any remaining text in the source file */ if (FileId == ASL_FILE_C_SOURCE_OUTPUT) { FlPrintFile (FileId, " /*\n"); } while (LsWriteOneSourceLine (FileId)) { ; } if (FileId == ASL_FILE_C_SOURCE_OUTPUT) { FlPrintFile (FileId, "\n */\n };\n"); } FlPrintFile (FileId, "\n"); if (FileId == ASL_FILE_LISTING_OUTPUT) { /* Print a summary of the compile exceptions */ FlPrintFile (FileId, "\n\nSummary of errors and warnings\n\n"); AePrintErrorLog (FileId); FlPrintFile (FileId, "\n"); UtDisplaySummary (FileId); FlPrintFile (FileId, "\n"); } }