File:  [MW Coherent from dump] / coherent / d / usr / src / examples / byteordering.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:38 2019 UTC (7 years, 2 months ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent

main()
{
	union
	{
		char b[4];
		int i[2];
		long l;
	} u;
	u.l = 0x12345678L;

	printf("%x %x %x %x\n",
		u.b[0], u.b[1], u.b[2], u.b[3]);
	printf("%x %x\n", u.i[0], u.i[1]);
	printf("%lx\n", u.l);
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.