From: Eric Hodel Date: 2006-03-31T06:45:16+09:00 Subject: Re: unpack signed short in network (big-endian) byte order On Mar 30, 2006, at 1:38 PM, baumanj@gmail.com wrote: > Perhaps this should be a new subject like "adding formats for > pack/unpack". I gave this a bit of thought, and there are quite a few > formats that seem to be missing. I would naturally assume that there > should be support for each combination of > > {unsigned, signed} x {native, network, little-endian} x {short, int, > long} > > However, of these 18 formats, 8 are missing. There are more than > enough > unused characters to specify them (j J k K o O r R t T W y Y z). I > tried to come up with consistent mappings based on what already exists > and this is what I came up with (?s indicate that the format is not > currently supported): [...] > I'm thinking of submitting an RCR for this, Don't bother with an RCR, just submit a patch to ruby-core. > but before I go through the > effort of figuring out the c code to achieve it, I wanted some > opinions > as to whether this is worthwhile and whether the mappings are > sensible. What does perl or python do for the same types? -- Eric Hodel - drbrain@segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com