__ini_value: change empty value check
Change the short-circuit check for an empty value to a more structual approach. This might be better for the code or not ..
This commit is contained in:
parent
ad736a66d0
commit
46638f0839
1 changed files with 38 additions and 41 deletions
|
@ -66,12 +66,8 @@ found {print; next}
|
|||
# main loop (til the line was found)
|
||||
!found {
|
||||
line = trim($0)
|
||||
# short curcit on empty lines
|
||||
if(line == "") {
|
||||
push_line()
|
||||
next
|
||||
}
|
||||
|
||||
# process if the line is not empty (or only contains spaces)
|
||||
if(line != "") {
|
||||
# check for a ini section
|
||||
if(substr(line, 1, 1) == "[" && substr(line, length(line), 1) == "]") {
|
||||
is_section = 1
|
||||
|
@ -120,6 +116,7 @@ found {print; next}
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# works cause no next statement from above *structual programming*
|
||||
push_line()
|
||||
|
|
Loading…
Reference in a new issue