endian_check.cpp File Reference

This pretty simple file checks if the system is LITTLE_ENDIAN or BIG_ENDIAN it does that by putting a 1 and a 0 in an array, and read it out as one number. More...

#include <stdio.h>
#include <string.h>

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 Main call of the endian_check program.


Detailed Description

This pretty simple file checks if the system is LITTLE_ENDIAN or BIG_ENDIAN it does that by putting a 1 and a 0 in an array, and read it out as one number.

If it is 1, it is LITTLE_ENDIAN, if it is 256, it is BIG_ENDIAN

After that it outputs the contents of an include files (endian.h) that says or TTD_LITTLE_ENDIAN, or TTD_BIG_ENDIAN. Makefile takes care of the real writing to the file.

Definition in file endian_check.cpp.


Function Documentation

int main ( int  argc,
char *  argv[] 
)

Main call of the endian_check program.

Parameters:
argc argument count
argv arguments themselves
Returns:
exit code

Definition at line 21 of file endian_check.cpp.


Generated on Mon Sep 22 20:34:21 2008 for openttd by  doxygen 1.5.6