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 = ""; |
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 |
} |
} |
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); |