Skip to content

Commit 86a4820

Browse files
committedJun 10, 2015
fix 4bb90e3
1 parent 4bb90e3 commit 86a4820

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed
 

‎scripts/sort_includes.pl

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,7 @@
2626
our $sorting;
2727

2828
BEGIN { $sorting = 0; }
29-
END {
30-
if( $sorting ) {
31-
print foreach sort keys %uis;
32-
print foreach sort keys %sys;
33-
print foreach sort keys %others;
34-
}
35-
}
29+
END { die "header files not empty" if keys %uis || keys %sys || keys %others; }
3630

3731
if(/^\s*#include/ ) {
3832
if(/"ui_/ ) {
@@ -43,7 +37,8 @@ END
4337
$others{$_}=1;
4438
}
4539
$sorting=1;
46-
next;
40+
41+
next unless eof;
4742
}
4843

4944
if( $sorting ) {
@@ -54,8 +49,9 @@ END
5449
undef %uis;
5550
undef %sys;
5651
undef %others;
57-
}
5852

53+
last if eof;
54+
}
5955

6056
$sorting=0;
6157

0 commit comments

Comments
 (0)
Please sign in to comment.