aboutsummaryrefslogtreecommitdiff
path: root/contrib/filter_params.pl
blob: 05861e376fe93aed3ab27a8898202fa2c5b9eea2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/perl

# Filters out some of the #defines used thourghout the GCC sources:
# - GTY(()) marks declarations for gengtype.c
# - PARAMS(()) is used for K&R compatibility. See ansidecl.h.

while (<>) {
    s/^\/\* /\/\*\* \@verbatim /;
    s/\*\// \@endverbatim \*\//;
    s/GTY[ \t]*\(\(.*\)\)//g;
    s/[ \t]ATTRIBUTE_UNUSED//g;
    s/PARAMS[ \t]*\(\((.*?)\)\)/\($1\)/sg;
    print;
}