Cleaned up headers and copyright text.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
/* Derived from "Unix Incompatibility Notes: Byte Order" by Jan Wolter */
|
||||
/* http://unixpapa.com/incnote/byteorder.html */
|
||||
|
||||
/* Big-Endian systems save the most significant byte first. */
|
||||
/* Sun and Motorola processors, IBM-370s and PDP-10s are big-endian. */
|
||||
/* "Network Byte Order" is also know as "Big-Endian Byte Order" */
|
||||
@@ -15,6 +18,19 @@
|
||||
/* x[2] = 0x03 */
|
||||
/* x[3] = 0x04 */
|
||||
|
||||
/* Note: Endianness doesn't apply to all variable manipulation.
|
||||
If you use bitwise or bitshift operations on integers,
|
||||
you can avoid having to check for endianness. */
|
||||
|
||||
/* The names are derived from Jonathon Swift's book Gulliver's Travels,
|
||||
where they describe Lilliputian political parties who disagree
|
||||
vehemently over which end to start eating an egg from.
|
||||
This terminology was popularized for byte order by a less than
|
||||
completely serious paper authored by Danny Cohen which appeared
|
||||
on April 1, 1980 and was entitled "On Holy Wars and a Plea for Peace" */
|
||||
|
||||
/* function to return true on Big-Endian architectures */
|
||||
/* (based on Harbison & Steele) */
|
||||
int big_endian(
|
||||
void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user