summaryrefslogtreecommitdiffstats
path: root/source/compiler/aslerror.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2013-04-04 21:18:57 +0000
committerjkim <jkim@FreeBSD.org>2013-04-04 21:18:57 +0000
commit4b5fbe0ac6228523722afb80af9d5c8ed2ba5ee8 (patch)
tree2d060ed4fedfc9aace2e673176570faa8ae1d376 /source/compiler/aslerror.c
parentbd5edd68a8fda8df18c688919e100f7f1df5ad6b (diff)
downloadFreeBSD-src-4b5fbe0ac6228523722afb80af9d5c8ed2ba5ee8.zip
FreeBSD-src-4b5fbe0ac6228523722afb80af9d5c8ed2ba5ee8.tar.gz
Import 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 551a2a5..5b3b483 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);
- }
}
}
}
OpenPOWER on IntegriCloud