Added doc-skip to skip certain functions from documentation.
[gnutls.git] / doc / scripts / getfuncs.pl
blob383924045f8848855102c3b05933fa7a52e6774a
1 eval '(exit $?0)' && eval 'exec perl -wST "$0" ${1+"$@"}'
2 & eval 'exec perl -wST "$0" $argv:q'
3 if 0;
5 # Copyright (C) 2011-2012 Free Software Foundation, Inc.
7 # This file is part of GnuTLS.
9 # This file is free software; you can redistribute it and/or modify it
10 # under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 3 of the License, or
12 # (at your option) any later version.
14 # This file is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 # General Public License for more details.
19 # You should have received a copy of the GNU General Public License
20 # along with this file; if not, write to the Free Software Foundation,
21 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 # given a header file in stdin it will print all functions
25 my $line;
26 my $func;
28 while ($line=<STDIN>) {
30 if ($line !~ m/typedef/ && $line !~ m/Copyright/ && $line !~ m/doc-skip/) {
31 $func = '';
33 if ($line =~ m/^\s*\w+[\s\*]+([A-Za-z0-9_]+)\s*\([^\)]+/) {
34 $func = $1;
37 if ($line =~ m/^\s*\w+\s+\w+[\s\*]+([A-Za-z0-9_]+)\s*\([^\)]+/) {
38 $func = $1;
41 if ($line =~ m/^[\s\*]*([A-Za-z0-9_]+)\s*\([^\)]+/) {
42 $func = $1;
45 if ($func ne '' && $func =~ m/gnutls_.*/) {
46 print $func . "\n";