projects
/
xmlrpc-c
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
initial load of upstream version 1.06.32
[xmlrpc-c]
/
tools
/
binmode-rpc-kit
/
oct2bin
1
#!/usr/bin/perl
2
# Turn C-style octal escapes into binary.
3
# Call as "echo -n 'ab\0\001cd' | oct2bin > out.binmode".
4
5
binmode STDOUT;
6
7
while (<>) {
8
s/\\(\d\d\d)/chr(oct($1))/ge;
9
s/\\0/chr(0)/ge;
10
s/\\\\/\\/g;
11
print $_;
12
}