File: extract-sdl-keynames.awk

package info (click to toggle)
neverball 1.5.4-5
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 94,644 kB
  • sloc: ansic: 22,125; makefile: 438; sh: 150; xml: 129; awk: 69
file content (16 lines) | stat: -rw-r--r-- 263 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
BEGIN {
    print "static const char *table[][2] = {"
}

/^\tkeynames\[[^\]]+] =/ {
    if (match($0, /"[^"]+"/))
    {
        name = substr($0, RSTART + 1, RLENGTH - 2)
        print "    { \"" name "\", " "N_(\"" name "\") },"
    }
}

END {
    print "};"
}