/[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 175 by dpavlin, Sun Nov 23 15:42:16 2003 UTC revision 176 by dpavlin, Mon Nov 24 01:16:04 2003 UTC
# Line 87  sub parse_iso_format { Line 87  sub parse_iso_format {
87                                  push @fmt,'mfn';                                  push @fmt,'mfn';
88                                  push @fmt,'';                                  push @fmt,'';
89                          } elsif ($f =~ s/^([^\d]+)(\d{0,3})/$2/) {                          } elsif ($f =~ s/^([^\d]+)(\d{0,3})/$2/) {
90                                  push @fmt,$1;                                  # still prefix?
91                                    if ($#fmt == 0) {
92                                            $fmt[0] .= $1;
93                                    } else {
94                                            push @fmt,$1;
95                                    }
96                          } elsif ($f =~ s/^([^\d]+\d{0,2})//) {                          } elsif ($f =~ s/^([^\d]+\d{0,2})//) {
97                                  push @fmt,$1;                                  if ($#fmt == 0) {
98                                            $fmt[0] .= $1;
99                                    } else {
100                                            push @fmt,$1;
101                                    }
102                          } elsif ($f =~ s/^(\d{1,2})//) {                          } elsif ($f =~ s/^(\d{1,2})//) {
103                                  push @fmt,$1;                                  if ($#fmt == 0) {
104                                            $fmt[0] .= $1;
105                                    } else {
106                                            push @fmt,$1;
107                                    }
108                          } else {                          } else {
109                                  print STDERR "unparsed format: $f\n";                                  print STDERR "unparsed format: $f\n";
110                                  $f = "";                                  $f = "";
# Line 100  sub parse_iso_format { Line 113  sub parse_iso_format {
113                  push @fmt,'' if ($#fmt % 3 != 0);       # add empty suffix                  push @fmt,'' if ($#fmt % 3 != 0);       # add empty suffix
114                  $cache->{format}->{$format} = \@fmt;                  $cache->{format}->{$format} = \@fmt;
115                                    
116  #               print STDERR "storing format for '$format': [",join("|",@fmt),"]\n";                  print STDERR "storing format for '$format': [",join("|",@fmt),"]\n";
117  #               print STDERR "storing format for '$format':",Dumper(@fmt),"\n";  #               print STDERR "storing format for '$format':",Dumper(@fmt),"\n";
118  #               print STDERR Dumper($cache->{format}->{$format});  #               print STDERR Dumper($cache->{format}->{$format});
119          }          }
# Line 140  sub parse_iso_format { Line 153  sub parse_iso_format {
153          $display = $prefix.$display.$sufix if ($display);          $display = $prefix.$display.$sufix if ($display);
154          print STDERR "format left unused: [",join("|",@fmt),"]\n" if (@fmt);          print STDERR "format left unused: [",join("|",@fmt),"]\n" if (@fmt);
155    
156            print STDERR "format: [",join("|",@{$tmp}),"]\n" if (@fmt);
157    
158  #       print STDERR "display: $display swish: $swish\n";  #       print STDERR "display: $display swish: $swish\n";
159    
160          return ($swish,$display);          return ($swish,$display);

Legend:
Removed from v.175  
changed lines
  Added in v.176

  ViewVC Help
Powered by ViewVC 1.1.26