From a2e3c5babc4e095d682539c22acd98c728fa9e0d Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 25 Jan 2011 15:05:42 +0000 Subject: [PATCH] canon: lift commod numbering base62 out of findcommod --- yarrg/canon | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/yarrg/canon b/yarrg/canon index a9f9801..e756297 100755 --- a/yarrg/canon +++ b/yarrg/canon @@ -40,10 +40,9 @@ sub findcommod ($) { my ($cname) = @_; my $me= $commodmap{$cname}; return $me if defined $me; my $val= $nextcommod++; - my $res= alencodenum($val); - $commodmap{$cname}= $res; + $commodmap{$cname}= $val; # printf "%s:%s\n", $res,$cname; - return $res; + return $val; } my $laststall=''; @@ -61,7 +60,7 @@ foreach my $k (sort keys %s) { printf "\"%s\n", $stall; $laststall= $stall; } - print findcommod($commod); + print alencodenum(findcommod($commod)); }; if (!defined($r[2])) { -- 2.30.2