mktables: White space only
authorKarl Williamson <public@khwilliamson.com>
Tue, 4 Oct 2011 19:57:42 +0000 (13:57 -0600)
committerKarl Williamson <public@khwilliamson.com>
Tue, 8 Nov 2011 15:09:22 +0000 (08:09 -0700)
Removing the nesting if, and the fact that this code was just copied
from a place where it was nested deeper means that we can outdent.

lib/unicore/mktables

index a89be17..9f6781c 100644 (file)
@@ -13908,58 +13908,58 @@ sub make_Name_pm () {
 $HEADER
 $INTERNAL_ONLY
 END
-        my $pre_body = "";
+    my $pre_body = "";
 
-            # Convert these structures to output format.
-            my $code_points_ending_in_code_point =
-                main::simple_dumper(\@code_points_ending_in_code_point,
+    # Convert these structures to output format.
+    my $code_points_ending_in_code_point =
+        main::simple_dumper(\@code_points_ending_in_code_point,
+                            ' ' x 8);
+    my $names = main::simple_dumper(\%names_ending_in_code_point,
+                                    ' ' x 8);
+    my $loose_names = main::simple_dumper(\%loose_names_ending_in_code_point,
                                     ' ' x 8);
-            my $names = main::simple_dumper(\%names_ending_in_code_point,
-                                            ' ' x 8);
-            my $loose_names = main::simple_dumper(\%loose_names_ending_in_code_point,
-                                            ' ' x 8);
 
-            # Do the same with the Hangul names,
-            my $jamo;
-            my $jamo_l;
-            my $jamo_v;
-            my $jamo_t;
-            my $jamo_re;
-            if ($has_hangul_syllables) {
+    # Do the same with the Hangul names,
+    my $jamo;
+    my $jamo_l;
+    my $jamo_v;
+    my $jamo_t;
+    my $jamo_re;
+    if ($has_hangul_syllables) {
 
-                # Construct a regular expression of all the possible
-                # combinations of the Hangul syllables.
-                my @L_re;   # Leading consonants
-                for my $i ($LBase .. $LBase + $LCount - 1) {
-                    push @L_re, $Jamo{$i}
-                }
-                my @V_re;   # Middle vowels
-                for my $i ($VBase .. $VBase + $VCount - 1) {
-                    push @V_re, $Jamo{$i}
-                }
-                my @T_re;   # Trailing consonants
-                for my $i ($TBase + 1 .. $TBase + $TCount - 1) {
-                    push @T_re, $Jamo{$i}
-                }
+        # Construct a regular expression of all the possible
+        # combinations of the Hangul syllables.
+        my @L_re;   # Leading consonants
+        for my $i ($LBase .. $LBase + $LCount - 1) {
+            push @L_re, $Jamo{$i}
+        }
+        my @V_re;   # Middle vowels
+        for my $i ($VBase .. $VBase + $VCount - 1) {
+            push @V_re, $Jamo{$i}
+        }
+        my @T_re;   # Trailing consonants
+        for my $i ($TBase + 1 .. $TBase + $TCount - 1) {
+            push @T_re, $Jamo{$i}
+        }
 
-                # The whole re is made up of the L V T combination.
-                $jamo_re = '('
-                            . join ('|', sort @L_re)
-                            . ')('
-                            . join ('|', sort @V_re)
-                            . ')('
-                            . join ('|', sort @T_re)
-                            . ')?';
+        # The whole re is made up of the L V T combination.
+        $jamo_re = '('
+                    . join ('|', sort @L_re)
+                    . ')('
+                    . join ('|', sort @V_re)
+                    . ')('
+                    . join ('|', sort @T_re)
+                    . ')?';
 
-                # These hashes needed by the algorithm were generated
-                # during reading of the Jamo.txt file
-                $jamo = main::simple_dumper(\%Jamo, ' ' x 8);
-                $jamo_l = main::simple_dumper(\%Jamo_L, ' ' x 8);
-                $jamo_v = main::simple_dumper(\%Jamo_V, ' ' x 8);
-                $jamo_t = main::simple_dumper(\%Jamo_T, ' ' x 8);
-            }
+        # These hashes needed by the algorithm were generated
+        # during reading of the Jamo.txt file
+        $jamo = main::simple_dumper(\%Jamo, ' ' x 8);
+        $jamo_l = main::simple_dumper(\%Jamo_L, ' ' x 8);
+        $jamo_v = main::simple_dumper(\%Jamo_V, ' ' x 8);
+        $jamo_t = main::simple_dumper(\%Jamo_T, ' ' x 8);
+    }
 
-            $pre_body .= <<END;
+    $pre_body .= <<END;
 
 # To achieve significant memory savings when this file is read in,
 # algorithmically derivable code points are omitted from the main body below.
@@ -13995,10 +13995,10 @@ $loose_names
 $code_points_ending_in_code_point
     );
 END
-            # Earlier releases didn't have Jamos.  No sense outputting
-            # them unless will be used.
-            if ($has_hangul_syllables) {
-                $pre_body .= <<END;
+    # Earlier releases didn't have Jamos.  No sense outputting
+    # them unless will be used.
+    if ($has_hangul_syllables) {
+        $pre_body .= <<END;
 
     # Convert from code point to Jamo short name for use in composing Hangul
     # syllable names
@@ -14040,9 +14040,9 @@ $jamo_t
     my \$TCount = $TCount;
     my \$NCount = \$VCount * \$TCount;
 END
-            } # End of has Jamos
+    } # End of has Jamos
 
-            $pre_body .= << 'END';
+    $pre_body .= << 'END';
 
     sub name_to_code_point_special {
         my ($name, $loose) = @_;
@@ -14052,8 +14052,8 @@ END
         # $loose is non-zero if to use loose matching, 'name' in that case
         # must be input as upper case with all blanks and dashes squeezed out.
 END
-            if ($has_hangul_syllables) {
-                $pre_body .= << 'END';
+    if ($has_hangul_syllables) {
+        $pre_body .= << 'END';
 
         if ((! $loose && $name =~ s/$HANGUL_SYLLABLE//)
             || ($loose && $name =~ s/$loose_HANGUL_SYLLABLE//))
@@ -14065,8 +14065,8 @@ END
             return ($L * $VCount + $V) * $TCount + $T + $SBase;
         }
 END
-            }
-            $pre_body .= << 'END';
+    }
+    $pre_body .= << 'END';
 
         # Name must end in 'code_point' for this to handle.
         return if (($loose && $name !~ /^ (.*?) ($run_on_code_point_re) $/x)
@@ -14108,8 +14108,8 @@ END
         # Returns the name of a code point if algorithmically determinable;
         # undef if not
 END
-            if ($has_hangul_syllables) {
-                $pre_body .= << 'END';
+    if ($has_hangul_syllables) {
+        $pre_body .= << 'END';
 
         # If in the Hangul range, calculate the name based on Unicode's
         # algorithm
@@ -14124,8 +14124,8 @@ END
             return $name;
         }
 END
-            }
-            $pre_body .= << 'END';
+    }
+    $pre_body .= << 'END';
 
         # Look through list of these code points for one in range.
         foreach my $hash (@code_points_ending_in_code_point) {