Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 11 lines (10 sloc) 0.659 kb
ac506d8 Generate the default colours from an awk script
Sound and Fury authored
1 # generate the colours initialisation c_init.c (used in colour.c) from
2 # colour.d, the file of colour definitions
3 # in records "S msg 7 0 0 1"
4 # $1=type $2=name $3=fore $4=back $5=hi $6=ul
5 BEGIN {FS=" ";print "colour curr;"}
6 /^\043/ {next}
7 /^%/ {printf "curr.fore=%d;curr.back=%d;curr.hi=%d;curr.ul=%d; c_%s[0]=curr;c_%s[1]=curr;\n", $3, $4, $5, $6, $2, $2}
8 /^S/ {printf "curr.fore=%d;curr.back=%d;curr.hi=%d;curr.ul=%d; c_%s[0]=curr;\n", $3, $4, $5, $6, $2}
9 /^R/ {printf "curr.fore=%d;curr.back=%d;curr.hi=%d;curr.ul=%d; c_%s[1]=curr;\n", $3, $4, $5, $6, $2}
10 /^!/ {printf "curr.fore=%d;curr.back=%d;curr.hi=%d;curr.ul=%d; c_%s=curr;\n", $3, $4, $5, $6, $2}
Something went wrong with that request. Please try again.