caps.awk (190B)
- BEGIN {
- print "static const char *const cap_names[] = {"
- }
- /^#define CAP_[^[:space:]]+[[:space:]]+[0-9]+[[:space:]]*$/ {
- printf "\t[%d] = \"%s\",\n", $3, tolower($2)
- }
- END {
- print "};"
- }
git clone https://anongit.hacktivis.me/git/oasis.git
caps.awk (190B)
- BEGIN {
- print "static const char *const cap_names[] = {"
- }
- /^#define CAP_[^[:space:]]+[[:space:]]+[0-9]+[[:space:]]*$/ {
- printf "\t[%d] = \"%s\",\n", $3, tolower($2)
- }
- END {
- print "};"
- }