2 #***************************************************************************
4 # Project ___| | | | _ \| |
6 # | (__| |_| | _ <| |___
7 # \___|\___/|_| \_\_____|
9 # Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
11 # This software is licensed as described in the file COPYING, which
12 # you should have received as part of this distribution. The terms
13 # are also available at https://curl.se/docs/copyright.html.
15 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
16 # copies of the Software, and permit persons to whom the Software is
17 # furnished to do so, under the terms of the COPYING file.
19 # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
20 # KIND, either express or implied.
22 # SPDX-License-Identifier: curl
24 ###########################################################################
33 # we may get the dir root pointed out
34 my $root = shift @ARGV;
35 while(defined $root) {
37 if($root =~ /--heading=(.*)/) {
42 elsif($root =~ /--sort/) {
55 $root = "$root/include/curl";
56 opendir(D, "$root") || die "Cannot open directory $root: $!\n";
61 foreach (sort(@dir)) {
63 push(@incs, "$root/$_");
76 foreach my $f (@incs) {
80 s/CURL_DEPRECATED\(.*"\)//;
82 if (/^(^CURL_EXTERN .*?)\(/) {
85 $decl =~ /([a-z_]+)$/;
88 elsif (/^(^CURL_EXTERN .*)/) {
89 # handle two-line declarations
99 $first =~ /([a-z_]+)$/;