[svn:parrot] r45982 - trunk/tools/util
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Sat Apr 24 11:55:14 UTC 2010
Author: NotFound
Date: Sat Apr 24 11:55:13 2010
New Revision: 45982
URL: https://trac.parrot.org/parrot/changeset/45982
Log:
multiple keys in parrot_config, TT #626
Modified:
trunk/tools/util/parrot-config.pir
Modified: trunk/tools/util/parrot-config.pir
==============================================================================
--- trunk/tools/util/parrot-config.pir Sat Apr 24 08:46:27 2010 (r45981)
+++ trunk/tools/util/parrot-config.pir Sat Apr 24 11:55:13 2010 (r45982)
@@ -46,18 +46,32 @@
if key == '--help' goto usage
if key == '--dump' goto dump
$I0 = defined conf_hash[key]
- if $I0 goto ok2
- print " no such key: '"
- print key
- print "'\n"
- end
-ok2:
+ unless $I0 goto failkey
+ dec argc
+ if i < argc goto dumpsome
$S0 = conf_hash[key]
print $S0
inc i
if i < argc goto loop
print "\n"
end
+dumpsome:
+ key = argv[i]
+ $I0 = defined conf_hash[key]
+ unless $I0 goto failkey
+ print key
+ print " => '"
+ $S1 = conf_hash[key]
+ print $S1
+ say "'"
+ inc i
+ if i <= argc goto dumpsome
+ end
+failkey:
+ print " no such key: '"
+ print key
+ print "'\n"
+ end
dump:
.local pmc iterator
iterator = iter conf_hash
More information about the parrot-commits
mailing list