Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
7123 dunkaist 1
BEGIN {
2
}
3
 
4
{
5
        cnt++
6
        names[cnt] = $1
7
        colors[cnt] = $2
8
}
9
 
10
END {
11
        printf "; Autogenerated from colors.txt, do not edit this file!\n"
12
        printf "; gawk -f colors.gawk colors.txt > colors.asm\n\n"
13
        printf "colors dd "
14
        printf colors[1]
15
        for (i=2; i<=cnt; i++) {
16
                printf ", %s", colors[i]
17
        }
18
 
19
        printf "\n\n"
20
 
21
        printf "names dw "
22
        printf names[1]
23
        for (i=2; i<=cnt; i++) {
24
                printf ", %s", names[i]
25
        }
26
 
27
        printf "\n\n"
28
 
29
        for (i=1; i<=cnt; i++) {
30
                printf "%s db %d,'%s'\n", names[i], length(names[i]), names[i]
31
        }
32
}
33