--- trunk/parse_format.pm 2003/11/23 17:33:59 175 +++ trunk/parse_format.pm 2003/11/24 01:16:04 176 @@ -87,11 +87,24 @@ push @fmt,'mfn'; push @fmt,''; } elsif ($f =~ s/^([^\d]+)(\d{0,3})/$2/) { - push @fmt,$1; + # still prefix? + if ($#fmt == 0) { + $fmt[0] .= $1; + } else { + push @fmt,$1; + } } elsif ($f =~ s/^([^\d]+\d{0,2})//) { - push @fmt,$1; + if ($#fmt == 0) { + $fmt[0] .= $1; + } else { + push @fmt,$1; + } } elsif ($f =~ s/^(\d{1,2})//) { - push @fmt,$1; + if ($#fmt == 0) { + $fmt[0] .= $1; + } else { + push @fmt,$1; + } } else { print STDERR "unparsed format: $f\n"; $f = ""; @@ -100,7 +113,7 @@ push @fmt,'' if ($#fmt % 3 != 0); # add empty suffix $cache->{format}->{$format} = \@fmt; -# print STDERR "storing format for '$format': [",join("|",@fmt),"]\n"; + print STDERR "storing format for '$format': [",join("|",@fmt),"]\n"; # print STDERR "storing format for '$format':",Dumper(@fmt),"\n"; # print STDERR Dumper($cache->{format}->{$format}); } @@ -140,6 +153,8 @@ $display = $prefix.$display.$sufix if ($display); print STDERR "format left unused: [",join("|",@fmt),"]\n" if (@fmt); + print STDERR "format: [",join("|",@{$tmp}),"]\n" if (@fmt); + # print STDERR "display: $display swish: $swish\n"; return ($swish,$display);