From 0ff2ef6cfe11e98b10c26dc8f1c359e6502538c8 Mon Sep 17 00:00:00 2001 From: Jung-uk Kim Date: Thu, 4 Apr 2013 21:18:57 +0000 Subject: Import ACPICA 20130328. --- source/compiler/aslerror.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'source/compiler/aslerror.c') diff --git a/source/compiler/aslerror.c b/source/compiler/aslerror.c index 551a2a54d0fa..5b3b483e33e2 100644 --- a/source/compiler/aslerror.c +++ b/source/compiler/aslerror.c @@ -302,12 +302,25 @@ AePrintException ( } else { - while (RActual && SourceByte && (SourceByte != '\n') && (Total < 256)) + /* Read/write the source line, up to the maximum line length */ + + while (RActual && SourceByte && (SourceByte != '\n')) { - if (fwrite (&SourceByte, 1, 1, OutputFile) != 1) + if (Total < 256) { - printf ("[*** iASL: Write error on output file ***]\n"); - return; + /* After the max line length, we will just read the line, no write */ + + if (fwrite (&SourceByte, 1, 1, OutputFile) != 1) + { + printf ("[*** iASL: Write error on output file ***]\n"); + return; + } + } + else if (Total == 256) + { + fprintf (OutputFile, + "\n[*** iASL: Very long input line, message below refers to column %u ***]", + Enode->Column); } RActual = fread (&SourceByte, 1, 1, SourceFile); @@ -320,13 +333,6 @@ AePrintException ( } Total++; } - - if (Total >= 256) - { - fprintf (OutputFile, - "\n[*** iASL: Long input line, an error occurred at column %u ***]", - Enode->Column); - } } } } -- cgit v1.2.3