aboutsummaryrefslogtreecommitdiff
path: root/source/compiler/aslerror.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2013-04-04 21:18:57 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2013-04-04 21:18:57 +0000
commit0ff2ef6cfe11e98b10c26dc8f1c359e6502538c8 (patch)
tree2d060ed4fedfc9aace2e673176570faa8ae1d376 /source/compiler/aslerror.c
parent6bb10c5e2fa82c104e57c7468335930ba9e47d4f (diff)
downloadsrc-0ff2ef6cfe11e98b10c26dc8f1c359e6502538c8.tar.gz
src-0ff2ef6cfe11e98b10c26dc8f1c359e6502538c8.zip
Import ACPICA 20130328.vendor/acpica/20130328
Notes
Notes: svn path=/vendor-sys/acpica/dist/; revision=249109 svn path=/vendor-sys/acpica/20130328/; revision=249110; tag=vendor/acpica/20130328
Diffstat (limited to 'source/compiler/aslerror.c')
-rw-r--r--source/compiler/aslerror.c28
1 files changed, 17 insertions, 11 deletions
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);
- }
}
}
}