aboutsummaryrefslogtreecommitdiff
path: root/unix/os/net/ntohs.c
blob: 02a956a6fede751a9ae01161f7b1c868e541379f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
 */

/* NTOHS -- [MACHDEP] Convert a short integer in net format to host format.
 */
ntohs (word)
short	word;
{
	register char *wp;
	static	short w;

	w = word;
	wp = (char *)&w;

	return ((wp[0] << 8) | wp[1]);
}