diff options
author | jkim <jkim@FreeBSD.org> | 2015-06-18 23:14:45 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2015-06-18 23:14:45 +0000 |
commit | 834a59ac96a56d139d5e26711cae9d9c099ab73e (patch) | |
tree | 0bdb0afb33a9872049c8a79ec239e8f1c918f4da /sys/contrib/dev/acpica/compiler/dtio.c | |
parent | 19250d4f16f66aaad903ed821f23db1b699eeb83 (diff) | |
parent | 77a98b4be9952afe90f7d9a02f6c901498f31413 (diff) | |
download | FreeBSD-src-834a59ac96a56d139d5e26711cae9d9c099ab73e.zip FreeBSD-src-834a59ac96a56d139d5e26711cae9d9c099ab73e.tar.gz |
Merge ACPICA 20150619.
Diffstat (limited to 'sys/contrib/dev/acpica/compiler/dtio.c')
-rw-r--r-- | sys/contrib/dev/acpica/compiler/dtio.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/sys/contrib/dev/acpica/compiler/dtio.c b/sys/contrib/dev/acpica/compiler/dtio.c index 4b05bd0..fed9925 100644 --- a/sys/contrib/dev/acpica/compiler/dtio.c +++ b/sys/contrib/dev/acpica/compiler/dtio.c @@ -129,7 +129,7 @@ DtTrim ( /* Skip lines that start with a space */ - if (!ACPI_STRCMP (String, " ")) + if (!strcmp (String, " ")) { ReturnString = UtStringCacheCalloc (1); return (ReturnString); @@ -138,7 +138,7 @@ DtTrim ( /* Setup pointers to start and end of input string */ Start = String; - End = String + ACPI_STRLEN (String) - 1; + End = String + strlen (String) - 1; /* Find first non-whitespace character */ @@ -180,9 +180,9 @@ DtTrim ( Length = ACPI_PTR_DIFF (End, Start) + 1; ReturnString = UtStringCacheCalloc (Length + 1); - if (ACPI_STRLEN (Start)) + if (strlen (Start)) { - ACPI_STRNCPY (ReturnString, Start, Length); + strncpy (ReturnString, Start, Length); } ReturnString[Length] = 0; @@ -313,7 +313,7 @@ DtParseLine ( Length = ACPI_PTR_DIFF (End, Start); TmpName = UtLocalCalloc (Length + 1); - ACPI_STRNCPY (TmpName, Start, Length); + strncpy (TmpName, Start, Length); Name = DtTrim (TmpName); ACPI_FREE (TmpName); @@ -360,7 +360,7 @@ DtParseLine ( Length = ACPI_PTR_DIFF (End, Start); TmpValue = UtLocalCalloc (Length + 1); - ACPI_STRNCPY (TmpValue, Start, Length); + strncpy (TmpValue, Start, Length); Value = DtTrim (TmpValue); ACPI_FREE (TmpValue); @@ -406,7 +406,8 @@ DtParseLine ( UINT32 DtGetNextLine ( - FILE *Handle) + FILE *Handle, + UINT32 Flags) { BOOLEAN LineNotAllBlanks = FALSE; UINT32 State = DT_NORMAL_TEXT; @@ -415,7 +416,7 @@ DtGetNextLine ( int c; - ACPI_MEMSET (Gbl_CurrentLineBuffer, 0, Gbl_LineBufferSize); + memset (Gbl_CurrentLineBuffer, 0, Gbl_LineBufferSize); for (i = 0; ;) { /* @@ -550,9 +551,12 @@ DtGetNextLine ( case '\n': - AcpiOsPrintf ("ERROR at line %u: Unterminated quoted string\n", - Gbl_CurrentLineNumber++); - State = DT_NORMAL_TEXT; + if (!(Flags & DT_ALLOW_MULTILINE_QUOTES)) + { + AcpiOsPrintf ("ERROR at line %u: Unterminated quoted string\n", + Gbl_CurrentLineNumber++); + State = DT_NORMAL_TEXT; + } break; default: /* Get next character */ @@ -746,7 +750,7 @@ DtScanFile ( /* Scan line-by-line */ - while ((Offset = DtGetNextLine (Handle)) != ASL_EOF) + while ((Offset = DtGetNextLine (Handle, 0)) != ASL_EOF) { ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Line %2.2u/%4.4X - %s", Gbl_CurrentLineNumber, Offset, Gbl_CurrentLineBuffer)); @@ -897,7 +901,7 @@ DtDumpBuffer ( } BufChar = Buffer[(ACPI_SIZE) i + j]; - if (ACPI_IS_PRINT (BufChar)) + if (isprint (BufChar)) { FlPrintFile (FileId, "%c", BufChar); } |