Ignore newlines in INI parser
This commit is contained in:
parent
cb7f4deb37
commit
36df83431b
@ -66,7 +66,7 @@ file(RELATIVE_PATH _PATH_PREFIX ${EXECTOS_BINARY_DIR} ${EXECTOS_SOURCE_DIR})
|
|||||||
add_compiler_flags(-D__RELFILE__="&__FILE__[__FILE__[0] == '.' ? sizeof \\\"${_PATH_PREFIX}\\\" - 1 : sizeof XTOS_SOURCE_DIR]")
|
add_compiler_flags(-D__RELFILE__="&__FILE__[__FILE__[0] == '.' ? sizeof \\\"${_PATH_PREFIX}\\\" - 1 : sizeof XTOS_SOURCE_DIR]")
|
||||||
|
|
||||||
# Set the virtual disk image size (in MiB)
|
# Set the virtual disk image size (in MiB)
|
||||||
set_disk_image_size(128)
|
set_disk_image_size(16)
|
||||||
|
|
||||||
# Build all subprojects
|
# Build all subprojects
|
||||||
add_subdirectory(bootdata)
|
add_subdirectory(bootdata)
|
||||||
|
@ -40,7 +40,17 @@ BlConfigParseIniFile(IN PWCHAR FileContents,
|
|||||||
while(Argument != NULL)
|
while(Argument != NULL)
|
||||||
{
|
{
|
||||||
/* Check every line */
|
/* Check every line */
|
||||||
if(RtlWideStringCompare(Argument, L"[", 1) == 0)
|
if(RtlWideStringCompare(Argument, L"\r\n", 2) == 0)
|
||||||
|
{
|
||||||
|
/* We can safely ignore a newline */
|
||||||
|
Argument += 2;
|
||||||
|
}
|
||||||
|
else if(RtlWideStringCompare(Argument, L"#", 1) == 0)
|
||||||
|
{
|
||||||
|
/* We can safely ignore a comment */
|
||||||
|
Argument += 1;
|
||||||
|
}
|
||||||
|
else if(RtlWideStringCompare(Argument, L"[", 1) == 0)
|
||||||
{
|
{
|
||||||
/* Skip to the section name */
|
/* Skip to the section name */
|
||||||
Argument += 1;
|
Argument += 1;
|
||||||
@ -95,11 +105,6 @@ BlConfigParseIniFile(IN PWCHAR FileContents,
|
|||||||
/* Set a tune */
|
/* Set a tune */
|
||||||
BlConsolePrint(L"Setting TUNE value to %S\n", Argument);
|
BlConsolePrint(L"Setting TUNE value to %S\n", Argument);
|
||||||
}
|
}
|
||||||
else if(RtlWideStringCompare(Argument, L"#", 1) == 0)
|
|
||||||
{
|
|
||||||
/* We can safely ignore a comment */
|
|
||||||
Argument += 1;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Configuration file might be corrupt */
|
/* Configuration file might be corrupt */
|
||||||
|
Loading…
Reference in New Issue
Block a user