summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/compiler/dtio.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2012-05-24 23:12:30 +0000
committerjkim <jkim@FreeBSD.org>2012-05-24 23:12:30 +0000
commit5e29a3bfbb9c8830043811a67749c68d62419dcb (patch)
tree9dd2174199f7139519d2253a1b845832de100537 /sys/contrib/dev/acpica/compiler/dtio.c
parent9efa72fd429a41fc46f151a4d5f03c1198c2a4da (diff)
downloadFreeBSD-src-5e29a3bfbb9c8830043811a67749c68d62419dcb.zip
FreeBSD-src-5e29a3bfbb9c8830043811a67749c68d62419dcb.tar.gz
Merge ACPICA 20120518.
Diffstat (limited to 'sys/contrib/dev/acpica/compiler/dtio.c')
-rw-r--r--sys/contrib/dev/acpica/compiler/dtio.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/sys/contrib/dev/acpica/compiler/dtio.c b/sys/contrib/dev/acpica/compiler/dtio.c
index 633ed2d..1d08389d 100644
--- a/sys/contrib/dev/acpica/compiler/dtio.c
+++ b/sys/contrib/dev/acpica/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