/[webpac2]/trunk/lib/WebPAC/Normalize.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/lib/WebPAC/Normalize.pm

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

revision 816 by dpavlin, Mon Apr 2 17:20:01 2007 UTC revision 817 by dpavlin, Thu Apr 5 21:50:14 2007 UTC
# Line 542  sub marc_fixed { Line 542  sub marc_fixed {
542                          my $old = $_->[1];                          my $old = $_->[1];
543                          if (length($old) < $pos) {                          if (length($old) < $pos) {
544                                  $_->[1] .= ' ' x ( $pos - length($old) ) . $val;                                  $_->[1] .= ' ' x ( $pos - length($old) ) . $val;
545                                  warn "## marc_fixed($f,$pos,'$val') append '$old' -> '$_->[1]'\n";                                  warn "## marc_fixed($f,$pos,'$val') append '$old' -> '$_->[1]'\n" if ($debug > 1);
546                          } else {                          } else {
547                                  $_->[1] = substr($old, 0, $pos) . $val . substr($old, $pos + length($val));                                  $_->[1] = substr($old, 0, $pos) . $val . substr($old, $pos + length($val));
548                                  warn "## marc_fixed($f,$pos,'$val') update '$old' -> '$_->[1]'\n";                                  warn "## marc_fixed($f,$pos,'$val') update '$old' -> '$_->[1]'\n" if ($debug > 1);
549                          }                          }
550                          $update++;                          $update++;
551                  }                  }
# Line 554  sub marc_fixed { Line 554  sub marc_fixed {
554          if (! $update) {          if (! $update) {
555                  my $v = ' ' x $pos . $val;                  my $v = ' ' x $pos . $val;
556                  push @{ $marc_record->[ $marc_record_offset ] }, [ $f, $v ];                  push @{ $marc_record->[ $marc_record_offset ] }, [ $f, $v ];
557                  warn "## marc_fixed($f,$pos,'val') created '$v'\n";                  warn "## marc_fixed($f,$pos,'val') created '$v'\n" if ($debug > 1);
558          }          }
559  }  }
560    

Legend:
Removed from v.816  
changed lines
  Added in v.817

  ViewVC Help
Powered by ViewVC 1.1.26