diff options
author | fluxgen <fluxgen> | 2001-12-11 20:47:02 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2001-12-11 20:47:02 (GMT) |
commit | 18830ac9add80cbd3bf7369307d7e35a519dca9b (patch) | |
tree | 4759a5434a34ba317fe77bbf8b0ed9bb57bb6018 /nls/convert.awk | |
parent | 1523b48bff07dead084af3064ad11c79a9b25df0 (diff) | |
download | fluxbox-18830ac9add80cbd3bf7369307d7e35a519dca9b.zip fluxbox-18830ac9add80cbd3bf7369307d7e35a519dca9b.tar.bz2 |
Initial revision
Diffstat (limited to 'nls/convert.awk')
-rw-r--r-- | nls/convert.awk | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/nls/convert.awk b/nls/convert.awk new file mode 100644 index 0000000..744179c --- /dev/null +++ b/nls/convert.awk | |||
@@ -0,0 +1,32 @@ | |||
1 | /^\$set/ { | ||
2 | major++ | ||
3 | minor = 0 | ||
4 | |||
5 | if (major > 1) | ||
6 | printf "\n" > output | ||
7 | printf "$set %d %s\n", major, $3 > output | ||
8 | |||
9 | if (header) { | ||
10 | majorName = substr($3, 2) | ||
11 | if (major > 1) | ||
12 | printf "\n" > header | ||
13 | printf "#define %sSet %#x\n", majorName, major > header | ||
14 | } | ||
15 | } | ||
16 | |||
17 | /^\$ #/ { | ||
18 | minor++ | ||
19 | |||
20 | if (header) { | ||
21 | minorName = substr($2, 2) | ||
22 | printf "#define %s%s %#x\n", majorName, minorName, minor > header | ||
23 | } | ||
24 | } | ||
25 | |||
26 | /^#/ { | ||
27 | text = substr($0, 3) | ||
28 | printf "%d %s\n", minor, text > output | ||
29 | } | ||
30 | |||
31 | ! /^(\$|#)/ { print > output } | ||
32 | |||