File: get_exp.awk

package info (click to toggle)
libgd2 2.2.4-2%2Bdeb9u5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 9,956 kB
  • sloc: ansic: 46,953; sh: 5,560; cpp: 1,325; makefile: 295; perl: 223; tcl: 45; awk: 43
file content (37 lines) | stat: -rw-r--r-- 1,040 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!awk
# awk hack to fetch libgd export functions from header
# and write them to STDOUT. Here you can get an awk version for Win32:
# http://www.gknw.net/development/prgtools/awk.zip
# $Id$
#
BEGIN {
  print "# Exports extracted from " ARGV[1] "";
  print "# Do not edit this file - it is created by make!";
  print "# All your changes will be lost!!";
  if (EPREFIX) {
    print "  (" EPREFIX ")";
  }
  print "  gdFontGetGiant,";
  print "  gdFontGetLarge,";
  print "  gdFontGetMediumBold,";
  print "  gdFontGetSmall,";
  print "  gdFontGetTiny,";
  print "  gdImageSquareToCircle,";
  print "  gdImageStringFTCircle,";
  print "  gdImageSharpen,";
}

# try to catch the function names from lines like:
# BGD_DECLARE(gdImagePtr) function ...
# BGD_DECLARE(void *) function ...
#
/^[ \t]*BGD_DECLARE\([^\)]*\) +(gd[A-Za-z0-9_]+)/ {
  sub(/^[ \t]*BGD_DECLARE\([^\)]+\) +/, "");
  sub(/[ \t]*\(.*$/, "");
  # hack to filter gdImageEllipse() since we have no C implementation.
  if ($0 != "gdImageEllipse") {
    print "  " $0 ",";
  }
}