mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-23 21:51:27 +00:00
Made sure all per-hunk state variables are initialized properly.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1204 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -279,6 +279,14 @@ function process_preprocessor_statement() {
|
||||
}
|
||||
}
|
||||
|
||||
function reset_hunk_state_variables() {
|
||||
lines = 0
|
||||
lines_deleted = 0
|
||||
output = 1
|
||||
if_nesting_level = -1
|
||||
delete_next_blank_line = 0
|
||||
}
|
||||
|
||||
function dump_lines() {
|
||||
# Detect empty hunks
|
||||
first_modif = -1
|
||||
@@ -299,8 +307,7 @@ function dump_lines() {
|
||||
for (i = 0; i < lines; i++)
|
||||
print line[i]
|
||||
}
|
||||
lines = 0
|
||||
lines_deleted = 0
|
||||
reset_hunk_state_variables()
|
||||
}
|
||||
|
||||
BEGIN {
|
||||
@@ -320,11 +327,7 @@ BEGIN {
|
||||
delete_disabled_code = 0
|
||||
|
||||
# Variable initialization.
|
||||
lines = 0
|
||||
lines_deleted = 0
|
||||
output = 1
|
||||
if_nesting_level = -1
|
||||
delete_next_blank_line = 0
|
||||
reset_hunk_state_variables()
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user