xref: /plan9/sys/src/ape/lib/bsd/nptohl.c (revision 219b2ee8daee37f4aad58d63f21287faa8e4ffdc)
1 unsigned long
nptohl(void * p)2 nptohl(void *p)
3 {
4 	unsigned char *up;
5 	unsigned long x;
6 
7 	up = p;
8 	x = (up[0]<<24)|(up[1]<<16)|(up[2]<<8)|up[3];
9 	return x;
10 }
11