diff options
author | jkim <jkim@FreeBSD.org> | 2012-05-19 05:44:32 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2012-05-19 05:44:32 +0000 |
commit | 291c27508808bb5c9ab780eb971fe958491f1468 (patch) | |
tree | 83fbd480537714dcce335edc4aed3216f4e57816 /source/compiler/dtio.c | |
parent | eb364ef2c90291c41e896d265d93fe21e48d02a7 (diff) | |
download | FreeBSD-src-291c27508808bb5c9ab780eb971fe958491f1468.zip FreeBSD-src-291c27508808bb5c9ab780eb971fe958491f1468.tar.gz |
Import ACPICA 20120518.
Diffstat (limited to 'source/compiler/dtio.c')
-rw-r--r-- | source/compiler/dtio.c | 18 |
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) |