diff options
Diffstat (limited to 'sys/contrib/dev/acpica/compiler/aslerror.c')
-rw-r--r-- | sys/contrib/dev/acpica/compiler/aslerror.c | 53 |
1 files changed, 32 insertions, 21 deletions
diff --git a/sys/contrib/dev/acpica/compiler/aslerror.c b/sys/contrib/dev/acpica/compiler/aslerror.c index ebc622f..7031fde 100644 --- a/sys/contrib/dev/acpica/compiler/aslerror.c +++ b/sys/contrib/dev/acpica/compiler/aslerror.c @@ -2,7 +2,7 @@ /****************************************************************************** * * Module Name: aslerror - Error handling and statistics - * $Revision: 83 $ + * $Revision: 1.88 $ * *****************************************************************************/ @@ -10,7 +10,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2004, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp. * All rights reserved. * * 2. License @@ -116,11 +116,17 @@ *****************************************************************************/ #define ASL_EXCEPTIONS -#include "aslcompiler.h" +#include <contrib/dev/acpica/compiler/aslcompiler.h> #define _COMPONENT ACPI_COMPILER ACPI_MODULE_NAME ("aslerror") +/* Local prototypes */ + +static void +AeAddToErrorLog ( + ASL_ERROR_MSG *Enode); + /******************************************************************************* * @@ -136,7 +142,7 @@ * ******************************************************************************/ -void +static void AeAddToErrorLog ( ASL_ERROR_MSG *Enode) { @@ -189,7 +195,7 @@ AeAddToErrorLog ( * * FUNCTION: AePrintException * - * PARAMETERS: Where - Where to send the message + * PARAMETERS: FileId - ID of output file * Enode - Error node to print * Header - Additional text before each message * @@ -211,7 +217,8 @@ AePrintException ( char *Header) { UINT8 SourceByte; - UINT32 Actual; + int Actual; + size_t RActual; UINT32 MsgLength; char *MainMessage; char *ExtraMessage; @@ -221,8 +228,10 @@ AePrintException ( FILE *SourceFile; - /* Only listing files have a header, and remarks/optimizations are always output */ - + /* + * Only listing files have a header, and remarks/optimizations + * are always output + */ if (!Header) { /* Ignore remarks if requested */ @@ -274,23 +283,26 @@ AePrintException ( * Seek to the offset in the combined source file, read the source * line, and write it to the output. */ - Actual = fseek (SourceFile, (long) Enode->LogicalByteOffset, SEEK_SET); + Actual = fseek (SourceFile, (long) Enode->LogicalByteOffset, + (int) SEEK_SET); if (Actual) { - fprintf (OutputFile, "[*** iASL: Seek error on source code temp file ***]"); + fprintf (OutputFile, + "[*** iASL: Seek error on source code temp file ***]"); } else { - Actual = fread (&SourceByte, 1, 1, SourceFile); - if (!Actual) + RActual = fread (&SourceByte, 1, 1, SourceFile); + if (!RActual) { - fprintf (OutputFile, "[*** iASL: Read error on source code temp file ***]"); + fprintf (OutputFile, + "[*** iASL: Read error on source code temp file ***]"); } - else while (Actual && SourceByte && (SourceByte != '\n')) + else while (RActual && SourceByte && (SourceByte != '\n')) { fwrite (&SourceByte, 1, 1, OutputFile); - Actual = fread (&SourceByte, 1, 1, SourceFile); + RActual = fread (&SourceByte, 1, 1, SourceFile); } } fprintf (OutputFile, "\n"); @@ -373,9 +385,7 @@ AePrintException ( } else { - fprintf (OutputFile, " %s %s\n\n", - MainMessage, - ExtraMessage); + fprintf (OutputFile, " %s %s\n\n", MainMessage, ExtraMessage); } } } @@ -423,7 +433,7 @@ AePrintErrorLog ( * Filename - source filename * ExtraMessage - additional error message * - * RETURN: New error node for this error + * RETURN: None * * DESCRIPTION: Create a new error node and add it to the error log * @@ -598,10 +608,11 @@ AslCoreSubsystemError ( * * PARAMETERS: CompilerMessage - Error message from the parser * - * RETURN: Status? + * RETURN: Status (0 for now) * * DESCRIPTION: Report an error situation discovered in a production - * NOTE: don't change the name of this function. + * NOTE: don't change the name of this function, it is called + * from the auto-generated parser. * ******************************************************************************/ |