chiark
/
gitweb
/
~mdw
/
autoys
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
gremlin/gremlin.in: Use `locale.getpreferredencoding'.
[autoys]
/
flaccrip
/
flaccrip-decode
1
#! /usr/bin/python
2
3
from struct import unpack
4
from sys import stdin
5
6
p = 0
7
while True:
8
h = stdin.read(13)
9
if h == '':
10
break
11
ntr, da, db, cid = unpack('<B3I', h)
12
print 'H %d %d %08x %08x %08x' % (p, ntr, da, db, cid)
13
p += 1
14
for i in xrange(ntr):
15
conf, ck, hunoz = unpack('<B2I', stdin.read(9))
16
print 'T %d %d %08x' % (i + 1, conf, ck)