Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: mjr@hussar.dco.dec.com (Marcus J. OpenRanum)
Subject: Re: Byte swapping between DECs & Suns
Date: Mon, 2 Mar 1992 02:25:46 GMT	[thread overview]
Message-ID: <1992Mar2.022546.25610@decuac.dec.com> (raw)
In-Reply-To: 1992Mar2.020300.26694@syd.dms.CSIRO.AU

chriss@dmssyd.syd.dms.CSIRO.AU (Chris Skelsey) writes:
>
>we are trying 
>to locate a public domain utility/function to swap bytes for various data 
>types (since the byte ordering of Suns & DECs is different). 

	Take a look at the man pages for htons() and htonl(), ntohl() and
ntohs() - they're a starting point, though they have the disadvantage of
converting everything to big-endian, so the little-endian machines take
an unfair hit.

	That's what you get for going against the tide and using those
big-endian machines. :)

mjr.
-- 
Oxymorons:
	Jumbo shrimp. Informed Consumer. 1Mb "Microkernel". Open UNIX(tm)*.
					- notebooks of a heretic.
*(UNIX is a Registered trademark of Unix Systems Labs)


      reply	other threads:[~1992-03-02  2:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-03-02  2:03 Byte swapping between DECs & Suns Chris Skelsey
1992-03-02  2:25 ` Marcus J. OpenRanum [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox