80 |
# this might be our local scpeciality -- fields 10 and 11 |
# this might be our local scpeciality -- fields 10 and 11 |
81 |
# (as opposed to 010 and 011) so they are strictly listed |
# (as opposed to 010 and 011) so they are strictly listed |
82 |
# here |
# here |
83 |
} elsif ($f =~ s/^(1[01])//) { |
} elsif ($f =~ s/^(1[01]\w?)//) { |
84 |
push @fmt,$1; |
push @fmt,$1; |
85 |
push @fmt,undef; |
push @fmt,undef; |
86 |
} elsif ($f =~ s/^mfn//i) { |
} elsif ($f =~ s/^mfn//i) { |
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 = ""; |
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 "display: $display swish: $swish\n"; |
print STDERR "format: [",join("|",@{$tmp}),"]\n" if (@fmt); |
157 |
|
|
158 |
|
# print STDERR "format: {",$format || '',"} display: {",$display || '',"} swish: {",$swish || '',"}\n"; |
159 |
|
|
160 |
return ($swish,$display); |
return ($swish,$display); |
161 |
} |
} |