2007-02-25 12:46:11 +00:00
|
|
|
#!/bin/sh
|
1987-11-12 12:26:36 +00:00
|
|
|
echo "/* this part is generated from $1 at: " `date` "*/"
|
1995-08-14 15:09:59 +00:00
|
|
|
ed -s $1 <<'EOI'
|
1987-01-06 13:42:33 +00:00
|
|
|
1,/^$/d
|
|
|
|
1,/^$/d
|
|
|
|
1,$s/^\(...\) \(.\).*/\1:\2/
|
1987-11-12 12:26:36 +00:00
|
|
|
g/:d/s/^\(...\):\(.\).*/#define C_\1(c) CC_opcst(op_\1, c)/
|
|
|
|
g/:[cslnfzor]/s/^\(...\):\(.\).*/#define C_\1(c) CC_opcst(op_\1, c)/
|
|
|
|
g/:w/s/^\(...\).*/#define C_\1(w) CC_opcst(op_\1, w)\
|
|
|
|
#define C_\1_narg() CC_opnarg(op_\1)/
|
|
|
|
g/:g/s/^\(...\).*/#define C_\1(g) CC_opcst(op_\1, g)\
|
|
|
|
#define C_\1_dnam(g, o) CC_opdnam(op_\1, g, o)\
|
|
|
|
#define C_\1_dlb(g, o) CC_opdlb(op_\1, g, o)/
|
|
|
|
g/:p/s/^\(...\).*/#define C_\1(p) CC_oppnam(op_\1, p)/
|
|
|
|
g/:b/s/^\(...\).*/#define C_\1(b) CC_opilb(op_\1, b)/
|
|
|
|
g/:-/s/^\(...\).*/#define C_\1() CC_op(op_\1)/
|
1987-01-06 13:42:33 +00:00
|
|
|
1,$p
|
|
|
|
EOI
|