summaryrefslogtreecommitdiffstats
path: root/source/compiler/dtio.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2012-05-19 05:44:32 +0000
committerjkim <jkim@FreeBSD.org>2012-05-19 05:44:32 +0000
commit291c27508808bb5c9ab780eb971fe958491f1468 (patch)
tree83fbd480537714dcce335edc4aed3216f4e57816 /source/compiler/dtio.c
parenteb364ef2c90291c41e896d265d93fe21e48d02a7 (diff)
downloadFreeBSD-src-291c27508808bb5c9ab780eb971fe958491f1468.zip
FreeBSD-src-291c27508808bb5c9ab780eb971fe958491f1468.tar.gz
Import ACPICA 20120518.
Diffstat (limited to 'source/compiler/dtio.c')
-rw-r--r--source/compiler/dtio.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/source/compiler/dtio.c b/source/compiler/dtio.c
index 6357bfb..2b4e433 100644
--- a/source/compiler/dtio.c
+++ b/source/compiler/dtio.c
@@ -427,7 +427,6 @@ DtGetNextLine (
{
case DT_START_QUOTED_STRING:
case DT_SLASH_ASTERISK_COMMENT:
- case DT_SLASH_SLASH_COMMENT:
AcpiOsPrintf ("**** EOF within comment/string %u\n", State);
break;
@@ -436,7 +435,22 @@ DtGetNextLine (
break;
}
- return (ASL_EOF);
+ /* Standalone EOF is OK */
+
+ if (i == 0)
+ {
+ return (ASL_EOF);
+ }
+
+ /*
+ * Received an EOF in the middle of a line. Terminate the
+ * line with a newline. The next call to this function will
+ * return a standalone EOF. Thus, the upper parsing software
+ * never has to deal with an EOF within a valid line (or
+ * the last line does not get tossed on the floor.)
+ */
+ c = '\n';
+ State = DT_NORMAL_TEXT;
}
switch (State)
OpenPOWER on IntegriCloud