1 # ***************************************************************************
3 # * Project ___| | | | _ \| |
4 # * / __| | | | |_) | |
5 # * | (__| |_| | _ <| |___
6 # * \___|\___/|_| \_\_____|
8 # * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
10 # * This software is licensed as described in the file COPYING, which
11 # * you should have received as part of this distribution. The terms
12 # * are also available at http://curl.haxx.se/docs/copyright.html.
14 # * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 # * copies of the Software, and permit persons to whom the Software is
16 # * furnished to do so, under the terms of the COPYING file.
18 # * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 # * KIND, either express or implied.
21 # ***************************************************************************
22 # awk script which fetches curl function symbols from public header input
23 # files and write them to STDOUT. Here you can get an awk version for Win32:
24 # http://www.gknw.net/development/prgtools/awk-20100523.zip
27 add_symbol("curl_strequal")
28 add_symbol("curl_strnequal")
31 function add_symbol(sym_name) {
32 sub(" ", "", sym_name)
33 exports[++idx] = sym_name
37 /^CURL_EXTERN .* [*]?curl_.*[(]/ {
45 printf("Added %d symbols to export list.\n", idx) > "/dev/stderr"
46 # sort symbols with shell sort
47 increment = int(idx / 2)
48 while (increment > 0) {
49 for (i = increment+1; i <= idx; i++) {
52 while ((j >= increment+1) && (exports[j-increment] > temp)) {
53 exports[j] = exports[j-increment]
61 increment = int(increment*5/11)
65 printf(" (%s)\n", EXPPREFIX)
68 printf(" %s,\n", exports[++x])
70 printf(" %s\n", exports[++x])