Subject: Re: Converting to little endian
To: Alan Barrett <apb@iafrica.com>
From: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
List: tech-kern
Date: 12/31/1998 12:53:18
On Thu, 31 Dec 1998, Alan Barrett wrote:
> But what should "foo" be? I suggest using "v", following the precedent
> set by Perl's "pack" and "unpack" functions. So we get vtoh{l,s} and
> htov{l,s} as functions to convert between native host byte order ("h")
> and little-endian byte order ("v").
Um, 'v'? How about 'b'(ig) or 'l'(ittle) instead:
btoh{l,s} -> bit endian to host
ltoh{l,s} -> little endian to host
htob{l,s} -> host to big endian
htol{l,s} -> host to little endian
Maybe 'le' and 'be' instead of 'l' and 'b':
betoh{l,s}, letoh{l,s}, htobe{l,s}, htole{l,s}.
- Hubert
--
Hubert Feyrer <hubert.feyrer@rz.uni-regensburg.de>