X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/3a732227d8d63271b7171482ce36218d04f586cc..HEAD:/utils/split-pieces diff --git a/utils/split-pieces b/utils/split-pieces index a5b62945..0bffd500 100755 --- a/utils/split-pieces +++ b/utils/split-pieces @@ -69,13 +69,19 @@ class SignedQfConvert (BaseQfConvert): SIGNEDP = True def fmt(me, n): return str(n) +class UnsignedQfConvert (BaseQfConvert): + SIGNEDP = False + def fmt(me, n): return '0x%x' % n + R_split = RX.compile(r',\s*|\s+') def spliteval(arg): return map(eval, R_split.split(arg.strip())) convmap = { 'scaf': ScafConvert, 'unscaf': ScafConvert, 'qf': SignedQfConvert, - 'unqf': SignedQfConvert } + 'unqf': SignedQfConvert, + 'uqf': UnsignedQfConvert, + 'unuqf': UnsignedQfConvert } op = getarg() cvt = convmap[op].parse() if op.startswith('un'): prepare, conv, format = spliteval, cvt.unhack, str