3 # Re-align the columns in insns.dat, and enforce case conventions
6 @cols = (0, 16, 48, 96);
8 while ($line = <STDIN
>) {
10 if ($line !~ /^\s*(\;.*|)$/) {
11 ($ln = $line) =~ s/\s+$//;
12 if ($line =~ /^\s*(\S+)\s+(\S+)\s+(\S+|\[.*\])\s+(\S+)\s*$/) {
13 @fields = ($1, $2, $3, $4);
14 $fields[0] = "\U$fields[0]" unless ($fields[0] =~ /^[^a-z]+cc$/);
15 $fields[3] =~ s/\,+$//;
16 $fields[3] = "\U$fields[3]" unless ($fields[3] eq 'ignore');
19 for ($i = 0; $i < scalar(@fields); $i++) {
20 if ($i > 0 && $c >= $cols[$i]) {
24 while ($c < $cols[$i]) {
29 for ($j = 0; $j < length($fields[$i]); $j++) {
30 if (substr($fields[$i], $j, 1) eq "\t") {