From: Ian Jackson Date: Tue, 25 Jan 2011 15:05:42 +0000 (+0000) Subject: canon: lift commod numbering base62 out of findcommod X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.main.git;a=commitdiff_plain;h=a2e3c5babc4e095d682539c22acd98c728fa9e0d canon: lift commod numbering base62 out of findcommod --- 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])) {