Enforce 'fn(void);' in function prototypes.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4336 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
9f3fd037bc
commit
6d99470e78
@ -72,6 +72,9 @@ sub parse($)
|
|||||||
# no space on inside of brackets
|
# no space on inside of brackets
|
||||||
$line =~ s/\(\s+/(/g;
|
$line =~ s/\(\s+/(/g;
|
||||||
$line =~ s/(\S)\s+\)/$1)/g;
|
$line =~ s/(\S)\s+\)/$1)/g;
|
||||||
|
|
||||||
|
# enforce 'fn(void);' in prototypes
|
||||||
|
$line =~ s/^(\w.+\w\()\);$/$1void);/;
|
||||||
}
|
}
|
||||||
# strip trailing space again (e.g. a trailing operator now has space afterwards)
|
# strip trailing space again (e.g. a trailing operator now has space afterwards)
|
||||||
$line =~ s/\s+$//g;
|
$line =~ s/\s+$//g;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user