Switch to unified view

a/unac/builder.in b/unac/builder.in
...
...
91
        $decomposition{$code_value} = $2;
91
        $decomposition{$code_value} = $2;
92
        }
92
        }
93
    }
93
    }
94
    if($general_category =~ /^M/) {
94
    if($general_category =~ /^M/) {
95
        $mark{$code_value} = 1;
95
        $mark{$code_value} = 1;
96
            # For mark caracters, we generate a 0 entry in the
97
            # decomposition table. This signals to the c code that no
98
            # output should be generated. Slightly hacky but ok. The
99
            # original code left mark character go through (generating
100
            # still accented output if the input was in decomposed
101
            # form). Decomposed text is rare, but, for example, macosx file
102
            # names have separate combining accent characters.
103
      $decomposition{$code_value} = "0000";
96
    }
104
    }
97
    $name{$code_value} = $character_name;
105
    $name{$code_value} = $character_name;
98
    }
106
    }
99
    close(FILE);
107
    close(FILE);
100
    
108
    
...
...
112
        my($code_value) = shift(@code_values);
120
        my($code_value) = shift(@code_values);
113
        if (hex $code_value > 0xffff) {
121
        if (hex $code_value > 0xffff) {
114
        undef @decomposition;
122
        undef @decomposition;
115
        last;
123
        last;
116
        }
124
        }
125
            # marks also have entries in the decomposition table (so that 
126
            # they can be suppressed when found in input), but no output
127
            # component should be generated for them.
128
            if (!exists($mark{$code_value})) {
117
      if(exists($decomposition{$code_value})) {
129
                if(exists($decomposition{$code_value})) {
118
      push(@code_values, split(' ', $decomposition{$code_value}));
130
                    push(@code_values, split(' ', $decomposition{$code_value}));
119
      } elsif (!exists($mark{$code_value})) {
131
                } else {
120
      push(@decomposition, $code_value);
132
                    push(@decomposition, $code_value);
121
      }
133
                }
134
            }
122
    }
135
    }
123
    if(@decomposition) {
136
    if(@decomposition) {
124
        $decomposition{$from} = "@decomposition";
137
        $decomposition{$from} = "@decomposition";
125
    } else {
138
    } else {
126
        delete($decomposition{$from});
139
        delete($decomposition{$from});