/[pcre]/code/trunk/maint/Builducptable
ViewVC logotype

Diff of /code/trunk/maint/Builducptable

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 276 by ph10, Fri Mar 9 10:15:12 2007 UTC revision 277 by ph10, Mon Nov 26 17:03:45 2007 UTC
# Line 8  Line 8 
8  # The script is rather slow because it just searches linearly through the  # The script is rather slow because it just searches linearly through the
9  # Scripts data in order to find the script for each character or character  # Scripts data in order to find the script for each character or character
10  # range. It could be made faster by sorting that data, or something, but hey,  # range. It could be made faster by sorting that data, or something, but hey,
11  # it is only ever run once in a blue moon.  # it is only ever run once in a blue moon. (It's even slower after I mended the
12    # "forgot to check for script number before amalgamation" bug, but even so,
13    # the effort of improving it isn't worth it.)
14    
15  # Subroutine: Given a character number, return the script number. The  # Subroutine: Given a character number, return the script number. The
16  # Scripts.txt file has been read into an array, keeping just the codepoints  # Scripts.txt file has been read into an array, keeping just the codepoints
# Line 164  while (<IN>) Line 166  while (<IN>)
166        }        }
167    
168      else      else
169        {        {
170          my($startscript) = script($cp);
171        my($ncp) = $cp + 1;        my($ncp) = $cp + 1;
172        while (<IN>)        while (<IN>)
173          {          {
# Line 172  while (<IN>) Line 175  while (<IN>)
175          last if (hex($fields[0]) != $ncp ||          last if (hex($fields[0]) != $ncp ||
176                   $fields[2]  ne $gc  ||                   $fields[2]  ne $gc  ||
177                   $fields[12] ne ""  ||                   $fields[12] ne ""  ||
178                   $fields[13] ne "");                   $fields[13] ne ""  ||
179                     script($ncp) != $startscript);
180    
181          $ncp++;          $ncp++;
182          }          }

Legend:
Removed from v.276  
changed lines
  Added in v.277

  ViewVC Help
Powered by ViewVC 1.1.5