From: Tim Abbott Date: Sun, 9 May 2010 18:44:31 +0000 (+0000) Subject: Add the decode file itself to version control. X-Git-Tag: 4.12~5 X-Git-Url: http://andersk.mit.edu/gitweb/config-package-dev.git/commitdiff_plain/6df6dbb590c148ebb47f634f716d88ee834a1b77 Add the decode file itself to version control. git-svn-id: svn+ssh://svn.mit.edu/athena/trunk/debathena/debathena/config-package-dev@24647 728af825-273c-0410-89f9-f7d3b574a069 --- diff --git a/decode b/decode new file mode 100644 index 0000000..73a216a --- /dev/null +++ b/decode @@ -0,0 +1,11 @@ +#!/usr/bin/perl +$ARGV[0] =~ s/\+([^+]*)\+/unparse($1)/eg; +print $ARGV[0]; +sub unparse { + $_ = $_[0]; + return "/" unless $_; + return "_" if $_ eq "-"; + return uc($_) if /^[a-z]$/; + s/^x//; + return chr hex $_; +}