1 set f [open enums2tcl.c w]
2 puts $f "#include \"../ccore/ccapi.h\""
3 puts $f "#include \"../ccore/ccrdscb.h\""
4 puts $f "#include <stdio.h>"
5 puts $f "int main (void) {"
6 set inc [open ../ccore/ccapi.h r]
7 while {[gets $inc line] >= 0} {
8 if [regexp {\bcc_rc_\w+} $line code] {
9 puts $f "printf(\"set $code %d\\n\", $code);"
13 set inc [open ../ccore/ccrdscb.h r]
14 while {[gets $inc line] >= 0} {
15 if [regexp {\bcc_rds_cb_(rc|op|stage)_\w+} $line code] {
16 puts $f "printf(\"set $code %d\\n\", $code);"