| OLD | NEW |
| 1 #!/usr/bin/tclsh | 1 #!/usr/bin/tclsh |
| 2 # | 2 # |
| 3 # This script is used to generate the array of strings and the enum | 3 # This script is used to generate the array of strings and the enum |
| 4 # that appear at the beginning of the C code implementation of a | 4 # that appear at the beginning of the C code implementation of a |
| 5 # a TCL command and that define the available subcommands for that | 5 # a TCL command and that define the available subcommands for that |
| 6 # TCL command. | 6 # TCL command. |
| 7 | 7 |
| 8 set prefix {} | 8 set prefix {} |
| 9 while {![eof stdin]} { | 9 while {![eof stdin]} { |
| 10 set line [gets stdin] | 10 set line [gets stdin] |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 put_item 0 | 42 put_item 0 |
| 43 finalize | 43 finalize |
| 44 puts " \175;" | 44 puts " \175;" |
| 45 puts " enum ${prefix}_enum \173" | 45 puts " enum ${prefix}_enum \173" |
| 46 foreach name [lsort $namelist] { | 46 foreach name [lsort $namelist] { |
| 47 regsub -all {@} $name {} name | 47 regsub -all {@} $name {} name |
| 48 put_item ${prefix}_[string toupper $name], | 48 put_item ${prefix}_[string toupper $name], |
| 49 } | 49 } |
| 50 finalize | 50 finalize |
| 51 puts " \175;" | 51 puts " \175;" |
| OLD | NEW |