From 6df6dbb590c148ebb47f634f716d88ee834a1b77 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Sun, 9 May 2010 18:44:31 +0000 Subject: [PATCH] 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 --- decode | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 decode 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 $_; +} -- 2.45.0