doc/spoiler/mag-extract
raw| 1 | { |
| 2 | type = $1 + 0; |
| 3 | if (type == 99 || type == 100 || type == 113) { |
| 4 | if (type == 99) { |
| 5 | name = capitalize($2); |
| 6 | gsub("_", " ", name); |
| 7 | } else |
| 8 | name = capitalize($3); |
| 9 | |
| 10 | printf("%s &%s &+%d &%s\\\\\n", name, $10, $8, $4); |
| 11 | } |
| 12 | } |
| 13 | |
| 14 | function capitalize(str) { |
| 15 | return toupper(substr(str, 1, 1)) substr(str, 2); |
| 16 | } |