fluxbox/nls/convert.awk
2002-04-04 18:20:33 +00:00

32 lines
531 B
Awk

/^\$set/ {
major++
minor = 0
if (major > 1)
printf "\n" > output
printf "$set %d %s\n", major, $3 >> output
if (header) {
majorName = substr($3, 2)
if (major > 1)
printf "\n" > header
printf "\t%sSet = %#x,\n", majorName, major >> header
}
}
/^\$ #/ {
minor++
if (header) {
minorName = substr($2, 2)
printf "\t%s%s = %#x,\n", majorName, minorName, minor >> header
}
}
/^#/ {
text = substr($0, 3)
printf "%d %s\n", minor, text > output
}
! /^(\$|#)/ { print > output }