/[webpac]/trunk/parse_format.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/parse_format.pm

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

revision 67 by dpavlin, Fri Jul 4 23:29:27 2003 UTC revision 105 by dpavlin, Mon Jul 14 17:08:37 2003 UTC
# Line 46  sub parse_iso_format { Line 46  sub parse_iso_format {
46          my $swish;          my $swish;
47    
48          sub cnv_cp {          sub cnv_cp {
49                  my $tmp = shift;                  my $codepage = shift;
50                    my $tmp = shift || return;
51                  if ($codepage) {                  if ($codepage) {
52                          $tmp = $codepage->convert($tmp) || print STDERR "$1$2 = '$tmp' can't convert";                          $tmp = $codepage->convert($tmp) || print STDERR "iso: '$tmp' can't convert\n";
53                  }                  }
54                  return $tmp;                  return $tmp;
55          }          }
# Line 58  sub parse_iso_format { Line 59  sub parse_iso_format {
59                  # this is EBSCO special to support numeric subfield in                  # this is EBSCO special to support numeric subfield in
60                  # form of 856#3                  # form of 856#3
61                  if ($format =~ s/^(\d\d\d)#*(\w?)//) {                  if ($format =~ s/^(\d\d\d)#*(\w?)//) {
62                          my $tmp = get_sf($row,$1,$2,$i);                          my $tmp = cnv_cp($codepage,&$func($row,$1,$2,$i));
63                          if ($tmp) {                          if ($tmp) {
64                                  $display .= $prefix.cnv_cp($tmp);                                  $display .= $prefix.$tmp;
65                                  $swish .= $tmp." ";                                  $swish .= $tmp." ";
66  #print STDERR " == $tmp";  #print STDERR " == $tmp";
67                          }                          }
# Line 69  sub parse_iso_format { Line 70  sub parse_iso_format {
70                  # (as opposed to 010 and 011) so they are strictly listed                  # (as opposed to 010 and 011) so they are strictly listed
71                  # here                  # here
72                  } elsif ($format =~ s/^(1[01])//) {                  } elsif ($format =~ s/^(1[01])//) {
73                          my $tmp = get_sf($row,$1,undef,$i);                          my $tmp = cnv_cp($codepage,&$func($row,$1,undef,$i));
74                          if ($tmp) {                          if ($tmp) {
75                                  $display .= $prefix.cnv_cp($tmp);                                  $display .= $prefix.$tmp;
76                                  $swish .= $tmp." ";                                  $swish .= $tmp." ";
77                          }                          }
78                          $prefix = "";                          $prefix = "";
# Line 104  sub parse_excel_format { Line 105  sub parse_excel_format {
105          my $i = shift;          my $i = shift;
106          my $codepage = shift;          my $codepage = shift;
107    
108            return if ($i > 0);     # Excel doesn't support repeatable fields
109    
110          my $out;          my $out;
111          my $out_swish;          my $out_swish;
112    
# Line 152  sub parse_feed_format { Line 155  sub parse_feed_format {
155          my $i = shift;          my $i = shift;
156          my $codepage = shift;          my $codepage = shift;
157    
158            # XXX feed doesn't support repeatable fields, but they really
159            # should, This is a bug. It should be fixed!
160            return if ($i > 0);
161    
162          my $out;          my $out;
163          my $out_swish;          my $out_swish;
164    

Legend:
Removed from v.67  
changed lines
  Added in v.105

  ViewVC Help
Powered by ViewVC 1.1.26