/[jsFind]/trunk/jsFind.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/jsFind.pm

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

revision 35 by dpavlin, Sun Oct 24 11:13:22 2004 UTC revision 36 by dpavlin, Sat Oct 30 20:50:39 2004 UTC
# Line 860  sub to_xml { Line 860  sub to_xml {
860          return $d;          return $d;
861  }  }
862    
863  =head2 base62  =head2 base_x
864    
865  Convert number to base62 (used for jsFind index filenames).  Convert number to base x (used for jsFind index filenames).
866    
867   my $n = $tree->base62(50);   my $n = $tree->base_x(50);
868    
869  =cut  =cut
870    
871  sub base62 {  sub base_x {
872          my $self = shift;          my $self = shift;
873    
874          my $value = shift;          my $value = shift;
# Line 878  sub base62 { Line 878  sub base62 {
878          my @digits = qw(          my @digits = qw(
879                  0 1 2 3 4 5 6 7 8 9                  0 1 2 3 4 5 6 7 8 9
880                  a b c d e f g h i j k l m n o p q r s t u v w x y z                  a b c d e f g h i j k l m n o p q r s t u v w x y z
                 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z  
881          );          );
882    
883          my $base = scalar(@digits);          my $base = scalar(@digits);
# Line 920  sub to_jsfind { Line 919  sub to_jsfind {
919          confess("path is undefined.") unless ($path);          confess("path is undefined.") unless ($path);
920          confess("file is undefined. Did you call \$t->root->to_jsfind(..) instead of \$t->to_jsfind(..) ?") unless (defined($file));          confess("file is undefined. Did you call \$t->root->to_jsfind(..) instead of \$t->to_jsfind(..) ?") unless (defined($file));
921    
922          $file = $self->base62($file);          $file = $self->base_x($file);
923    
924          my $nr_keys = 0;          my $nr_keys = 0;
925    

Legend:
Removed from v.35  
changed lines
  Added in v.36

  ViewVC Help
Powered by ViewVC 1.1.26